@collana-solutions/react-pattern-ui 0.0.0-stage → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +23 -3
  3. package/dist/index.d.ts +9 -0
  4. package/dist/index.js +2 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.modern.js +2 -0
  7. package/dist/index.modern.js.map +1 -0
  8. package/dist/index.umd.js +2 -0
  9. package/dist/index.umd.js.map +1 -0
  10. package/dist/lib/Layout/AuthenticationLayout.d.ts +9 -0
  11. package/dist/lib/Layout/PanelSideBarLayout/NavbarLayout.d.ts +8 -0
  12. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/ButtonIcon.d.ts +9 -0
  13. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/Context/PanelSideBarContext.d.ts +15 -0
  14. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/Context/PanelSideBarContextProps.d.ts +84 -0
  15. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/Definitions/PanelItem.d.ts +60 -0
  16. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/Definitions/PanelLinkRenderer.d.ts +13 -0
  17. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/MainSection.d.ts +8 -0
  18. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelItemsRenderer.d.ts +12 -0
  19. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSideBarItem.d.ts +10 -0
  20. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSideBarToggle.d.ts +7 -0
  21. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSidebar.d.ts +5 -0
  22. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/getActivePanel.d.ts +4 -0
  23. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/panelUtils.d.ts +20 -0
  24. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBarLayout.d.ts +41 -0
  25. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBarLayoutContent.d.ts +10 -0
  26. package/dist/lib/Layout/PanelSideBarLayout/PanelSideBarNavbar.d.ts +24 -0
  27. package/dist/lib/Paging/Paging.d.ts +28 -0
  28. package/dist/scss/Form/_form.scss +8 -0
  29. package/dist/scss/Form/index.scss +1 -0
  30. package/dist/scss/Layout/AuthenticationLayout.scss +94 -0
  31. package/dist/scss/Layout/_PanelSideBarLayout.scss +533 -0
  32. package/dist/scss/Layout/_PanelSideBarNavbar.scss +76 -0
  33. package/dist/scss/Layout/index.scss +3 -0
  34. package/dist/scss/Layout/variables.scss +73 -0
  35. package/dist/styles.css +548 -0
  36. package/package.json +105 -6
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 collana solutions AG (formerly Neolution AG)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,23 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # pattern-ui
2
+
3
+ Some basic functions and components which are needed in most of projects.
4
+
5
+ ## Installation
6
+
7
+ ```shell
8
+ npm install @collana-solutions/react-pattern-ui
9
+ ```
10
+
11
+ Then import the styles once, for example in the root layout of the app:
12
+
13
+ ```ts
14
+ import "@collana-solutions/react-pattern-ui/styles.css";
15
+ ```
16
+
17
+ # Sidebar
18
+
19
+ A customisable sidebar with own context, dropdown menu entries, icon menu entries, automatic active detection and more
20
+
21
+ # PanelSidebar
22
+
23
+ Based on `Sidebar` plus custom side panels in order to choose different sidebar menu entries.
@@ -0,0 +1,9 @@
1
+ export * from "./lib/Layout/AuthenticationLayout";
2
+ export * from "./lib/Paging/Paging";
3
+ export { PanelSidebarNavbar, PanelSidebarNavbarProps } from "./lib/Layout/PanelSideBarLayout/PanelSideBarNavbar";
4
+ export * from "./lib/Layout/PanelSideBarLayout/NavbarLayout";
5
+ export * from "./lib/Layout/PanelSideBarLayout/PanelSideBarLayout";
6
+ export * from "./lib/Layout/PanelSideBarLayout/PanelSideBar/Context/PanelSideBarContext";
7
+ export * from "./lib/Layout/PanelSideBarLayout/PanelSideBar/Definitions/PanelItem";
8
+ export * from "./lib/Layout/PanelSideBarLayout/PanelSideBar/Definitions/PanelLinkRenderer";
9
+ export * from "./lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/panelUtils";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime"),n=require("classnames"),s=require("@neolution-ch/reactstrap"),t=require("react"),i=require("@fortawesome/free-solid-svg-icons"),a=require("@fortawesome/react-fontawesome");function l(e){return e&&e.__esModule?e:{default:e}}var r=l(n);const o={backPageComponent:"<",nextPageComponent:">",firstPageComponent:"<<",lastPageComponent:">>"},d=n=>{const{brand:t,navbarRightItems:l,navbarLeftItems:o,useToggleButton:d,toggleSidebar:c,theme:m}=n;if(d&&!c)throw new Error("You must provide the toggleSidebar function when useToggleButton is true.");return e.jsxs("nav",{id:"nav-top",className:r.default("panel-layout navbar navbar-expand",{"navbar-dark":"dark"===m},{"navbar-light":"light"===m},{"navbar-blue":"blue"===m}),children:[e.jsx("div",{className:"navbar-brand",children:t}),d&&e.jsx("button",{id:"sidebar-toggle",className:"btn btn-link btn-sm order-0 me-lg-0",onClick:()=>c&&c(),children:e.jsx(a.FontAwesomeIcon,{icon:i.faBars,size:"2x"})}),e.jsxs(s.Nav,{tag:"div",className:"top-navbar flex-row justify-content-between",children:[e.jsx("span",{className:"d-flex flex-row justify-content-start align-items-center",children:o?.map(((n,t)=>e.jsx(s.NavItem,{tag:"div",className:"navbar-custom-item",children:n},t)))}),e.jsx("span",{className:"d-flex flex-row justify-content-end align-items-center",children:l?.map(((n,t)=>e.jsx(s.NavItem,{tag:"div",className:"navbar-custom-item",children:n},t)))})]})]})},c=n=>{const{children:s,footer:t,isIconShownOnSidebarCollapse:i,excludeSibebarMenu:a,mainContentBodyRef:l,mainContentBodyStyle:o}=n;return e.jsxs("section",{ref:l,id:"main-content-body",style:o,className:r.default("content",{"show-icons":i},{"exclude-sidebar-menu":a}),children:[e.jsx("main",{className:"container-fluid",children:s}),e.jsx("footer",{hidden:!t,className:"py-4 bg-light mt-auto",children:e.jsx("div",{className:"mx-4",children:e.jsx("div",{className:"layout-sidenav__footer",children:t})})})]})},m=n=>{const{children:s,isSidebarOpen:t,useResponsiveLayout:i=!1,renderFirstItemsLevelAsTiles:a}=n;return e.jsx("section",{id:"main-section",className:r.default({toggled:!t},{"responsive-layout":i},{"section-no-tiles":!a},{"section-tiles":a}),children:s})},u=e=>e.find((e=>e.children?u(e.children):e.active)),h=(e,n)=>u(e)??e.find((e=>n?e.id===n:e.id)),g=e=>!!u(e),x=(e,n)=>{let s=[];for(const n of e)n.children&&g(n.children)&&(s=[...s,n.id],s=[...s,...x(n.children)]);return s},p=e=>{let n=[];for(const s of e)!1===s.display&&(n=[...n,s.id]),s.children&&(n=[...n,...p(s.children)]);return n},v=e=>{let n=[];for(const s of e)s.children&&(n=[...n,s.id],n=[...n,...v(s.children)]);return n},b=e=>{let n=[];for(const s of e)s.expanded&&(n=[...n,s.id]),s.children&&(n=[...n,...b(s.children)]);return n},f=t.createContext(null),I=()=>{const e=t.useContext(f);if(null===e)throw new Error("usePanelSideBarContext must be used within a PanelSideBarProvider");return e},j=({item:n,collapsedWithIcon:s,className:t})=>{const{icon:i,title:l,onSidebarCollapseOptions:r}=n,o=s?"ms-1 me-3 p-1":"me-2",d=i||s&&r?.fallbackIcon;return e.jsxs("span",{className:t,children:[d&&e.jsx(a.FontAwesomeIcon,{icon:d,className:o}),s&&d?"":l]})},S=n=>{const{depth:i=0,children:a,isParentHidden:l=!1,isIconShownOnSidebarCollapse:o}=n,{LinkRenderer:d,toggledMenuItemIds:c,toggleMenuItem:m,hiddenMenuItemIds:u,isSidebarOpen:h}=I(),x=!!a.children?.length,p=x&&a.children&&g(a.children)||a.active,v=c?.includes(a.id),b=t.useRef(null),f=o&&!h;return t.useEffect((()=>{const e=b.current;a.active&&e&&e.scrollIntoView({behavior:"smooth",block:"center"})}),[b,a.active]),e.jsxs(e.Fragment,{children:[e.jsx(s.NavItem,{hidden:l||u.includes(a.id),onClick:()=>{x&&!a.collapseIconOnly&&m(a.id)},className:r.default({"menu-open":v,active:p}),style:{paddingLeft:!f&&i?`${i+1}rem`:void 0},children:e.jsx("div",{ref:b,children:x?e.jsxs("div",{className:r.default("d-flex flex-row",{"justify-content-between":a.collapseIconOnly}),children:[a.collapseIconOnly&&e.jsx(d,{item:a,children:e.jsx(j,{className:"nav-link",item:a,collapsedWithIcon:f})}),e.jsx("a",{role:"button",className:r.default("nav-link",{"w-100":!a.collapseIconOnly},{"dropdown-toggle":x&&!f}),onClick:()=>{a.collapseIconOnly&&m(a.id)},children:!a.collapseIconOnly&&e.jsx(j,{item:a,collapsedWithIcon:f})})]}):e.jsx(d,{item:a,children:e.jsx(j,{className:"nav-link",item:a,collapsedWithIcon:f})})})}),x&&e.jsx(s.Collapse,{isOpen:v,navbar:!0,className:r.default("item-menu",{"mb-1":v}),children:a.children?.map((n=>e.jsx(S,{depth:i+1,active:a.active,isParentHidden:u.includes(a.id),isIconShownOnSidebarCollapse:o,children:n},n.id)))})]})},y=n=>{const{item:{disabled:t,icon:i,onClick:l,id:o,title:d},activePanelId:c,renderTilesAsLinks:m,setActivePanel:u}=n;return e.jsx(s.Button,{color:"primary",outline:!0,className:r.default("tile",{active:c===o}),onClick:()=>{m||(l?l():u(o))},title:"string"==typeof d?String(d):"",disabled:t,children:i&&e.jsx(a.FontAwesomeIcon,{icon:i,size:"lg",fixedWidth:!0})},o)},C=n=>{const{items:s,activePanelId:t,renderTilesAsLinks:i,setActivePanel:a,LinkRenderer:l,hiddenMenuItemIds:r}=n;return s?.filter((e=>!r.includes(e.id))).map(((n,s)=>i?e.jsx(l,{item:n,children:e.jsx(y,{item:n,setActivePanel:a,activePanelId:t,renderTilesAsLinks:i})},s):e.jsx(y,{item:n,setActivePanel:a,activePanelId:t,renderTilesAsLinks:i},s)))},w=n=>{const{isIconShownOnSidebarCollapse:s}=n,{activePanelId:t,menuItems:i,setActivePanel:a,renderFirstItemsLevelAsTiles:l,renderTilesAsLinks:o,LinkRenderer:d,theme:c,hiddenMenuItemIds:m}=I(),u=r.default("panel-layout",{"sidenav-dark":"dark"===c},{"sidenav-light":"light"===c},{"sidenav-blue":"blue"===c},{"show-icons":s}),h=i.find((e=>e.id===t));if(l){if(i.some((e=>!e.icon)))throw new Error("Outer panel icon is required");return e.jsxs("nav",{id:"side-nav",className:u,children:[e.jsx("div",{className:"side-nav__tiles",children:e.jsx(C,{items:i,LinkRenderer:d,hiddenMenuItemIds:m,setActivePanel:a,activePanelId:t,renderTilesAsLinks:o})}),e.jsx("div",{className:"side-nav__items",children:h?.children?.map((n=>e.jsx(S,{isIconShownOnSidebarCollapse:s,children:n},n.id)))})]})}return e.jsx("nav",{id:"side-nav",className:u,children:e.jsx("div",{className:"side-nav__items",children:i?.map((n=>e.jsx(S,{isIconShownOnSidebarCollapse:s,children:n},n.id)))})})},P=n=>{const{toggled:t,isIconShownOnSidebarCollapse:l,...o}=n,{theme:d}=I();return e.jsx(s.Button,{...o,className:r.default({"side-nav-toggle-dark":"dark"===d},{"side-nav-toggle-light":"light"===d},{"side-nav-toggle-blue":"blue"===d},{"show-icons":l}),id:"side-nav-toggle",color:"primary",children:e.jsx(a.FontAwesomeIcon,{className:"toggler",icon:t?i.faAngleRight:i.faAngleLeft})})};exports.AuthenticationLayout=n=>{const{children:s,className:t,footer:i,logo:a}=n;return e.jsx("div",{className:r.default("auth__wrapper",t),children:e.jsxs("div",{className:"container auth__container",children:[e.jsx("aside",{className:"auth__sidebar-left"}),e.jsxs("main",{className:"auth__content",children:[a&&e.jsx("div",{className:"auth__logo mb-4",children:a}),e.jsx("article",{children:s})]}),e.jsx("aside",{className:"auth__sidebar-right"}),e.jsx("footer",{className:"auth__footer",children:i})]})})},exports.NavbarLayout=n=>{const{brand:s,children:t,navbarLeftItems:i,navbarRightItems:a,footer:l,useResponsiveLayout:r=!1,mainContentBodyRef:o,theme:u,mainContentBodyStyle:h}=n;return e.jsxs(e.Fragment,{children:[e.jsx(d,{useToggleButton:!1,theme:u,brand:s,navbarRightItems:a,navbarLeftItems:i}),e.jsx(m,{isSidebarOpen:!1,useResponsiveLayout:r,children:e.jsx(c,{excludeSibebarMenu:!0,footer:l,isIconShownOnSidebarCollapse:!1,mainContentBodyRef:o,mainContentBodyStyle:h,children:t})})]})},exports.Paging=({currentItemsPerPage:n,currentPage:i,totalRecords:a,currentRecordCount:l,pagingPossible:r=!0,translations:d,navigationComponents:c=o,possiblePageItemCounts:m,maxPagesShown:u=7,showControls:h=!0,changePageSizePossible:g=!0,setItemsPerPage:x,setCurrentPage:p})=>{const{backPageComponent:v,nextPageComponent:b,firstPageComponent:f,lastPageComponent:I}=c,j=Math.ceil(a/n),S=Math.max(0,Math.min(i-Math.ceil(u/2),j-u)),y=t.useMemo((()=>[...m??[25,50,100,200],n].filter(((e,n,s)=>s.indexOf(e)===n)).toSorted(((e,n)=>e-n))),[n,m]);return e.jsx("div",{className:"container-fluid paging",children:e.jsxs(s.Row,{style:{marginBottom:"20px"},children:[e.jsxs(s.Col,{xs:r&&n<a?6:12,style:{paddingLeft:0},children:[r&&g&&e.jsxs(s.UncontrolledButtonDropdown,{children:[e.jsx(s.DropdownToggle,{caret:!0,color:"link",size:"sm",children:n}),e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownItem,{header:!0,children:d.itemsPerPageDropdown}),y.map((n=>e.jsx(s.DropdownItem,{onClick:()=>x(n),children:n},`pageItemCount_${n}`)))]})]}),e.jsx("span",{className:"small ml-2",children:d.showedItemsText.replace("{from}",((i-1)*n+1).toString()).replace("{to}",((i-1)*n+l).toString()).replace("{total}",a.toString())})]}),r&&n<a&&e.jsx(s.Col,{xs:6,style:{textAlign:"right",paddingRight:0},children:e.jsxs(s.ButtonGroup,{size:"sm",children:[h&&e.jsx(s.Button,{color:"secondary",outline:!0,disabled:1===i,onClick:()=>p(1),children:f}),h&&e.jsx(s.Button,{color:"secondary",outline:!0,disabled:1===i,onClick:()=>p(i-1),children:v}),Array.from({length:j+1},((e,n)=>n)).filter((e=>e>S)).slice(0,u).map((n=>e.jsx(s.Button,{outline:i!==n,color:"secondary",onClick:()=>p(n),children:n},n))),h&&e.jsx(s.Button,{color:"secondary",outline:!0,disabled:i===j,onClick:()=>p(i+1),children:b}),h&&e.jsx(s.Button,{color:"secondary",outline:!0,disabled:i===j,onClick:()=>p(j),children:I})]})})]})})},exports.PanelSideBarLayout=n=>{const{brand:s,children:i,navbarLeftItems:a,navbarRightItems:l,footer:r,collapsible:o=!0,useToggleButton:u=!1,useResponsiveLayout:h=!1,excludeSibebarMenu:g=!1,mainContentBodyStyle:x}=n,{isSidebarOpen:p,toggleSidebar:v,theme:b,renderFirstItemsLevelAsTiles:f,menuItems:j,activePanelId:S,mainContentBodyRef:y}=I();if(h&&!u)throw new Error("Responsive layout can be used only with toggle button in the navbar!");const C=t.useMemo((()=>j.find((e=>e.id===S))?.onSidebarCollapseOptions?.showIcon??!1),[j,S]);return e.jsxs(e.Fragment,{children:[e.jsx(d,{useToggleButton:u,theme:b,toggleSidebar:v,brand:s,navbarRightItems:l,navbarLeftItems:a}),e.jsxs(m,{isSidebarOpen:p,useResponsiveLayout:h,renderFirstItemsLevelAsTiles:f,children:[!g&&e.jsxs(e.Fragment,{children:[e.jsx(w,{isIconShownOnSidebarCollapse:C}),o&&!u&&e.jsx(P,{onClick:v,toggled:!p,isIconShownOnSidebarCollapse:C})]}),e.jsx(c,{excludeSibebarMenu:g,footer:r,isIconShownOnSidebarCollapse:C,mainContentBodyRef:y,mainContentBodyStyle:x,children:i})]})]})},exports.PanelSideBarProvider=n=>{const{children:s,defaultActivePanelId:i,sidebarOpenByDefault:a=!0,menuItems:l,LinkRenderer:r,renderTilesAsLinks:o=!1,renderFirstItemsLevelAsTiles:d=!0,theme:c="blue"}=n,m=t.useRef(null),u=t.useMemo((()=>l),[l]),[g,v]=t.useState(a),[I,j]=t.useState(h(u,i)?.id),[S,y]=t.useState(p(u)),C=b(u),[w,P]=t.useState(I?[...C,I]:C);t.useEffect((()=>{const e=h(u,i)?.id;j(e),e&&P((n=>{const s=[...x(u),e].filter((e=>!n.includes(e)));return[...n,...s]}))}),[u,i]);return e.jsx(f.Provider,{value:{menuItems:u,activePanelId:I,setActivePanel:e=>j(e),toggledMenuItemIds:w,toggleMenuItem:e=>{P((n=>n.includes(e)?n.filter((n=>n!==e)):[...n,e]))},untoggleMenuItems:()=>P([]),isSidebarOpen:g,toggleSidebar:()=>v((e=>!e)),LinkRenderer:r,theme:c,renderFirstItemsLevelAsTiles:d,renderTilesAsLinks:o,openMenuItems:e=>{P((n=>[...n,...e.filter((e=>!n.includes(e)))]))},closeMenuItems:(e,n)=>{const s=I?[...x(u),I]:[];P((t=>n?t.filter((n=>!e.includes(n))):t.filter((n=>!e.filter((e=>!s.includes(e))).includes(n)))))},hiddenMenuItemIds:S,setHiddenMenuItemsIds:y,mainContentBodyRef:m},children:s})},exports.PanelSidebarNavbar=n=>e.jsx(d,{...n,useToggleButton:!1}),exports.getChildrenPanelItemsIds=v,exports.getHiddenPanelIds=p,exports.getPreExpandedMenuItems=b,exports.usePanelSideBarContext=I;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/lib/Layout/AuthenticationLayout.tsx","../src/lib/Paging/Paging.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarNavbar.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarLayoutContent.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/MainSection.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/getActivePanel.ts","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/panelUtils.ts","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Context/PanelSideBarContext.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSideBarItem.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/ButtonIcon.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelItemsRenderer.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSidebar.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSideBarToggle.tsx","../src/lib/Layout/PanelSideBarLayout/NavbarLayout.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarLayout.tsx"],"sourcesContent":["import classNames from \"classnames\";\r\nimport { PropsWithChildren, ReactNode } from \"react\";\r\nimport \"../../../styles/Layout/AuthenticationLayout.scss\";\r\n\r\ninterface AuthenticationLayoutProps {\r\n className?: string;\r\n footer?: ReactNode;\r\n logo?: ReactNode;\r\n}\r\n\r\nconst AuthenticationLayout = (props: PropsWithChildren<AuthenticationLayoutProps>) => {\r\n const { children, className, footer, logo } = props;\r\n\r\n return (\r\n <div className={classNames(\"auth__wrapper\", className)}>\r\n <div className=\"container auth__container\">\r\n <aside className=\"auth__sidebar-left\" />\r\n <main className=\"auth__content\">\r\n {logo && <div className=\"auth__logo mb-4\">{logo}</div>}\r\n\r\n <article>{children}</article>\r\n </main>\r\n <aside className=\"auth__sidebar-right\" />\r\n <footer className=\"auth__footer\">{footer}</footer>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport { AuthenticationLayout, AuthenticationLayoutProps };\r\n","import {\r\n Button,\r\n ButtonGroup,\r\n Col,\r\n DropdownItem,\r\n DropdownMenu,\r\n DropdownToggle,\r\n Row,\r\n UncontrolledButtonDropdown,\r\n} from \"@neolution-ch/reactstrap\";\r\nimport { ReactNode, useMemo } from \"react\";\r\n\r\ninterface PagingProps {\r\n currentItemsPerPage: number;\r\n currentPage: number;\r\n totalRecords: number;\r\n currentRecordCount: number;\r\n pagingPossible?: boolean;\r\n translations: PagingTranslations;\r\n navigationComponents?: PagingNavigationComponents;\r\n possiblePageItemCounts?: number[];\r\n maxPagesShown?: number;\r\n showControls?: boolean;\r\n changePageSizePossible?: boolean;\r\n setItemsPerPage(itemsPerPage: number): void;\r\n setCurrentPage(itemsPerPage: number): void;\r\n}\r\n\r\ninterface PagingTranslations {\r\n showedItemsText: string;\r\n itemsPerPageDropdown: string;\r\n}\r\n\r\ninterface PagingNavigationComponents {\r\n backPageComponent: ReactNode;\r\n nextPageComponent: ReactNode;\r\n firstPageComponent: ReactNode;\r\n lastPageComponent: ReactNode;\r\n}\r\n\r\nconst defaultNavigationComponents: PagingNavigationComponents = {\r\n backPageComponent: \"<\",\r\n nextPageComponent: \">\",\r\n firstPageComponent: \"<<\",\r\n lastPageComponent: \">>\",\r\n};\r\n\r\nconst Paging = ({\r\n currentItemsPerPage,\r\n currentPage,\r\n totalRecords,\r\n currentRecordCount,\r\n pagingPossible = true,\r\n translations,\r\n navigationComponents = defaultNavigationComponents,\r\n possiblePageItemCounts,\r\n maxPagesShown = 7,\r\n showControls = true,\r\n changePageSizePossible = true,\r\n setItemsPerPage,\r\n setCurrentPage,\r\n}: PagingProps) => {\r\n const { backPageComponent, nextPageComponent, firstPageComponent, lastPageComponent } = navigationComponents;\r\n const maxPage = Math.ceil(totalRecords / currentItemsPerPage);\r\n const firstPageShown = Math.max(0, Math.min(currentPage - Math.ceil(maxPagesShown / 2), maxPage - maxPagesShown));\r\n\r\n const possibleItemsPerPage = useMemo(\r\n () =>\r\n [...(possiblePageItemCounts ?? [25, 50, 100, 200]), currentItemsPerPage]\r\n .filter((value, index, array) => array.indexOf(value) === index)\r\n .toSorted((a, b) => a - b),\r\n [currentItemsPerPage, possiblePageItemCounts],\r\n );\r\n\r\n return (\r\n <div className=\"container-fluid paging\">\r\n <Row style={{ marginBottom: \"20px\" }}>\r\n <Col xs={pagingPossible && currentItemsPerPage < totalRecords ? 6 : 12} style={{ paddingLeft: 0 }}>\r\n {pagingPossible && changePageSizePossible && (\r\n <UncontrolledButtonDropdown>\r\n <DropdownToggle caret color=\"link\" size=\"sm\">\r\n {currentItemsPerPage}\r\n </DropdownToggle>\r\n <DropdownMenu>\r\n <DropdownItem header>{translations.itemsPerPageDropdown}</DropdownItem>\r\n {possibleItemsPerPage.map((pageItemCount) => (\r\n <DropdownItem key={`pageItemCount_${pageItemCount}`} onClick={() => setItemsPerPage(pageItemCount)}>\r\n {pageItemCount}\r\n </DropdownItem>\r\n ))}\r\n </DropdownMenu>\r\n </UncontrolledButtonDropdown>\r\n )}\r\n <span className=\"small ml-2\">\r\n {translations.showedItemsText\r\n .replace(\"{from}\", ((currentPage - 1) * currentItemsPerPage + 1).toString())\r\n .replace(\"{to}\", ((currentPage - 1) * currentItemsPerPage + currentRecordCount).toString())\r\n .replace(\"{total}\", totalRecords.toString())}\r\n </span>\r\n </Col>\r\n\r\n {pagingPossible && currentItemsPerPage < totalRecords && (\r\n <Col xs={6} style={{ textAlign: \"right\", paddingRight: 0 }}>\r\n <ButtonGroup size=\"sm\">\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === 1} onClick={() => setCurrentPage(1)}>\r\n {firstPageComponent}\r\n </Button>\r\n )}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === 1} onClick={() => setCurrentPage(currentPage - 1)}>\r\n {backPageComponent}\r\n </Button>\r\n )}\r\n {Array.from({ length: maxPage + 1 }, (_, i) => i)\r\n .filter((page) => page > firstPageShown)\r\n .slice(0, maxPagesShown)\r\n .map((page) => (\r\n <Button key={page} outline={currentPage !== page} color=\"secondary\" onClick={() => setCurrentPage(page)}>\r\n {page}\r\n </Button>\r\n ))}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === maxPage} onClick={() => setCurrentPage(currentPage + 1)}>\r\n {nextPageComponent}\r\n </Button>\r\n )}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === maxPage} onClick={() => setCurrentPage(maxPage)}>\r\n {lastPageComponent}\r\n </Button>\r\n )}\r\n </ButtonGroup>\r\n </Col>\r\n )}\r\n </Row>\r\n </div>\r\n );\r\n};\r\n\r\nexport { Paging, PagingProps, PagingTranslations, PagingNavigationComponents };\r\n","import { faBars } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { ReactNode } from \"react\";\r\nimport { Nav, NavItem } from \"@neolution-ch/reactstrap\";\r\nimport classNames from \"classnames\";\r\nimport { SidebarProps } from \"./PanelSideBar/Context/PanelSideBarContextProps\";\r\n\r\nexport interface PanelSidebarNavbarInternalProps extends Pick<Partial<SidebarProps>, \"theme\" | \"toggleSidebar\"> {\r\n /**\r\n * The brand content shown on the top navigation bar.\r\n */\r\n brand?: ReactNode;\r\n /**\r\n * The menu content on the right.\r\n */\r\n navbarLeftItems?: ReactNode[];\r\n /**\r\n * The menu content on the left.\r\n */\r\n navbarRightItems?: ReactNode[];\r\n\r\n /**\r\n * The menu content on the left.\r\n */\r\n useToggleButton?: boolean;\r\n}\r\n\r\nconst PanelSidebarNavbarInternal = (props: PanelSidebarNavbarInternalProps) => {\r\n const { brand, navbarRightItems, navbarLeftItems, useToggleButton, toggleSidebar, theme } = props;\r\n\r\n if (useToggleButton && !toggleSidebar) {\r\n throw new Error(\"You must provide the toggleSidebar function when useToggleButton is true.\");\r\n }\r\n\r\n return (\r\n <nav\r\n id=\"nav-top\"\r\n className={classNames(\r\n \"panel-layout navbar navbar-expand\",\r\n { \"navbar-dark\": theme === \"dark\" },\r\n { \"navbar-light\": theme === \"light\" },\r\n { \"navbar-blue\": theme === \"blue\" },\r\n )}\r\n >\r\n <div className=\"navbar-brand\">{brand}</div>\r\n {useToggleButton && (\r\n <button id=\"sidebar-toggle\" className=\"btn btn-link btn-sm order-0 me-lg-0\" onClick={() => toggleSidebar && toggleSidebar()}>\r\n <FontAwesomeIcon icon={faBars} size=\"2x\" />\r\n </button>\r\n )}\r\n <Nav tag=\"div\" className=\"top-navbar flex-row justify-content-between\">\r\n <span className=\"d-flex flex-row justify-content-start align-items-center\">\r\n {navbarLeftItems?.map((item, index) => (\r\n <NavItem tag=\"div\" key={index} className=\"navbar-custom-item\">\r\n {item}\r\n </NavItem>\r\n ))}\r\n </span>\r\n <span className=\"d-flex flex-row justify-content-end align-items-center\">\r\n {navbarRightItems?.map((item, index) => (\r\n <NavItem tag=\"div\" key={index} className=\"navbar-custom-item\">\r\n {item}\r\n </NavItem>\r\n ))}\r\n </span>\r\n </Nav>\r\n </nav>\r\n );\r\n};\r\n\r\nexport type PanelSidebarNavbarProps = Omit<PanelSidebarNavbarInternalProps, \"toggleSidebar\" | \"useToggleButton\">;\r\n\r\nconst PanelSidebarNavbar = (props: PanelSidebarNavbarProps) => {\r\n return <PanelSidebarNavbarInternal {...props} useToggleButton={false} />;\r\n};\r\n\r\nexport { PanelSidebarNavbarInternal, PanelSidebarNavbar };\r\n","import classNames from \"classnames\";\r\nimport { CSSProperties, PropsWithChildren, ReactNode, RefObject } from \"react\";\r\n\r\ninterface PanelSideBarLayoutContentProps extends PropsWithChildren {\r\n footer?: ReactNode;\r\n isIconShownOnSidebarCollapse: boolean;\r\n excludeSibebarMenu: boolean;\r\n mainContentBodyRef?: RefObject<HTMLElement | null>;\r\n mainContentBodyStyle?: CSSProperties;\r\n}\r\n\r\nexport const PanelSideBarLayoutContent = (props: PanelSideBarLayoutContentProps) => {\r\n const { children, footer, isIconShownOnSidebarCollapse, excludeSibebarMenu, mainContentBodyRef, mainContentBodyStyle } = props;\r\n\r\n return (\r\n <section\r\n ref={mainContentBodyRef}\r\n id=\"main-content-body\"\r\n style={mainContentBodyStyle}\r\n className={classNames(\"content\", { \"show-icons\": isIconShownOnSidebarCollapse }, { \"exclude-sidebar-menu\": excludeSibebarMenu })}\r\n >\r\n <main className=\"container-fluid\">{children}</main>\r\n <footer hidden={!footer} className=\"py-4 bg-light mt-auto\">\r\n <div className=\"mx-4\">\r\n <div className=\"layout-sidenav__footer\">{footer}</div>\r\n </div>\r\n </footer>\r\n </section>\r\n );\r\n};\r\n","import classNames from \"classnames\";\r\nimport { PropsWithChildren } from \"react\";\r\n\r\ninterface MainSectionProps extends PropsWithChildren {\r\n isSidebarOpen: boolean;\r\n useResponsiveLayout?: boolean;\r\n renderFirstItemsLevelAsTiles?: boolean;\r\n}\r\n\r\nconst MainSection = (props: MainSectionProps) => {\r\n const { children, isSidebarOpen, useResponsiveLayout = false, renderFirstItemsLevelAsTiles } = props;\r\n return (\r\n <section\r\n id=\"main-section\"\r\n className={classNames(\r\n { toggled: !isSidebarOpen },\r\n { \"responsive-layout\": useResponsiveLayout },\r\n { \"section-no-tiles\": !renderFirstItemsLevelAsTiles },\r\n { \"section-tiles\": renderFirstItemsLevelAsTiles },\r\n )}\r\n >\r\n {children}\r\n </section>\r\n );\r\n};\r\n\r\nexport { MainSection };\r\n","import { PanelItem } from \"../Definitions/PanelItem\";\r\n\r\nconst getActivePanelInternal = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n): PanelItem<TPanelItemId, TPanelItem> | undefined => items.find((x) => (x.children ? getActivePanelInternal(x.children) : x.active));\r\n\r\nexport const getActivePanel = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n defaultActivePanelId?: TPanelItemId,\r\n) => getActivePanelInternal(items) ?? items.find((x) => (defaultActivePanelId ? x.id === defaultActivePanelId : x.id));\r\n\r\nexport const hasActiveChildren = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) =>\r\n !!getActivePanelInternal(items);\r\n\r\nexport const getActivePanelParentsIds = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n activePanel: TPanelItemId,\r\n) => {\r\n let parentsIds: TPanelItemId[] = [];\r\n\r\n for (const item of items) {\r\n if (item.children && hasActiveChildren(item.children)) {\r\n parentsIds = [...parentsIds, item.id];\r\n parentsIds = [...parentsIds, ...getActivePanelParentsIds(item.children, activePanel)];\r\n }\r\n }\r\n\r\n return parentsIds;\r\n};\r\n","import { PanelItem } from \"../Definitions/PanelItem\";\r\n\r\n/**\r\n * Recursively gets the hidden panel items identifiers\r\n * @param items the panel items\r\n * @returns the hidden panel items identifiers\r\n */\r\nconst getHiddenPanelIds = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let hiddenIds: TPanelItemId[] = [];\r\n\r\n for (const item of items) {\r\n if (item.display === false) {\r\n hiddenIds = [...hiddenIds, item.id];\r\n }\r\n if (item.children) {\r\n hiddenIds = [...hiddenIds, ...getHiddenPanelIds(item.children)];\r\n }\r\n }\r\n\r\n return hiddenIds;\r\n};\r\n\r\n/**\r\n * Recursively gets the children panel items identifiers\r\n * @param children the panel items\r\n * @returns the children panel items identifiers\r\n */\r\nconst getChildrenPanelItemsIds = <TPanelItemId extends string, TPanelItem>(children: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let childrenIds: TPanelItemId[] = [];\r\n\r\n for (const child of children) {\r\n if (child.children) {\r\n childrenIds = [...childrenIds, child.id];\r\n childrenIds = [...childrenIds, ...getChildrenPanelItemsIds(child.children)];\r\n }\r\n }\r\n\r\n return childrenIds;\r\n};\r\n\r\n/**\r\n * Recursively gets the pre-expanded panel items\r\n * @param items the panel items\r\n * @returns the panel items that are pre-expanded\r\n */\r\nconst getPreExpandedMenuItems = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let preExpandedIds: TPanelItemId[] = [];\r\n\r\n for (const x of items) {\r\n if (x.expanded) {\r\n preExpandedIds = [...preExpandedIds, x.id];\r\n }\r\n if (x.children) {\r\n preExpandedIds = [...preExpandedIds, ...getPreExpandedMenuItems(x.children)];\r\n }\r\n }\r\n\r\n return preExpandedIds;\r\n};\r\n\r\nexport { getChildrenPanelItemsIds, getHiddenPanelIds, getPreExpandedMenuItems };\r\n","import React, { Context, createContext, useContext, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { getActivePanel, getActivePanelParentsIds } from \"../Utils/getActivePanel\";\r\nimport { PanelSideBarContextProps } from \"./PanelSideBarContextProps\";\r\nimport { getHiddenPanelIds, getPreExpandedMenuItems } from \"../Utils/panelUtils\";\r\n\r\nexport type MenuItemToggleFn<TPanelItemId extends string> = (menuItemId: TPanelItemId) => void;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst PanelSideBarContext = createContext<PanelSideBarContextProps<any, any> | null>(null);\r\n\r\nexport interface PanelSideBarMenuProviderProps<TPanelItemId extends string, TPanelItem> extends Pick<\r\n PanelSideBarContextProps<TPanelItemId, TPanelItem>,\r\n \"menuItems\" | \"LinkRenderer\" | \"theme\" | \"renderTilesAsLinks\" | \"renderFirstItemsLevelAsTiles\" | \"defaultActivePanelId\"\r\n> {\r\n /**\r\n * The children elements.\r\n */\r\n children: React.ReactNode;\r\n\r\n /**\r\n * if the sidebar should be open by default.\r\n */\r\n sidebarOpenByDefault?: boolean;\r\n}\r\n\r\nexport const PanelSideBarProvider = <TPanelItemId extends string, TPanelItem>(\r\n props: PanelSideBarMenuProviderProps<TPanelItemId, TPanelItem>,\r\n) => {\r\n const {\r\n children,\r\n defaultActivePanelId,\r\n sidebarOpenByDefault = true,\r\n menuItems: defaultMenuItems,\r\n LinkRenderer,\r\n renderTilesAsLinks = false,\r\n renderFirstItemsLevelAsTiles = true,\r\n theme = \"blue\",\r\n } = props;\r\n const mainContentBodyRef = useRef<HTMLElement>(null);\r\n const menuItems = useMemo(() => defaultMenuItems, [defaultMenuItems]);\r\n const [isSidebarOpen, setIsSidebarOpen] = useState(sidebarOpenByDefault);\r\n const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);\r\n\r\n const [activePanelId, setActivePanelId] = useState(getActivePanel(menuItems, defaultActivePanelId)?.id);\r\n const setActivePanel = (panelId: TPanelItemId) => setActivePanelId(panelId);\r\n\r\n const [hiddenMenuItemIds, setHiddenMenuItemsIds] = useState<TPanelItemId[]>(getHiddenPanelIds(menuItems));\r\n\r\n const preExpandedMenuItemIds = getPreExpandedMenuItems(menuItems);\r\n const [toggledMenuItemIds, setToggledMenuItemIds] = useState<TPanelItemId[]>(\r\n activePanelId ? [...preExpandedMenuItemIds, activePanelId] : preExpandedMenuItemIds,\r\n );\r\n const toggleMenuItem: MenuItemToggleFn<TPanelItemId> = (menuItemId) => {\r\n setToggledMenuItemIds((prev) => {\r\n const idExists = prev.includes(menuItemId);\r\n\r\n if (idExists) {\r\n return prev.filter((id) => id !== menuItemId);\r\n }\r\n\r\n return [...prev, menuItemId];\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n const activePanelId = getActivePanel(menuItems, defaultActivePanelId)?.id;\r\n\r\n // eslint-disable-next-line react-hooks/set-state-in-effect\r\n setActivePanelId(activePanelId);\r\n if (activePanelId) {\r\n setToggledMenuItemIds((prev) => {\r\n const toggledMenuItemIds = [...getActivePanelParentsIds(menuItems, activePanelId), activePanelId].filter((x) => !prev.includes(x));\r\n return [...prev, ...toggledMenuItemIds];\r\n });\r\n }\r\n }, [menuItems, defaultActivePanelId]);\r\n\r\n const untoggleMenuItems = () => setToggledMenuItemIds([]);\r\n\r\n const openMenuItems = (panelItemIds: TPanelItemId[]) => {\r\n setToggledMenuItemIds((prev) => [...prev, ...panelItemIds.filter((x) => !prev.includes(x))]);\r\n };\r\n\r\n const closeMenuItems = (panelItemIds: TPanelItemId[], includeActivePanel?: boolean) => {\r\n const activePanels = activePanelId ? [...getActivePanelParentsIds(menuItems, activePanelId), activePanelId] : [];\r\n setToggledMenuItemIds((prev) =>\r\n includeActivePanel\r\n ? prev.filter((x) => !panelItemIds.includes(x))\r\n : prev.filter((x) => !panelItemIds.filter((y) => !activePanels.includes(y)).includes(x)),\r\n );\r\n };\r\n\r\n return (\r\n <PanelSideBarContext.Provider\r\n value={{\r\n menuItems,\r\n activePanelId,\r\n setActivePanel,\r\n toggledMenuItemIds,\r\n toggleMenuItem,\r\n untoggleMenuItems,\r\n isSidebarOpen,\r\n toggleSidebar,\r\n LinkRenderer,\r\n theme,\r\n renderFirstItemsLevelAsTiles,\r\n renderTilesAsLinks,\r\n openMenuItems,\r\n closeMenuItems,\r\n hiddenMenuItemIds,\r\n setHiddenMenuItemsIds,\r\n mainContentBodyRef,\r\n }}\r\n >\r\n {children}\r\n </PanelSideBarContext.Provider>\r\n );\r\n};\r\n\r\nexport const usePanelSideBarContext = <TPanelItemId extends string, TPanelItem>() => {\r\n const context = useContext(PanelSideBarContext as Context<PanelSideBarContextProps<TPanelItemId, TPanelItem>>);\r\n if (context === null) {\r\n throw new Error(\"usePanelSideBarContext must be used within a PanelSideBarProvider\");\r\n }\r\n return context;\r\n};\r\n","import { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport classNames from \"classnames\";\r\nimport { useRef, useEffect } from \"react\";\r\nimport { Collapse, NavItem } from \"@neolution-ch/reactstrap\";\r\nimport { PanelItem } from \"./../PanelSideBar/Definitions/PanelItem\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport { hasActiveChildren } from \"./Utils/getActivePanel\";\r\n\r\nexport interface PanelSideBarItemProps<TPanelItemId extends string, TPanelItem> {\r\n children: PanelItem<TPanelItemId, TPanelItem>;\r\n depth?: number;\r\n active?: boolean;\r\n isParentHidden?: boolean;\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nconst PanelSidebarItemNavLink = <TPanelItemId extends string, TPanelItem>({\r\n item,\r\n collapsedWithIcon,\r\n className,\r\n}: {\r\n item: PanelItem<TPanelItemId, TPanelItem>;\r\n collapsedWithIcon?: boolean;\r\n className?: string;\r\n}) => {\r\n const { icon, title, onSidebarCollapseOptions } = item;\r\n const panelIconClassName = collapsedWithIcon ? \"ms-1 me-3 p-1\" : \"me-2\";\r\n const displayIcon = icon || (collapsedWithIcon && onSidebarCollapseOptions?.fallbackIcon);\r\n\r\n return (\r\n <span className={className}>\r\n {displayIcon && <FontAwesomeIcon icon={displayIcon} className={panelIconClassName} />}\r\n {!collapsedWithIcon || !displayIcon ? title : \"\"}\r\n </span>\r\n );\r\n};\r\n\r\nconst PanelSideBarItem = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarItemProps<TPanelItemId, TPanelItem>) => {\r\n const { depth = 0, children: item, isParentHidden = false, isIconShownOnSidebarCollapse } = props;\r\n const { LinkRenderer, toggledMenuItemIds, toggleMenuItem, hiddenMenuItemIds, isSidebarOpen } = usePanelSideBarContext<\r\n TPanelItemId,\r\n TPanelItem\r\n >();\r\n\r\n const hasItems = !!item.children?.length;\r\n const isActive = (hasItems && item.children && hasActiveChildren(item.children)) || item.active;\r\n const isOpen = toggledMenuItemIds?.includes(item.id);\r\n const scrollToActiveItemRef = useRef<HTMLDivElement>(null);\r\n const collapsedWithIcon = isIconShownOnSidebarCollapse && !isSidebarOpen;\r\n\r\n useEffect(() => {\r\n const currentItem = scrollToActiveItemRef.current;\r\n\r\n if (!item.active || !currentItem) {\r\n return;\r\n }\r\n\r\n currentItem.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\r\n }, [scrollToActiveItemRef, item.active]);\r\n\r\n return (\r\n <>\r\n <NavItem\r\n hidden={isParentHidden || hiddenMenuItemIds.includes(item.id)}\r\n onClick={() => {\r\n if (hasItems && !item.collapseIconOnly) {\r\n toggleMenuItem(item.id);\r\n }\r\n }}\r\n className={classNames({ \"menu-open\": isOpen, active: isActive })}\r\n style={{ paddingLeft: !collapsedWithIcon && depth ? `${depth + 1}rem` : undefined }}\r\n >\r\n <div ref={scrollToActiveItemRef}>\r\n {hasItems ? (\r\n <div className={classNames(\"d-flex flex-row\", { \"justify-content-between\": item.collapseIconOnly })}>\r\n {item.collapseIconOnly && (\r\n <LinkRenderer item={item}>\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem>\r\n className=\"nav-link\"\r\n item={item}\r\n collapsedWithIcon={collapsedWithIcon}\r\n />\r\n </LinkRenderer>\r\n )}\r\n\r\n <a\r\n role=\"button\"\r\n className={classNames(\r\n \"nav-link\",\r\n { \"w-100\": !item.collapseIconOnly },\r\n { \"dropdown-toggle\": hasItems && !collapsedWithIcon },\r\n )}\r\n onClick={() => {\r\n if (item.collapseIconOnly) {\r\n toggleMenuItem(item.id);\r\n }\r\n }}\r\n >\r\n {!item.collapseIconOnly && (\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem> item={item} collapsedWithIcon={collapsedWithIcon} />\r\n )}\r\n </a>\r\n </div>\r\n ) : (\r\n <LinkRenderer item={item}>\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem> className=\"nav-link\" item={item} collapsedWithIcon={collapsedWithIcon} />\r\n </LinkRenderer>\r\n )}\r\n </div>\r\n </NavItem>\r\n {hasItems && (\r\n <Collapse isOpen={isOpen} navbar className={classNames(\"item-menu\", { \"mb-1\": isOpen })}>\r\n {item.children?.map((childItem) => (\r\n <PanelSideBarItem\r\n key={childItem.id}\r\n depth={depth + 1}\r\n active={item.active}\r\n isParentHidden={hiddenMenuItemIds.includes(item.id)}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n >\r\n {childItem}\r\n </PanelSideBarItem>\r\n ))}\r\n </Collapse>\r\n )}\r\n </>\r\n );\r\n};\r\n\r\nexport { PanelSideBarItem };\r\n","import { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { Button } from \"@neolution-ch/reactstrap\";\r\nimport classNames from \"classnames\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\n\r\ninterface ButtonIconProps<TPanelItemId extends string, TPanelItem> {\r\n item: PanelItem<TPanelItemId, TPanelItem>;\r\n activePanelId?: TPanelItemId;\r\n renderTilesAsLinks?: boolean;\r\n setActivePanel: (panelId: TPanelItemId) => void;\r\n}\r\n\r\nexport const ButtonIcon = <TPanelItemId extends string, TPanelItem>(props: ButtonIconProps<TPanelItemId, TPanelItem>) => {\r\n const {\r\n item: { disabled, icon, onClick, id, title },\r\n activePanelId,\r\n renderTilesAsLinks,\r\n setActivePanel,\r\n } = props;\r\n return (\r\n <Button\r\n key={id}\r\n color=\"primary\"\r\n outline\r\n className={classNames(\"tile\", { active: activePanelId === id })}\r\n onClick={() => {\r\n if (!renderTilesAsLinks) {\r\n if (onClick) {\r\n onClick();\r\n } else {\r\n setActivePanel(id);\r\n }\r\n }\r\n }}\r\n title={typeof title === \"string\" ? String(title) : \"\"}\r\n disabled={disabled}\r\n >\r\n {icon && <FontAwesomeIcon icon={icon} size=\"lg\" fixedWidth />}\r\n </Button>\r\n );\r\n};\r\n","import { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { ButtonIcon } from \"./ButtonIcon\";\r\nimport { PanelLinkRenderer } from \"./Definitions/PanelLinkRenderer\";\r\n\r\ninterface PanelItemsRendererProps<TPanelItemId extends string, TPanelItem> {\r\n items: PanelItem<TPanelItemId, TPanelItem>[];\r\n activePanelId?: TPanelItemId;\r\n renderTilesAsLinks?: boolean;\r\n setActivePanel: (panelId: TPanelItemId) => void;\r\n LinkRenderer: PanelLinkRenderer<TPanelItemId, TPanelItem>;\r\n hiddenMenuItemIds: TPanelItemId[];\r\n}\r\nexport const PanelItemsRenderer = <TPanelItemId extends string, TPanelItem>(props: PanelItemsRendererProps<TPanelItemId, TPanelItem>) => {\r\n const { items, activePanelId, renderTilesAsLinks, setActivePanel, LinkRenderer, hiddenMenuItemIds } = props;\r\n return items\r\n\r\n ?.filter((x) => !hiddenMenuItemIds.includes(x.id))\r\n .map((item, index) =>\r\n renderTilesAsLinks ? (\r\n <LinkRenderer key={index} item={item}>\r\n <ButtonIcon item={item} setActivePanel={setActivePanel} activePanelId={activePanelId} renderTilesAsLinks={renderTilesAsLinks} />\r\n </LinkRenderer>\r\n ) : (\r\n <ButtonIcon\r\n key={index}\r\n item={item}\r\n setActivePanel={setActivePanel}\r\n activePanelId={activePanelId}\r\n renderTilesAsLinks={renderTilesAsLinks}\r\n />\r\n ),\r\n );\r\n};\r\n","import classNames from \"classnames\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { PanelSideBarItem } from \"./PanelSideBarItem\";\r\nimport { PanelItemsRenderer } from \"./PanelItemsRenderer\";\r\n\r\ninterface PanelSideBarProps {\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nexport const PanelSideBar = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarProps) => {\r\n const { isIconShownOnSidebarCollapse } = props;\r\n const {\r\n activePanelId,\r\n menuItems,\r\n setActivePanel,\r\n renderFirstItemsLevelAsTiles,\r\n renderTilesAsLinks,\r\n LinkRenderer,\r\n theme,\r\n hiddenMenuItemIds,\r\n } = usePanelSideBarContext<TPanelItemId, TPanelItem>();\r\n\r\n const className = classNames(\r\n \"panel-layout\",\r\n { \"sidenav-dark\": theme === \"dark\" },\r\n { \"sidenav-light\": theme === \"light\" },\r\n { \"sidenav-blue\": theme === \"blue\" },\r\n { \"show-icons\": isIconShownOnSidebarCollapse },\r\n );\r\n\r\n const activePanel: PanelItem<TPanelItemId, TPanelItem> | undefined = menuItems.find((x) => x.id === activePanelId);\r\n\r\n if (renderFirstItemsLevelAsTiles) {\r\n if (menuItems.some((x) => !x.icon)) {\r\n throw new Error(\"Outer panel icon is required\");\r\n }\r\n\r\n return (\r\n <nav id=\"side-nav\" className={className}>\r\n <div className=\"side-nav__tiles\">\r\n {\r\n <PanelItemsRenderer\r\n items={menuItems}\r\n LinkRenderer={LinkRenderer}\r\n hiddenMenuItemIds={hiddenMenuItemIds}\r\n setActivePanel={setActivePanel}\r\n activePanelId={activePanelId}\r\n renderTilesAsLinks={renderTilesAsLinks}\r\n />\r\n }\r\n </div>\r\n <div className=\"side-nav__items\">\r\n {activePanel?.children?.map((item) => (\r\n <PanelSideBarItem<TPanelItemId, TPanelItem> key={item.id} isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}>\r\n {item}\r\n </PanelSideBarItem>\r\n ))}\r\n </div>\r\n </nav>\r\n );\r\n } else {\r\n return (\r\n <nav id=\"side-nav\" className={className}>\r\n <div className=\"side-nav__items\">\r\n {menuItems?.map((item) => (\r\n <PanelSideBarItem<TPanelItemId, TPanelItem> key={item.id} isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}>\r\n {item}\r\n </PanelSideBarItem>\r\n ))}\r\n </div>\r\n </nav>\r\n );\r\n }\r\n};\r\n","import { faAngleLeft, faAngleRight } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { Button, ButtonProps } from \"@neolution-ch/reactstrap\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport classNames from \"classnames\";\r\n\r\ninterface PanelSideBarToggleProps extends ButtonProps {\r\n toggled: boolean;\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nexport const PanelSideBarToggle = (props: PanelSideBarToggleProps) => {\r\n const { toggled, isIconShownOnSidebarCollapse, ...buttonProps } = props;\r\n const { theme } = usePanelSideBarContext();\r\n\r\n return (\r\n <Button\r\n {...buttonProps}\r\n className={classNames(\r\n { \"side-nav-toggle-dark\": theme === \"dark\" },\r\n { \"side-nav-toggle-light\": theme === \"light\" },\r\n { \"side-nav-toggle-blue\": theme === \"blue\" },\r\n { \"show-icons\": isIconShownOnSidebarCollapse },\r\n )}\r\n id=\"side-nav-toggle\"\r\n color=\"primary\"\r\n >\r\n <FontAwesomeIcon className=\"toggler\" icon={toggled ? faAngleRight : faAngleLeft} />\r\n </Button>\r\n );\r\n};\r\n","import \"../../../../styles/Layout/index.scss\";\r\n\r\nimport { ComponentProps, PropsWithChildren } from \"react\";\r\nimport { PanelSideBarLayoutContent } from \"./PanelSideBarLayoutContent\";\r\nimport { PanelSidebarNavbarInternal, PanelSidebarNavbarInternalProps } from \"./PanelSideBarNavbar\";\r\nimport { MainSection } from \"./PanelSideBar/MainSection\";\r\nimport { PanelSideBarLayoutProps } from \"./PanelSideBarLayout\";\r\n\r\nexport interface NavbarLayoutProps\r\n extends\r\n PropsWithChildren,\r\n Pick<ComponentProps<typeof PanelSideBarLayoutContent>, \"footer\" | \"mainContentBodyRef\" | \"mainContentBodyStyle\">,\r\n Pick<PanelSideBarLayoutProps, \"useResponsiveLayout\" | \"navbarLeftItems\" | \"navbarRightItems\" | \"brand\">,\r\n Pick<PanelSidebarNavbarInternalProps, \"theme\"> {}\r\n\r\nexport const NavbarLayout = (props: NavbarLayoutProps) => {\r\n const {\r\n brand,\r\n children,\r\n navbarLeftItems,\r\n navbarRightItems,\r\n footer,\r\n useResponsiveLayout = false,\r\n mainContentBodyRef,\r\n theme,\r\n mainContentBodyStyle,\r\n } = props;\r\n\r\n return (\r\n <>\r\n <PanelSidebarNavbarInternal\r\n useToggleButton={false}\r\n theme={theme}\r\n brand={brand}\r\n navbarRightItems={navbarRightItems}\r\n navbarLeftItems={navbarLeftItems}\r\n />\r\n <MainSection isSidebarOpen={false} useResponsiveLayout={useResponsiveLayout}>\r\n <PanelSideBarLayoutContent\r\n excludeSibebarMenu={true}\r\n footer={footer}\r\n isIconShownOnSidebarCollapse={false}\r\n mainContentBodyRef={mainContentBodyRef}\r\n mainContentBodyStyle={mainContentBodyStyle}\r\n >\r\n {children}\r\n </PanelSideBarLayoutContent>\r\n </MainSection>\r\n </>\r\n );\r\n};\r\n","import { PropsWithChildren, ReactNode, useMemo } from \"react\";\r\nimport \"../../../../styles/Layout/index.scss\";\r\nimport { PanelSideBar } from \"./PanelSideBar/PanelSidebar\";\r\nimport { PanelSideBarLayoutContent } from \"./PanelSideBarLayoutContent\";\r\nimport { PanelSideBarToggle } from \"./PanelSideBar/PanelSideBarToggle\";\r\nimport { PanelSidebarNavbarInternal } from \"./PanelSideBarNavbar\";\r\nimport { usePanelSideBarContext } from \"./PanelSideBar/Context/PanelSideBarContext\";\r\nimport { MainSection } from \"./PanelSideBar/MainSection\";\r\n\r\nexport interface PanelSideBarLayoutProps extends PropsWithChildren {\r\n /**\r\n * The brand content shown on the top navigation bar.\r\n */\r\n brand?: ReactNode;\r\n /**\r\n * The footer content.\r\n */\r\n footer?: ReactNode;\r\n /**\r\n * The collapsible option to choose.\r\n */\r\n collapsible?: boolean;\r\n /**\r\n * The navbar content on the right.\r\n */\r\n navbarRightItems?: ReactNode[];\r\n /**\r\n * The navbar content on the left.\r\n */\r\n navbarLeftItems?: ReactNode[];\r\n\r\n /**\r\n * If using the toggle button instead of the side menu adiacent bar.\r\n */\r\n useToggleButton?: boolean;\r\n\r\n /**\r\n * If use the responsive layout when the screen is sm in order to remove the sidebar overlay.\r\n */\r\n useResponsiveLayout?: boolean;\r\n\r\n /**\r\n * If true, exclude the sidebar menu.\r\n */\r\n excludeSibebarMenu?: boolean;\r\n\r\n /**\r\n * The style applied to the main content body.\r\n */\r\n mainContentBodyStyle?: React.CSSProperties;\r\n}\r\n\r\nexport const PanelSideBarLayout = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarLayoutProps) => {\r\n const {\r\n brand,\r\n children,\r\n navbarLeftItems,\r\n navbarRightItems,\r\n footer,\r\n collapsible = true,\r\n useToggleButton = false,\r\n useResponsiveLayout = false,\r\n excludeSibebarMenu = false,\r\n mainContentBodyStyle,\r\n } = props;\r\n\r\n const { isSidebarOpen, toggleSidebar, theme, renderFirstItemsLevelAsTiles, menuItems, activePanelId, mainContentBodyRef } =\r\n usePanelSideBarContext<TPanelItemId, TPanelItem>();\r\n\r\n if (useResponsiveLayout && !useToggleButton) {\r\n throw new Error(\"Responsive layout can be used only with toggle button in the navbar!\");\r\n }\r\n\r\n const isIconShownOnSidebarCollapse = useMemo(\r\n () => menuItems.find((x) => x.id === activePanelId)?.onSidebarCollapseOptions?.showIcon ?? false,\r\n [menuItems, activePanelId],\r\n );\r\n\r\n return (\r\n <>\r\n <PanelSidebarNavbarInternal\r\n useToggleButton={useToggleButton}\r\n theme={theme}\r\n toggleSidebar={toggleSidebar}\r\n brand={brand}\r\n navbarRightItems={navbarRightItems}\r\n navbarLeftItems={navbarLeftItems}\r\n />\r\n <MainSection\r\n isSidebarOpen={isSidebarOpen}\r\n useResponsiveLayout={useResponsiveLayout}\r\n renderFirstItemsLevelAsTiles={renderFirstItemsLevelAsTiles}\r\n >\r\n {!excludeSibebarMenu && (\r\n <>\r\n <PanelSideBar<TPanelItemId, TPanelItem> isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse} />\r\n {collapsible && !useToggleButton && (\r\n <PanelSideBarToggle\r\n onClick={toggleSidebar}\r\n toggled={!isSidebarOpen}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n />\r\n )}\r\n </>\r\n )}\r\n <PanelSideBarLayoutContent\r\n excludeSibebarMenu={excludeSibebarMenu}\r\n footer={footer}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n mainContentBodyRef={mainContentBodyRef}\r\n mainContentBodyStyle={mainContentBodyStyle}\r\n >\r\n {children}\r\n </PanelSideBarLayoutContent>\r\n </MainSection>\r\n </>\r\n );\r\n};\r\n"],"names":["defaultNavigationComponents","backPageComponent","nextPageComponent","firstPageComponent","lastPageComponent","PanelSidebarNavbarInternal","props","brand","navbarRightItems","navbarLeftItems","useToggleButton","toggleSidebar","theme","Error","_jsxs","id","className","classNames","children","_jsx","onClick","FontAwesomeIcon","icon","faBars","size","Nav","tag","map","item","index","NavItem","PanelSideBarLayoutContent","footer","isIconShownOnSidebarCollapse","excludeSibebarMenu","mainContentBodyRef","mainContentBodyStyle","ref","style","hidden","MainSection","isSidebarOpen","useResponsiveLayout","renderFirstItemsLevelAsTiles","toggled","getActivePanelInternal","items","find","x","active","getActivePanel","defaultActivePanelId","hasActiveChildren","getActivePanelParentsIds","activePanel","parentsIds","getHiddenPanelIds","hiddenIds","display","getChildrenPanelItemsIds","childrenIds","child","getPreExpandedMenuItems","preExpandedIds","expanded","PanelSideBarContext","createContext","usePanelSideBarContext","context","useContext","PanelSidebarItemNavLink","collapsedWithIcon","title","onSidebarCollapseOptions","panelIconClassName","displayIcon","fallbackIcon","PanelSideBarItem","depth","isParentHidden","LinkRenderer","toggledMenuItemIds","toggleMenuItem","hiddenMenuItemIds","hasItems","length","isActive","isOpen","includes","scrollToActiveItemRef","useRef","useEffect","currentItem","current","scrollIntoView","behavior","block","collapseIconOnly","paddingLeft","undefined","role","Collapse","navbar","childItem","ButtonIcon","disabled","activePanelId","renderTilesAsLinks","setActivePanel","Button","color","outline","String","fixedWidth","PanelItemsRenderer","filter","PanelSideBar","menuItems","some","PanelSideBarToggle","buttonProps","faAngleRight","faAngleLeft","logo","_Fragment","currentItemsPerPage","currentPage","totalRecords","currentRecordCount","pagingPossible","translations","navigationComponents","possiblePageItemCounts","maxPagesShown","showControls","changePageSizePossible","setItemsPerPage","setCurrentPage","maxPage","Math","ceil","firstPageShown","max","min","possibleItemsPerPage","useMemo","value","array","indexOf","toSorted","a","b","Row","marginBottom","Col","xs","UncontrolledButtonDropdown","DropdownToggle","caret","DropdownMenu","DropdownItem","header","itemsPerPageDropdown","pageItemCount","showedItemsText","replace","toString","textAlign","paddingRight","ButtonGroup","Array","from","_","i","page","slice","collapsible","showIcon","sidebarOpenByDefault","defaultMenuItems","setIsSidebarOpen","useState","setActivePanelId","setHiddenMenuItemsIds","preExpandedMenuItemIds","setToggledMenuItemIds","prev","Provider","panelId","menuItemId","untoggleMenuItems","openMenuItems","panelItemIds","closeMenuItems","includeActivePanel","activePanels","y"],"mappings":"0RAUA,MC8BMA,EAA0D,CAC9DC,kBAAmB,IACnBC,kBAAmB,IACnBC,mBAAoB,KACpBC,kBAAmB,MCjBfC,EAA8BC,IAClC,MAAMC,MAAEA,EAAKC,iBAAEA,EAAgBC,gBAAEA,EAAeC,gBAAEA,EAAeC,cAAEA,EAAaC,MAAEA,GAAUN,EAE5F,GAAII,IAAoBC,EACtB,MAAM,IAAIE,MAAM,6EAGlB,OACEC,OAAA,MAAA,CACEC,GAAG,UACHC,UAAWC,EAAAA,QACT,oCACA,CAAE,cAAyB,SAAVL,GACjB,CAAE,eAA0B,UAAVA,GAClB,CAAE,cAAyB,SAAVA,IAClBM,SAAA,CAEDC,EAAAA,WAAKH,UAAU,eAAcE,SAAEX,IAC9BG,GACCS,EAAAA,IAAA,SAAA,CAAQJ,GAAG,iBAAiBC,UAAU,sCAAsCI,QAAS,IAAMT,GAAiBA,aAC1GQ,EAAAA,IAACE,EAAAA,iBAAgBC,KAAMC,EAAAA,OAAQC,KAAK,SAGxCV,EAAAA,KAACW,EAAAA,IAAG,CAACC,IAAI,MAAMV,UAAU,8CAA6CE,SAAA,CACpEC,EAAAA,IAAA,OAAA,CAAMH,UAAU,2DAA0DE,SACvET,GAAiBkB,KAAI,CAACC,EAAMC,IAC3BV,EAAAA,IAACW,EAAAA,SAAQJ,IAAI,MAAkBV,UAAU,8BACtCY,GADqBC,OAK5BV,MAAA,OAAA,CAAMH,UAAU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KlG,SAASqG,GAGtBH,EAAKvE,QAAQpG,GAAOA,IAAO8K,IAG7B,IAAIH,EAAMG,IACjB,EAuCEC,kBAvBoB,IAAML,EAAsB,IAwBhDhJ,gBACA9B,cA7DgB,IAAMyK,GAAkBM,IAAUA,IA8DlD1G,eACApE,QACA+B,+BACAgE,qBACAoF,cA5BiBC,IACrBP,GAAuBC,GAAS,IAAIA,KAASM,EAAa7E,QAAQnE,IAAO0I,EAAKlG,SAASxC,OAAK,EA4BxFiJ,eAzBiB,CAACD,EAA8BE,KACpD,MAAMC,EAAezF,EAAgB,IAAIrD,EAAyBgE,GAA2BX,GAAiB,GAC9G+E,GAAuBC,GACrBQ,EACIR,EAAKvE,QAAQnE,IAAOgJ,EAAaxG,SAASxC,KAC1C0I,EAAKvE,QAAQnE,IAAOgJ,EAAa7E,QAAQiF,IAAOD,EAAa3G,SAAS4G,KAAI5G,SAASxC,MACxF,EAoBGmC,oBACAoG,wBACApJ,sBACDjB,SAEAA,GAC4B,6BL3CPZ,GACnBa,EAAAA,IAACd,EAA0B,IAAKC,EAAOI,iBAAiB"}
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as n,Fragment as i}from"react/jsx-runtime";import t from"classnames";import{Row as l,Col as s,UncontrolledButtonDropdown as r,DropdownToggle as a,DropdownMenu as o,DropdownItem as d,ButtonGroup as c,Button as m,Nav as h,NavItem as u,Collapse as g}from"@neolution-ch/reactstrap";import{useMemo as p,createContext as v,useRef as b,useState as f,useEffect as I,useContext as y}from"react";import{faBars as S,faAngleRight as C,faAngleLeft as w}from"@fortawesome/free-solid-svg-icons";import{FontAwesomeIcon as P}from"@fortawesome/react-fontawesome";const k=i=>{const{children:l,className:s,footer:r,logo:a}=i;return e("div",{className:t("auth__wrapper",s),children:n("div",{className:"container auth__container",children:[e("aside",{className:"auth__sidebar-left"}),n("main",{className:"auth__content",children:[a&&e("div",{className:"auth__logo mb-4",children:a}),e("article",{children:l})]}),e("aside",{className:"auth__sidebar-right"}),e("footer",{className:"auth__footer",children:r})]})})},N={backPageComponent:"<",nextPageComponent:">",firstPageComponent:"<<",lastPageComponent:">>"},L=({currentItemsPerPage:i,currentPage:t,totalRecords:h,currentRecordCount:u,pagingPossible:g=!0,translations:v,navigationComponents:b=N,possiblePageItemCounts:f,maxPagesShown:I=7,showControls:y=!0,changePageSizePossible:S=!0,setItemsPerPage:C,setCurrentPage:w})=>{const{backPageComponent:P,nextPageComponent:k,firstPageComponent:L,lastPageComponent:x}=b,O=Math.ceil(h/i),R=Math.max(0,Math.min(t-Math.ceil(I/2),O-I)),A=p((()=>[...f??[25,50,100,200],i].filter(((e,n,i)=>i.indexOf(e)===n)).toSorted(((e,n)=>e-n))),[i,f]);return e("div",{className:"container-fluid paging",children:n(l,{style:{marginBottom:"20px"},children:[n(s,{xs:g&&i<h?6:12,style:{paddingLeft:0},children:[g&&S&&n(r,{children:[e(a,{caret:!0,color:"link",size:"sm",children:i}),n(o,{children:[e(d,{header:!0,children:v.itemsPerPageDropdown}),A.map((n=>e(d,{onClick:()=>C(n),children:n},`pageItemCount_${n}`)))]})]}),e("span",{className:"small ml-2",children:v.showedItemsText.replace("{from}",((t-1)*i+1).toString()).replace("{to}",((t-1)*i+u).toString()).replace("{total}",h.toString())})]}),g&&i<h&&e(s,{xs:6,style:{textAlign:"right",paddingRight:0},children:n(c,{size:"sm",children:[y&&e(m,{color:"secondary",outline:!0,disabled:1===t,onClick:()=>w(1),children:L}),y&&e(m,{color:"secondary",outline:!0,disabled:1===t,onClick:()=>w(t-1),children:P}),Array.from({length:O+1},((e,n)=>n)).filter((e=>e>R)).slice(0,I).map((n=>e(m,{outline:t!==n,color:"secondary",onClick:()=>w(n),children:n},n))),y&&e(m,{color:"secondary",outline:!0,disabled:t===O,onClick:()=>w(t+1),children:k}),y&&e(m,{color:"secondary",outline:!0,disabled:t===O,onClick:()=>w(O),children:x})]})})]})})},x=i=>{const{brand:l,navbarRightItems:s,navbarLeftItems:r,useToggleButton:a,toggleSidebar:o,theme:d}=i;if(a&&!o)throw new Error("You must provide the toggleSidebar function when useToggleButton is true.");return n("nav",{id:"nav-top",className:t("panel-layout navbar navbar-expand",{"navbar-dark":"dark"===d},{"navbar-light":"light"===d},{"navbar-blue":"blue"===d}),children:[e("div",{className:"navbar-brand",children:l}),a&&e("button",{id:"sidebar-toggle",className:"btn btn-link btn-sm order-0 me-lg-0",onClick:()=>o&&o(),children:e(P,{icon:S,size:"2x"})}),n(h,{tag:"div",className:"top-navbar flex-row justify-content-between",children:[e("span",{className:"d-flex flex-row justify-content-start align-items-center",children:r?.map(((n,i)=>e(u,{tag:"div",className:"navbar-custom-item",children:n},i)))}),e("span",{className:"d-flex flex-row justify-content-end align-items-center",children:s?.map(((n,i)=>e(u,{tag:"div",className:"navbar-custom-item",children:n},i)))})]})]})},O=n=>e(x,{...n,useToggleButton:!1}),R=i=>{const{children:l,footer:s,isIconShownOnSidebarCollapse:r,excludeSibebarMenu:a,mainContentBodyRef:o,mainContentBodyStyle:d}=i;return n("section",{ref:o,id:"main-content-body",style:d,className:t("content",{"show-icons":r},{"exclude-sidebar-menu":a}),children:[e("main",{className:"container-fluid",children:l}),e("footer",{hidden:!s,className:"py-4 bg-light mt-auto",children:e("div",{className:"mx-4",children:e("div",{className:"layout-sidenav__footer",children:s})})})]})},A=n=>{const{children:i,isSidebarOpen:l,useResponsiveLayout:s=!1,renderFirstItemsLevelAsTiles:r}=n;return e("section",{id:"main-section",className:t({toggled:!l},{"responsive-layout":s},{"section-no-tiles":!r},{"section-tiles":r}),children:i})},_=t=>{const{brand:l,children:s,navbarLeftItems:r,navbarRightItems:a,footer:o,useResponsiveLayout:d=!1,mainContentBodyRef:c,theme:m,mainContentBodyStyle:h}=t;return n(i,{children:[e(x,{useToggleButton:!1,theme:m,brand:l,navbarRightItems:a,navbarLeftItems:r}),e(A,{isSidebarOpen:!1,useResponsiveLayout:d,children:e(R,{excludeSibebarMenu:!0,footer:o,isIconShownOnSidebarCollapse:!1,mainContentBodyRef:c,mainContentBodyStyle:h,children:s})})]})},B=e=>e.find((e=>e.children?B(e.children):e.active)),M=(e,n)=>B(e)??e.find((e=>n?e.id===n:e.id)),T=e=>!!B(e),F=(e,n)=>{let i=[];for(const n of e)n.children&&T(n.children)&&(i=[...i,n.id],i=[...i,...F(n.children)]);return i},j=e=>{let n=[];for(const i of e)!1===i.display&&(n=[...n,i.id]),i.children&&(n=[...n,...j(i.children)]);return n},z=e=>{let n=[];for(const i of e)i.children&&(n=[...n,i.id],n=[...n,...z(i.children)]);return n},W=e=>{let n=[];for(const i of e)i.expanded&&(n=[...n,i.id]),i.children&&(n=[...n,...W(i.children)]);return n},E=v(null),H=n=>{const{children:i,defaultActivePanelId:t,sidebarOpenByDefault:l=!0,menuItems:s,LinkRenderer:r,renderTilesAsLinks:a=!1,renderFirstItemsLevelAsTiles:o=!0,theme:d="blue"}=n,c=b(null),m=p((()=>s),[s]),[h,u]=f(l),[g,v]=f(M(m,t)?.id),[y,S]=f(j(m)),C=W(m),[w,P]=f(g?[...C,g]:C);I((()=>{const e=M(m,t)?.id;v(e),e&&P((n=>{const i=[...F(m),e].filter((e=>!n.includes(e)));return[...n,...i]}))}),[m,t]);return e(E.Provider,{value:{menuItems:m,activePanelId:g,setActivePanel:e=>v(e),toggledMenuItemIds:w,toggleMenuItem:e=>{P((n=>n.includes(e)?n.filter((n=>n!==e)):[...n,e]))},untoggleMenuItems:()=>P([]),isSidebarOpen:h,toggleSidebar:()=>u((e=>!e)),LinkRenderer:r,theme:d,renderFirstItemsLevelAsTiles:o,renderTilesAsLinks:a,openMenuItems:e=>{P((n=>[...n,...e.filter((e=>!n.includes(e)))]))},closeMenuItems:(e,n)=>{const i=g?[...F(m),g]:[];P((t=>n?t.filter((n=>!e.includes(n))):t.filter((n=>!e.filter((e=>!i.includes(e))).includes(n)))))},hiddenMenuItemIds:y,setHiddenMenuItemsIds:S,mainContentBodyRef:c},children:i})},D=()=>{const e=y(E);if(null===e)throw new Error("usePanelSideBarContext must be used within a PanelSideBarProvider");return e},$=({item:i,collapsedWithIcon:t,className:l})=>{const{icon:s,title:r,onSidebarCollapseOptions:a}=i,o=t?"ms-1 me-3 p-1":"me-2",d=s||t&&a?.fallbackIcon;return n("span",{className:l,children:[d&&e(P,{icon:d,className:o}),t&&d?"":r]})},q=l=>{const{depth:s=0,children:r,isParentHidden:a=!1,isIconShownOnSidebarCollapse:o}=l,{LinkRenderer:d,toggledMenuItemIds:c,toggleMenuItem:m,hiddenMenuItemIds:h,isSidebarOpen:p}=D(),v=!!r.children?.length,f=v&&r.children&&T(r.children)||r.active,y=c?.includes(r.id),S=b(null),C=o&&!p;return I((()=>{const e=S.current;r.active&&e&&e.scrollIntoView({behavior:"smooth",block:"center"})}),[S,r.active]),n(i,{children:[e(u,{hidden:a||h.includes(r.id),onClick:()=>{v&&!r.collapseIconOnly&&m(r.id)},className:t({"menu-open":y,active:f}),style:{paddingLeft:!C&&s?`${s+1}rem`:void 0},children:e("div",{ref:S,children:v?n("div",{className:t("d-flex flex-row",{"justify-content-between":r.collapseIconOnly}),children:[r.collapseIconOnly&&e(d,{item:r,children:e($,{className:"nav-link",item:r,collapsedWithIcon:C})}),e("a",{role:"button",className:t("nav-link",{"w-100":!r.collapseIconOnly},{"dropdown-toggle":v&&!C}),onClick:()=>{r.collapseIconOnly&&m(r.id)},children:!r.collapseIconOnly&&e($,{item:r,collapsedWithIcon:C})})]}):e(d,{item:r,children:e($,{className:"nav-link",item:r,collapsedWithIcon:C})})})}),v&&e(g,{isOpen:y,navbar:!0,className:t("item-menu",{"mb-1":y}),children:r.children?.map((n=>e(q,{depth:s+1,active:r.active,isParentHidden:h.includes(r.id),isIconShownOnSidebarCollapse:o,children:n},n.id)))})]})},V=n=>{const{item:{disabled:i,icon:l,onClick:s,id:r,title:a},activePanelId:o,renderTilesAsLinks:d,setActivePanel:c}=n;return e(m,{color:"primary",outline:!0,className:t("tile",{active:o===r}),onClick:()=>{d||(s?s():c(r))},title:"string"==typeof a?String(a):"",disabled:i,children:l&&e(P,{icon:l,size:"lg",fixedWidth:!0})},r)},Y=n=>{const{items:i,activePanelId:t,renderTilesAsLinks:l,setActivePanel:s,LinkRenderer:r,hiddenMenuItemIds:a}=n;return i?.filter((e=>!a.includes(e.id))).map(((n,i)=>l?e(r,{item:n,children:e(V,{item:n,setActivePanel:s,activePanelId:t,renderTilesAsLinks:l})},i):e(V,{item:n,setActivePanel:s,activePanelId:t,renderTilesAsLinks:l},i)))},G=i=>{const{isIconShownOnSidebarCollapse:l}=i,{activePanelId:s,menuItems:r,setActivePanel:a,renderFirstItemsLevelAsTiles:o,renderTilesAsLinks:d,LinkRenderer:c,theme:m,hiddenMenuItemIds:h}=D(),u=t("panel-layout",{"sidenav-dark":"dark"===m},{"sidenav-light":"light"===m},{"sidenav-blue":"blue"===m},{"show-icons":l}),g=r.find((e=>e.id===s));if(o){if(r.some((e=>!e.icon)))throw new Error("Outer panel icon is required");return n("nav",{id:"side-nav",className:u,children:[e("div",{className:"side-nav__tiles",children:e(Y,{items:r,LinkRenderer:c,hiddenMenuItemIds:h,setActivePanel:a,activePanelId:s,renderTilesAsLinks:d})}),e("div",{className:"side-nav__items",children:g?.children?.map((n=>e(q,{isIconShownOnSidebarCollapse:l,children:n},n.id)))})]})}return e("nav",{id:"side-nav",className:u,children:e("div",{className:"side-nav__items",children:r?.map((n=>e(q,{isIconShownOnSidebarCollapse:l,children:n},n.id)))})})},J=n=>{const{toggled:i,isIconShownOnSidebarCollapse:l,...s}=n,{theme:r}=D();return e(m,{...s,className:t({"side-nav-toggle-dark":"dark"===r},{"side-nav-toggle-light":"light"===r},{"side-nav-toggle-blue":"blue"===r},{"show-icons":l}),id:"side-nav-toggle",color:"primary",children:e(P,{className:"toggler",icon:i?C:w})})},K=t=>{const{brand:l,children:s,navbarLeftItems:r,navbarRightItems:a,footer:o,collapsible:d=!0,useToggleButton:c=!1,useResponsiveLayout:m=!1,excludeSibebarMenu:h=!1,mainContentBodyStyle:u}=t,{isSidebarOpen:g,toggleSidebar:v,theme:b,renderFirstItemsLevelAsTiles:f,menuItems:I,activePanelId:y,mainContentBodyRef:S}=D();if(m&&!c)throw new Error("Responsive layout can be used only with toggle button in the navbar!");const C=p((()=>I.find((e=>e.id===y))?.onSidebarCollapseOptions?.showIcon??!1),[I,y]);return n(i,{children:[e(x,{useToggleButton:c,theme:b,toggleSidebar:v,brand:l,navbarRightItems:a,navbarLeftItems:r}),n(A,{isSidebarOpen:g,useResponsiveLayout:m,renderFirstItemsLevelAsTiles:f,children:[!h&&n(i,{children:[e(G,{isIconShownOnSidebarCollapse:C}),d&&!c&&e(J,{onClick:v,toggled:!g,isIconShownOnSidebarCollapse:C})]}),e(R,{excludeSibebarMenu:h,footer:o,isIconShownOnSidebarCollapse:C,mainContentBodyRef:S,mainContentBodyStyle:u,children:s})]})]})};export{k as AuthenticationLayout,_ as NavbarLayout,L as Paging,K as PanelSideBarLayout,H as PanelSideBarProvider,O as PanelSidebarNavbar,z as getChildrenPanelItemsIds,j as getHiddenPanelIds,W as getPreExpandedMenuItems,D as usePanelSideBarContext};
2
+ //# sourceMappingURL=index.modern.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.modern.js","sources":["../src/lib/Layout/AuthenticationLayout.tsx","../src/lib/Paging/Paging.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarNavbar.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarLayoutContent.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/MainSection.tsx","../src/lib/Layout/PanelSideBarLayout/NavbarLayout.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/getActivePanel.ts","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/panelUtils.ts","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Context/PanelSideBarContext.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSideBarItem.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/ButtonIcon.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelItemsRenderer.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSidebar.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSideBarToggle.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarLayout.tsx"],"sourcesContent":["import classNames from \"classnames\";\r\nimport { PropsWithChildren, ReactNode } from \"react\";\r\nimport \"../../../styles/Layout/AuthenticationLayout.scss\";\r\n\r\ninterface AuthenticationLayoutProps {\r\n className?: string;\r\n footer?: ReactNode;\r\n logo?: ReactNode;\r\n}\r\n\r\nconst AuthenticationLayout = (props: PropsWithChildren<AuthenticationLayoutProps>) => {\r\n const { children, className, footer, logo } = props;\r\n\r\n return (\r\n <div className={classNames(\"auth__wrapper\", className)}>\r\n <div className=\"container auth__container\">\r\n <aside className=\"auth__sidebar-left\" />\r\n <main className=\"auth__content\">\r\n {logo && <div className=\"auth__logo mb-4\">{logo}</div>}\r\n\r\n <article>{children}</article>\r\n </main>\r\n <aside className=\"auth__sidebar-right\" />\r\n <footer className=\"auth__footer\">{footer}</footer>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport { AuthenticationLayout, AuthenticationLayoutProps };\r\n","import {\r\n Button,\r\n ButtonGroup,\r\n Col,\r\n DropdownItem,\r\n DropdownMenu,\r\n DropdownToggle,\r\n Row,\r\n UncontrolledButtonDropdown,\r\n} from \"@neolution-ch/reactstrap\";\r\nimport { ReactNode, useMemo } from \"react\";\r\n\r\ninterface PagingProps {\r\n currentItemsPerPage: number;\r\n currentPage: number;\r\n totalRecords: number;\r\n currentRecordCount: number;\r\n pagingPossible?: boolean;\r\n translations: PagingTranslations;\r\n navigationComponents?: PagingNavigationComponents;\r\n possiblePageItemCounts?: number[];\r\n maxPagesShown?: number;\r\n showControls?: boolean;\r\n changePageSizePossible?: boolean;\r\n setItemsPerPage(itemsPerPage: number): void;\r\n setCurrentPage(itemsPerPage: number): void;\r\n}\r\n\r\ninterface PagingTranslations {\r\n showedItemsText: string;\r\n itemsPerPageDropdown: string;\r\n}\r\n\r\ninterface PagingNavigationComponents {\r\n backPageComponent: ReactNode;\r\n nextPageComponent: ReactNode;\r\n firstPageComponent: ReactNode;\r\n lastPageComponent: ReactNode;\r\n}\r\n\r\nconst defaultNavigationComponents: PagingNavigationComponents = {\r\n backPageComponent: \"<\",\r\n nextPageComponent: \">\",\r\n firstPageComponent: \"<<\",\r\n lastPageComponent: \">>\",\r\n};\r\n\r\nconst Paging = ({\r\n currentItemsPerPage,\r\n currentPage,\r\n totalRecords,\r\n currentRecordCount,\r\n pagingPossible = true,\r\n translations,\r\n navigationComponents = defaultNavigationComponents,\r\n possiblePageItemCounts,\r\n maxPagesShown = 7,\r\n showControls = true,\r\n changePageSizePossible = true,\r\n setItemsPerPage,\r\n setCurrentPage,\r\n}: PagingProps) => {\r\n const { backPageComponent, nextPageComponent, firstPageComponent, lastPageComponent } = navigationComponents;\r\n const maxPage = Math.ceil(totalRecords / currentItemsPerPage);\r\n const firstPageShown = Math.max(0, Math.min(currentPage - Math.ceil(maxPagesShown / 2), maxPage - maxPagesShown));\r\n\r\n const possibleItemsPerPage = useMemo(\r\n () =>\r\n [...(possiblePageItemCounts ?? [25, 50, 100, 200]), currentItemsPerPage]\r\n .filter((value, index, array) => array.indexOf(value) === index)\r\n .toSorted((a, b) => a - b),\r\n [currentItemsPerPage, possiblePageItemCounts],\r\n );\r\n\r\n return (\r\n <div className=\"container-fluid paging\">\r\n <Row style={{ marginBottom: \"20px\" }}>\r\n <Col xs={pagingPossible && currentItemsPerPage < totalRecords ? 6 : 12} style={{ paddingLeft: 0 }}>\r\n {pagingPossible && changePageSizePossible && (\r\n <UncontrolledButtonDropdown>\r\n <DropdownToggle caret color=\"link\" size=\"sm\">\r\n {currentItemsPerPage}\r\n </DropdownToggle>\r\n <DropdownMenu>\r\n <DropdownItem header>{translations.itemsPerPageDropdown}</DropdownItem>\r\n {possibleItemsPerPage.map((pageItemCount) => (\r\n <DropdownItem key={`pageItemCount_${pageItemCount}`} onClick={() => setItemsPerPage(pageItemCount)}>\r\n {pageItemCount}\r\n </DropdownItem>\r\n ))}\r\n </DropdownMenu>\r\n </UncontrolledButtonDropdown>\r\n )}\r\n <span className=\"small ml-2\">\r\n {translations.showedItemsText\r\n .replace(\"{from}\", ((currentPage - 1) * currentItemsPerPage + 1).toString())\r\n .replace(\"{to}\", ((currentPage - 1) * currentItemsPerPage + currentRecordCount).toString())\r\n .replace(\"{total}\", totalRecords.toString())}\r\n </span>\r\n </Col>\r\n\r\n {pagingPossible && currentItemsPerPage < totalRecords && (\r\n <Col xs={6} style={{ textAlign: \"right\", paddingRight: 0 }}>\r\n <ButtonGroup size=\"sm\">\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === 1} onClick={() => setCurrentPage(1)}>\r\n {firstPageComponent}\r\n </Button>\r\n )}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === 1} onClick={() => setCurrentPage(currentPage - 1)}>\r\n {backPageComponent}\r\n </Button>\r\n )}\r\n {Array.from({ length: maxPage + 1 }, (_, i) => i)\r\n .filter((page) => page > firstPageShown)\r\n .slice(0, maxPagesShown)\r\n .map((page) => (\r\n <Button key={page} outline={currentPage !== page} color=\"secondary\" onClick={() => setCurrentPage(page)}>\r\n {page}\r\n </Button>\r\n ))}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === maxPage} onClick={() => setCurrentPage(currentPage + 1)}>\r\n {nextPageComponent}\r\n </Button>\r\n )}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === maxPage} onClick={() => setCurrentPage(maxPage)}>\r\n {lastPageComponent}\r\n </Button>\r\n )}\r\n </ButtonGroup>\r\n </Col>\r\n )}\r\n </Row>\r\n </div>\r\n );\r\n};\r\n\r\nexport { Paging, PagingProps, PagingTranslations, PagingNavigationComponents };\r\n","import { faBars } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { ReactNode } from \"react\";\r\nimport { Nav, NavItem } from \"@neolution-ch/reactstrap\";\r\nimport classNames from \"classnames\";\r\nimport { SidebarProps } from \"./PanelSideBar/Context/PanelSideBarContextProps\";\r\n\r\nexport interface PanelSidebarNavbarInternalProps extends Pick<Partial<SidebarProps>, \"theme\" | \"toggleSidebar\"> {\r\n /**\r\n * The brand content shown on the top navigation bar.\r\n */\r\n brand?: ReactNode;\r\n /**\r\n * The menu content on the right.\r\n */\r\n navbarLeftItems?: ReactNode[];\r\n /**\r\n * The menu content on the left.\r\n */\r\n navbarRightItems?: ReactNode[];\r\n\r\n /**\r\n * The menu content on the left.\r\n */\r\n useToggleButton?: boolean;\r\n}\r\n\r\nconst PanelSidebarNavbarInternal = (props: PanelSidebarNavbarInternalProps) => {\r\n const { brand, navbarRightItems, navbarLeftItems, useToggleButton, toggleSidebar, theme } = props;\r\n\r\n if (useToggleButton && !toggleSidebar) {\r\n throw new Error(\"You must provide the toggleSidebar function when useToggleButton is true.\");\r\n }\r\n\r\n return (\r\n <nav\r\n id=\"nav-top\"\r\n className={classNames(\r\n \"panel-layout navbar navbar-expand\",\r\n { \"navbar-dark\": theme === \"dark\" },\r\n { \"navbar-light\": theme === \"light\" },\r\n { \"navbar-blue\": theme === \"blue\" },\r\n )}\r\n >\r\n <div className=\"navbar-brand\">{brand}</div>\r\n {useToggleButton && (\r\n <button id=\"sidebar-toggle\" className=\"btn btn-link btn-sm order-0 me-lg-0\" onClick={() => toggleSidebar && toggleSidebar()}>\r\n <FontAwesomeIcon icon={faBars} size=\"2x\" />\r\n </button>\r\n )}\r\n <Nav tag=\"div\" className=\"top-navbar flex-row justify-content-between\">\r\n <span className=\"d-flex flex-row justify-content-start align-items-center\">\r\n {navbarLeftItems?.map((item, index) => (\r\n <NavItem tag=\"div\" key={index} className=\"navbar-custom-item\">\r\n {item}\r\n </NavItem>\r\n ))}\r\n </span>\r\n <span className=\"d-flex flex-row justify-content-end align-items-center\">\r\n {navbarRightItems?.map((item, index) => (\r\n <NavItem tag=\"div\" key={index} className=\"navbar-custom-item\">\r\n {item}\r\n </NavItem>\r\n ))}\r\n </span>\r\n </Nav>\r\n </nav>\r\n );\r\n};\r\n\r\nexport type PanelSidebarNavbarProps = Omit<PanelSidebarNavbarInternalProps, \"toggleSidebar\" | \"useToggleButton\">;\r\n\r\nconst PanelSidebarNavbar = (props: PanelSidebarNavbarProps) => {\r\n return <PanelSidebarNavbarInternal {...props} useToggleButton={false} />;\r\n};\r\n\r\nexport { PanelSidebarNavbarInternal, PanelSidebarNavbar };\r\n","import classNames from \"classnames\";\r\nimport { CSSProperties, PropsWithChildren, ReactNode, RefObject } from \"react\";\r\n\r\ninterface PanelSideBarLayoutContentProps extends PropsWithChildren {\r\n footer?: ReactNode;\r\n isIconShownOnSidebarCollapse: boolean;\r\n excludeSibebarMenu: boolean;\r\n mainContentBodyRef?: RefObject<HTMLElement | null>;\r\n mainContentBodyStyle?: CSSProperties;\r\n}\r\n\r\nexport const PanelSideBarLayoutContent = (props: PanelSideBarLayoutContentProps) => {\r\n const { children, footer, isIconShownOnSidebarCollapse, excludeSibebarMenu, mainContentBodyRef, mainContentBodyStyle } = props;\r\n\r\n return (\r\n <section\r\n ref={mainContentBodyRef}\r\n id=\"main-content-body\"\r\n style={mainContentBodyStyle}\r\n className={classNames(\"content\", { \"show-icons\": isIconShownOnSidebarCollapse }, { \"exclude-sidebar-menu\": excludeSibebarMenu })}\r\n >\r\n <main className=\"container-fluid\">{children}</main>\r\n <footer hidden={!footer} className=\"py-4 bg-light mt-auto\">\r\n <div className=\"mx-4\">\r\n <div className=\"layout-sidenav__footer\">{footer}</div>\r\n </div>\r\n </footer>\r\n </section>\r\n );\r\n};\r\n","import classNames from \"classnames\";\r\nimport { PropsWithChildren } from \"react\";\r\n\r\ninterface MainSectionProps extends PropsWithChildren {\r\n isSidebarOpen: boolean;\r\n useResponsiveLayout?: boolean;\r\n renderFirstItemsLevelAsTiles?: boolean;\r\n}\r\n\r\nconst MainSection = (props: MainSectionProps) => {\r\n const { children, isSidebarOpen, useResponsiveLayout = false, renderFirstItemsLevelAsTiles } = props;\r\n return (\r\n <section\r\n id=\"main-section\"\r\n className={classNames(\r\n { toggled: !isSidebarOpen },\r\n { \"responsive-layout\": useResponsiveLayout },\r\n { \"section-no-tiles\": !renderFirstItemsLevelAsTiles },\r\n { \"section-tiles\": renderFirstItemsLevelAsTiles },\r\n )}\r\n >\r\n {children}\r\n </section>\r\n );\r\n};\r\n\r\nexport { MainSection };\r\n","import \"../../../../styles/Layout/index.scss\";\r\n\r\nimport { ComponentProps, PropsWithChildren } from \"react\";\r\nimport { PanelSideBarLayoutContent } from \"./PanelSideBarLayoutContent\";\r\nimport { PanelSidebarNavbarInternal, PanelSidebarNavbarInternalProps } from \"./PanelSideBarNavbar\";\r\nimport { MainSection } from \"./PanelSideBar/MainSection\";\r\nimport { PanelSideBarLayoutProps } from \"./PanelSideBarLayout\";\r\n\r\nexport interface NavbarLayoutProps\r\n extends\r\n PropsWithChildren,\r\n Pick<ComponentProps<typeof PanelSideBarLayoutContent>, \"footer\" | \"mainContentBodyRef\" | \"mainContentBodyStyle\">,\r\n Pick<PanelSideBarLayoutProps, \"useResponsiveLayout\" | \"navbarLeftItems\" | \"navbarRightItems\" | \"brand\">,\r\n Pick<PanelSidebarNavbarInternalProps, \"theme\"> {}\r\n\r\nexport const NavbarLayout = (props: NavbarLayoutProps) => {\r\n const {\r\n brand,\r\n children,\r\n navbarLeftItems,\r\n navbarRightItems,\r\n footer,\r\n useResponsiveLayout = false,\r\n mainContentBodyRef,\r\n theme,\r\n mainContentBodyStyle,\r\n } = props;\r\n\r\n return (\r\n <>\r\n <PanelSidebarNavbarInternal\r\n useToggleButton={false}\r\n theme={theme}\r\n brand={brand}\r\n navbarRightItems={navbarRightItems}\r\n navbarLeftItems={navbarLeftItems}\r\n />\r\n <MainSection isSidebarOpen={false} useResponsiveLayout={useResponsiveLayout}>\r\n <PanelSideBarLayoutContent\r\n excludeSibebarMenu={true}\r\n footer={footer}\r\n isIconShownOnSidebarCollapse={false}\r\n mainContentBodyRef={mainContentBodyRef}\r\n mainContentBodyStyle={mainContentBodyStyle}\r\n >\r\n {children}\r\n </PanelSideBarLayoutContent>\r\n </MainSection>\r\n </>\r\n );\r\n};\r\n","import { PanelItem } from \"../Definitions/PanelItem\";\r\n\r\nconst getActivePanelInternal = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n): PanelItem<TPanelItemId, TPanelItem> | undefined => items.find((x) => (x.children ? getActivePanelInternal(x.children) : x.active));\r\n\r\nexport const getActivePanel = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n defaultActivePanelId?: TPanelItemId,\r\n) => getActivePanelInternal(items) ?? items.find((x) => (defaultActivePanelId ? x.id === defaultActivePanelId : x.id));\r\n\r\nexport const hasActiveChildren = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) =>\r\n !!getActivePanelInternal(items);\r\n\r\nexport const getActivePanelParentsIds = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n activePanel: TPanelItemId,\r\n) => {\r\n let parentsIds: TPanelItemId[] = [];\r\n\r\n for (const item of items) {\r\n if (item.children && hasActiveChildren(item.children)) {\r\n parentsIds = [...parentsIds, item.id];\r\n parentsIds = [...parentsIds, ...getActivePanelParentsIds(item.children, activePanel)];\r\n }\r\n }\r\n\r\n return parentsIds;\r\n};\r\n","import { PanelItem } from \"../Definitions/PanelItem\";\r\n\r\n/**\r\n * Recursively gets the hidden panel items identifiers\r\n * @param items the panel items\r\n * @returns the hidden panel items identifiers\r\n */\r\nconst getHiddenPanelIds = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let hiddenIds: TPanelItemId[] = [];\r\n\r\n for (const item of items) {\r\n if (item.display === false) {\r\n hiddenIds = [...hiddenIds, item.id];\r\n }\r\n if (item.children) {\r\n hiddenIds = [...hiddenIds, ...getHiddenPanelIds(item.children)];\r\n }\r\n }\r\n\r\n return hiddenIds;\r\n};\r\n\r\n/**\r\n * Recursively gets the children panel items identifiers\r\n * @param children the panel items\r\n * @returns the children panel items identifiers\r\n */\r\nconst getChildrenPanelItemsIds = <TPanelItemId extends string, TPanelItem>(children: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let childrenIds: TPanelItemId[] = [];\r\n\r\n for (const child of children) {\r\n if (child.children) {\r\n childrenIds = [...childrenIds, child.id];\r\n childrenIds = [...childrenIds, ...getChildrenPanelItemsIds(child.children)];\r\n }\r\n }\r\n\r\n return childrenIds;\r\n};\r\n\r\n/**\r\n * Recursively gets the pre-expanded panel items\r\n * @param items the panel items\r\n * @returns the panel items that are pre-expanded\r\n */\r\nconst getPreExpandedMenuItems = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let preExpandedIds: TPanelItemId[] = [];\r\n\r\n for (const x of items) {\r\n if (x.expanded) {\r\n preExpandedIds = [...preExpandedIds, x.id];\r\n }\r\n if (x.children) {\r\n preExpandedIds = [...preExpandedIds, ...getPreExpandedMenuItems(x.children)];\r\n }\r\n }\r\n\r\n return preExpandedIds;\r\n};\r\n\r\nexport { getChildrenPanelItemsIds, getHiddenPanelIds, getPreExpandedMenuItems };\r\n","import React, { Context, createContext, useContext, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { getActivePanel, getActivePanelParentsIds } from \"../Utils/getActivePanel\";\r\nimport { PanelSideBarContextProps } from \"./PanelSideBarContextProps\";\r\nimport { getHiddenPanelIds, getPreExpandedMenuItems } from \"../Utils/panelUtils\";\r\n\r\nexport type MenuItemToggleFn<TPanelItemId extends string> = (menuItemId: TPanelItemId) => void;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst PanelSideBarContext = createContext<PanelSideBarContextProps<any, any> | null>(null);\r\n\r\nexport interface PanelSideBarMenuProviderProps<TPanelItemId extends string, TPanelItem> extends Pick<\r\n PanelSideBarContextProps<TPanelItemId, TPanelItem>,\r\n \"menuItems\" | \"LinkRenderer\" | \"theme\" | \"renderTilesAsLinks\" | \"renderFirstItemsLevelAsTiles\" | \"defaultActivePanelId\"\r\n> {\r\n /**\r\n * The children elements.\r\n */\r\n children: React.ReactNode;\r\n\r\n /**\r\n * if the sidebar should be open by default.\r\n */\r\n sidebarOpenByDefault?: boolean;\r\n}\r\n\r\nexport const PanelSideBarProvider = <TPanelItemId extends string, TPanelItem>(\r\n props: PanelSideBarMenuProviderProps<TPanelItemId, TPanelItem>,\r\n) => {\r\n const {\r\n children,\r\n defaultActivePanelId,\r\n sidebarOpenByDefault = true,\r\n menuItems: defaultMenuItems,\r\n LinkRenderer,\r\n renderTilesAsLinks = false,\r\n renderFirstItemsLevelAsTiles = true,\r\n theme = \"blue\",\r\n } = props;\r\n const mainContentBodyRef = useRef<HTMLElement>(null);\r\n const menuItems = useMemo(() => defaultMenuItems, [defaultMenuItems]);\r\n const [isSidebarOpen, setIsSidebarOpen] = useState(sidebarOpenByDefault);\r\n const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);\r\n\r\n const [activePanelId, setActivePanelId] = useState(getActivePanel(menuItems, defaultActivePanelId)?.id);\r\n const setActivePanel = (panelId: TPanelItemId) => setActivePanelId(panelId);\r\n\r\n const [hiddenMenuItemIds, setHiddenMenuItemsIds] = useState<TPanelItemId[]>(getHiddenPanelIds(menuItems));\r\n\r\n const preExpandedMenuItemIds = getPreExpandedMenuItems(menuItems);\r\n const [toggledMenuItemIds, setToggledMenuItemIds] = useState<TPanelItemId[]>(\r\n activePanelId ? [...preExpandedMenuItemIds, activePanelId] : preExpandedMenuItemIds,\r\n );\r\n const toggleMenuItem: MenuItemToggleFn<TPanelItemId> = (menuItemId) => {\r\n setToggledMenuItemIds((prev) => {\r\n const idExists = prev.includes(menuItemId);\r\n\r\n if (idExists) {\r\n return prev.filter((id) => id !== menuItemId);\r\n }\r\n\r\n return [...prev, menuItemId];\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n const activePanelId = getActivePanel(menuItems, defaultActivePanelId)?.id;\r\n\r\n // eslint-disable-next-line react-hooks/set-state-in-effect\r\n setActivePanelId(activePanelId);\r\n if (activePanelId) {\r\n setToggledMenuItemIds((prev) => {\r\n const toggledMenuItemIds = [...getActivePanelParentsIds(menuItems, activePanelId), activePanelId].filter((x) => !prev.includes(x));\r\n return [...prev, ...toggledMenuItemIds];\r\n });\r\n }\r\n }, [menuItems, defaultActivePanelId]);\r\n\r\n const untoggleMenuItems = () => setToggledMenuItemIds([]);\r\n\r\n const openMenuItems = (panelItemIds: TPanelItemId[]) => {\r\n setToggledMenuItemIds((prev) => [...prev, ...panelItemIds.filter((x) => !prev.includes(x))]);\r\n };\r\n\r\n const closeMenuItems = (panelItemIds: TPanelItemId[], includeActivePanel?: boolean) => {\r\n const activePanels = activePanelId ? [...getActivePanelParentsIds(menuItems, activePanelId), activePanelId] : [];\r\n setToggledMenuItemIds((prev) =>\r\n includeActivePanel\r\n ? prev.filter((x) => !panelItemIds.includes(x))\r\n : prev.filter((x) => !panelItemIds.filter((y) => !activePanels.includes(y)).includes(x)),\r\n );\r\n };\r\n\r\n return (\r\n <PanelSideBarContext.Provider\r\n value={{\r\n menuItems,\r\n activePanelId,\r\n setActivePanel,\r\n toggledMenuItemIds,\r\n toggleMenuItem,\r\n untoggleMenuItems,\r\n isSidebarOpen,\r\n toggleSidebar,\r\n LinkRenderer,\r\n theme,\r\n renderFirstItemsLevelAsTiles,\r\n renderTilesAsLinks,\r\n openMenuItems,\r\n closeMenuItems,\r\n hiddenMenuItemIds,\r\n setHiddenMenuItemsIds,\r\n mainContentBodyRef,\r\n }}\r\n >\r\n {children}\r\n </PanelSideBarContext.Provider>\r\n );\r\n};\r\n\r\nexport const usePanelSideBarContext = <TPanelItemId extends string, TPanelItem>() => {\r\n const context = useContext(PanelSideBarContext as Context<PanelSideBarContextProps<TPanelItemId, TPanelItem>>);\r\n if (context === null) {\r\n throw new Error(\"usePanelSideBarContext must be used within a PanelSideBarProvider\");\r\n }\r\n return context;\r\n};\r\n","import { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport classNames from \"classnames\";\r\nimport { useRef, useEffect } from \"react\";\r\nimport { Collapse, NavItem } from \"@neolution-ch/reactstrap\";\r\nimport { PanelItem } from \"./../PanelSideBar/Definitions/PanelItem\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport { hasActiveChildren } from \"./Utils/getActivePanel\";\r\n\r\nexport interface PanelSideBarItemProps<TPanelItemId extends string, TPanelItem> {\r\n children: PanelItem<TPanelItemId, TPanelItem>;\r\n depth?: number;\r\n active?: boolean;\r\n isParentHidden?: boolean;\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nconst PanelSidebarItemNavLink = <TPanelItemId extends string, TPanelItem>({\r\n item,\r\n collapsedWithIcon,\r\n className,\r\n}: {\r\n item: PanelItem<TPanelItemId, TPanelItem>;\r\n collapsedWithIcon?: boolean;\r\n className?: string;\r\n}) => {\r\n const { icon, title, onSidebarCollapseOptions } = item;\r\n const panelIconClassName = collapsedWithIcon ? \"ms-1 me-3 p-1\" : \"me-2\";\r\n const displayIcon = icon || (collapsedWithIcon && onSidebarCollapseOptions?.fallbackIcon);\r\n\r\n return (\r\n <span className={className}>\r\n {displayIcon && <FontAwesomeIcon icon={displayIcon} className={panelIconClassName} />}\r\n {!collapsedWithIcon || !displayIcon ? title : \"\"}\r\n </span>\r\n );\r\n};\r\n\r\nconst PanelSideBarItem = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarItemProps<TPanelItemId, TPanelItem>) => {\r\n const { depth = 0, children: item, isParentHidden = false, isIconShownOnSidebarCollapse } = props;\r\n const { LinkRenderer, toggledMenuItemIds, toggleMenuItem, hiddenMenuItemIds, isSidebarOpen } = usePanelSideBarContext<\r\n TPanelItemId,\r\n TPanelItem\r\n >();\r\n\r\n const hasItems = !!item.children?.length;\r\n const isActive = (hasItems && item.children && hasActiveChildren(item.children)) || item.active;\r\n const isOpen = toggledMenuItemIds?.includes(item.id);\r\n const scrollToActiveItemRef = useRef<HTMLDivElement>(null);\r\n const collapsedWithIcon = isIconShownOnSidebarCollapse && !isSidebarOpen;\r\n\r\n useEffect(() => {\r\n const currentItem = scrollToActiveItemRef.current;\r\n\r\n if (!item.active || !currentItem) {\r\n return;\r\n }\r\n\r\n currentItem.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\r\n }, [scrollToActiveItemRef, item.active]);\r\n\r\n return (\r\n <>\r\n <NavItem\r\n hidden={isParentHidden || hiddenMenuItemIds.includes(item.id)}\r\n onClick={() => {\r\n if (hasItems && !item.collapseIconOnly) {\r\n toggleMenuItem(item.id);\r\n }\r\n }}\r\n className={classNames({ \"menu-open\": isOpen, active: isActive })}\r\n style={{ paddingLeft: !collapsedWithIcon && depth ? `${depth + 1}rem` : undefined }}\r\n >\r\n <div ref={scrollToActiveItemRef}>\r\n {hasItems ? (\r\n <div className={classNames(\"d-flex flex-row\", { \"justify-content-between\": item.collapseIconOnly })}>\r\n {item.collapseIconOnly && (\r\n <LinkRenderer item={item}>\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem>\r\n className=\"nav-link\"\r\n item={item}\r\n collapsedWithIcon={collapsedWithIcon}\r\n />\r\n </LinkRenderer>\r\n )}\r\n\r\n <a\r\n role=\"button\"\r\n className={classNames(\r\n \"nav-link\",\r\n { \"w-100\": !item.collapseIconOnly },\r\n { \"dropdown-toggle\": hasItems && !collapsedWithIcon },\r\n )}\r\n onClick={() => {\r\n if (item.collapseIconOnly) {\r\n toggleMenuItem(item.id);\r\n }\r\n }}\r\n >\r\n {!item.collapseIconOnly && (\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem> item={item} collapsedWithIcon={collapsedWithIcon} />\r\n )}\r\n </a>\r\n </div>\r\n ) : (\r\n <LinkRenderer item={item}>\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem> className=\"nav-link\" item={item} collapsedWithIcon={collapsedWithIcon} />\r\n </LinkRenderer>\r\n )}\r\n </div>\r\n </NavItem>\r\n {hasItems && (\r\n <Collapse isOpen={isOpen} navbar className={classNames(\"item-menu\", { \"mb-1\": isOpen })}>\r\n {item.children?.map((childItem) => (\r\n <PanelSideBarItem\r\n key={childItem.id}\r\n depth={depth + 1}\r\n active={item.active}\r\n isParentHidden={hiddenMenuItemIds.includes(item.id)}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n >\r\n {childItem}\r\n </PanelSideBarItem>\r\n ))}\r\n </Collapse>\r\n )}\r\n </>\r\n );\r\n};\r\n\r\nexport { PanelSideBarItem };\r\n","import { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { Button } from \"@neolution-ch/reactstrap\";\r\nimport classNames from \"classnames\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\n\r\ninterface ButtonIconProps<TPanelItemId extends string, TPanelItem> {\r\n item: PanelItem<TPanelItemId, TPanelItem>;\r\n activePanelId?: TPanelItemId;\r\n renderTilesAsLinks?: boolean;\r\n setActivePanel: (panelId: TPanelItemId) => void;\r\n}\r\n\r\nexport const ButtonIcon = <TPanelItemId extends string, TPanelItem>(props: ButtonIconProps<TPanelItemId, TPanelItem>) => {\r\n const {\r\n item: { disabled, icon, onClick, id, title },\r\n activePanelId,\r\n renderTilesAsLinks,\r\n setActivePanel,\r\n } = props;\r\n return (\r\n <Button\r\n key={id}\r\n color=\"primary\"\r\n outline\r\n className={classNames(\"tile\", { active: activePanelId === id })}\r\n onClick={() => {\r\n if (!renderTilesAsLinks) {\r\n if (onClick) {\r\n onClick();\r\n } else {\r\n setActivePanel(id);\r\n }\r\n }\r\n }}\r\n title={typeof title === \"string\" ? String(title) : \"\"}\r\n disabled={disabled}\r\n >\r\n {icon && <FontAwesomeIcon icon={icon} size=\"lg\" fixedWidth />}\r\n </Button>\r\n );\r\n};\r\n","import { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { ButtonIcon } from \"./ButtonIcon\";\r\nimport { PanelLinkRenderer } from \"./Definitions/PanelLinkRenderer\";\r\n\r\ninterface PanelItemsRendererProps<TPanelItemId extends string, TPanelItem> {\r\n items: PanelItem<TPanelItemId, TPanelItem>[];\r\n activePanelId?: TPanelItemId;\r\n renderTilesAsLinks?: boolean;\r\n setActivePanel: (panelId: TPanelItemId) => void;\r\n LinkRenderer: PanelLinkRenderer<TPanelItemId, TPanelItem>;\r\n hiddenMenuItemIds: TPanelItemId[];\r\n}\r\nexport const PanelItemsRenderer = <TPanelItemId extends string, TPanelItem>(props: PanelItemsRendererProps<TPanelItemId, TPanelItem>) => {\r\n const { items, activePanelId, renderTilesAsLinks, setActivePanel, LinkRenderer, hiddenMenuItemIds } = props;\r\n return items\r\n\r\n ?.filter((x) => !hiddenMenuItemIds.includes(x.id))\r\n .map((item, index) =>\r\n renderTilesAsLinks ? (\r\n <LinkRenderer key={index} item={item}>\r\n <ButtonIcon item={item} setActivePanel={setActivePanel} activePanelId={activePanelId} renderTilesAsLinks={renderTilesAsLinks} />\r\n </LinkRenderer>\r\n ) : (\r\n <ButtonIcon\r\n key={index}\r\n item={item}\r\n setActivePanel={setActivePanel}\r\n activePanelId={activePanelId}\r\n renderTilesAsLinks={renderTilesAsLinks}\r\n />\r\n ),\r\n );\r\n};\r\n","import classNames from \"classnames\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { PanelSideBarItem } from \"./PanelSideBarItem\";\r\nimport { PanelItemsRenderer } from \"./PanelItemsRenderer\";\r\n\r\ninterface PanelSideBarProps {\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nexport const PanelSideBar = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarProps) => {\r\n const { isIconShownOnSidebarCollapse } = props;\r\n const {\r\n activePanelId,\r\n menuItems,\r\n setActivePanel,\r\n renderFirstItemsLevelAsTiles,\r\n renderTilesAsLinks,\r\n LinkRenderer,\r\n theme,\r\n hiddenMenuItemIds,\r\n } = usePanelSideBarContext<TPanelItemId, TPanelItem>();\r\n\r\n const className = classNames(\r\n \"panel-layout\",\r\n { \"sidenav-dark\": theme === \"dark\" },\r\n { \"sidenav-light\": theme === \"light\" },\r\n { \"sidenav-blue\": theme === \"blue\" },\r\n { \"show-icons\": isIconShownOnSidebarCollapse },\r\n );\r\n\r\n const activePanel: PanelItem<TPanelItemId, TPanelItem> | undefined = menuItems.find((x) => x.id === activePanelId);\r\n\r\n if (renderFirstItemsLevelAsTiles) {\r\n if (menuItems.some((x) => !x.icon)) {\r\n throw new Error(\"Outer panel icon is required\");\r\n }\r\n\r\n return (\r\n <nav id=\"side-nav\" className={className}>\r\n <div className=\"side-nav__tiles\">\r\n {\r\n <PanelItemsRenderer\r\n items={menuItems}\r\n LinkRenderer={LinkRenderer}\r\n hiddenMenuItemIds={hiddenMenuItemIds}\r\n setActivePanel={setActivePanel}\r\n activePanelId={activePanelId}\r\n renderTilesAsLinks={renderTilesAsLinks}\r\n />\r\n }\r\n </div>\r\n <div className=\"side-nav__items\">\r\n {activePanel?.children?.map((item) => (\r\n <PanelSideBarItem<TPanelItemId, TPanelItem> key={item.id} isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}>\r\n {item}\r\n </PanelSideBarItem>\r\n ))}\r\n </div>\r\n </nav>\r\n );\r\n } else {\r\n return (\r\n <nav id=\"side-nav\" className={className}>\r\n <div className=\"side-nav__items\">\r\n {menuItems?.map((item) => (\r\n <PanelSideBarItem<TPanelItemId, TPanelItem> key={item.id} isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}>\r\n {item}\r\n </PanelSideBarItem>\r\n ))}\r\n </div>\r\n </nav>\r\n );\r\n }\r\n};\r\n","import { faAngleLeft, faAngleRight } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { Button, ButtonProps } from \"@neolution-ch/reactstrap\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport classNames from \"classnames\";\r\n\r\ninterface PanelSideBarToggleProps extends ButtonProps {\r\n toggled: boolean;\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nexport const PanelSideBarToggle = (props: PanelSideBarToggleProps) => {\r\n const { toggled, isIconShownOnSidebarCollapse, ...buttonProps } = props;\r\n const { theme } = usePanelSideBarContext();\r\n\r\n return (\r\n <Button\r\n {...buttonProps}\r\n className={classNames(\r\n { \"side-nav-toggle-dark\": theme === \"dark\" },\r\n { \"side-nav-toggle-light\": theme === \"light\" },\r\n { \"side-nav-toggle-blue\": theme === \"blue\" },\r\n { \"show-icons\": isIconShownOnSidebarCollapse },\r\n )}\r\n id=\"side-nav-toggle\"\r\n color=\"primary\"\r\n >\r\n <FontAwesomeIcon className=\"toggler\" icon={toggled ? faAngleRight : faAngleLeft} />\r\n </Button>\r\n );\r\n};\r\n","import { PropsWithChildren, ReactNode, useMemo } from \"react\";\r\nimport \"../../../../styles/Layout/index.scss\";\r\nimport { PanelSideBar } from \"./PanelSideBar/PanelSidebar\";\r\nimport { PanelSideBarLayoutContent } from \"./PanelSideBarLayoutContent\";\r\nimport { PanelSideBarToggle } from \"./PanelSideBar/PanelSideBarToggle\";\r\nimport { PanelSidebarNavbarInternal } from \"./PanelSideBarNavbar\";\r\nimport { usePanelSideBarContext } from \"./PanelSideBar/Context/PanelSideBarContext\";\r\nimport { MainSection } from \"./PanelSideBar/MainSection\";\r\n\r\nexport interface PanelSideBarLayoutProps extends PropsWithChildren {\r\n /**\r\n * The brand content shown on the top navigation bar.\r\n */\r\n brand?: ReactNode;\r\n /**\r\n * The footer content.\r\n */\r\n footer?: ReactNode;\r\n /**\r\n * The collapsible option to choose.\r\n */\r\n collapsible?: boolean;\r\n /**\r\n * The navbar content on the right.\r\n */\r\n navbarRightItems?: ReactNode[];\r\n /**\r\n * The navbar content on the left.\r\n */\r\n navbarLeftItems?: ReactNode[];\r\n\r\n /**\r\n * If using the toggle button instead of the side menu adiacent bar.\r\n */\r\n useToggleButton?: boolean;\r\n\r\n /**\r\n * If use the responsive layout when the screen is sm in order to remove the sidebar overlay.\r\n */\r\n useResponsiveLayout?: boolean;\r\n\r\n /**\r\n * If true, exclude the sidebar menu.\r\n */\r\n excludeSibebarMenu?: boolean;\r\n\r\n /**\r\n * The style applied to the main content body.\r\n */\r\n mainContentBodyStyle?: React.CSSProperties;\r\n}\r\n\r\nexport const PanelSideBarLayout = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarLayoutProps) => {\r\n const {\r\n brand,\r\n children,\r\n navbarLeftItems,\r\n navbarRightItems,\r\n footer,\r\n collapsible = true,\r\n useToggleButton = false,\r\n useResponsiveLayout = false,\r\n excludeSibebarMenu = false,\r\n mainContentBodyStyle,\r\n } = props;\r\n\r\n const { isSidebarOpen, toggleSidebar, theme, renderFirstItemsLevelAsTiles, menuItems, activePanelId, mainContentBodyRef } =\r\n usePanelSideBarContext<TPanelItemId, TPanelItem>();\r\n\r\n if (useResponsiveLayout && !useToggleButton) {\r\n throw new Error(\"Responsive layout can be used only with toggle button in the navbar!\");\r\n }\r\n\r\n const isIconShownOnSidebarCollapse = useMemo(\r\n () => menuItems.find((x) => x.id === activePanelId)?.onSidebarCollapseOptions?.showIcon ?? false,\r\n [menuItems, activePanelId],\r\n );\r\n\r\n return (\r\n <>\r\n <PanelSidebarNavbarInternal\r\n useToggleButton={useToggleButton}\r\n theme={theme}\r\n toggleSidebar={toggleSidebar}\r\n brand={brand}\r\n navbarRightItems={navbarRightItems}\r\n navbarLeftItems={navbarLeftItems}\r\n />\r\n <MainSection\r\n isSidebarOpen={isSidebarOpen}\r\n useResponsiveLayout={useResponsiveLayout}\r\n renderFirstItemsLevelAsTiles={renderFirstItemsLevelAsTiles}\r\n >\r\n {!excludeSibebarMenu && (\r\n <>\r\n <PanelSideBar<TPanelItemId, TPanelItem> isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse} />\r\n {collapsible && !useToggleButton && (\r\n <PanelSideBarToggle\r\n onClick={toggleSidebar}\r\n toggled={!isSidebarOpen}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n />\r\n )}\r\n </>\r\n )}\r\n <PanelSideBarLayoutContent\r\n excludeSibebarMenu={excludeSibebarMenu}\r\n footer={footer}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n mainContentBodyRef={mainContentBodyRef}\r\n mainContentBodyStyle={mainContentBodyStyle}\r\n >\r\n {children}\r\n </PanelSideBarLayoutContent>\r\n </MainSection>\r\n </>\r\n );\r\n};\r\n"],"names":["AuthenticationLayout","props","children","className","footer","logo","_jsx","classNames","_jsxs","defaultNavigationComponents","backPageComponent","nextPageComponent","firstPageComponent","lastPageComponent","Paging","currentItemsPerPage","currentPage","totalRecords","currentRecordCount","pagingPossible","translations","navigationComponents","possiblePageItemCounts","maxPagesShown","showControls","changePageSizePossible","setItemsPerPage","setCurrentPage","maxPage","Math","ceil","firstPageShown","max","min","possibleItemsPerPage","useMemo","filter","value","index","array","indexOf","toSorted","a","b","Row","style","marginBottom","Col","xs","paddingLeft","UncontrolledButtonDropdown","DropdownToggle","caret","color","size","DropdownMenu","DropdownItem","header","itemsPerPageDropdown","map","pageItemCount","onClick","showedItemsText","replace","toString","textAlign","paddingRight","ButtonGroup","Button","outline","disabled","Array","from","length","_","i","page","slice","PanelSidebarNavbarInternal","brand","navbarRightItems","navbarLeftItems","useToggleButton","toggleSidebar","theme","Error","id","FontAwesomeIcon","icon","faBars","Nav","tag","item","NavItem","PanelSidebarNavbar","PanelSideBarLayoutContent","isIconShownOnSidebarCollapse","excludeSibebarMenu","mainContentBodyRef","mainContentBodyStyle","ref","hidden","MainSection","isSidebarOpen","useResponsiveLayout","renderFirstItemsLevelAsTiles","toggled","NavbarLayout","_Fragment","getActivePanelInternal","items","find","x","active","getActivePanel","defaultActivePanelId","hasActiveChildren","getActivePanelParentsIds","activePanel","parentsIds","getHiddenPanelIds","hiddenIds","display","getChildrenPanelItemsIds","childrenIds","child","getPreExpandedMenuItems","preExpandedIds","expanded","PanelSideBarContext","createContext","PanelSideBarProvider","sidebarOpenByDefault","menuItems","defaultMenuItems","LinkRenderer","renderTilesAsLinks","useRef","setIsSidebarOpen","useState","activePanelId","setActivePanelId","hiddenMenuItemIds","setHiddenMenuItemsIds","preExpandedMenuItemIds","toggledMenuItemIds","setToggledMenuItemIds","useEffect","prev","includes","Provider","setActivePanel","panelId","toggleMenuItem","menuItemId","untoggleMenuItems","openMenuItems","panelItemIds","closeMenuItems","includeActivePanel","activePanels","y","usePanelSideBarContext","context","useContext","PanelSidebarItemNavLink","collapsedWithIcon","title","onSidebarCollapseOptions","panelIconClassName","displayIcon","fallbackIcon","PanelSideBarItem","depth","isParentHidden","hasItems","isActive","isOpen","scrollToActiveItemRef","currentItem","current","scrollIntoView","behavior","block","collapseIconOnly","undefined","role","Collapse","navbar","childItem","ButtonIcon","String","fixedWidth","PanelItemsRenderer","PanelSideBar","some","PanelSideBarToggle","buttonProps","faAngleRight","faAngleLeft","PanelSideBarLayout","collapsible","showIcon"],"mappings":"sjBAUA,MAAMA,EAAwBC,IAC5B,MAAMC,SAAEA,EAAQC,UAAEA,EAASC,OAAEA,EAAMC,KAAEA,GAASJ,EAE9C,OACEK,EAAA,MAAA,CAAKH,UAAWI,EAAW,gBAAiBJ,GAAUD,SACpDM,EAAA,MAAA,CAAKL,UAAU,4BAA2BD,SAAA,CACxCI,EAAA,QAAA,CAAOH,UAAU,uBACjBK,EAAA,OAAA,CAAML,UAAU,gBAAeD,SAAA,CAC5BG,GAAQC,SAAKH,UAAU,kBAAiBD,SAAEG,IAE3CC,EAAA,UAAA,CAAAJ,SAAUA,OAEZI,EAAA,QAAA,CAAOH,UAAU,wBACjBG,EAAA,SAAA,CAAQH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BAAkBA,EAClBC,gBAAiBA,IAEnBzE,EAAC8F,EAAW,CACVC,cAAeA,EACfC,oBAAqBA,EACrBC,6BAA8BA,EAA4BvG,SAAA,EAExD+F,GACAzF,EAAAoG,EAAA,CAAA1G,SAAA,CACEI,EAAC4L,EAAY,CAA2BlG,6BAA8BA,IACrEyG,IAAgBvH,GACf5E,EAAC8L,EAAkB,CACjBvI,QAASsB,EACTuB,SAAUH,EACVP,6BAA8BA,OAKtC1F,EAACyF,EAAyB,CACxBE,mBAAoBA,EACpB7F,OAAQA,EACR4F,6BAA8BA,EAC9BE,mBAAoBA,EACpBC,qBAAsBA,EAAoBjG,SAEzCA,SAGJ"}
@@ -0,0 +1,2 @@
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react/jsx-runtime"),require("classnames"),require("@neolution-ch/reactstrap"),require("react"),require("@fortawesome/free-solid-svg-icons"),require("@fortawesome/react-fontawesome")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","classnames","@neolution-ch/reactstrap","react","@fortawesome/free-solid-svg-icons","@fortawesome/react-fontawesome"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).ReactPatternUI={},e.jsxRuntime,e.classNames,e.reactstrap,e.React,e.freeSolidSvgIcons,e.reactFontawesome)}(this,(function(e,n,s,t,i,a,o){"use strict";const l={backPageComponent:"<",nextPageComponent:">",firstPageComponent:"<<",lastPageComponent:">>"},r=e=>{const{brand:i,navbarRightItems:l,navbarLeftItems:r,useToggleButton:d,toggleSidebar:c,theme:m}=e;if(d&&!c)throw new Error("You must provide the toggleSidebar function when useToggleButton is true.");return n.jsxs("nav",{id:"nav-top",className:s("panel-layout navbar navbar-expand",{"navbar-dark":"dark"===m},{"navbar-light":"light"===m},{"navbar-blue":"blue"===m}),children:[n.jsx("div",{className:"navbar-brand",children:i}),d&&n.jsx("button",{id:"sidebar-toggle",className:"btn btn-link btn-sm order-0 me-lg-0",onClick:()=>c&&c(),children:n.jsx(o.FontAwesomeIcon,{icon:a.faBars,size:"2x"})}),n.jsxs(t.Nav,{tag:"div",className:"top-navbar flex-row justify-content-between",children:[n.jsx("span",{className:"d-flex flex-row justify-content-start align-items-center",children:r?.map(((e,s)=>n.jsx(t.NavItem,{tag:"div",className:"navbar-custom-item",children:e},s)))}),n.jsx("span",{className:"d-flex flex-row justify-content-end align-items-center",children:l?.map(((e,s)=>n.jsx(t.NavItem,{tag:"div",className:"navbar-custom-item",children:e},s)))})]})]})},d=e=>{const{children:t,footer:i,isIconShownOnSidebarCollapse:a,excludeSibebarMenu:o,mainContentBodyRef:l,mainContentBodyStyle:r}=e;return n.jsxs("section",{ref:l,id:"main-content-body",style:r,className:s("content",{"show-icons":a},{"exclude-sidebar-menu":o}),children:[n.jsx("main",{className:"container-fluid",children:t}),n.jsx("footer",{hidden:!i,className:"py-4 bg-light mt-auto",children:n.jsx("div",{className:"mx-4",children:n.jsx("div",{className:"layout-sidenav__footer",children:i})})})]})},c=e=>{const{children:t,isSidebarOpen:i,useResponsiveLayout:a=!1,renderFirstItemsLevelAsTiles:o}=e;return n.jsx("section",{id:"main-section",className:s({toggled:!i},{"responsive-layout":a},{"section-no-tiles":!o},{"section-tiles":o}),children:t})},m=e=>e.find((e=>e.children?m(e.children):e.active)),u=(e,n)=>m(e)??e.find((e=>n?e.id===n:e.id)),h=e=>!!m(e),g=(e,n)=>{let s=[];for(const n of e)n.children&&h(n.children)&&(s=[...s,n.id],s=[...s,...g(n.children)]);return s},x=e=>{let n=[];for(const s of e)!1===s.display&&(n=[...n,s.id]),s.children&&(n=[...n,...x(s.children)]);return n},p=e=>{let n=[];for(const s of e)s.children&&(n=[...n,s.id],n=[...n,...p(s.children)]);return n},v=e=>{let n=[];for(const s of e)s.expanded&&(n=[...n,s.id]),s.children&&(n=[...n,...v(s.children)]);return n},f=i.createContext(null),b=()=>{const e=i.useContext(f);if(null===e)throw new Error("usePanelSideBarContext must be used within a PanelSideBarProvider");return e},I=({item:e,collapsedWithIcon:s,className:t})=>{const{icon:i,title:a,onSidebarCollapseOptions:l}=e,r=s?"ms-1 me-3 p-1":"me-2",d=i||s&&l?.fallbackIcon;return n.jsxs("span",{className:t,children:[d&&n.jsx(o.FontAwesomeIcon,{icon:d,className:r}),s&&d?"":a]})},j=e=>{const{depth:a=0,children:o,isParentHidden:l=!1,isIconShownOnSidebarCollapse:r}=e,{LinkRenderer:d,toggledMenuItemIds:c,toggleMenuItem:m,hiddenMenuItemIds:u,isSidebarOpen:g}=b(),x=!!o.children?.length,p=x&&o.children&&h(o.children)||o.active,v=c?.includes(o.id),f=i.useRef(null),S=r&&!g;return i.useEffect((()=>{const e=f.current;o.active&&e&&e.scrollIntoView({behavior:"smooth",block:"center"})}),[f,o.active]),n.jsxs(n.Fragment,{children:[n.jsx(t.NavItem,{hidden:l||u.includes(o.id),onClick:()=>{x&&!o.collapseIconOnly&&m(o.id)},className:s({"menu-open":v,active:p}),style:{paddingLeft:!S&&a?`${a+1}rem`:void 0},children:n.jsx("div",{ref:f,children:x?n.jsxs("div",{className:s("d-flex flex-row",{"justify-content-between":o.collapseIconOnly}),children:[o.collapseIconOnly&&n.jsx(d,{item:o,children:n.jsx(I,{className:"nav-link",item:o,collapsedWithIcon:S})}),n.jsx("a",{role:"button",className:s("nav-link",{"w-100":!o.collapseIconOnly},{"dropdown-toggle":x&&!S}),onClick:()=>{o.collapseIconOnly&&m(o.id)},children:!o.collapseIconOnly&&n.jsx(I,{item:o,collapsedWithIcon:S})})]}):n.jsx(d,{item:o,children:n.jsx(I,{className:"nav-link",item:o,collapsedWithIcon:S})})})}),x&&n.jsx(t.Collapse,{isOpen:v,navbar:!0,className:s("item-menu",{"mb-1":v}),children:o.children?.map((e=>n.jsx(j,{depth:a+1,active:o.active,isParentHidden:u.includes(o.id),isIconShownOnSidebarCollapse:r,children:e},e.id)))})]})},S=e=>{const{item:{disabled:i,icon:a,onClick:l,id:r,title:d},activePanelId:c,renderTilesAsLinks:m,setActivePanel:u}=e;return n.jsx(t.Button,{color:"primary",outline:!0,className:s("tile",{active:c===r}),onClick:()=>{m||(l?l():u(r))},title:"string"==typeof d?String(d):"",disabled:i,children:a&&n.jsx(o.FontAwesomeIcon,{icon:a,size:"lg",fixedWidth:!0})},r)},y=e=>{const{items:s,activePanelId:t,renderTilesAsLinks:i,setActivePanel:a,LinkRenderer:o,hiddenMenuItemIds:l}=e;return s?.filter((e=>!l.includes(e.id))).map(((e,s)=>i?n.jsx(o,{item:e,children:n.jsx(S,{item:e,setActivePanel:a,activePanelId:t,renderTilesAsLinks:i})},s):n.jsx(S,{item:e,setActivePanel:a,activePanelId:t,renderTilesAsLinks:i},s)))},C=e=>{const{isIconShownOnSidebarCollapse:t}=e,{activePanelId:i,menuItems:a,setActivePanel:o,renderFirstItemsLevelAsTiles:l,renderTilesAsLinks:r,LinkRenderer:d,theme:c,hiddenMenuItemIds:m}=b(),u=s("panel-layout",{"sidenav-dark":"dark"===c},{"sidenav-light":"light"===c},{"sidenav-blue":"blue"===c},{"show-icons":t}),h=a.find((e=>e.id===i));if(l){if(a.some((e=>!e.icon)))throw new Error("Outer panel icon is required");return n.jsxs("nav",{id:"side-nav",className:u,children:[n.jsx("div",{className:"side-nav__tiles",children:n.jsx(y,{items:a,LinkRenderer:d,hiddenMenuItemIds:m,setActivePanel:o,activePanelId:i,renderTilesAsLinks:r})}),n.jsx("div",{className:"side-nav__items",children:h?.children?.map((e=>n.jsx(j,{isIconShownOnSidebarCollapse:t,children:e},e.id)))})]})}return n.jsx("nav",{id:"side-nav",className:u,children:n.jsx("div",{className:"side-nav__items",children:a?.map((e=>n.jsx(j,{isIconShownOnSidebarCollapse:t,children:e},e.id)))})})},w=e=>{const{toggled:i,isIconShownOnSidebarCollapse:l,...r}=e,{theme:d}=b();return n.jsx(t.Button,{...r,className:s({"side-nav-toggle-dark":"dark"===d},{"side-nav-toggle-light":"light"===d},{"side-nav-toggle-blue":"blue"===d},{"show-icons":l}),id:"side-nav-toggle",color:"primary",children:n.jsx(o.FontAwesomeIcon,{className:"toggler",icon:i?a.faAngleRight:a.faAngleLeft})})};e.AuthenticationLayout=e=>{const{children:t,className:i,footer:a,logo:o}=e;return n.jsx("div",{className:s("auth__wrapper",i),children:n.jsxs("div",{className:"container auth__container",children:[n.jsx("aside",{className:"auth__sidebar-left"}),n.jsxs("main",{className:"auth__content",children:[o&&n.jsx("div",{className:"auth__logo mb-4",children:o}),n.jsx("article",{children:t})]}),n.jsx("aside",{className:"auth__sidebar-right"}),n.jsx("footer",{className:"auth__footer",children:a})]})})},e.NavbarLayout=e=>{const{brand:s,children:t,navbarLeftItems:i,navbarRightItems:a,footer:o,useResponsiveLayout:l=!1,mainContentBodyRef:m,theme:u,mainContentBodyStyle:h}=e;return n.jsxs(n.Fragment,{children:[n.jsx(r,{useToggleButton:!1,theme:u,brand:s,navbarRightItems:a,navbarLeftItems:i}),n.jsx(c,{isSidebarOpen:!1,useResponsiveLayout:l,children:n.jsx(d,{excludeSibebarMenu:!0,footer:o,isIconShownOnSidebarCollapse:!1,mainContentBodyRef:m,mainContentBodyStyle:h,children:t})})]})},e.Paging=({currentItemsPerPage:e,currentPage:s,totalRecords:a,currentRecordCount:o,pagingPossible:r=!0,translations:d,navigationComponents:c=l,possiblePageItemCounts:m,maxPagesShown:u=7,showControls:h=!0,changePageSizePossible:g=!0,setItemsPerPage:x,setCurrentPage:p})=>{const{backPageComponent:v,nextPageComponent:f,firstPageComponent:b,lastPageComponent:I}=c,j=Math.ceil(a/e),S=Math.max(0,Math.min(s-Math.ceil(u/2),j-u)),y=i.useMemo((()=>[...m??[25,50,100,200],e].filter(((e,n,s)=>s.indexOf(e)===n)).toSorted(((e,n)=>e-n))),[e,m]);return n.jsx("div",{className:"container-fluid paging",children:n.jsxs(t.Row,{style:{marginBottom:"20px"},children:[n.jsxs(t.Col,{xs:r&&e<a?6:12,style:{paddingLeft:0},children:[r&&g&&n.jsxs(t.UncontrolledButtonDropdown,{children:[n.jsx(t.DropdownToggle,{caret:!0,color:"link",size:"sm",children:e}),n.jsxs(t.DropdownMenu,{children:[n.jsx(t.DropdownItem,{header:!0,children:d.itemsPerPageDropdown}),y.map((e=>n.jsx(t.DropdownItem,{onClick:()=>x(e),children:e},`pageItemCount_${e}`)))]})]}),n.jsx("span",{className:"small ml-2",children:d.showedItemsText.replace("{from}",((s-1)*e+1).toString()).replace("{to}",((s-1)*e+o).toString()).replace("{total}",a.toString())})]}),r&&e<a&&n.jsx(t.Col,{xs:6,style:{textAlign:"right",paddingRight:0},children:n.jsxs(t.ButtonGroup,{size:"sm",children:[h&&n.jsx(t.Button,{color:"secondary",outline:!0,disabled:1===s,onClick:()=>p(1),children:b}),h&&n.jsx(t.Button,{color:"secondary",outline:!0,disabled:1===s,onClick:()=>p(s-1),children:v}),Array.from({length:j+1},((e,n)=>n)).filter((e=>e>S)).slice(0,u).map((e=>n.jsx(t.Button,{outline:s!==e,color:"secondary",onClick:()=>p(e),children:e},e))),h&&n.jsx(t.Button,{color:"secondary",outline:!0,disabled:s===j,onClick:()=>p(s+1),children:f}),h&&n.jsx(t.Button,{color:"secondary",outline:!0,disabled:s===j,onClick:()=>p(j),children:I})]})})]})})},e.PanelSideBarLayout=e=>{const{brand:s,children:t,navbarLeftItems:a,navbarRightItems:o,footer:l,collapsible:m=!0,useToggleButton:u=!1,useResponsiveLayout:h=!1,excludeSibebarMenu:g=!1,mainContentBodyStyle:x}=e,{isSidebarOpen:p,toggleSidebar:v,theme:f,renderFirstItemsLevelAsTiles:I,menuItems:j,activePanelId:S,mainContentBodyRef:y}=b();if(h&&!u)throw new Error("Responsive layout can be used only with toggle button in the navbar!");const P=i.useMemo((()=>j.find((e=>e.id===S))?.onSidebarCollapseOptions?.showIcon??!1),[j,S]);return n.jsxs(n.Fragment,{children:[n.jsx(r,{useToggleButton:u,theme:f,toggleSidebar:v,brand:s,navbarRightItems:o,navbarLeftItems:a}),n.jsxs(c,{isSidebarOpen:p,useResponsiveLayout:h,renderFirstItemsLevelAsTiles:I,children:[!g&&n.jsxs(n.Fragment,{children:[n.jsx(C,{isIconShownOnSidebarCollapse:P}),m&&!u&&n.jsx(w,{onClick:v,toggled:!p,isIconShownOnSidebarCollapse:P})]}),n.jsx(d,{excludeSibebarMenu:g,footer:l,isIconShownOnSidebarCollapse:P,mainContentBodyRef:y,mainContentBodyStyle:x,children:t})]})]})},e.PanelSideBarProvider=e=>{const{children:s,defaultActivePanelId:t,sidebarOpenByDefault:a=!0,menuItems:o,LinkRenderer:l,renderTilesAsLinks:r=!1,renderFirstItemsLevelAsTiles:d=!0,theme:c="blue"}=e,m=i.useRef(null),h=i.useMemo((()=>o),[o]),[p,b]=i.useState(a),[I,j]=i.useState(u(h,t)?.id),[S,y]=i.useState(x(h)),C=v(h),[w,P]=i.useState(I?[...C,I]:C);i.useEffect((()=>{const e=u(h,t)?.id;j(e),e&&P((n=>{const s=[...g(h),e].filter((e=>!n.includes(e)));return[...n,...s]}))}),[h,t]);return n.jsx(f.Provider,{value:{menuItems:h,activePanelId:I,setActivePanel:e=>j(e),toggledMenuItemIds:w,toggleMenuItem:e=>{P((n=>n.includes(e)?n.filter((n=>n!==e)):[...n,e]))},untoggleMenuItems:()=>P([]),isSidebarOpen:p,toggleSidebar:()=>b((e=>!e)),LinkRenderer:l,theme:c,renderFirstItemsLevelAsTiles:d,renderTilesAsLinks:r,openMenuItems:e=>{P((n=>[...n,...e.filter((e=>!n.includes(e)))]))},closeMenuItems:(e,n)=>{const s=I?[...g(h),I]:[];P((t=>n?t.filter((n=>!e.includes(n))):t.filter((n=>!e.filter((e=>!s.includes(e))).includes(n)))))},hiddenMenuItemIds:S,setHiddenMenuItemsIds:y,mainContentBodyRef:m},children:s})},e.PanelSidebarNavbar=e=>n.jsx(r,{...e,useToggleButton:!1}),e.getChildrenPanelItemsIds=p,e.getHiddenPanelIds=x,e.getPreExpandedMenuItems=v,e.usePanelSideBarContext=b}));
2
+ //# sourceMappingURL=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.js","sources":["../src/lib/Layout/AuthenticationLayout.tsx","../src/lib/Paging/Paging.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarNavbar.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarLayoutContent.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/MainSection.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/getActivePanel.ts","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Utils/panelUtils.ts","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/Context/PanelSideBarContext.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSideBarItem.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/ButtonIcon.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelItemsRenderer.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSidebar.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBar/PanelSideBarToggle.tsx","../src/lib/Layout/PanelSideBarLayout/NavbarLayout.tsx","../src/lib/Layout/PanelSideBarLayout/PanelSideBarLayout.tsx"],"sourcesContent":["import classNames from \"classnames\";\r\nimport { PropsWithChildren, ReactNode } from \"react\";\r\nimport \"../../../styles/Layout/AuthenticationLayout.scss\";\r\n\r\ninterface AuthenticationLayoutProps {\r\n className?: string;\r\n footer?: ReactNode;\r\n logo?: ReactNode;\r\n}\r\n\r\nconst AuthenticationLayout = (props: PropsWithChildren<AuthenticationLayoutProps>) => {\r\n const { children, className, footer, logo } = props;\r\n\r\n return (\r\n <div className={classNames(\"auth__wrapper\", className)}>\r\n <div className=\"container auth__container\">\r\n <aside className=\"auth__sidebar-left\" />\r\n <main className=\"auth__content\">\r\n {logo && <div className=\"auth__logo mb-4\">{logo}</div>}\r\n\r\n <article>{children}</article>\r\n </main>\r\n <aside className=\"auth__sidebar-right\" />\r\n <footer className=\"auth__footer\">{footer}</footer>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport { AuthenticationLayout, AuthenticationLayoutProps };\r\n","import {\r\n Button,\r\n ButtonGroup,\r\n Col,\r\n DropdownItem,\r\n DropdownMenu,\r\n DropdownToggle,\r\n Row,\r\n UncontrolledButtonDropdown,\r\n} from \"@neolution-ch/reactstrap\";\r\nimport { ReactNode, useMemo } from \"react\";\r\n\r\ninterface PagingProps {\r\n currentItemsPerPage: number;\r\n currentPage: number;\r\n totalRecords: number;\r\n currentRecordCount: number;\r\n pagingPossible?: boolean;\r\n translations: PagingTranslations;\r\n navigationComponents?: PagingNavigationComponents;\r\n possiblePageItemCounts?: number[];\r\n maxPagesShown?: number;\r\n showControls?: boolean;\r\n changePageSizePossible?: boolean;\r\n setItemsPerPage(itemsPerPage: number): void;\r\n setCurrentPage(itemsPerPage: number): void;\r\n}\r\n\r\ninterface PagingTranslations {\r\n showedItemsText: string;\r\n itemsPerPageDropdown: string;\r\n}\r\n\r\ninterface PagingNavigationComponents {\r\n backPageComponent: ReactNode;\r\n nextPageComponent: ReactNode;\r\n firstPageComponent: ReactNode;\r\n lastPageComponent: ReactNode;\r\n}\r\n\r\nconst defaultNavigationComponents: PagingNavigationComponents = {\r\n backPageComponent: \"<\",\r\n nextPageComponent: \">\",\r\n firstPageComponent: \"<<\",\r\n lastPageComponent: \">>\",\r\n};\r\n\r\nconst Paging = ({\r\n currentItemsPerPage,\r\n currentPage,\r\n totalRecords,\r\n currentRecordCount,\r\n pagingPossible = true,\r\n translations,\r\n navigationComponents = defaultNavigationComponents,\r\n possiblePageItemCounts,\r\n maxPagesShown = 7,\r\n showControls = true,\r\n changePageSizePossible = true,\r\n setItemsPerPage,\r\n setCurrentPage,\r\n}: PagingProps) => {\r\n const { backPageComponent, nextPageComponent, firstPageComponent, lastPageComponent } = navigationComponents;\r\n const maxPage = Math.ceil(totalRecords / currentItemsPerPage);\r\n const firstPageShown = Math.max(0, Math.min(currentPage - Math.ceil(maxPagesShown / 2), maxPage - maxPagesShown));\r\n\r\n const possibleItemsPerPage = useMemo(\r\n () =>\r\n [...(possiblePageItemCounts ?? [25, 50, 100, 200]), currentItemsPerPage]\r\n .filter((value, index, array) => array.indexOf(value) === index)\r\n .toSorted((a, b) => a - b),\r\n [currentItemsPerPage, possiblePageItemCounts],\r\n );\r\n\r\n return (\r\n <div className=\"container-fluid paging\">\r\n <Row style={{ marginBottom: \"20px\" }}>\r\n <Col xs={pagingPossible && currentItemsPerPage < totalRecords ? 6 : 12} style={{ paddingLeft: 0 }}>\r\n {pagingPossible && changePageSizePossible && (\r\n <UncontrolledButtonDropdown>\r\n <DropdownToggle caret color=\"link\" size=\"sm\">\r\n {currentItemsPerPage}\r\n </DropdownToggle>\r\n <DropdownMenu>\r\n <DropdownItem header>{translations.itemsPerPageDropdown}</DropdownItem>\r\n {possibleItemsPerPage.map((pageItemCount) => (\r\n <DropdownItem key={`pageItemCount_${pageItemCount}`} onClick={() => setItemsPerPage(pageItemCount)}>\r\n {pageItemCount}\r\n </DropdownItem>\r\n ))}\r\n </DropdownMenu>\r\n </UncontrolledButtonDropdown>\r\n )}\r\n <span className=\"small ml-2\">\r\n {translations.showedItemsText\r\n .replace(\"{from}\", ((currentPage - 1) * currentItemsPerPage + 1).toString())\r\n .replace(\"{to}\", ((currentPage - 1) * currentItemsPerPage + currentRecordCount).toString())\r\n .replace(\"{total}\", totalRecords.toString())}\r\n </span>\r\n </Col>\r\n\r\n {pagingPossible && currentItemsPerPage < totalRecords && (\r\n <Col xs={6} style={{ textAlign: \"right\", paddingRight: 0 }}>\r\n <ButtonGroup size=\"sm\">\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === 1} onClick={() => setCurrentPage(1)}>\r\n {firstPageComponent}\r\n </Button>\r\n )}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === 1} onClick={() => setCurrentPage(currentPage - 1)}>\r\n {backPageComponent}\r\n </Button>\r\n )}\r\n {Array.from({ length: maxPage + 1 }, (_, i) => i)\r\n .filter((page) => page > firstPageShown)\r\n .slice(0, maxPagesShown)\r\n .map((page) => (\r\n <Button key={page} outline={currentPage !== page} color=\"secondary\" onClick={() => setCurrentPage(page)}>\r\n {page}\r\n </Button>\r\n ))}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === maxPage} onClick={() => setCurrentPage(currentPage + 1)}>\r\n {nextPageComponent}\r\n </Button>\r\n )}\r\n {showControls && (\r\n <Button color=\"secondary\" outline disabled={currentPage === maxPage} onClick={() => setCurrentPage(maxPage)}>\r\n {lastPageComponent}\r\n </Button>\r\n )}\r\n </ButtonGroup>\r\n </Col>\r\n )}\r\n </Row>\r\n </div>\r\n );\r\n};\r\n\r\nexport { Paging, PagingProps, PagingTranslations, PagingNavigationComponents };\r\n","import { faBars } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { ReactNode } from \"react\";\r\nimport { Nav, NavItem } from \"@neolution-ch/reactstrap\";\r\nimport classNames from \"classnames\";\r\nimport { SidebarProps } from \"./PanelSideBar/Context/PanelSideBarContextProps\";\r\n\r\nexport interface PanelSidebarNavbarInternalProps extends Pick<Partial<SidebarProps>, \"theme\" | \"toggleSidebar\"> {\r\n /**\r\n * The brand content shown on the top navigation bar.\r\n */\r\n brand?: ReactNode;\r\n /**\r\n * The menu content on the right.\r\n */\r\n navbarLeftItems?: ReactNode[];\r\n /**\r\n * The menu content on the left.\r\n */\r\n navbarRightItems?: ReactNode[];\r\n\r\n /**\r\n * The menu content on the left.\r\n */\r\n useToggleButton?: boolean;\r\n}\r\n\r\nconst PanelSidebarNavbarInternal = (props: PanelSidebarNavbarInternalProps) => {\r\n const { brand, navbarRightItems, navbarLeftItems, useToggleButton, toggleSidebar, theme } = props;\r\n\r\n if (useToggleButton && !toggleSidebar) {\r\n throw new Error(\"You must provide the toggleSidebar function when useToggleButton is true.\");\r\n }\r\n\r\n return (\r\n <nav\r\n id=\"nav-top\"\r\n className={classNames(\r\n \"panel-layout navbar navbar-expand\",\r\n { \"navbar-dark\": theme === \"dark\" },\r\n { \"navbar-light\": theme === \"light\" },\r\n { \"navbar-blue\": theme === \"blue\" },\r\n )}\r\n >\r\n <div className=\"navbar-brand\">{brand}</div>\r\n {useToggleButton && (\r\n <button id=\"sidebar-toggle\" className=\"btn btn-link btn-sm order-0 me-lg-0\" onClick={() => toggleSidebar && toggleSidebar()}>\r\n <FontAwesomeIcon icon={faBars} size=\"2x\" />\r\n </button>\r\n )}\r\n <Nav tag=\"div\" className=\"top-navbar flex-row justify-content-between\">\r\n <span className=\"d-flex flex-row justify-content-start align-items-center\">\r\n {navbarLeftItems?.map((item, index) => (\r\n <NavItem tag=\"div\" key={index} className=\"navbar-custom-item\">\r\n {item}\r\n </NavItem>\r\n ))}\r\n </span>\r\n <span className=\"d-flex flex-row justify-content-end align-items-center\">\r\n {navbarRightItems?.map((item, index) => (\r\n <NavItem tag=\"div\" key={index} className=\"navbar-custom-item\">\r\n {item}\r\n </NavItem>\r\n ))}\r\n </span>\r\n </Nav>\r\n </nav>\r\n );\r\n};\r\n\r\nexport type PanelSidebarNavbarProps = Omit<PanelSidebarNavbarInternalProps, \"toggleSidebar\" | \"useToggleButton\">;\r\n\r\nconst PanelSidebarNavbar = (props: PanelSidebarNavbarProps) => {\r\n return <PanelSidebarNavbarInternal {...props} useToggleButton={false} />;\r\n};\r\n\r\nexport { PanelSidebarNavbarInternal, PanelSidebarNavbar };\r\n","import classNames from \"classnames\";\r\nimport { CSSProperties, PropsWithChildren, ReactNode, RefObject } from \"react\";\r\n\r\ninterface PanelSideBarLayoutContentProps extends PropsWithChildren {\r\n footer?: ReactNode;\r\n isIconShownOnSidebarCollapse: boolean;\r\n excludeSibebarMenu: boolean;\r\n mainContentBodyRef?: RefObject<HTMLElement | null>;\r\n mainContentBodyStyle?: CSSProperties;\r\n}\r\n\r\nexport const PanelSideBarLayoutContent = (props: PanelSideBarLayoutContentProps) => {\r\n const { children, footer, isIconShownOnSidebarCollapse, excludeSibebarMenu, mainContentBodyRef, mainContentBodyStyle } = props;\r\n\r\n return (\r\n <section\r\n ref={mainContentBodyRef}\r\n id=\"main-content-body\"\r\n style={mainContentBodyStyle}\r\n className={classNames(\"content\", { \"show-icons\": isIconShownOnSidebarCollapse }, { \"exclude-sidebar-menu\": excludeSibebarMenu })}\r\n >\r\n <main className=\"container-fluid\">{children}</main>\r\n <footer hidden={!footer} className=\"py-4 bg-light mt-auto\">\r\n <div className=\"mx-4\">\r\n <div className=\"layout-sidenav__footer\">{footer}</div>\r\n </div>\r\n </footer>\r\n </section>\r\n );\r\n};\r\n","import classNames from \"classnames\";\r\nimport { PropsWithChildren } from \"react\";\r\n\r\ninterface MainSectionProps extends PropsWithChildren {\r\n isSidebarOpen: boolean;\r\n useResponsiveLayout?: boolean;\r\n renderFirstItemsLevelAsTiles?: boolean;\r\n}\r\n\r\nconst MainSection = (props: MainSectionProps) => {\r\n const { children, isSidebarOpen, useResponsiveLayout = false, renderFirstItemsLevelAsTiles } = props;\r\n return (\r\n <section\r\n id=\"main-section\"\r\n className={classNames(\r\n { toggled: !isSidebarOpen },\r\n { \"responsive-layout\": useResponsiveLayout },\r\n { \"section-no-tiles\": !renderFirstItemsLevelAsTiles },\r\n { \"section-tiles\": renderFirstItemsLevelAsTiles },\r\n )}\r\n >\r\n {children}\r\n </section>\r\n );\r\n};\r\n\r\nexport { MainSection };\r\n","import { PanelItem } from \"../Definitions/PanelItem\";\r\n\r\nconst getActivePanelInternal = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n): PanelItem<TPanelItemId, TPanelItem> | undefined => items.find((x) => (x.children ? getActivePanelInternal(x.children) : x.active));\r\n\r\nexport const getActivePanel = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n defaultActivePanelId?: TPanelItemId,\r\n) => getActivePanelInternal(items) ?? items.find((x) => (defaultActivePanelId ? x.id === defaultActivePanelId : x.id));\r\n\r\nexport const hasActiveChildren = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) =>\r\n !!getActivePanelInternal(items);\r\n\r\nexport const getActivePanelParentsIds = <TPanelItemId extends string, TPanelItem>(\r\n items: PanelItem<TPanelItemId, TPanelItem>[],\r\n activePanel: TPanelItemId,\r\n) => {\r\n let parentsIds: TPanelItemId[] = [];\r\n\r\n for (const item of items) {\r\n if (item.children && hasActiveChildren(item.children)) {\r\n parentsIds = [...parentsIds, item.id];\r\n parentsIds = [...parentsIds, ...getActivePanelParentsIds(item.children, activePanel)];\r\n }\r\n }\r\n\r\n return parentsIds;\r\n};\r\n","import { PanelItem } from \"../Definitions/PanelItem\";\r\n\r\n/**\r\n * Recursively gets the hidden panel items identifiers\r\n * @param items the panel items\r\n * @returns the hidden panel items identifiers\r\n */\r\nconst getHiddenPanelIds = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let hiddenIds: TPanelItemId[] = [];\r\n\r\n for (const item of items) {\r\n if (item.display === false) {\r\n hiddenIds = [...hiddenIds, item.id];\r\n }\r\n if (item.children) {\r\n hiddenIds = [...hiddenIds, ...getHiddenPanelIds(item.children)];\r\n }\r\n }\r\n\r\n return hiddenIds;\r\n};\r\n\r\n/**\r\n * Recursively gets the children panel items identifiers\r\n * @param children the panel items\r\n * @returns the children panel items identifiers\r\n */\r\nconst getChildrenPanelItemsIds = <TPanelItemId extends string, TPanelItem>(children: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let childrenIds: TPanelItemId[] = [];\r\n\r\n for (const child of children) {\r\n if (child.children) {\r\n childrenIds = [...childrenIds, child.id];\r\n childrenIds = [...childrenIds, ...getChildrenPanelItemsIds(child.children)];\r\n }\r\n }\r\n\r\n return childrenIds;\r\n};\r\n\r\n/**\r\n * Recursively gets the pre-expanded panel items\r\n * @param items the panel items\r\n * @returns the panel items that are pre-expanded\r\n */\r\nconst getPreExpandedMenuItems = <TPanelItemId extends string, TPanelItem>(items: PanelItem<TPanelItemId, TPanelItem>[]) => {\r\n let preExpandedIds: TPanelItemId[] = [];\r\n\r\n for (const x of items) {\r\n if (x.expanded) {\r\n preExpandedIds = [...preExpandedIds, x.id];\r\n }\r\n if (x.children) {\r\n preExpandedIds = [...preExpandedIds, ...getPreExpandedMenuItems(x.children)];\r\n }\r\n }\r\n\r\n return preExpandedIds;\r\n};\r\n\r\nexport { getChildrenPanelItemsIds, getHiddenPanelIds, getPreExpandedMenuItems };\r\n","import React, { Context, createContext, useContext, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { getActivePanel, getActivePanelParentsIds } from \"../Utils/getActivePanel\";\r\nimport { PanelSideBarContextProps } from \"./PanelSideBarContextProps\";\r\nimport { getHiddenPanelIds, getPreExpandedMenuItems } from \"../Utils/panelUtils\";\r\n\r\nexport type MenuItemToggleFn<TPanelItemId extends string> = (menuItemId: TPanelItemId) => void;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst PanelSideBarContext = createContext<PanelSideBarContextProps<any, any> | null>(null);\r\n\r\nexport interface PanelSideBarMenuProviderProps<TPanelItemId extends string, TPanelItem> extends Pick<\r\n PanelSideBarContextProps<TPanelItemId, TPanelItem>,\r\n \"menuItems\" | \"LinkRenderer\" | \"theme\" | \"renderTilesAsLinks\" | \"renderFirstItemsLevelAsTiles\" | \"defaultActivePanelId\"\r\n> {\r\n /**\r\n * The children elements.\r\n */\r\n children: React.ReactNode;\r\n\r\n /**\r\n * if the sidebar should be open by default.\r\n */\r\n sidebarOpenByDefault?: boolean;\r\n}\r\n\r\nexport const PanelSideBarProvider = <TPanelItemId extends string, TPanelItem>(\r\n props: PanelSideBarMenuProviderProps<TPanelItemId, TPanelItem>,\r\n) => {\r\n const {\r\n children,\r\n defaultActivePanelId,\r\n sidebarOpenByDefault = true,\r\n menuItems: defaultMenuItems,\r\n LinkRenderer,\r\n renderTilesAsLinks = false,\r\n renderFirstItemsLevelAsTiles = true,\r\n theme = \"blue\",\r\n } = props;\r\n const mainContentBodyRef = useRef<HTMLElement>(null);\r\n const menuItems = useMemo(() => defaultMenuItems, [defaultMenuItems]);\r\n const [isSidebarOpen, setIsSidebarOpen] = useState(sidebarOpenByDefault);\r\n const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);\r\n\r\n const [activePanelId, setActivePanelId] = useState(getActivePanel(menuItems, defaultActivePanelId)?.id);\r\n const setActivePanel = (panelId: TPanelItemId) => setActivePanelId(panelId);\r\n\r\n const [hiddenMenuItemIds, setHiddenMenuItemsIds] = useState<TPanelItemId[]>(getHiddenPanelIds(menuItems));\r\n\r\n const preExpandedMenuItemIds = getPreExpandedMenuItems(menuItems);\r\n const [toggledMenuItemIds, setToggledMenuItemIds] = useState<TPanelItemId[]>(\r\n activePanelId ? [...preExpandedMenuItemIds, activePanelId] : preExpandedMenuItemIds,\r\n );\r\n const toggleMenuItem: MenuItemToggleFn<TPanelItemId> = (menuItemId) => {\r\n setToggledMenuItemIds((prev) => {\r\n const idExists = prev.includes(menuItemId);\r\n\r\n if (idExists) {\r\n return prev.filter((id) => id !== menuItemId);\r\n }\r\n\r\n return [...prev, menuItemId];\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n const activePanelId = getActivePanel(menuItems, defaultActivePanelId)?.id;\r\n\r\n // eslint-disable-next-line react-hooks/set-state-in-effect\r\n setActivePanelId(activePanelId);\r\n if (activePanelId) {\r\n setToggledMenuItemIds((prev) => {\r\n const toggledMenuItemIds = [...getActivePanelParentsIds(menuItems, activePanelId), activePanelId].filter((x) => !prev.includes(x));\r\n return [...prev, ...toggledMenuItemIds];\r\n });\r\n }\r\n }, [menuItems, defaultActivePanelId]);\r\n\r\n const untoggleMenuItems = () => setToggledMenuItemIds([]);\r\n\r\n const openMenuItems = (panelItemIds: TPanelItemId[]) => {\r\n setToggledMenuItemIds((prev) => [...prev, ...panelItemIds.filter((x) => !prev.includes(x))]);\r\n };\r\n\r\n const closeMenuItems = (panelItemIds: TPanelItemId[], includeActivePanel?: boolean) => {\r\n const activePanels = activePanelId ? [...getActivePanelParentsIds(menuItems, activePanelId), activePanelId] : [];\r\n setToggledMenuItemIds((prev) =>\r\n includeActivePanel\r\n ? prev.filter((x) => !panelItemIds.includes(x))\r\n : prev.filter((x) => !panelItemIds.filter((y) => !activePanels.includes(y)).includes(x)),\r\n );\r\n };\r\n\r\n return (\r\n <PanelSideBarContext.Provider\r\n value={{\r\n menuItems,\r\n activePanelId,\r\n setActivePanel,\r\n toggledMenuItemIds,\r\n toggleMenuItem,\r\n untoggleMenuItems,\r\n isSidebarOpen,\r\n toggleSidebar,\r\n LinkRenderer,\r\n theme,\r\n renderFirstItemsLevelAsTiles,\r\n renderTilesAsLinks,\r\n openMenuItems,\r\n closeMenuItems,\r\n hiddenMenuItemIds,\r\n setHiddenMenuItemsIds,\r\n mainContentBodyRef,\r\n }}\r\n >\r\n {children}\r\n </PanelSideBarContext.Provider>\r\n );\r\n};\r\n\r\nexport const usePanelSideBarContext = <TPanelItemId extends string, TPanelItem>() => {\r\n const context = useContext(PanelSideBarContext as Context<PanelSideBarContextProps<TPanelItemId, TPanelItem>>);\r\n if (context === null) {\r\n throw new Error(\"usePanelSideBarContext must be used within a PanelSideBarProvider\");\r\n }\r\n return context;\r\n};\r\n","import { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport classNames from \"classnames\";\r\nimport { useRef, useEffect } from \"react\";\r\nimport { Collapse, NavItem } from \"@neolution-ch/reactstrap\";\r\nimport { PanelItem } from \"./../PanelSideBar/Definitions/PanelItem\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport { hasActiveChildren } from \"./Utils/getActivePanel\";\r\n\r\nexport interface PanelSideBarItemProps<TPanelItemId extends string, TPanelItem> {\r\n children: PanelItem<TPanelItemId, TPanelItem>;\r\n depth?: number;\r\n active?: boolean;\r\n isParentHidden?: boolean;\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nconst PanelSidebarItemNavLink = <TPanelItemId extends string, TPanelItem>({\r\n item,\r\n collapsedWithIcon,\r\n className,\r\n}: {\r\n item: PanelItem<TPanelItemId, TPanelItem>;\r\n collapsedWithIcon?: boolean;\r\n className?: string;\r\n}) => {\r\n const { icon, title, onSidebarCollapseOptions } = item;\r\n const panelIconClassName = collapsedWithIcon ? \"ms-1 me-3 p-1\" : \"me-2\";\r\n const displayIcon = icon || (collapsedWithIcon && onSidebarCollapseOptions?.fallbackIcon);\r\n\r\n return (\r\n <span className={className}>\r\n {displayIcon && <FontAwesomeIcon icon={displayIcon} className={panelIconClassName} />}\r\n {!collapsedWithIcon || !displayIcon ? title : \"\"}\r\n </span>\r\n );\r\n};\r\n\r\nconst PanelSideBarItem = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarItemProps<TPanelItemId, TPanelItem>) => {\r\n const { depth = 0, children: item, isParentHidden = false, isIconShownOnSidebarCollapse } = props;\r\n const { LinkRenderer, toggledMenuItemIds, toggleMenuItem, hiddenMenuItemIds, isSidebarOpen } = usePanelSideBarContext<\r\n TPanelItemId,\r\n TPanelItem\r\n >();\r\n\r\n const hasItems = !!item.children?.length;\r\n const isActive = (hasItems && item.children && hasActiveChildren(item.children)) || item.active;\r\n const isOpen = toggledMenuItemIds?.includes(item.id);\r\n const scrollToActiveItemRef = useRef<HTMLDivElement>(null);\r\n const collapsedWithIcon = isIconShownOnSidebarCollapse && !isSidebarOpen;\r\n\r\n useEffect(() => {\r\n const currentItem = scrollToActiveItemRef.current;\r\n\r\n if (!item.active || !currentItem) {\r\n return;\r\n }\r\n\r\n currentItem.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\r\n }, [scrollToActiveItemRef, item.active]);\r\n\r\n return (\r\n <>\r\n <NavItem\r\n hidden={isParentHidden || hiddenMenuItemIds.includes(item.id)}\r\n onClick={() => {\r\n if (hasItems && !item.collapseIconOnly) {\r\n toggleMenuItem(item.id);\r\n }\r\n }}\r\n className={classNames({ \"menu-open\": isOpen, active: isActive })}\r\n style={{ paddingLeft: !collapsedWithIcon && depth ? `${depth + 1}rem` : undefined }}\r\n >\r\n <div ref={scrollToActiveItemRef}>\r\n {hasItems ? (\r\n <div className={classNames(\"d-flex flex-row\", { \"justify-content-between\": item.collapseIconOnly })}>\r\n {item.collapseIconOnly && (\r\n <LinkRenderer item={item}>\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem>\r\n className=\"nav-link\"\r\n item={item}\r\n collapsedWithIcon={collapsedWithIcon}\r\n />\r\n </LinkRenderer>\r\n )}\r\n\r\n <a\r\n role=\"button\"\r\n className={classNames(\r\n \"nav-link\",\r\n { \"w-100\": !item.collapseIconOnly },\r\n { \"dropdown-toggle\": hasItems && !collapsedWithIcon },\r\n )}\r\n onClick={() => {\r\n if (item.collapseIconOnly) {\r\n toggleMenuItem(item.id);\r\n }\r\n }}\r\n >\r\n {!item.collapseIconOnly && (\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem> item={item} collapsedWithIcon={collapsedWithIcon} />\r\n )}\r\n </a>\r\n </div>\r\n ) : (\r\n <LinkRenderer item={item}>\r\n <PanelSidebarItemNavLink<TPanelItemId, TPanelItem> className=\"nav-link\" item={item} collapsedWithIcon={collapsedWithIcon} />\r\n </LinkRenderer>\r\n )}\r\n </div>\r\n </NavItem>\r\n {hasItems && (\r\n <Collapse isOpen={isOpen} navbar className={classNames(\"item-menu\", { \"mb-1\": isOpen })}>\r\n {item.children?.map((childItem) => (\r\n <PanelSideBarItem\r\n key={childItem.id}\r\n depth={depth + 1}\r\n active={item.active}\r\n isParentHidden={hiddenMenuItemIds.includes(item.id)}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n >\r\n {childItem}\r\n </PanelSideBarItem>\r\n ))}\r\n </Collapse>\r\n )}\r\n </>\r\n );\r\n};\r\n\r\nexport { PanelSideBarItem };\r\n","import { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { Button } from \"@neolution-ch/reactstrap\";\r\nimport classNames from \"classnames\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\n\r\ninterface ButtonIconProps<TPanelItemId extends string, TPanelItem> {\r\n item: PanelItem<TPanelItemId, TPanelItem>;\r\n activePanelId?: TPanelItemId;\r\n renderTilesAsLinks?: boolean;\r\n setActivePanel: (panelId: TPanelItemId) => void;\r\n}\r\n\r\nexport const ButtonIcon = <TPanelItemId extends string, TPanelItem>(props: ButtonIconProps<TPanelItemId, TPanelItem>) => {\r\n const {\r\n item: { disabled, icon, onClick, id, title },\r\n activePanelId,\r\n renderTilesAsLinks,\r\n setActivePanel,\r\n } = props;\r\n return (\r\n <Button\r\n key={id}\r\n color=\"primary\"\r\n outline\r\n className={classNames(\"tile\", { active: activePanelId === id })}\r\n onClick={() => {\r\n if (!renderTilesAsLinks) {\r\n if (onClick) {\r\n onClick();\r\n } else {\r\n setActivePanel(id);\r\n }\r\n }\r\n }}\r\n title={typeof title === \"string\" ? String(title) : \"\"}\r\n disabled={disabled}\r\n >\r\n {icon && <FontAwesomeIcon icon={icon} size=\"lg\" fixedWidth />}\r\n </Button>\r\n );\r\n};\r\n","import { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { ButtonIcon } from \"./ButtonIcon\";\r\nimport { PanelLinkRenderer } from \"./Definitions/PanelLinkRenderer\";\r\n\r\ninterface PanelItemsRendererProps<TPanelItemId extends string, TPanelItem> {\r\n items: PanelItem<TPanelItemId, TPanelItem>[];\r\n activePanelId?: TPanelItemId;\r\n renderTilesAsLinks?: boolean;\r\n setActivePanel: (panelId: TPanelItemId) => void;\r\n LinkRenderer: PanelLinkRenderer<TPanelItemId, TPanelItem>;\r\n hiddenMenuItemIds: TPanelItemId[];\r\n}\r\nexport const PanelItemsRenderer = <TPanelItemId extends string, TPanelItem>(props: PanelItemsRendererProps<TPanelItemId, TPanelItem>) => {\r\n const { items, activePanelId, renderTilesAsLinks, setActivePanel, LinkRenderer, hiddenMenuItemIds } = props;\r\n return items\r\n\r\n ?.filter((x) => !hiddenMenuItemIds.includes(x.id))\r\n .map((item, index) =>\r\n renderTilesAsLinks ? (\r\n <LinkRenderer key={index} item={item}>\r\n <ButtonIcon item={item} setActivePanel={setActivePanel} activePanelId={activePanelId} renderTilesAsLinks={renderTilesAsLinks} />\r\n </LinkRenderer>\r\n ) : (\r\n <ButtonIcon\r\n key={index}\r\n item={item}\r\n setActivePanel={setActivePanel}\r\n activePanelId={activePanelId}\r\n renderTilesAsLinks={renderTilesAsLinks}\r\n />\r\n ),\r\n );\r\n};\r\n","import classNames from \"classnames\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport { PanelItem } from \"./Definitions/PanelItem\";\r\nimport { PanelSideBarItem } from \"./PanelSideBarItem\";\r\nimport { PanelItemsRenderer } from \"./PanelItemsRenderer\";\r\n\r\ninterface PanelSideBarProps {\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nexport const PanelSideBar = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarProps) => {\r\n const { isIconShownOnSidebarCollapse } = props;\r\n const {\r\n activePanelId,\r\n menuItems,\r\n setActivePanel,\r\n renderFirstItemsLevelAsTiles,\r\n renderTilesAsLinks,\r\n LinkRenderer,\r\n theme,\r\n hiddenMenuItemIds,\r\n } = usePanelSideBarContext<TPanelItemId, TPanelItem>();\r\n\r\n const className = classNames(\r\n \"panel-layout\",\r\n { \"sidenav-dark\": theme === \"dark\" },\r\n { \"sidenav-light\": theme === \"light\" },\r\n { \"sidenav-blue\": theme === \"blue\" },\r\n { \"show-icons\": isIconShownOnSidebarCollapse },\r\n );\r\n\r\n const activePanel: PanelItem<TPanelItemId, TPanelItem> | undefined = menuItems.find((x) => x.id === activePanelId);\r\n\r\n if (renderFirstItemsLevelAsTiles) {\r\n if (menuItems.some((x) => !x.icon)) {\r\n throw new Error(\"Outer panel icon is required\");\r\n }\r\n\r\n return (\r\n <nav id=\"side-nav\" className={className}>\r\n <div className=\"side-nav__tiles\">\r\n {\r\n <PanelItemsRenderer\r\n items={menuItems}\r\n LinkRenderer={LinkRenderer}\r\n hiddenMenuItemIds={hiddenMenuItemIds}\r\n setActivePanel={setActivePanel}\r\n activePanelId={activePanelId}\r\n renderTilesAsLinks={renderTilesAsLinks}\r\n />\r\n }\r\n </div>\r\n <div className=\"side-nav__items\">\r\n {activePanel?.children?.map((item) => (\r\n <PanelSideBarItem<TPanelItemId, TPanelItem> key={item.id} isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}>\r\n {item}\r\n </PanelSideBarItem>\r\n ))}\r\n </div>\r\n </nav>\r\n );\r\n } else {\r\n return (\r\n <nav id=\"side-nav\" className={className}>\r\n <div className=\"side-nav__items\">\r\n {menuItems?.map((item) => (\r\n <PanelSideBarItem<TPanelItemId, TPanelItem> key={item.id} isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}>\r\n {item}\r\n </PanelSideBarItem>\r\n ))}\r\n </div>\r\n </nav>\r\n );\r\n }\r\n};\r\n","import { faAngleLeft, faAngleRight } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { Button, ButtonProps } from \"@neolution-ch/reactstrap\";\r\nimport { usePanelSideBarContext } from \"./Context/PanelSideBarContext\";\r\nimport classNames from \"classnames\";\r\n\r\ninterface PanelSideBarToggleProps extends ButtonProps {\r\n toggled: boolean;\r\n isIconShownOnSidebarCollapse: boolean;\r\n}\r\n\r\nexport const PanelSideBarToggle = (props: PanelSideBarToggleProps) => {\r\n const { toggled, isIconShownOnSidebarCollapse, ...buttonProps } = props;\r\n const { theme } = usePanelSideBarContext();\r\n\r\n return (\r\n <Button\r\n {...buttonProps}\r\n className={classNames(\r\n { \"side-nav-toggle-dark\": theme === \"dark\" },\r\n { \"side-nav-toggle-light\": theme === \"light\" },\r\n { \"side-nav-toggle-blue\": theme === \"blue\" },\r\n { \"show-icons\": isIconShownOnSidebarCollapse },\r\n )}\r\n id=\"side-nav-toggle\"\r\n color=\"primary\"\r\n >\r\n <FontAwesomeIcon className=\"toggler\" icon={toggled ? faAngleRight : faAngleLeft} />\r\n </Button>\r\n );\r\n};\r\n","import \"../../../../styles/Layout/index.scss\";\r\n\r\nimport { ComponentProps, PropsWithChildren } from \"react\";\r\nimport { PanelSideBarLayoutContent } from \"./PanelSideBarLayoutContent\";\r\nimport { PanelSidebarNavbarInternal, PanelSidebarNavbarInternalProps } from \"./PanelSideBarNavbar\";\r\nimport { MainSection } from \"./PanelSideBar/MainSection\";\r\nimport { PanelSideBarLayoutProps } from \"./PanelSideBarLayout\";\r\n\r\nexport interface NavbarLayoutProps\r\n extends\r\n PropsWithChildren,\r\n Pick<ComponentProps<typeof PanelSideBarLayoutContent>, \"footer\" | \"mainContentBodyRef\" | \"mainContentBodyStyle\">,\r\n Pick<PanelSideBarLayoutProps, \"useResponsiveLayout\" | \"navbarLeftItems\" | \"navbarRightItems\" | \"brand\">,\r\n Pick<PanelSidebarNavbarInternalProps, \"theme\"> {}\r\n\r\nexport const NavbarLayout = (props: NavbarLayoutProps) => {\r\n const {\r\n brand,\r\n children,\r\n navbarLeftItems,\r\n navbarRightItems,\r\n footer,\r\n useResponsiveLayout = false,\r\n mainContentBodyRef,\r\n theme,\r\n mainContentBodyStyle,\r\n } = props;\r\n\r\n return (\r\n <>\r\n <PanelSidebarNavbarInternal\r\n useToggleButton={false}\r\n theme={theme}\r\n brand={brand}\r\n navbarRightItems={navbarRightItems}\r\n navbarLeftItems={navbarLeftItems}\r\n />\r\n <MainSection isSidebarOpen={false} useResponsiveLayout={useResponsiveLayout}>\r\n <PanelSideBarLayoutContent\r\n excludeSibebarMenu={true}\r\n footer={footer}\r\n isIconShownOnSidebarCollapse={false}\r\n mainContentBodyRef={mainContentBodyRef}\r\n mainContentBodyStyle={mainContentBodyStyle}\r\n >\r\n {children}\r\n </PanelSideBarLayoutContent>\r\n </MainSection>\r\n </>\r\n );\r\n};\r\n","import { PropsWithChildren, ReactNode, useMemo } from \"react\";\r\nimport \"../../../../styles/Layout/index.scss\";\r\nimport { PanelSideBar } from \"./PanelSideBar/PanelSidebar\";\r\nimport { PanelSideBarLayoutContent } from \"./PanelSideBarLayoutContent\";\r\nimport { PanelSideBarToggle } from \"./PanelSideBar/PanelSideBarToggle\";\r\nimport { PanelSidebarNavbarInternal } from \"./PanelSideBarNavbar\";\r\nimport { usePanelSideBarContext } from \"./PanelSideBar/Context/PanelSideBarContext\";\r\nimport { MainSection } from \"./PanelSideBar/MainSection\";\r\n\r\nexport interface PanelSideBarLayoutProps extends PropsWithChildren {\r\n /**\r\n * The brand content shown on the top navigation bar.\r\n */\r\n brand?: ReactNode;\r\n /**\r\n * The footer content.\r\n */\r\n footer?: ReactNode;\r\n /**\r\n * The collapsible option to choose.\r\n */\r\n collapsible?: boolean;\r\n /**\r\n * The navbar content on the right.\r\n */\r\n navbarRightItems?: ReactNode[];\r\n /**\r\n * The navbar content on the left.\r\n */\r\n navbarLeftItems?: ReactNode[];\r\n\r\n /**\r\n * If using the toggle button instead of the side menu adiacent bar.\r\n */\r\n useToggleButton?: boolean;\r\n\r\n /**\r\n * If use the responsive layout when the screen is sm in order to remove the sidebar overlay.\r\n */\r\n useResponsiveLayout?: boolean;\r\n\r\n /**\r\n * If true, exclude the sidebar menu.\r\n */\r\n excludeSibebarMenu?: boolean;\r\n\r\n /**\r\n * The style applied to the main content body.\r\n */\r\n mainContentBodyStyle?: React.CSSProperties;\r\n}\r\n\r\nexport const PanelSideBarLayout = <TPanelItemId extends string, TPanelItem>(props: PanelSideBarLayoutProps) => {\r\n const {\r\n brand,\r\n children,\r\n navbarLeftItems,\r\n navbarRightItems,\r\n footer,\r\n collapsible = true,\r\n useToggleButton = false,\r\n useResponsiveLayout = false,\r\n excludeSibebarMenu = false,\r\n mainContentBodyStyle,\r\n } = props;\r\n\r\n const { isSidebarOpen, toggleSidebar, theme, renderFirstItemsLevelAsTiles, menuItems, activePanelId, mainContentBodyRef } =\r\n usePanelSideBarContext<TPanelItemId, TPanelItem>();\r\n\r\n if (useResponsiveLayout && !useToggleButton) {\r\n throw new Error(\"Responsive layout can be used only with toggle button in the navbar!\");\r\n }\r\n\r\n const isIconShownOnSidebarCollapse = useMemo(\r\n () => menuItems.find((x) => x.id === activePanelId)?.onSidebarCollapseOptions?.showIcon ?? false,\r\n [menuItems, activePanelId],\r\n );\r\n\r\n return (\r\n <>\r\n <PanelSidebarNavbarInternal\r\n useToggleButton={useToggleButton}\r\n theme={theme}\r\n toggleSidebar={toggleSidebar}\r\n brand={brand}\r\n navbarRightItems={navbarRightItems}\r\n navbarLeftItems={navbarLeftItems}\r\n />\r\n <MainSection\r\n isSidebarOpen={isSidebarOpen}\r\n useResponsiveLayout={useResponsiveLayout}\r\n renderFirstItemsLevelAsTiles={renderFirstItemsLevelAsTiles}\r\n >\r\n {!excludeSibebarMenu && (\r\n <>\r\n <PanelSideBar<TPanelItemId, TPanelItem> isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse} />\r\n {collapsible && !useToggleButton && (\r\n <PanelSideBarToggle\r\n onClick={toggleSidebar}\r\n toggled={!isSidebarOpen}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n />\r\n )}\r\n </>\r\n )}\r\n <PanelSideBarLayoutContent\r\n excludeSibebarMenu={excludeSibebarMenu}\r\n footer={footer}\r\n isIconShownOnSidebarCollapse={isIconShownOnSidebarCollapse}\r\n mainContentBodyRef={mainContentBodyRef}\r\n mainContentBodyStyle={mainContentBodyStyle}\r\n >\r\n {children}\r\n </PanelSideBarLayoutContent>\r\n </MainSection>\r\n </>\r\n );\r\n};\r\n"],"names":["defaultNavigationComponents","backPageComponent","nextPageComponent","firstPageComponent","lastPageComponent","PanelSidebarNavbarInternal","props","brand","navbarRightItems","navbarLeftItems","useToggleButton","toggleSidebar","theme","Error","_jsxs","id","className","classNames","children","_jsx","onClick","FontAwesomeIcon","icon","faBars","size","Nav","tag","map","item","index","NavItem","PanelSideBarLayoutContent","footer","isIconShownOnSidebarCollapse","excludeSibebarMenu","mainContentBodyRef","mainContentBodyStyle","ref","style","hidden","MainSection","isSidebarOpen","useResponsiveLayout","renderFirstItemsLevelAsTiles","toggled","getActivePanelInternal","items","find","x","active","getActivePanel","defaultActivePanelId","hasActiveChildren","getActivePanelParentsIds","activePanel","parentsIds","getHiddenPanelIds","hiddenIds","display","getChildrenPanelItemsIds","childrenIds","child","getPreExpandedMenuItems","preExpandedIds","expanded","PanelSideBarContext","createContext","usePanelSideBarContext","context","useContext","PanelSidebarItemNavLink","collapsedWithIcon","title","onSidebarCollapseOptions","panelIconClassName","displayIcon","fallbackIcon","PanelSideBarItem","depth","isParentHidden","LinkRenderer","toggledMenuItemIds","toggleMenuItem","hiddenMenuItemIds","hasItems","length","isActive","isOpen","includes","scrollToActiveItemRef","useRef","useEffect","currentItem","current","scrollIntoView","behavior","block","collapseIconOnly","paddingLeft","undefined","role","Collapse","navbar","childItem","ButtonIcon","disabled","activePanelId","renderTilesAsLinks","setActivePanel","Button","color","outline","String","fixedWidth","PanelItemsRenderer","filter","PanelSideBar","menuItems","some","PanelSideBarToggle","buttonProps","faAngleRight","faAngleLeft","logo","_Fragment","currentItemsPerPage","currentPage","totalRecords","currentRecordCount","pagingPossible","translations","navigationComponents","possiblePageItemCounts","maxPagesShown","showControls","changePageSizePossible","setItemsPerPage","setCurrentPage","maxPage","Math","ceil","firstPageShown","max","min","possibleItemsPerPage","useMemo","value","array","indexOf","toSorted","a","b","Row","marginBottom","Col","xs","UncontrolledButtonDropdown","DropdownToggle","caret","DropdownMenu","DropdownItem","header","itemsPerPageDropdown","pageItemCount","showedItemsText","replace","toString","textAlign","paddingRight","ButtonGroup","Array","from","_","i","page","slice","collapsible","showIcon","sidebarOpenByDefault","defaultMenuItems","setIsSidebarOpen","useState","setActivePanelId","setHiddenMenuItemsIds","preExpandedMenuItemIds","setToggledMenuItemIds","prev","Provider","panelId","menuItemId","untoggleMenuItems","openMenuItems","panelItemIds","closeMenuItems","includeActivePanel","activePanels","y"],"mappings":"gqBA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