From 460f6c3bd8ae5956f4a201df7966cfca3c3f5744 Mon Sep 17 00:00:00 2001 From: Maria Sanchez Date: Thu, 14 Jul 2022 15:03:52 -0600 Subject: [PATCH] fix file issues --- web-ui/web-react/src/App.js | 340 +++++++++++++++++- web-ui/web-react/src/AppTopbar.js | 26 +- web-ui/web-react/src/BlockViewer.js | 2 +- web-ui/web-react/src/Doc.js | 339 ----------------- .../src/{template => templates}/BlocksDemo.js | 0 .../src/{template => templates}/ButtonDemo.js | 0 .../src/{template => templates}/ChartDemo.js | 0 .../{template => templates}/CodeHighlight.js | 0 .../src/{template => templates}/Dashboard.js | 0 .../{template => templates}/Documentation.js | 0 .../src/{template => templates}/FileDemo.js | 0 .../{template => templates}/FloatLabelDemo.js | 0 .../{template => templates}/FormLayoutDemo.js | 0 .../src/{template => templates}/IconsDemo.js | 0 .../src/{template => templates}/InputDemo.js | 0 .../InvalidStateDemo.js | 0 .../src/{template => templates}/ListDemo.js | 0 .../src/{template => templates}/MediaDemo.js | 0 .../src/{template => templates}/MenuDemo.js | 8 +- .../{template => templates}/MessagesDemo.js | 0 .../src/{template => templates}/MiscDemo.js | 0 .../{template => templates}/OverlayDemo.js | 0 .../src/{template => templates}/PanelDemo.js | 0 .../src/{template => templates}/TableDemo.js | 0 .../src/{template => templates}/TreeDemo.js | 0 .../menu/ConfirmationDemo.js | 0 .../menu/PaymentDemo.js | 0 .../menu/PersonalDemo.js | 0 .../{template => templates}/menu/SeatDemo.js | 0 29 files changed, 348 insertions(+), 367 deletions(-) delete mode 100644 web-ui/web-react/src/Doc.js rename web-ui/web-react/src/{template => templates}/BlocksDemo.js (100%) rename web-ui/web-react/src/{template => templates}/ButtonDemo.js (100%) rename web-ui/web-react/src/{template => templates}/ChartDemo.js (100%) rename web-ui/web-react/src/{template => templates}/CodeHighlight.js (100%) rename web-ui/web-react/src/{template => templates}/Dashboard.js (100%) rename web-ui/web-react/src/{template => templates}/Documentation.js (100%) rename web-ui/web-react/src/{template => templates}/FileDemo.js (100%) rename web-ui/web-react/src/{template => templates}/FloatLabelDemo.js (100%) rename web-ui/web-react/src/{template => templates}/FormLayoutDemo.js (100%) rename web-ui/web-react/src/{template => templates}/IconsDemo.js (100%) rename web-ui/web-react/src/{template => templates}/InputDemo.js (100%) rename web-ui/web-react/src/{template => templates}/InvalidStateDemo.js (100%) rename web-ui/web-react/src/{template => templates}/ListDemo.js (100%) rename web-ui/web-react/src/{template => templates}/MediaDemo.js (100%) rename web-ui/web-react/src/{template => templates}/MenuDemo.js (98%) rename web-ui/web-react/src/{template => templates}/MessagesDemo.js (100%) rename web-ui/web-react/src/{template => templates}/MiscDemo.js (100%) rename web-ui/web-react/src/{template => templates}/OverlayDemo.js (100%) rename web-ui/web-react/src/{template => templates}/PanelDemo.js (100%) rename web-ui/web-react/src/{template => templates}/TableDemo.js (100%) rename web-ui/web-react/src/{template => templates}/TreeDemo.js (100%) rename web-ui/web-react/src/{template => templates}/menu/ConfirmationDemo.js (100%) rename web-ui/web-react/src/{template => templates}/menu/PaymentDemo.js (100%) rename web-ui/web-react/src/{template => templates}/menu/PersonalDemo.js (100%) rename web-ui/web-react/src/{template => templates}/menu/SeatDemo.js (100%) diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index 522981e5..7e3f23c4 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -1,19 +1,339 @@ -import React from "react"; +import React, { useState, useEffect, useRef } from 'react'; +import classNames from 'classnames'; +import { Route, useLocation } from 'react-router-dom'; +import { CSSTransition } from 'react-transition-group'; +import { AppTopbar } from './AppTopbar'; +import { AppFooter } from './AppFooter'; +import { AppMenu } from './AppMenu'; +import { AppConfig } from './AppConfig'; + +import Dashboard from './templates/Dashboard'; +import ButtonDemo from './templates/ButtonDemo'; +import ChartDemo from './templates/ChartDemo'; +import Documentation from './templates/Documentation'; +import FileDemo from './templates/FileDemo'; +import FloatLabelDemo from './templates/FloatLabelDemo'; +import FormLayoutDemo from './templates/FormLayoutDemo'; +import InputDemo from './templates/InputDemo'; +import ListDemo from './templates/ListDemo'; +import MenuDemo from './templates/MenuDemo'; +import MessagesDemo from './templates/MessagesDemo'; +import MiscDemo from './templates/MiscDemo'; +import OverlayDemo from './templates/OverlayDemo'; +import MediaDemo from './templates/MediaDemo'; +import PanelDemo from './templates/PanelDemo'; +import TableDemo from './templates/TableDemo'; +import TreeDemo from './templates/TreeDemo'; +import InvalidStateDemo from './templates/InvalidStateDemo'; +import BlocksDemo from './templates/BlocksDemo'; +import IconsDemo from './templates/IconsDemo'; +import FormAdminSistema from './components/FormAdminSistema'; + +import Crud from './pages/Crud'; +import EmptyPage from './pages/EmptyPage'; +import TimelineDemo from './pages/TimelineDemo'; + +import PrimeReact from 'primereact/api'; +import { Tooltip } from 'primereact/tooltip'; + +import 'primereact/resources/primereact.css'; +import 'primeicons/primeicons.css'; +import 'primeflex/primeflex.css'; +import 'prismjs/themes/prism-coy.css'; +import './assets/demo/flags/flags.css'; +import './assets/demo/Demos.scss'; +import './assets/layout/layout.scss'; +import './App.scss'; +import LogIn from './components/LogIn'; const App = () => { + const [layoutMode, setLayoutMode] = useState('static'); + const [layoutColorMode, setLayoutColorMode] = useState('light') + const [inputStyle, setInputStyle] = useState('outlined'); + const [ripple, setRipple] = useState(true); + const [staticMenuInactive, setStaticMenuInactive] = useState(false); + const [overlayMenuActive, setOverlayMenuActive] = useState(false); + const [mobileMenuActive, setMobileMenuActive] = useState(false); + const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false); + const copyTooltipRef = useRef(); + const location = useLocation(); + + PrimeReact.ripple = true; + + let menuClick = false; + let mobileTopbarMenuClick = false; + + useEffect(() => { + if (mobileMenuActive) { + addClass(document.body, "body-overflow-hidden"); + } else { + removeClass(document.body, "body-overflow-hidden"); + } + }, [mobileMenuActive]); + + useEffect(() => { + copyTooltipRef && copyTooltipRef.current && copyTooltipRef.current.updateTargetEvents(); + }, [location]); + + const onInputStyleChange = (inputStyle) => { + setInputStyle(inputStyle); + } + + const onRipple = (e) => { + PrimeReact.ripple = e.value; + setRipple(e.value) + } + + const onLayoutModeChange = (mode) => { + setLayoutMode(mode) + } + + const onColorModeChange = (mode) => { + setLayoutColorMode(mode) + } + + const onWrapperClick = (event) => { + if (!menuClick) { + setOverlayMenuActive(false); + setMobileMenuActive(false); + } + + if (!mobileTopbarMenuClick) { + setMobileTopbarMenuActive(false); + } + + mobileTopbarMenuClick = false; + menuClick = false; + } + + const onToggleMenuClick = (event) => { + menuClick = true; + + if (isDesktop()) { + if (layoutMode === 'overlay') { + if (mobileMenuActive === true) { + setOverlayMenuActive(true); + } + + setOverlayMenuActive((prevState) => !prevState); + setMobileMenuActive(false); + } + else if (layoutMode === 'static') { + setStaticMenuInactive((prevState) => !prevState); + } + } + else { + setMobileMenuActive((prevState) => !prevState); + } + + event.preventDefault(); + } + + const onSidebarClick = () => { + menuClick = true; + } + + const onMobileTopbarMenuClick = (event) => { + mobileTopbarMenuClick = true; + + setMobileTopbarMenuActive((prevState) => !prevState); + event.preventDefault(); + } + + const onMobileSubTopbarMenuClick = (event) => { + mobileTopbarMenuClick = true; + + event.preventDefault(); + } + + const onMenuItemClick = (event) => { + if (!event.item.items) { + setOverlayMenuActive(false); + setMobileMenuActive(false); + } + } + const isDesktop = () => { + return window.innerWidth >= 992; + } + + const menu = [ + { + label: 'Home', + items: [ + {label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/'}, + {label: 'Registro admin sistema', icon: 'pi pi-fw pi-id-card', to: '/formAdminSistema'}, + {label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn'} + ] + }, + { + label: 'UI Components', icon: 'pi pi-fw pi-sitemap', + items: [ + { label: 'Form Layout', icon: 'pi pi-fw pi-id-card', to: '/formlayout' }, + { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' }, + { label: "Float Label", icon: "pi pi-fw pi-bookmark", to: "/floatlabel" }, + { label: "Invalid State", icon: "pi pi-fw pi-exclamation-circle", to: "invalidstate" }, + { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' }, + { label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' }, + { label: 'List', icon: 'pi pi-fw pi-list', to: '/list' }, + { label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' }, + { label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' }, + { label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' }, + { label: "Media", icon: "pi pi-fw pi-image", to: "/media" }, + { label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' }, + { label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' }, + { label: 'File', icon: 'pi pi-fw pi-file', to: '/file' }, + { label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' }, + { label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' }, + ] + }, + { + label: 'UI Blocks', + items: [ + { label: 'Free Blocks', icon: 'pi pi-fw pi-eye', to: '/blocks', badge: "NEW" }, + { label: 'All Blocks', icon: 'pi pi-fw pi-globe', url: 'https://www.primefaces.org/primeblocks-react' } + ] + }, + { + label: 'Icons', + items: [ + { label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' } + ] + }, + { + label: 'Pages', icon: 'pi pi-fw pi-clone', + items: [ + { label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' }, + { label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' }, + { label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' } + ] + }, + { + label: 'Menu Hierarchy', icon: 'pi pi-fw pi-search', + items: [ + { + label: 'Submenu 1', icon: 'pi pi-fw pi-bookmark', + items: [ + { + label: 'Submenu 1.1', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' }, + ] + }, + { + label: 'Submenu 1.2', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' } + ] + }, + ] + }, + { + label: 'Submenu 2', icon: 'pi pi-fw pi-bookmark', + items: [ + { + label: 'Submenu 2.1', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' }, + ] + }, + { + label: 'Submenu 2.2', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' } + ] + } + ] + } + ] + } + ]; + + const addClass = (element, className) => { + if (element.classList) + element.classList.add(className); + else + element.className += ' ' + className; + } + + const removeClass = (element, className) => { + if (element.classList) + element.classList.remove(className); + else + element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); + } + + const wrapperClass = classNames('layout-wrapper', { + 'layout-overlay': layoutMode === 'overlay', + 'layout-static': layoutMode === 'static', + 'layout-static-sidebar-inactive': staticMenuInactive && layoutMode === 'static', + 'layout-overlay-sidebar-active': overlayMenuActive && layoutMode === 'overlay', + 'layout-mobile-sidebar-active': mobileMenuActive, + 'p-input-filled': inputStyle === 'filled', + 'p-ripple-disabled': ripple === false, + 'layout-theme-light': layoutColorMode === 'light' + }); return ( -
-

Initial page

- -
- +
+ + + + +
+
+ +
+
+ } /> + + + + + + + + + + + + + + + + + } /> + + + + + + + +
+ + +
+ + + + +
+
+ +
- ) + ); + } -export default App; \ No newline at end of file +export default App; diff --git a/web-ui/web-react/src/AppTopbar.js b/web-ui/web-react/src/AppTopbar.js index 2e8d7b17..40e350b1 100644 --- a/web-ui/web-react/src/AppTopbar.js +++ b/web-ui/web-react/src/AppTopbar.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React from 'react'; import { Link } from 'react-router-dom'; import classNames from 'classnames'; @@ -7,7 +7,7 @@ export const AppTopbar = (props) => { return (
- logo + logo KATOIKIA @@ -15,30 +15,30 @@ export const AppTopbar = (props) => { */} - -
    - {/*
  • +
      + {/*
    • */} - {/*
    • + {/*
    • */} -
    • - -
    • -
    +
  • + +
  • +
); } diff --git a/web-ui/web-react/src/BlockViewer.js b/web-ui/web-react/src/BlockViewer.js index 85661eaf..2e440d6d 100644 --- a/web-ui/web-react/src/BlockViewer.js +++ b/web-ui/web-react/src/BlockViewer.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { classNames } from 'primereact/utils'; -import { CodeHighlight } from './components/CodeHighlight'; +import { CodeHighlight } from './templates/CodeHighlight'; const BlockViewer = (props) => { diff --git a/web-ui/web-react/src/Doc.js b/web-ui/web-react/src/Doc.js deleted file mode 100644 index e10894ba..00000000 --- a/web-ui/web-react/src/Doc.js +++ /dev/null @@ -1,339 +0,0 @@ -import React, { useState, useEffect, useRef } from 'react'; -import classNames from 'classnames'; -import { Route, useLocation } from 'react-router-dom'; -import { CSSTransition } from 'react-transition-group'; - -import { AppTopbar } from './AppTopbar'; -import { AppFooter } from './AppFooter'; -import { AppMenu } from './AppMenu'; -import { AppConfig } from './AppConfig'; - -import Dashboard from './components/Dashboard'; -import ButtonDemo from './components/ButtonDemo'; -import ChartDemo from './components/ChartDemo'; -import Documentation from './components/Documentation'; -import FileDemo from './components/FileDemo'; -import FloatLabelDemo from './components/FloatLabelDemo'; -import FormLayoutDemo from './components/FormLayoutDemo'; -import InputDemo from './components/InputDemo'; -import ListDemo from './components/ListDemo'; -import MenuDemo from './components/MenuDemo'; -import MessagesDemo from './components/MessagesDemo'; -import MiscDemo from './components/MiscDemo'; -import OverlayDemo from './components/OverlayDemo'; -import MediaDemo from './components/MediaDemo'; -import PanelDemo from './components/PanelDemo'; -import TableDemo from './components/TableDemo'; -import TreeDemo from './components/TreeDemo'; -import InvalidStateDemo from './components/InvalidStateDemo'; -import BlocksDemo from './components/BlocksDemo'; -import IconsDemo from './components/IconsDemo'; -import FormAdminSistema from './components/FormAdminSistema'; - -import Crud from './pages/Crud'; -import EmptyPage from './pages/EmptyPage'; -import TimelineDemo from './pages/TimelineDemo'; - -import PrimeReact from 'primereact/api'; -import { Tooltip } from 'primereact/tooltip'; - -import 'primereact/resources/primereact.css'; -import 'primeicons/primeicons.css'; -import 'primeflex/primeflex.css'; -import 'prismjs/themes/prism-coy.css'; -import './assets/demo/flags/flags.css'; -import './assets/demo/Demos.scss'; -import './assets/layout/layout.scss'; -import './App.scss'; -import LogIn from './components/LogIn'; - -const Doc = () => { - const [layoutMode, setLayoutMode] = useState('static'); - const [layoutColorMode, setLayoutColorMode] = useState('light') - const [inputStyle, setInputStyle] = useState('outlined'); - const [ripple, setRipple] = useState(true); - const [staticMenuInactive, setStaticMenuInactive] = useState(false); - const [overlayMenuActive, setOverlayMenuActive] = useState(false); - const [mobileMenuActive, setMobileMenuActive] = useState(false); - const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false); - const copyTooltipRef = useRef(); - const location = useLocation(); - - PrimeReact.ripple = true; - - let menuClick = false; - let mobileTopbarMenuClick = false; - - useEffect(() => { - if (mobileMenuActive) { - addClass(document.body, "body-overflow-hidden"); - } else { - removeClass(document.body, "body-overflow-hidden"); - } - }, [mobileMenuActive]); - - useEffect(() => { - copyTooltipRef && copyTooltipRef.current && copyTooltipRef.current.updateTargetEvents(); - }, [location]); - - const onInputStyleChange = (inputStyle) => { - setInputStyle(inputStyle); - } - - const onRipple = (e) => { - PrimeReact.ripple = e.value; - setRipple(e.value) - } - - const onLayoutModeChange = (mode) => { - setLayoutMode(mode) - } - - const onColorModeChange = (mode) => { - setLayoutColorMode(mode) - } - - const onWrapperClick = (event) => { - if (!menuClick) { - setOverlayMenuActive(false); - setMobileMenuActive(false); - } - - if (!mobileTopbarMenuClick) { - setMobileTopbarMenuActive(false); - } - - mobileTopbarMenuClick = false; - menuClick = false; - } - - const onToggleMenuClick = (event) => { - menuClick = true; - - if (isDesktop()) { - if (layoutMode === 'overlay') { - if (mobileMenuActive === true) { - setOverlayMenuActive(true); - } - - setOverlayMenuActive((prevState) => !prevState); - setMobileMenuActive(false); - } - else if (layoutMode === 'static') { - setStaticMenuInactive((prevState) => !prevState); - } - } - else { - setMobileMenuActive((prevState) => !prevState); - } - - event.preventDefault(); - } - - const onSidebarClick = () => { - menuClick = true; - } - - const onMobileTopbarMenuClick = (event) => { - mobileTopbarMenuClick = true; - - setMobileTopbarMenuActive((prevState) => !prevState); - event.preventDefault(); - } - - const onMobileSubTopbarMenuClick = (event) => { - mobileTopbarMenuClick = true; - - event.preventDefault(); - } - - const onMenuItemClick = (event) => { - if (!event.item.items) { - setOverlayMenuActive(false); - setMobileMenuActive(false); - } - } - const isDesktop = () => { - return window.innerWidth >= 992; - } - - const menu = [ - { - label: 'Home', - items: [ - {label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/'}, - {label: 'Registro admin sistema', icon: 'pi pi-fw pi-id-card', to: '/formAdminSistema'}, - {label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn'} - ] - }, - { - label: 'UI Components', icon: 'pi pi-fw pi-sitemap', - items: [ - { label: 'Form Layout', icon: 'pi pi-fw pi-id-card', to: '/formlayout' }, - { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' }, - { label: "Float Label", icon: "pi pi-fw pi-bookmark", to: "/floatlabel" }, - { label: "Invalid State", icon: "pi pi-fw pi-exclamation-circle", to: "invalidstate" }, - { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' }, - { label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' }, - { label: 'List', icon: 'pi pi-fw pi-list', to: '/list' }, - { label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' }, - { label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' }, - { label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' }, - { label: "Media", icon: "pi pi-fw pi-image", to: "/media" }, - { label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' }, - { label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' }, - { label: 'File', icon: 'pi pi-fw pi-file', to: '/file' }, - { label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' }, - { label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' }, - ] - }, - { - label: 'UI Blocks', - items: [ - { label: 'Free Blocks', icon: 'pi pi-fw pi-eye', to: '/blocks', badge: "NEW" }, - { label: 'All Blocks', icon: 'pi pi-fw pi-globe', url: 'https://www.primefaces.org/primeblocks-react' } - ] - }, - { - label: 'Icons', - items: [ - { label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' } - ] - }, - { - label: 'Pages', icon: 'pi pi-fw pi-clone', - items: [ - { label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' }, - { label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' }, - { label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' } - ] - }, - { - label: 'Menu Hierarchy', icon: 'pi pi-fw pi-search', - items: [ - { - label: 'Submenu 1', icon: 'pi pi-fw pi-bookmark', - items: [ - { - label: 'Submenu 1.1', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' }, - ] - }, - { - label: 'Submenu 1.2', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' } - ] - }, - ] - }, - { - label: 'Submenu 2', icon: 'pi pi-fw pi-bookmark', - items: [ - { - label: 'Submenu 2.1', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' }, - ] - }, - { - label: 'Submenu 2.2', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' } - ] - } - ] - } - ] - } - ]; - - const addClass = (element, className) => { - if (element.classList) - element.classList.add(className); - else - element.className += ' ' + className; - } - - const removeClass = (element, className) => { - if (element.classList) - element.classList.remove(className); - else - element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); - } - - const wrapperClass = classNames('layout-wrapper', { - 'layout-overlay': layoutMode === 'overlay', - 'layout-static': layoutMode === 'static', - 'layout-static-sidebar-inactive': staticMenuInactive && layoutMode === 'static', - 'layout-overlay-sidebar-active': overlayMenuActive && layoutMode === 'overlay', - 'layout-mobile-sidebar-active': mobileMenuActive, - 'p-input-filled': inputStyle === 'filled', - 'p-ripple-disabled': ripple === false, - 'layout-theme-light': layoutColorMode === 'light' - }); - - return ( -
- - - - -
- -
- -
-
- } /> - - - - - - - - - - - - - - - - - } /> - - - - - - - -
- - -
- - - - -
-
- - -
- ); - -} - -export default Doc; diff --git a/web-ui/web-react/src/template/BlocksDemo.js b/web-ui/web-react/src/templates/BlocksDemo.js similarity index 100% rename from web-ui/web-react/src/template/BlocksDemo.js rename to web-ui/web-react/src/templates/BlocksDemo.js diff --git a/web-ui/web-react/src/template/ButtonDemo.js b/web-ui/web-react/src/templates/ButtonDemo.js similarity index 100% rename from web-ui/web-react/src/template/ButtonDemo.js rename to web-ui/web-react/src/templates/ButtonDemo.js diff --git a/web-ui/web-react/src/template/ChartDemo.js b/web-ui/web-react/src/templates/ChartDemo.js similarity index 100% rename from web-ui/web-react/src/template/ChartDemo.js rename to web-ui/web-react/src/templates/ChartDemo.js diff --git a/web-ui/web-react/src/template/CodeHighlight.js b/web-ui/web-react/src/templates/CodeHighlight.js similarity index 100% rename from web-ui/web-react/src/template/CodeHighlight.js rename to web-ui/web-react/src/templates/CodeHighlight.js diff --git a/web-ui/web-react/src/template/Dashboard.js b/web-ui/web-react/src/templates/Dashboard.js similarity index 100% rename from web-ui/web-react/src/template/Dashboard.js rename to web-ui/web-react/src/templates/Dashboard.js diff --git a/web-ui/web-react/src/template/Documentation.js b/web-ui/web-react/src/templates/Documentation.js similarity index 100% rename from web-ui/web-react/src/template/Documentation.js rename to web-ui/web-react/src/templates/Documentation.js diff --git a/web-ui/web-react/src/template/FileDemo.js b/web-ui/web-react/src/templates/FileDemo.js similarity index 100% rename from web-ui/web-react/src/template/FileDemo.js rename to web-ui/web-react/src/templates/FileDemo.js diff --git a/web-ui/web-react/src/template/FloatLabelDemo.js b/web-ui/web-react/src/templates/FloatLabelDemo.js similarity index 100% rename from web-ui/web-react/src/template/FloatLabelDemo.js rename to web-ui/web-react/src/templates/FloatLabelDemo.js diff --git a/web-ui/web-react/src/template/FormLayoutDemo.js b/web-ui/web-react/src/templates/FormLayoutDemo.js similarity index 100% rename from web-ui/web-react/src/template/FormLayoutDemo.js rename to web-ui/web-react/src/templates/FormLayoutDemo.js diff --git a/web-ui/web-react/src/template/IconsDemo.js b/web-ui/web-react/src/templates/IconsDemo.js similarity index 100% rename from web-ui/web-react/src/template/IconsDemo.js rename to web-ui/web-react/src/templates/IconsDemo.js diff --git a/web-ui/web-react/src/template/InputDemo.js b/web-ui/web-react/src/templates/InputDemo.js similarity index 100% rename from web-ui/web-react/src/template/InputDemo.js rename to web-ui/web-react/src/templates/InputDemo.js diff --git a/web-ui/web-react/src/template/InvalidStateDemo.js b/web-ui/web-react/src/templates/InvalidStateDemo.js similarity index 100% rename from web-ui/web-react/src/template/InvalidStateDemo.js rename to web-ui/web-react/src/templates/InvalidStateDemo.js diff --git a/web-ui/web-react/src/template/ListDemo.js b/web-ui/web-react/src/templates/ListDemo.js similarity index 100% rename from web-ui/web-react/src/template/ListDemo.js rename to web-ui/web-react/src/templates/ListDemo.js diff --git a/web-ui/web-react/src/template/MediaDemo.js b/web-ui/web-react/src/templates/MediaDemo.js similarity index 100% rename from web-ui/web-react/src/template/MediaDemo.js rename to web-ui/web-react/src/templates/MediaDemo.js diff --git a/web-ui/web-react/src/template/MenuDemo.js b/web-ui/web-react/src/templates/MenuDemo.js similarity index 98% rename from web-ui/web-react/src/template/MenuDemo.js rename to web-ui/web-react/src/templates/MenuDemo.js index 0b2cb671..67552d8b 100644 --- a/web-ui/web-react/src/template/MenuDemo.js +++ b/web-ui/web-react/src/templates/MenuDemo.js @@ -11,10 +11,10 @@ import { ContextMenu } from 'primereact/contextmenu'; import { MegaMenu } from 'primereact/megamenu'; import { PanelMenu } from 'primereact/panelmenu'; import { Route, useHistory, useLocation } from 'react-router-dom'; -import { PersonalDemo } from '../components/menu/PersonalDemo'; -import { ConfirmationDemo } from '../components/menu/ConfirmationDemo'; -import { PaymentDemo } from '../components/menu/PaymentDemo'; -import { SeatDemo } from '../components/menu/SeatDemo'; +import { PersonalDemo } from '../templates/menu/PersonalDemo'; +import { ConfirmationDemo } from '../templates/menu/ConfirmationDemo'; +import { PaymentDemo } from '../templates/menu/PaymentDemo'; +import { SeatDemo } from '../templates/menu/SeatDemo'; const MenuDemo = () => { const [activeIndex, setActiveIndex] = useState(0); diff --git a/web-ui/web-react/src/template/MessagesDemo.js b/web-ui/web-react/src/templates/MessagesDemo.js similarity index 100% rename from web-ui/web-react/src/template/MessagesDemo.js rename to web-ui/web-react/src/templates/MessagesDemo.js diff --git a/web-ui/web-react/src/template/MiscDemo.js b/web-ui/web-react/src/templates/MiscDemo.js similarity index 100% rename from web-ui/web-react/src/template/MiscDemo.js rename to web-ui/web-react/src/templates/MiscDemo.js diff --git a/web-ui/web-react/src/template/OverlayDemo.js b/web-ui/web-react/src/templates/OverlayDemo.js similarity index 100% rename from web-ui/web-react/src/template/OverlayDemo.js rename to web-ui/web-react/src/templates/OverlayDemo.js diff --git a/web-ui/web-react/src/template/PanelDemo.js b/web-ui/web-react/src/templates/PanelDemo.js similarity index 100% rename from web-ui/web-react/src/template/PanelDemo.js rename to web-ui/web-react/src/templates/PanelDemo.js diff --git a/web-ui/web-react/src/template/TableDemo.js b/web-ui/web-react/src/templates/TableDemo.js similarity index 100% rename from web-ui/web-react/src/template/TableDemo.js rename to web-ui/web-react/src/templates/TableDemo.js diff --git a/web-ui/web-react/src/template/TreeDemo.js b/web-ui/web-react/src/templates/TreeDemo.js similarity index 100% rename from web-ui/web-react/src/template/TreeDemo.js rename to web-ui/web-react/src/templates/TreeDemo.js diff --git a/web-ui/web-react/src/template/menu/ConfirmationDemo.js b/web-ui/web-react/src/templates/menu/ConfirmationDemo.js similarity index 100% rename from web-ui/web-react/src/template/menu/ConfirmationDemo.js rename to web-ui/web-react/src/templates/menu/ConfirmationDemo.js diff --git a/web-ui/web-react/src/template/menu/PaymentDemo.js b/web-ui/web-react/src/templates/menu/PaymentDemo.js similarity index 100% rename from web-ui/web-react/src/template/menu/PaymentDemo.js rename to web-ui/web-react/src/templates/menu/PaymentDemo.js diff --git a/web-ui/web-react/src/template/menu/PersonalDemo.js b/web-ui/web-react/src/templates/menu/PersonalDemo.js similarity index 100% rename from web-ui/web-react/src/template/menu/PersonalDemo.js rename to web-ui/web-react/src/templates/menu/PersonalDemo.js diff --git a/web-ui/web-react/src/template/menu/SeatDemo.js b/web-ui/web-react/src/templates/menu/SeatDemo.js similarity index 100% rename from web-ui/web-react/src/template/menu/SeatDemo.js rename to web-ui/web-react/src/templates/menu/SeatDemo.js