katoikia-app/web-ui/web-react/node_modules/.cache/babel-loader/bda3a0fc9cfc9343443a90c29a8...

1 line
54 KiB
JSON
Raw Normal View History

2022-07-06 04:15:11 +00:00
{"ast":null,"code":"import _slicedToArray from \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\n\nvar _this = this,\n _jsxFileName = \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/src/components/MenuDemo.js\";\n\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { Menubar } from 'primereact/menubar';\nimport { InputText } from 'primereact/inputtext';\nimport { BreadCrumb } from 'primereact/breadcrumb';\nimport { Steps } from 'primereact/steps';\nimport { TabMenu } from 'primereact/tabmenu';\nimport { TieredMenu } from 'primereact/tieredmenu';\nimport { Menu } from 'primereact/menu';\nimport { Button } from 'primereact/button';\nimport { ContextMenu } from 'primereact/contextmenu';\nimport { MegaMenu } from 'primereact/megamenu';\nimport { PanelMenu } from 'primereact/panelmenu';\nimport { Route, useHistory, useLocation } from 'react-router-dom';\nimport { PersonalDemo } from '../components/menu/PersonalDemo';\nimport { ConfirmationDemo } from '../components/menu/ConfirmationDemo';\nimport { PaymentDemo } from '../components/menu/PaymentDemo';\nimport { SeatDemo } from '../components/menu/SeatDemo';\n\nvar MenuDemo = function MenuDemo() {\n var _useState = useState(0),\n _useState2 = _slicedToArray(_useState, 2),\n activeIndex = _useState2[0],\n setActiveIndex = _useState2[1];\n\n var menu = useRef(null);\n var contextMenu = useRef(null);\n var history = useHistory();\n var location = useLocation();\n var checkActiveIndex = useCallback(function () {\n var paths = location.pathname.split('/');\n var currentPath = paths[paths.length - 1];\n\n switch (currentPath) {\n case 'seat':\n setActiveIndex(1);\n break;\n\n case 'payment':\n setActiveIndex(2);\n break;\n\n case 'confirmation':\n setActiveIndex(3);\n break;\n\n default:\n break;\n }\n }, [location]);\n useEffect(function () {\n checkActiveIndex();\n }, [checkActiveIndex]);\n var nestedMenuitems = [{\n label: 'Customers',\n icon: 'pi pi-fw pi-table',\n items: [{\n label: 'New',\n icon: 'pi pi-fw pi-user-plus',\n items: [{\n label: 'Customer',\n icon: 'pi pi-fw pi-plus'\n }, {\n label: 'Duplicate',\n icon: 'pi pi-fw pi-copy'\n }]\n }, {\n label: 'Edit',\n icon: 'pi pi-fw pi-user-edit'\n }]\n }, {\n label: 'Orders',\n icon: 'pi pi-fw pi-shopping-cart',\n items: [{\n label: 'View',\n icon: 'pi pi-fw pi-list'\n }, {\n label: 'Search',\n icon: 'pi pi-fw pi-search'\n }]\n }, {\n label: 'Shipments',\n icon: 'pi pi-fw pi-envelope',\n items: [{\n label: 'Tracker',\n icon: 'pi pi-fw pi-compass'\n }, {\n label: 'Map',\n icon: 'pi pi-fw pi-map-marker'\n }, {\n label: 'Manage',\n icon: 'pi pi-fw pi-pencil'\n }]\n }, {\n label: 'Profile',\n icon: 'pi pi-fw pi-user',\n items: [{\n label: 'Settings',\n icon: 'pi pi-fw pi-cog'\n }, {\n label: 'Billing',\n icon: 'pi pi-fw pi-file'\n }]\n }, {\n label: 'Quit',\n icon: 'pi pi-fw pi-sign-out'\n }];\n var breadcrumbHome = {\n icon: 'pi pi-home',\n to: '/'\n };\n var breadcrumbItems = [{\n label: 'Computer'\n }, {\n label: 'Notebook'\n }, {\n label: 'Accessories'\n }, {\n label: 'Backpacks'\n }, {\n label: 'Item'\n }];\n var wizardItems = [{\n label: 'Personal',\n command: function command() {\n return history.push('/menu');\n }\n }, {\n label: 'Seat',\n command: function command() {\n return history.push('/menu/seat');\n }\n }, {\n label: 'Payment',\n command: function command() {\n return history.push('/menu/payment');\n }\n }, {\n label: 'Confirmation',\n command: function command() {\n return history.push('/menu/confirmation');\n }\n }];\n var tieredMenuItem