commit d5dd39566a1dc37a3bb758d692e2c9cd48b283a0
Author: Michal Schwob <michal.schwob@seznam.cz>
Date:   Thu Nov 16 13:25:40 2023 +0100

    FIX: rendering plan view fixed, plan view page added to navigation
    re #10873

diff --git a/package-lock.json b/package-lock.json
index f0310cf..23b0269 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -33,6 +33,7 @@
         "react-native-svg": "13.9.0",
         "react-native-tab-view": "^3.5.2",
         "react-native-vector-icons": "^9.2.0",
+        "react-native-xml2js": "^1.0.3",
         "react-redux": "^8.0.5",
         "redux": "^4.2.1",
         "redux-persist-transform-encrypt": "^5.0.0",
@@ -8717,6 +8718,11 @@
       "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.335.tgz",
       "integrity": "sha512-l/eowQqTnrq3gu+WSrdfkhfNHnPgYqlKAwxz7MTOj6mom19vpEDHNXl6dxDxyTiYuhemydprKr/HCrHfgk+OfQ=="
     },
+    "node_modules/emitter-component": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.1.tgz",
+      "integrity": "sha512-G+mpdiAySMuB7kesVRLuyvYRqDmshB7ReKEVuyBPkzQlmiDiLrt7hHHIy4Aff552bgknVN7B2/d3lzhGO5dvpQ=="
+    },
     "node_modules/emoji-regex": {
       "version": "8.0.0",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -8881,6 +8887,14 @@
         "node": ">=6"
       }
     },
+    "node_modules/events": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
+      "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==",
+      "engines": {
+        "node": ">=0.4.x"
+      }
+    },
     "node_modules/exec-async": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/exec-async/-/exec-async-2.2.0.tgz",
@@ -14242,6 +14256,41 @@
         "node": ">=10"
       }
     },
+    "node_modules/react-native-xml2js": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/react-native-xml2js/-/react-native-xml2js-1.0.3.tgz",
+      "integrity": "sha512-1GxaGgz1VN0LM8XzHEqkmcqCWs7xwMazt6AAhdyoVxBvtLqf1pfIPS4KhJ+ZR1hDVv5qX8imEXL4nAwiKy+UnQ==",
+      "dependencies": {
+        "buffer": "5.0.x",
+        "events": "1.1.x",
+        "sax": "0.6.x",
+        "stream": "0.0.x",
+        "timers": "0.1.x",
+        "xmlbuilder": "8.2.x"
+      }
+    },
+    "node_modules/react-native-xml2js/node_modules/buffer": {
+      "version": "5.0.8",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz",
+      "integrity": "sha512-xXvjQhVNz50v2nPeoOsNqWCLGfiv4ji/gXZM28jnVwdLJxH4mFyqgqCKfaK9zf1KUbG6zTkjLOy7ou+jSMarGA==",
+      "dependencies": {
+        "base64-js": "^1.0.2",
+        "ieee754": "^1.1.4"
+      }
+    },
+    "node_modules/react-native-xml2js/node_modules/sax": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz",
+      "integrity": "sha512-8ip+qnRh7m8OEyvoM1JoSBzlrepp3ajVR8nqgrfTig+TewfyvTijl0am8/anFqgbcdz62ofEUKE1hHNDCdbeSQ=="
+    },
+    "node_modules/react-native-xml2js/node_modules/xmlbuilder": {
+      "version": "8.2.2",
+      "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz",
+      "integrity": "sha512-eKRAFz04jghooy8muekqzo8uCSVNeyRedbuJrp0fovbLIi7wlsYtdUn3vBAAPq2Y3/0xMz2WMEUQ8yhVVO9Stw==",
+      "engines": {
+        "node": ">=4.0"
+      }
+    },
     "node_modules/react-native/node_modules/promise": {
       "version": "8.3.0",
       "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz",
@@ -15001,6 +15050,14 @@
         "node": ">= 0.6"
       }
     },
+    "node_modules/stream": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz",
+      "integrity": "sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g==",
+      "dependencies": {
+        "emitter-component": "^1.1.1"
+      }
+    },
     "node_modules/stream-buffers": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
@@ -15400,6 +15457,11 @@
         "xtend": "~4.0.1"
       }
     },
+    "node_modules/timers": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/timers/-/timers-0.1.1.tgz",
+      "integrity": "sha512-pkJC8uIP/gxDHxNQUBUbjHyl6oZfT+ofn7tbaHW+CFIUjI+Q2MBbHcx1JSBQfhDaTcO9bNg328q0i7Vk5PismQ=="
+    },
     "node_modules/tinycolor2": {
       "version": "1.6.0",
       "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz",
@@ -22419,6 +22481,11 @@
       "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.335.tgz",
       "integrity": "sha512-l/eowQqTnrq3gu+WSrdfkhfNHnPgYqlKAwxz7MTOj6mom19vpEDHNXl6dxDxyTiYuhemydprKr/HCrHfgk+OfQ=="
     },
+    "emitter-component": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.1.tgz",
+      "integrity": "sha512-G+mpdiAySMuB7kesVRLuyvYRqDmshB7ReKEVuyBPkzQlmiDiLrt7hHHIy4Aff552bgknVN7B2/d3lzhGO5dvpQ=="
+    },
     "emoji-regex": {
       "version": "8.0.0",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -22539,6 +22606,11 @@
       "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
       "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
     },
+    "events": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
+      "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw=="
+    },
     "exec-async": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/exec-async/-/exec-async-2.2.0.tgz",
@@ -26520,6 +26592,40 @@
         }
       }
     },
+    "react-native-xml2js": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/react-native-xml2js/-/react-native-xml2js-1.0.3.tgz",
+      "integrity": "sha512-1GxaGgz1VN0LM8XzHEqkmcqCWs7xwMazt6AAhdyoVxBvtLqf1pfIPS4KhJ+ZR1hDVv5qX8imEXL4nAwiKy+UnQ==",
+      "requires": {
+        "buffer": "5.0.x",
+        "events": "1.1.x",
+        "sax": "0.6.x",
+        "stream": "0.0.x",
+        "timers": "0.1.x",
+        "xmlbuilder": "8.2.x"
+      },
+      "dependencies": {
+        "buffer": {
+          "version": "5.0.8",
+          "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz",
+          "integrity": "sha512-xXvjQhVNz50v2nPeoOsNqWCLGfiv4ji/gXZM28jnVwdLJxH4mFyqgqCKfaK9zf1KUbG6zTkjLOy7ou+jSMarGA==",
+          "requires": {
+            "base64-js": "^1.0.2",
+            "ieee754": "^1.1.4"
+          }
+        },
+        "sax": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz",
+          "integrity": "sha512-8ip+qnRh7m8OEyvoM1JoSBzlrepp3ajVR8nqgrfTig+TewfyvTijl0am8/anFqgbcdz62ofEUKE1hHNDCdbeSQ=="
+        },
+        "xmlbuilder": {
+          "version": "8.2.2",
+          "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz",
+          "integrity": "sha512-eKRAFz04jghooy8muekqzo8uCSVNeyRedbuJrp0fovbLIi7wlsYtdUn3vBAAPq2Y3/0xMz2WMEUQ8yhVVO9Stw=="
+        }
+      }
+    },
     "react-redux": {
       "version": "8.0.5",
       "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.5.tgz",
@@ -27096,6 +27202,14 @@
       "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
       "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA=="
     },
+    "stream": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz",
+      "integrity": "sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g==",
+      "requires": {
+        "emitter-component": "^1.1.1"
+      }
+    },
     "stream-buffers": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
@@ -27396,6 +27510,11 @@
         "xtend": "~4.0.1"
       }
     },
+    "timers": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/timers/-/timers-0.1.1.tgz",
+      "integrity": "sha512-pkJC8uIP/gxDHxNQUBUbjHyl6oZfT+ofn7tbaHW+CFIUjI+Q2MBbHcx1JSBQfhDaTcO9bNg328q0i7Vk5PismQ=="
+    },
     "tinycolor2": {
       "version": "1.6.0",
       "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz",
diff --git a/src/components/navigation/MenuComponent.tsx b/src/components/navigation/MenuComponent.tsx
index f515af8..b4fd185 100644
--- a/src/components/navigation/MenuComponent.tsx
+++ b/src/components/navigation/MenuComponent.tsx
@@ -49,6 +49,17 @@ const MenuComponent = (props: MenuComponentProps) => {
                         <ChevronRightIcon/>
                     </HStack>
                 </Menu.Item>
+                <Menu.Item
+                    onPress={ () => props.navigation.navigate("Plan", { placeId: undefined, roomId: undefined }) }
+                    _text={ { color: "primary.500" } }
+                    _pressed={ { bg: "secondary.500" } }
+                    bg={ route === "Plan" ? "secondary.500" : "white" }
+                >
+                    <HStack justifyContent={ "space-between" } flex={ 1 }>
+                        <Text>Plan</Text>
+                        <ChevronRightIcon/>
+                    </HStack>
+                </Menu.Item>
                 <Menu.Item
                     onPress={ () => props.navigation.navigate("Logout") }
                     _text={ { color: "primary.500" } }
diff --git a/src/pages/Navigation.tsx b/src/pages/Navigation.tsx
index 45e2156..1c2329d 100644
--- a/src/pages/Navigation.tsx
+++ b/src/pages/Navigation.tsx
@@ -14,6 +14,7 @@ import ItemViewPage from "./ItemViewPage"
 import NotesViewPage from "./NotesViewPage"
 import MenuComponent from "../components/navigation/MenuComponent"
 import PlanViewPage from "./PlanViewPage"
+import {gestureHandlerRootHOC} from "react-native-gesture-handler"
 
 export type RootStackParamList = {
     Home: undefined,
@@ -77,7 +78,7 @@ const Navigation = () => {
                         />
                         <Stack.Screen
                             name={"Plan"}
-                            component={PlanViewPage}
+                            component={gestureHandlerRootHOC(PlanViewPage)}
                             initialParams={ { placeId: undefined, roomId: undefined } }
                         />
                     </>
diff --git a/src/pages/PlanViewPage.tsx b/src/pages/PlanViewPage.tsx
index c43519c..5b26230 100644
--- a/src/pages/PlanViewPage.tsx
+++ b/src/pages/PlanViewPage.tsx
@@ -4,23 +4,17 @@ import { AppDispatch, RootState } from "../stores/store"
 import LoadingBox from "../components/loading/LoadingBox"
 import { log } from "../logging/logger"
 import { DrawerScreenProps } from "@react-navigation/drawer"
-import { RootDrawerParamList } from "./Navigation"
-import { Box, CloseIcon, Select, useToast, Button, Flex, Text, Center, VStack, ScrollView, View, HStack, Divider } from "native-base"
+import { RootStackParamList } from "./Navigation"
+import { Box, CloseIcon, Select, useToast, Button, Flex, Text, VStack, ScrollView, HStack, Divider } from "native-base"
 import { ErrorToast } from "../components/toast/ErrorToast"
 import { Floor, Place, Room } from "../types/plan"
 import { getFloorList, getPlanFloorImage, getPlanInventories, getPlanItems } from "../stores/actions/planThunks"
-import { login } from "../stores/actions/userThunks"
-import { getPlanItemsRequest } from "../api/planservice"
-import ItemPreview from "../components/listView/ItemPreview"
-import { BASE_API_URL } from "../api/constants"
 import ListView from "../components/listView/ListView"
-import SearchForm from "../components/search/SearchForm"
-import { loadItemsByInventory } from "../stores/actions/listViewThunks"
 import CastlePlanView from "../components/plan/CastlePlanView"
 
 import { Dimensions } from 'react-native';
 
-const PlanViewPage = ({ route, navigation }: DrawerScreenProps<RootDrawerParamList, 'Plan'>) => {
+const PlanViewPage = ({ route, navigation }: DrawerScreenProps<RootStackParamList, 'Plan'>) => {
 
   const dispatch = useDispatch<AppDispatch>()
 
