@admin-layout/tailwind-design-pro 12.0.16-alpha.9 → 12.0.16-alpha.90

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 (260) hide show
  1. package/lib/cdm-locales/en/menu.json +2 -1
  2. package/lib/cdm-locales/es/menu.json +2 -1
  3. package/lib/cdm-locales/index.d.ts +2 -0
  4. package/lib/cdm-locales/index.d.ts.map +1 -0
  5. package/lib/cdm-locales/index.ts +1 -0
  6. package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
  7. package/lib/components/LanguageMenu/LanguageMenu.js +16 -20
  8. package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
  9. package/lib/components/Layout/BasicLayout/index.d.ts +6 -5
  10. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  11. package/lib/components/Layout/BasicLayout/index.js +220 -124
  12. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  13. package/lib/components/Layout/BasicLayout/utils.d.ts +2 -0
  14. package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
  15. package/lib/components/Layout/BasicLayout/utils.js +16 -13
  16. package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
  17. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
  18. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +9 -14
  19. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
  20. package/lib/components/Layout/GlobalHeader/Header.d.ts +0 -1
  21. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  22. package/lib/components/Layout/GlobalHeader/Header.js +38 -10
  23. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  24. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +0 -2
  25. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
  26. package/lib/components/Layout/GlobalHeader/MainHeader.js +54 -85
  27. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
  28. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +1 -1
  29. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
  30. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -0
  31. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  32. package/lib/components/Layout/GlobalHeader/RightContent.js +73 -6
  33. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
  34. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
  35. package/lib/components/Layout/GlobalHeader/RightMenu.js +2 -4
  36. package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
  37. package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
  38. package/lib/components/Layout/GlobalHeader/index.d.ts +0 -1
  39. package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -1
  40. package/lib/components/Layout/ProTailwindLayout.d.ts +2 -2
  41. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
  42. package/lib/components/Layout/ProTailwindLayout.js +69 -7
  43. package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
  44. package/lib/components/Layout/Sidebar/BottomMenu.d.ts +4 -0
  45. package/lib/components/Layout/Sidebar/BottomMenu.d.ts.map +1 -0
  46. package/lib/components/Layout/Sidebar/BottomMenu.js +330 -0
  47. package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -0
  48. package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
  49. package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
  50. package/lib/components/Layout/Sidebar/MainSidebar.d.ts +5 -0
  51. package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -0
  52. package/lib/components/Layout/Sidebar/MainSidebar.js +246 -0
  53. package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -0
  54. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +6 -0
  55. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -0
  56. package/lib/components/Layout/Sidebar/MainSidebarMenu.js +467 -0
  57. package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -0
  58. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts +4 -0
  59. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -0
  60. package/lib/components/Layout/Sidebar/PerplexSidebar.js +279 -0
  61. package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -0
  62. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts +4 -0
  63. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -0
  64. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +332 -0
  65. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -0
  66. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  67. package/lib/components/Layout/TailwindLayout.js +29 -10
  68. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  69. package/lib/components/Layout/getPageTitle.js.map +1 -1
  70. package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
  71. package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
  72. package/lib/components/Layout/slot-fill/HeaderNotice.js +7 -0
  73. package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -0
  74. package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
  75. package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
  76. package/lib/components/Layout/slot-fill/Logo.d.ts +4 -0
  77. package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -0
  78. package/lib/components/Layout/slot-fill/Logo.js +7 -0
  79. package/lib/components/Layout/slot-fill/Logo.js.map +1 -0
  80. package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
  81. package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +4 -0
  82. package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -0
  83. package/lib/components/Layout/slot-fill/SideMenuLogo.js +7 -0
  84. package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -0
  85. package/lib/components/Layout/slot-fill/index.d.ts +2 -0
  86. package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
  87. package/lib/components/Layout/util.js +1 -1
  88. package/lib/components/Layout/util.js.map +1 -1
  89. package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -3
  90. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  91. package/lib/components/SettingDrawer/SettingDrawer.js +166 -416
  92. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  93. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +7 -0
  94. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -0
  95. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +30 -0
  96. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -0
  97. package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +3 -0
  98. package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -0
  99. package/lib/components/SettingDrawer/{CheckBoxTheme.js → components/CheckBoxTheme.js} +14 -5
  100. package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -0
  101. package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +7 -0
  102. package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -0
  103. package/lib/components/SettingDrawer/components/DeviceTabs.js +82 -0
  104. package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -0
  105. package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +3 -0
  106. package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -0
  107. package/lib/components/SettingDrawer/{InvitationSettings.js → components/InvitationSettings.js} +11 -7
  108. package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -0
  109. package/lib/components/SettingDrawer/components/LayoutChange.d.ts +3 -0
  110. package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -0
  111. package/lib/components/SettingDrawer/{LayoutChange.js → components/LayoutChange.js} +24 -17
  112. package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -0
  113. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +20 -0
  114. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -0
  115. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +119 -0
  116. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -0
  117. package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +3 -0
  118. package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -0
  119. package/lib/components/SettingDrawer/{NavigationsModes.js → components/NavigationsModes.js} +91 -40
  120. package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -0
  121. package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +3 -0
  122. package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -0
  123. package/lib/components/SettingDrawer/{RegionalSettings.js → components/RegionalSettings.js} +55 -178
  124. package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -0
  125. package/lib/components/SettingDrawer/components/SettingsActions.d.ts +12 -0
  126. package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -0
  127. package/lib/components/SettingDrawer/components/SettingsActions.js +69 -0
  128. package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -0
  129. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +4 -0
  130. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -0
  131. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +25 -0
  132. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -0
  133. package/lib/components/SettingDrawer/{Switch/index.d.ts → components/Switch.d.ts} +2 -2
  134. package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -0
  135. package/lib/components/SettingDrawer/{Switch/index.js → components/Switch.js} +1 -1
  136. package/lib/components/SettingDrawer/components/Switch.js.map +1 -0
  137. package/lib/components/SettingDrawer/components/ThemeColor.d.ts +3 -0
  138. package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -0
  139. package/lib/components/SettingDrawer/{ThemeColor.js → components/ThemeColor.js} +16 -4
  140. package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -0
  141. package/lib/components/SettingDrawer/{ThemeSelector.d.ts → components/ThemeSelector.d.ts} +1 -1
  142. package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -0
  143. package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -0
  144. package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +3 -0
  145. package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -0
  146. package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -0
  147. package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts +18 -0
  148. package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -0
  149. package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +119 -0
  150. package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -0
  151. package/lib/components/SettingDrawer/utils/constants.d.ts +11 -0
  152. package/lib/components/SettingDrawer/utils/constants.d.ts.map +1 -0
  153. package/lib/components/SettingDrawer/utils/constants.js +77 -0
  154. package/lib/components/SettingDrawer/utils/constants.js.map +1 -0
  155. package/lib/components/SettingDrawer/utils/helper.d.ts +37 -0
  156. package/lib/components/SettingDrawer/utils/helper.d.ts.map +1 -0
  157. package/lib/components/SettingDrawer/utils/helper.js +243 -0
  158. package/lib/components/SettingDrawer/utils/helper.js.map +1 -0
  159. package/lib/components/SettingDrawer/utils/transformers.d.ts +15 -0
  160. package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -0
  161. package/lib/components/SettingDrawer/utils/transformers.js +76 -0
  162. package/lib/components/SettingDrawer/utils/transformers.js.map +1 -0
  163. package/lib/components/SettingDrawer/{types.d.ts → utils/types.d.ts} +14 -0
  164. package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
  165. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +10 -5
  166. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
  167. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +97 -4
  168. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -1
  169. package/lib/components/index.js +1 -1
  170. package/lib/components/typings.d.ts +20 -1
  171. package/lib/components/typings.d.ts.map +1 -1
  172. package/lib/compute.d.ts.map +1 -1
  173. package/lib/compute.js +10 -2
  174. package/lib/compute.js.map +1 -1
  175. package/lib/config/constants.js.map +1 -1
  176. package/lib/config/env-config.d.ts +3 -0
  177. package/lib/config/env-config.d.ts.map +1 -1
  178. package/lib/config/env-config.js +10 -0
  179. package/lib/config/env-config.js.map +1 -1
  180. package/lib/helpers/DynamicIcon.js.map +1 -1
  181. package/lib/hooks/useMediaQuery.js.map +1 -1
  182. package/lib/hooks/useScrollThreshold.js.map +1 -1
  183. package/lib/hooks/useTailwindTheme.js +82 -0
  184. package/lib/hooks/useTailwindTheme.js.map +1 -0
  185. package/lib/icons.d.ts +2 -0
  186. package/lib/icons.d.ts.map +1 -1
  187. package/lib/icons.js +4 -2
  188. package/lib/icons.js.map +1 -1
  189. package/lib/index.d.ts +1 -0
  190. package/lib/index.d.ts.map +1 -1
  191. package/lib/index.js +1 -1
  192. package/lib/index.js.map +1 -1
  193. package/lib/machines/selectors.d.ts +118 -0
  194. package/lib/machines/selectors.d.ts.map +1 -0
  195. package/lib/machines/settingsMachine.d.ts +25 -2
  196. package/lib/machines/settingsMachine.d.ts.map +1 -1
  197. package/lib/machines/settingsMachine.js +139 -168
  198. package/lib/machines/settingsMachine.js.map +1 -1
  199. package/lib/machines/settingsMachine.test.d.ts +2 -0
  200. package/lib/machines/settingsMachine.test.d.ts.map +1 -0
  201. package/lib/machines/types.d.ts +107 -9
  202. package/lib/machines/types.d.ts.map +1 -1
  203. package/lib/machines/types.js.map +1 -1
  204. package/lib/module.js.map +1 -1
  205. package/lib/redux/searchReducer.js.map +1 -1
  206. package/lib/routes.json +9 -1
  207. package/lib/tailwindConfig.js.map +1 -1
  208. package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
  209. package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
  210. package/lib/utils/configOverrides.d.ts +213 -0
  211. package/lib/utils/configOverrides.d.ts.map +1 -0
  212. package/lib/utils/configOverrides.js +91 -0
  213. package/lib/utils/configOverrides.js.map +1 -0
  214. package/lib/utils/isBrowser/index.js.map +1 -1
  215. package/lib/utils/settingsUtils.d.ts +20 -0
  216. package/lib/utils/settingsUtils.d.ts.map +1 -0
  217. package/lib/utils/settingsUtils.js +74 -0
  218. package/lib/utils/settingsUtils.js.map +1 -0
  219. package/lib/utils/utils/index.js.map +1 -1
  220. package/package.json +6 -6
  221. package/lib/components/Layout/GlobalHeader/Logo.d.ts +0 -4
  222. package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +0 -1
  223. package/lib/components/Layout/GlobalHeader/Logo.js +0 -141
  224. package/lib/components/Layout/GlobalHeader/Logo.js.map +0 -1
  225. package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -5
  226. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
  227. package/lib/components/Layout/Sidebar/Sidebar.js +0 -180
  228. package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
  229. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -4
  230. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
  231. package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -176
  232. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
  233. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -3
  234. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
  235. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
  236. package/lib/components/SettingDrawer/InvitationSettings.d.ts +0 -3
  237. package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +0 -1
  238. package/lib/components/SettingDrawer/InvitationSettings.js.map +0 -1
  239. package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -3
  240. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
  241. package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
  242. package/lib/components/SettingDrawer/NavigationsModes.d.ts +0 -3
  243. package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +0 -1
  244. package/lib/components/SettingDrawer/NavigationsModes.js.map +0 -1
  245. package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -3
  246. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
  247. package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
  248. package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
  249. package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
  250. package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -3
  251. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
  252. package/lib/components/SettingDrawer/ThemeColor.js.map +0 -1
  253. package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +0 -1
  254. package/lib/components/SettingDrawer/ThemeSelector.js.map +0 -1
  255. package/lib/components/SettingDrawer/WebFontsSelector.d.ts +0 -3
  256. package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +0 -1
  257. package/lib/components/SettingDrawer/WebFontsSelector.js.map +0 -1
  258. package/lib/components/SettingDrawer/types.d.ts.map +0 -1
  259. /package/lib/components/SettingDrawer/{ThemeSelector.js → components/ThemeSelector.js} +0 -0
  260. /package/lib/components/SettingDrawer/{WebFontsSelector.js → components/WebFontsSelector.js} +0 -0
@@ -1,13 +1,80 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import {LanguageMenu}from'../../LanguageMenu/LanguageMenu.js';import OrganizationDropDown from'./OrganizationDropdown.js';const RightContent = props => {
1
+ import {jsxs,jsx}from'react/jsx-runtime';import {useState,useEffect,useRef}from'react';import {LanguageMenu}from'../../LanguageMenu/LanguageMenu.js';import OrganizationDropDown from'./OrganizationDropdown.js';const useHorizontalScroll = () => {
2
+ const elRef = useRef(null);
3
+ useEffect(() => {
4
+ const el = elRef.current;
5
+ if (el) {
6
+ const onWheel = e => {
7
+ if (e.deltaY === 0) return;
8
+ e.preventDefault();
9
+ el.scrollTo({
10
+ left: el.scrollLeft + e.deltaY,
11
+ behavior: 'smooth'
12
+ });
13
+ };
14
+ el.addEventListener('wheel', onWheel);
15
+ return () => {
16
+ el.removeEventListener('wheel', onWheel);
17
+ };
18
+ }
19
+ }, []);
20
+ return elRef;
21
+ };
22
+ const RightContent = props => {
2
23
  const {
3
- routeParams,
24
+ theme,
25
+ layout,
4
26
  upperMenus,
5
- settings,
6
- collapsed
27
+ routeParams,
28
+ collapsed,
29
+ settings
7
30
  } = props;
31
+ const [navBarItems, setNavBarItems] = useState([]);
32
+ const scrollRef = useHorizontalScroll();
33
+ // TODO: uncomment this once the extension API is updated
34
+ // const controller: any = useExtensionController();
35
+ // useEffect(() => {
36
+ // if (controller) {
37
+ // const subscription = controller.services.contribution.getContributions().subscribe(({ pageNavBar }) => {
38
+ // setNavBarItems(pageNavBar || []);
39
+ // });
40
+ // return () => subscription.unsubscribe();
41
+ // }
42
+ // }, [controller]);
43
+ useEffect(() => {
44
+ const ele = document.getElementById('item-wrapper');
45
+ if (ele) {
46
+ if (check(ele)) {
47
+ ele.style.boxShadow = 'inset 0 0 5px #e2e2e2';
48
+ } else {
49
+ ele.style.boxShadow = 'none';
50
+ }
51
+ }
52
+ });
53
+ const check = el => {
54
+ const curOverflow = el.style.overflow;
55
+ if (!curOverflow || curOverflow === 'visible') {
56
+ el.style.overflow = 'hidden';
57
+ }
58
+ const isOverflowing = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
59
+ el.style.overflow = curOverflow;
60
+ return isOverflowing;
61
+ };
8
62
  return jsxs("div", {
9
- className: "flex items-center flex-shrink-0 space-x-6",
63
+ className: `flex items-center ${collapsed ? 'ml-2.5' : 'ml-0'}`,
10
64
  children: [jsx("div", {
65
+ id: "item-wrapper",
66
+ ref: scrollRef,
67
+ className: "flex overflow-x-auto scrollbar-hide whitespace-nowrap space-x-2 py-2 px-1",
68
+ children: navBarItems.map((item, index) => {
69
+ if (item.position === 'right' && item.component) {
70
+ return jsx("div", {
71
+ className: "flex-shrink-0",
72
+ children: item.component(props)
73
+ }, index);
74
+ }
75
+ return null;
76
+ })
77
+ }), jsx("div", {
11
78
  className: "relative",
12
79
  children: jsx(LanguageMenu, {})
13
80
  }), jsx("div", {
@@ -20,4 +87,4 @@ import {jsxs,jsx}from'react/jsx-runtime';import {LanguageMenu}from'../../Languag
20
87
  })
21
88
  })]
22
89
  });
23
- };export{RightContent};//# sourceMappingURL=RightContent.js.map
90
+ };export{RightContent,useHorizontalScroll};//# sourceMappingURL=RightContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"sourcesContent":[null],"names":[],"mappings":"mKAMa,MAAA,YAAY,GAAqC,KAAC,IAAS;QAC9D;AACN,IAAA,WACS;AA4Bb,IAAE,UAAA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"sourcesContent":[null],"names":["_jsxs"],"mappings":"iNAOO,MAAM,mBAAmB,GAAG,MAAK;AACpC,EAAA,MAAA,QAAW,MAAG,CAAA,IAAuB,CAAA;WAErC,CAAA,MAAa;AACT,IAAA,MAAA,EAAA,GAAM,KAAK,CAAA;QACX,EAAA,EAAI;AACA,MAAA,MAAA,OAAM,GAAA,CAAA,IAAO;AACT,QAAA,IAAA,CAAA,CAAA,MAAI,KAAE,CAAA,EAAM;wBAAQ,EAAA;mBACl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kBAAA,EAAA,SAAA,GAAA,QAAA,GAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"RightMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAOrE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAgBhD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuR/C,CAAC"}
1
+ {"version":3,"file":"RightMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAOrE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAgBhD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiR/C,CAAC"}
@@ -233,9 +233,7 @@ const RightMenu = ({
233
233
  onMouseEnter: onOpen,
234
234
  children: [jsx("button", {
235
235
  className: `
236
- inline-flex items-center justify-center
237
- ${scrolled ? 'text-muted-foreground bg-transparent hover:text-foreground' : 'text-white bg-muted hover:text-white'}
238
- rounded-full h-12 w-12 min-w-[48px] outline-none transform transition-colors duration-200
236
+ inline-flex items-center justify-center bg-muted hover:bg-muted-foreground text-foreground rounded-full h-12 w-12 min-w-[48px] outline-none transform transition-colors duration-200
239
237
  `,
240
238
  "aria-expanded": "false",
241
239
  onClick: toggleMenu,
@@ -245,7 +243,7 @@ const RightMenu = ({
245
243
  alt: "User"
246
244
  }) : null
247
245
  }), isOpen && jsxs("div", {
248
- className: "absolute right-0 mt-2 w-72 rounded-themed shadow-themed-lg py-1 themed-dropdown ring-1 ring-border focus:outline-none z-40",
246
+ className: "bg-background absolute right-0 mt-2 w-72 rounded-themed shadow-themed-lg py-1 themed-dropdown ring-1 ring-border focus:outline-none z-40",
249
247
  role: "menu",
250
248
  "aria-orientation": "vertical",
251
249
  "aria-labelledby": "user-menu",
@@ -1 +1 @@
1
- {"version":3,"file":"RightMenu.js","sources":["../../../../src/components/Layout/GlobalHeader/RightMenu.tsx"],"sourcesContent":[null],"names":["_jsx","React","_jsxs"],"mappings":"yTASA,MAAM,eAAe,GAAkB,CAAC;MAC9B;;;eAIe,EAAA,SAAC,IAAI,QAAQ,CAAS,IAAA,CAAA;kBACtB;AACb,IAAA,IAAA,CAAA,MAAG,EAAA;mBACN,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,SAAA,IAAA;QACA,SAAE,CAAA,SAAA,CAAA;AAEP,OAAA,CAAA;AACJ;AAEA,GAAM,EAAA,EAAC;SASG,YAAY,CAAA,MAAA,CAAA,OAAgB,EAAA;IAClC,OAAO,EAAM;AACb,GAAA,CAAA,GAAAA,GAAO,CAAA,KAAA,EAAA;AACP,IAAA;AACA,GAAA,CAAA;;AAGM,MAAA,SAAY,GAAG,CAAS;UACxB;aACA;mBAEoC;UACjC;AACL,EAAA,QAAA;AACI,EAAA,WAAA;;;AAGJ,EAAA,MAAA,CAAC,SAAC,EAAA,YAAA,CAAA,GAAA,QAAA,EAAA;QAEF,CAAsC,MAAA,EAAA,SAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;AACtC,EAAA,MAAA,CAAA,cAAkB,EAAA,iBAA4B,CAAA,GAAAC,cAAA,CAAA,QAAA,CAAA,IAAA,CAAA;AAC1C,EAAA,MAAA,OAAA,SAAU,CAAG,IAAK,CAAA;;;AAGtB,GAAA,GAAA;UAEI,IAAA;AACA,GAAA,CAAA;AACA;QACJ,MAAC,GAAA,MAAA,SAAA,CAAA,IAAA,CAAA;AAED,EAAA,MAAA,OAAO,GAAG,MAAE,SAAA,CAAA,KAAA,CAAA;AACR,EAAA,MAAA,UAAA,GAAS,MAAmB,SAAA,CAAA,CAAA;AAC5B;AACJ,EAAA,SAAE,CAAA,MAAA;AACN,IAAA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A,kBAAuB,CAAS;AA2BrB,KAAA;AACA,GAAA,EAAA,EAAA,CAAA;AAwBxC;AAEA,EAAA,MAAA,iBAAyB,GAAA,MAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SearchBar.js","sources":["../../../../src/components/Layout/GlobalHeader/SearchBar.tsx"],"sourcesContent":[null],"names":[],"mappings":"uSAMA,MAAM;AAQN,EAAA;AACI,CAAA,GAAA,KAAA;AACM,MAAA,SAAW,GAAA,CAAA;AACjB,EAAA;aACO,GAAA,QAAQ;;AAEf,CAAA,KAAA;QAEA,QAAA,GAAA,WAAA,EAAA;AACA,EAAA,MAAA,sBAAwB,EAAG;AACvB,EAAA,MAAA,YAAW,MAAG,CAAK,IAAC,CAAA;AACpB,EAAA,MAAA,CAAA,MAAA,EAAS,SAAA,CAAA,GAAA,QAAqB,CAAC,KAAC,CAAA;AAChC,EAAA,MAAA,CAAA,aAAW,EAAI,gBAAK,CAAA,GAAA,QAAA,CAAA,EAAA,CAAA;AAChB,EAAA,MAAA;eACH;AACL,IAAA,aAAE;IAEF;AACA,GAAA,GAAA,WAAM,CAAA,KAAa,IAAI,KAA0B,OAAI,CAAA;AACjD;AACI,EAAA,MAAA,kBAAK,GAAW,MAAA,KAAA,IAAA;kBACZ,KAAM,CAAA,MAAA,CAAA,KAAc;2BACpB,CAAA,KAAiB,CAAC,CAAA;mBAClB,EAAA,EAAM;AACV,MAAA,QAAA,CAAA,eAAc,CAAA,EAAA,CAAA,CAAA;;;;AAId,EAAA,MAAA,aAAK,GAAO,KAAA,IAAA;iBACR,CAAA,GAAK;sBACD;AACA,QAAA,KAAA,CAAA;wBACI,CAAA,IAAA,IAAS,IAAA,GAAA,aAAA,CAAA,MAAA,GAAA,CAAA,GAAA,IAAA,GAAA,CAAA,GAAA,IAAA,CAAA;;oBAEb;4BACA,EAAU;wBACb,CAAA,IAAA,IAAA,IAAA,GAAA,EAAA,GAAA,IAAA,GAAA,CAAA,GAAA,IAAA,CAAA;;AAEL,MAAA,KAAA,OAAK;4BACK,EAAA;yBACG,IAAC,CAAA,IAAO,aAAA,CAAA,aAAA,CAAA,EAAA;gBACjB,MAAM,GAAA,aAAA,CAAA,aAAA,CAAA;UACb,IAAA,MAAA,EAAA;AACL,YAAE,OAAA,CAAA,GAAA,CAAA,yBAAA,EAAA,MAAA,CAAA,KAAA,CAAA;UAEF;UACA,SAAe,CAAA,KAAA,CAAA;AACX,QAAA;AACI,QAAA;mBACI;aACH,CAAA,cAAA,EAAA;AACL,QAAA,SAAE,CAAA,KAAA,CAAA;AAEF,QAAA;AACA;AACI,EAAA,CAAA;AACJ;WACG,CAAA,MAAA;IAEP,MAAA,kBAAsB,GAAA,KAAA,IAAA;AACtB,MAAA,IAAM,SAAA,CAAA,OAAiB,IAAI,CAAA,SAAwB,CAAA,OAAA,CAAA,QAAA,CAAA,KAAA,CAAA,MAAA,CAAA,EAAA;AAC/C,QAAA,SAAI,CAAM,KAAI,CAAE;AACZ,MAAA;;YAEJ,CAAA,gBAAiB,CAAA,WAAA,EAAA,kBAAA,CAAA;AACrB,IAAA,OAAE,MAAA;MAEF,QACI,CAAA,mBAAU,CAAA,WAAW,EAAA,kBAAuB,CAAA;AA2BZ,IAAA,CAAA;AACA,EAAA,CAAA,EAAA,EAAA,CAAA;AAwBxC;AAEA,EAAA,MAAA,iBAAyB,GAAA,MAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,3 @@
1
1
  export * from './MainHeader';
2
- export * from './Logo';
3
2
  export * from './RightMenu';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import type { LinksFunction } from '@remix-run/node';
3
1
  import { BasicLayoutProps } from '@admin-layout/client';
2
+ import type { LinksFunction } from '@remix-run/node';
3
+ import * as React from 'react';
4
4
  declare const ProTailwindLayout: React.FC<BasicLayoutProps & {
5
5
  loaderData?: any;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"ProTailwindLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/ProTailwindLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAOH,gBAAgB,EACnB,MAAM,sBAAsB,CAAC;AAc9B,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,GAAG;IAAE,UAAU,CAAC,EAAE,GAAG,CAAA;CAAE,CASxE,CAAC;AACF,eAAe,iBAAiB,CAAC;AAEjC,eAAO,MAAM,MAAM;;CAElB,CAAC;AACF,eAAO,MAAM,KAAK,EAAE,aAA+D,CAAC;AAEpF,eAAO,MAAM,MAAM,GAAU,WAAM;;;EA0BlC,CAAC;AAEF,wBAAsB,YAAY,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE;;;;CAAA,gBAkBnE;AAED,eAAO,MAAM,gBAAgB,GAAI;;;CAA6B,YAE7D,CAAC"}
1
+ {"version":3,"file":"ProTailwindLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/ProTailwindLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,gBAAgB,EAMnB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2E/B,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,GAAG;IAAE,UAAU,CAAC,EAAE,GAAG,CAAA;CAAE,CAyBxE,CAAC;AACF,eAAe,iBAAiB,CAAC;AAEjC,eAAO,MAAM,MAAM;;CAElB,CAAC;AACF,eAAO,MAAM,KAAK,EAAE,aAA+D,CAAC;AAEpF,eAAO,MAAM,MAAM,GAAU,WAAM;;;EA0BlC,CAAC;AAEF,wBAAsB,YAAY,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE;;;;CAAA,gBAkBnE;AAED,eAAO,MAAM,gBAAgB,GAAI;;;CAA6B,YAE7D,CAAC"}
@@ -1,17 +1,73 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { useSelector } from 'react-redux';
3
2
  import { filterRoutesWithLocale, transformData, addProLayoutParentKeys, removeUnnecessaryProperties, menuDataRender } from '@admin-layout/client';
4
3
  import { matchParentRoute } from '@admin-layout/client/lib/utils/parentRoute.js';
5
- import { ClientContainerService } from 'common';
6
4
  import { ClientTypes } from '@common-stack/client-core';
5
+ import { getAvailableCategories, getMenusByAdvancedFilter } from '@common-stack/client-react/lib/utils/filteredRoutes.js';
6
+ import { ClientContainerService } from 'common';
7
+ import * as React from 'react';
8
+ import { useSelector } from 'react-redux';
7
9
  import { createSelector } from 'reselect';
8
- import BasicLayoutEnhanced from './TailwindLayout.js';
9
10
  import { config } from '../../config/env-config.js';
11
+ import BasicLayoutEnhanced from './TailwindLayout.js';
10
12
  import stylesheet from '../../styles/index.css?url';
11
13
  const selectOrgName = state => state.platform.orgName;
12
- const selector = createSelector([selectOrgName], orgName => ({
13
- orgName
14
+ const selectSettings = state => state.settings;
15
+ const selector = createSelector([selectOrgName, selectSettings], (orgName, settings) => ({
16
+ orgName,
17
+ settings
14
18
  }));
19
+ /**
20
+ * Filter menu items based on user visibility settings using filteredRoutes utilities
21
+ */
22
+ function filterMenuItemsByVisibility(menuData, settings) {
23
+ if (!menuData || !Array.isArray(menuData)) return [];
24
+ const hiddenMenuCategories = settings?.hiddenMenuCategories || [];
25
+ // Deduplicate hiddenMenuKeys using Set for consistent behavior
26
+ const hiddenMenuKeys = settings?.hiddenMenuKeys ? Array.from(new Set(settings.hiddenMenuKeys)) : [];
27
+ // Convert menu data to format expected by filteredRoutes utilities
28
+ const menuItemsWithCategories = menuData.map(item => ({
29
+ ...item,
30
+ // Use position as category for filtering
31
+ category: item.position || 'default',
32
+ // Ensure key exists for filtering
33
+ key: item.key || item.path || ''
34
+ }));
35
+ // Step 1: Filter by categories using advanced filter
36
+ const availableCategories = getAvailableCategories(menuItemsWithCategories);
37
+ const visibleCategories = availableCategories.filter(category => !hiddenMenuCategories.includes(category.toLowerCase()));
38
+ let filteredByCategory = menuItemsWithCategories;
39
+ if (visibleCategories.length !== availableCategories.length) {
40
+ // Use advanced filter to get menus by visible categories
41
+ const filters = {
42
+ categories: visibleCategories.length > 0 ? visibleCategories : ['__no_matches__'] // Empty array would show all
43
+ };
44
+ const filteredMenuMaps = getMenusByAdvancedFilter(menuItemsWithCategories, filters);
45
+ // Convert back to array format
46
+ filteredByCategory = filteredMenuMaps.map(menuMap => {
47
+ const path = Object.keys(menuMap)[0];
48
+ return {
49
+ ...menuMap[path],
50
+ path
51
+ };
52
+ });
53
+ }
54
+ // Step 2: Filter out individually hidden items recursively
55
+ const filterItemsRecursively = items => {
56
+ return items.filter(item => {
57
+ if (!item?.key) return false;
58
+ // Skip if this specific item is hidden
59
+ if (hiddenMenuKeys.includes(item.key)) {
60
+ return false;
61
+ }
62
+ // Process children recursively
63
+ if (item.children && Array.isArray(item.children) && item.children.length > 0) {
64
+ item.children = filterItemsRecursively(item.children);
65
+ }
66
+ return true;
67
+ });
68
+ };
69
+ return filterItemsRecursively(filteredByCategory);
70
+ }
15
71
  const ProTailwindLayout = props => {
16
72
  const {
17
73
  loaderData: {
@@ -20,15 +76,21 @@ const ProTailwindLayout = props => {
20
76
  }
21
77
  } = props;
22
78
  const {
23
- orgName
79
+ orgName,
80
+ settings
24
81
  } = useSelector(state => selector(state));
82
+ // Apply menu visibility filters
83
+ const filteredMenuData = React.useMemo(() => {
84
+ return filterMenuItemsByVisibility(newMenuData, settings);
85
+ }, [newMenuData, settings?.hiddenMenuCategories, settings?.hiddenMenuKeys]);
25
86
  const params = {
26
87
  orgName: orgName
27
88
  };
28
89
  return jsx(BasicLayoutEnhanced, {
29
90
  routeParams: params,
30
91
  permissions: permissions,
31
- menuData: newMenuData
92
+ menuData: filteredMenuData,
93
+ fullMenuData: newMenuData
32
94
  });
33
95
  };
34
96
  const handle = {
@@ -1 +1 @@
1
- {"version":3,"file":"ProTailwindLayout.js","sources":["../../../src/components/Layout/ProTailwindLayout.tsx"],"sourcesContent":[null],"names":["_jsx","TailwindLayout"],"mappings":"+jBAqBA,MAAM,aAAa,GAAG,KAAC,IAAO,KAAG,CAAA,QAAM,CAAA,OAAS;AAEhD,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,aAAa,CAAC,EAAE,YAAY;AAE7D,EAAA;;AAII,MAAA,iBAAoB,GAAA,KAAA,IAAW;AAG/B,EAAA,MAAA;AACA,IAAA,UAAQ,EAAA;AACZ,MAAE,WAAA;AACF,MAAA;AAEA;AACI,GAAA,GAAA,KAAY;EACd,MAAA;AACF,IAAA;AAEA,GAAM,GAAA,WAAa,CAAA,SAAQ,QAAQ,MAAI,CAAA,CAAA;AACnC,EAAA,MAAA,MAAmB,GAAA;IACnB,OAAI,EAAA;AACJ,GAAA;SACeA,GAAA,CAAAC;IACf,WAAC,EAAA,MAAA;IAAC,WAAgB,EAAA,WAAA;AACd,IAAA,QAAA,EAAA;IACJ;;;AAKA,EAAA,IAAA,EAAA;AACA;cACkB,MAAA,CAAM;KACpB,EAAA,YAAY;AACZ,EAAA,IAAA,EAAA;;AAEY,MAAA,MAAA,GAAE,MAAC,MAAA,IAAA;AACf,EAAA,MAAA;IACJ;MACM,MAAA,CAAA,OAAA;MACC,WAAA,GAAA,EAAA;;eAEQ,GAAA,gBAAA,CAAA,WAAA,EAAA,MAAA,CAAA,WAAA,CAAA;WACb,CAAA,EAAA;AACN,IAAE,OAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAEF;QACgF,eAAA,GAAA,sBAAA,CAAA,WAAA,CAAA,QAAA,CAAA,CAAA;AAC5E,EAAA,MAAA,iBAAyB,GAAA,aAAY,gBAAG,CAAA;AACxC,EAAA,MAAA,+CAAmC,CAAA,iBAAA,CAAA;AAEnC,EAAA,sBAAK,CAAA,OAAA,CAAA,IAAA,IAAA,2BAAA,CAAA,IAAA,CAAA,CAAA;AACD,EAAA,IAAA,WAAiB,GAAA,MAAA;iBAEX,GAAA,MAAc,EAAA,YAAU,EAAI,WAAW;AAC7C,EAAA,IAAA,CAAA,WAAA,EAAY;UAEN,IAAA,KAAA,CAAA,uBAAsB,CAAA;AAC5B;MACH,CAAA,WAAA,EAAA;IAAC,MAAO,IAAG,KAAC,CAAA,uBAAA,CAAA;AACT;AACA,EAAA,MAAA,WAAQ,GAAM,cAAG,CAAA,eAAA,EAAA,WAAA,CAAA;SACpB;AACD,IAAA;AACJ,IAAC;AAED,GAAM;AACF;AACF,eAAA,YAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ProTailwindLayout.js","sources":["../../../src/components/Layout/ProTailwindLayout.tsx"],"sourcesContent":[null],"names":["_jsx","TailwindLayout"],"mappings":"gtBAyBA,MAAM,aAAa,GAAG,KAAC,IAAO,KAAG,CAAA,QAAM,CAAA,OAAS;AAChD,MAAM,cAAc,GAAG,KAAC,SAAU,CAAA,QAAM;AAExC,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,MAAM;AAEzF,EAAA,OAAA;;AAEG,CAAA,CAAA,C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WAAA,GAAA,EAAA;AAEF,EAAA,IAAM;IACF,WAAA,GAAA,gBAAA,CAAA,WAAA,EAAA,MAAA,CAAA,WAAA,CAAA;AACA,EAAA,CAAA,CAAA,OAAM,CAAA,EAAA;AACN,IAAA,OAAM,CAAE,GAAA,CAAA,CAAA,CAAA;AAER,EAAA;AACI,EAAA,MAAA,eAAQ,GAAS,kCAAwC,CAAA,QAAA,CAAA,CAAA;QAEzD,iBAAiB,GAAG,aAAa,CAAC,eAAY,CAAA;AAC9C,EAAA,MAAA,sBAAoB,GAAA,sBAAa,CAAA,iBAAA,CAAA;wBAE3B,CAAA,OAAA,CAAmB,IAAG,IAAA,2BAAc,CAAA,IAAuB,CAAA,CAAA;AACjE,EAAA,IAAA,WAAA,GAAA,MAAA,EAAoB,YAAQ,EAAA,WAAa;MAC5C,WAAA,GAAA,MAAA,EAAA,YAAA,EAAA,WAAA;MAAC,CAAA,WAAW,EAAA;AACT,IAAA,MAAA,IAAA,KAAQ,CAAA,uBAAM,CAAA;AACd,EAAA;MACH,CAAA,WAAA,EAAA;AACD,IAAA,MAAA,iCAAkB,CAAA;AACtB,EAAC;AAED,EAAA,MAAO,WAAM,GAAA,cAAsB,CAAA,eAAe,EAAA,WAAc,CAAE;AAC9D,EAAA,OAAA;AACJ,IAAE,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IRightMenuProps } from '../../typings';
3
+ export declare const BottomMenu: React.FC<IRightMenuProps>;
4
+ //# sourceMappingURL=BottomMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/BottomMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAOrE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAgBhD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuUhD,CAAC"}
@@ -0,0 +1,330 @@
1
+ import {jsxs,Fragment,jsx}from'react/jsx-runtime';import React__default,{useState,useRef,useEffect}from'react';import {Link}from'@remix-run/react';import {useAppSelector}from'@admin-layout/client';import {generateMenuPath}from'../util.js';import {renderDynamicIcon}from'../../../helpers/DynamicIcon.js';import switchDialogs from'@app/dialog/WrappedDialogsSwitch';const DialogComponent = ({
2
+ path,
3
+ onClose
4
+ }) => {
5
+ const [dialog, setDialog] = useState(null);
6
+ useEffect(() => {
7
+ if (!dialog) {
8
+ switchDialogs(path).then(component => {
9
+ setDialog(component);
10
+ });
11
+ }
12
+ }, []);
13
+ return dialog ? jsx(dialog.default, {
14
+ onClose: onClose
15
+ }) : jsx("div", {
16
+ children: "Loading..."
17
+ });
18
+ };
19
+ const BottomMenu = ({
20
+ menuData,
21
+ routeParams,
22
+ getMenuSeparation,
23
+ scrolled,
24
+ settings,
25
+ authorities,
26
+ isMobile,
27
+ picture
28
+ }) => {
29
+ const [MenusList, setMenusList] = useState();
30
+ const [isOpen, setIsOpen] = useState(false);
31
+ const [openedModalKey, setOpenedModalKey] = React__default.useState(null);
32
+ const menuRef = useRef(null);
33
+ const {
34
+ t
35
+ } = {
36
+ t: key => key
37
+ }; // Mock translation function
38
+ // const cancelRef = React.useRef();
39
+ const {
40
+ profile = {}
41
+ } = useAppSelector(state => state?.user || {});
42
+ const {
43
+ nickname,
44
+ picture: profilePicture
45
+ } = profile || {};
46
+ const onOpen = () => setIsOpen(true);
47
+ const onClose = () => setIsOpen(false);
48
+ const toggleMenu = () => setIsOpen(!isOpen);
49
+ const accountMenuItems = menuData?.find(menu => menu.key === 'account');
50
+ const logoutMenuItems = menuData?.filter(menu => menu.key === 'logout.modal');
51
+ // Handle outside clicks to close the menu
52
+ useEffect(() => {
53
+ const handleClickOutside = event => {
54
+ if (menuRef.current && !menuRef.current.contains(event.target)) {
55
+ setIsOpen(false);
56
+ }
57
+ };
58
+ // Handle escape key to close the menu
59
+ const handleEscKey = event => {
60
+ if (event.key === 'Escape') {
61
+ setIsOpen(false);
62
+ }
63
+ };
64
+ if (isOpen) {
65
+ document.addEventListener('mousedown', handleClickOutside);
66
+ document.addEventListener('keydown', handleEscKey);
67
+ }
68
+ return () => {
69
+ document.removeEventListener('mousedown', handleClickOutside);
70
+ document.removeEventListener('keydown', handleEscKey);
71
+ };
72
+ }, [isOpen]);
73
+ const newMenuData = menuData?.filter(m => !m.hideInMenu)?.map(m => {
74
+ if (!m.hideInMenu) {
75
+ const path = generateMenuPath(m.path, routeParams);
76
+ return {
77
+ ...m,
78
+ path
79
+ };
80
+ }
81
+ });
82
+ useEffect(() => {
83
+ setMenusList(getMenuSeparation(newMenuData));
84
+ }, [authorities]);
85
+ const conversionPath = path => {
86
+ if (path && path.indexOf('http') === 0) {
87
+ return path;
88
+ }
89
+ if (path && path.indexOf('/http') === 0) {
90
+ return path.replace(/^\//g, '');
91
+ }
92
+ return `/${path || ''}`.replace(/\/+/g, '/');
93
+ };
94
+ const getMenuItemModal = item => {
95
+ // const icon = this.getIcon(item.icon);
96
+ const {
97
+ key,
98
+ name,
99
+ icon
100
+ } = item;
101
+ return jsxs("button", {
102
+ onClick: () => {
103
+ setOpenedModalKey(key);
104
+ setIsOpen(false); // Close the dropdown when opening a modal
105
+ },
106
+ className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
107
+ role: "menuitem",
108
+ children: [jsx("div", {
109
+ className: "mr-3",
110
+ children: renderDynamicIcon(icon)
111
+ }), t(name)]
112
+ });
113
+ };
114
+ /**
115
+ * Judge whether it is http link.return or a Link
116
+ * @memberOf SiderMenu
117
+ */
118
+ const getMenuItemPath = item => {
119
+ // const { styles = {} } = props;
120
+ const itemPath = conversionPath(item.path);
121
+ // const icon = this.getIcon(item.icon);
122
+ const {
123
+ target,
124
+ name,
125
+ icon
126
+ } = item;
127
+ // Is it a http link
128
+ if (/^https?:\/\//.test(itemPath)) {
129
+ return jsxs("a", {
130
+ href: itemPath,
131
+ target: target,
132
+ onClick: onClose,
133
+ className: "flex items-center w-full p-3 text-foreground hover:bg-muted",
134
+ role: "menuitem",
135
+ children: [jsxs("div", {
136
+ className: "mr-3",
137
+ children: [renderDynamicIcon(icon), " "]
138
+ }), jsx("span", {
139
+ className: "ml-1",
140
+ children: name
141
+ })]
142
+ });
143
+ }
144
+ return jsxs(Link, {
145
+ to: itemPath,
146
+ onClick: onClose,
147
+ className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
148
+ role: "menuitem",
149
+ children: [jsx("div", {
150
+ className: "mr-3",
151
+ children: renderDynamicIcon(icon)
152
+ }), name]
153
+ });
154
+ };
155
+ const getMenuModals = () => {
156
+ let dialogMenus = [];
157
+ const upperMenus = MenusList?.upperMenus?.filter(x => x.modal === true);
158
+ const middleMenus = MenusList?.middleMenus?.filter(x => x.modal === true);
159
+ const lowerMenus = MenusList?.lowerMenus?.filter(x => x.modal === true);
160
+ const bottomMenus = MenusList?.bottomMenus?.filter(x => x.modal === true);
161
+ if (upperMenus?.length > 0) dialogMenus = dialogMenus.concat(...upperMenus);
162
+ if (middleMenus?.length > 0) dialogMenus = dialogMenus.concat(...middleMenus);
163
+ if (lowerMenus?.length > 0) dialogMenus = dialogMenus.concat(...lowerMenus);
164
+ if (bottomMenus?.length > 0) dialogMenus = dialogMenus.concat(...bottomMenus);
165
+ return dialogMenus.map((item, k) => {
166
+ const {
167
+ dialogPath,
168
+ key,
169
+ name
170
+ } = item;
171
+ return key === openedModalKey && jsx("div", {
172
+ className: "fixed inset-0 z-50 overflow-y-auto",
173
+ children: jsxs("div", {
174
+ className: "flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",
175
+ children: [jsx("div", {
176
+ className: "fixed inset-0 transition-opacity",
177
+ "aria-hidden": "true",
178
+ children: jsx("div", {
179
+ className: "absolute inset-0 bg-black bg-opacity-50",
180
+ onClick: () => {
181
+ onClose();
182
+ setOpenedModalKey(null);
183
+ }
184
+ })
185
+ }), jsx("span", {
186
+ className: "hidden sm:inline-block sm:align-middle sm:h-screen",
187
+ "aria-hidden": "true",
188
+ children: "\u200B"
189
+ }), jsx("div", {
190
+ className: "inline-block align-bottom rounded-themed-lg text-left overflow-hidden shadow-themed-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full themed-modal",
191
+ role: "dialog",
192
+ "aria-modal": "true",
193
+ "aria-labelledby": "modal-headline",
194
+ children: jsxs("div", {
195
+ className: "px-4 pt-5 pb-4 sm:p-6 sm:pb-4",
196
+ children: [jsx("div", {
197
+ className: "flex justify-end",
198
+ children: jsxs("button", {
199
+ type: "button",
200
+ className: "rounded-themed text-muted-foreground hover:text-foreground focus-themed",
201
+ onClick: () => {
202
+ onClose();
203
+ setOpenedModalKey(null);
204
+ },
205
+ children: [jsx("span", {
206
+ className: "sr-only",
207
+ children: "Close"
208
+ }), jsx("svg", {
209
+ className: "h-6 w-6",
210
+ xmlns: "http://www.w3.org/2000/svg",
211
+ fill: "none",
212
+ viewBox: "0 0 24 24",
213
+ stroke: "currentColor",
214
+ "aria-hidden": "true",
215
+ children: jsx("path", {
216
+ strokeLinecap: "round",
217
+ strokeLinejoin: "round",
218
+ strokeWidth: "2",
219
+ d: "M6 18L18 6M6 6l12 12"
220
+ })
221
+ })]
222
+ })
223
+ }), jsx("div", {
224
+ className: "mt-2",
225
+ children: jsx(DialogComponent, {
226
+ path: dialogPath,
227
+ onClose: () => {
228
+ onClose();
229
+ setOpenedModalKey(null);
230
+ }
231
+ })
232
+ })]
233
+ })
234
+ })]
235
+ })
236
+ }, k);
237
+ });
238
+ };
239
+ return jsxs(Fragment, {
240
+ children: [jsxs("div", {
241
+ className: "relative",
242
+ ref: menuRef,
243
+ onMouseEnter: onOpen,
244
+ children: [jsxs("div", {
245
+ className: "flex items-center gap-2",
246
+ onClick: toggleMenu,
247
+ children: [jsx("button", {
248
+ className: `
249
+ inline-flex items-center justify-center bg-muted hover:bg-muted-foreground text-foreground rounded-full h-12 w-12 min-w-[48px] outline-none transform transition-colors duration-200
250
+ `,
251
+ "aria-expanded": "false",
252
+ children: picture ? jsx("img", {
253
+ src: picture,
254
+ className: "rounded-full",
255
+ alt: "User"
256
+ }) : jsx("svg", {
257
+ className: "h-6 w-6 text-foreground",
258
+ fill: "none",
259
+ stroke: "currentColor",
260
+ viewBox: "0 0 24 24",
261
+ xmlns: "http://www.w3.org/2000/svg",
262
+ children: jsx("path", {
263
+ strokeLinecap: "round",
264
+ strokeLinejoin: "round",
265
+ strokeWidth: "2",
266
+ d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
267
+ })
268
+ })
269
+ }), isMobile && jsx("span", {
270
+ className: "text-lg font-medium",
271
+ children: t(nickname)
272
+ })]
273
+ }), isOpen && jsxs("div", {
274
+ className: "bg-background absolute bottom-full mb-2 w-72 rounded-themed shadow-themed-lg py-1 themed-dropdown ring-1 ring-border focus:outline-none z-40",
275
+ role: "menu",
276
+ "aria-orientation": "vertical",
277
+ "aria-labelledby": "user-menu",
278
+ children: [MenusList?.upperMenus?.map((item, k) => jsx("div", {
279
+ className: "px-1 py-1",
280
+ children: item.modal ? getMenuItemModal(item) : getMenuItemPath(item)
281
+ }, k)), MenusList?.upperMenus?.length > 0 && MenusList?.middleMenus?.length > 0 && jsx("hr", {
282
+ className: "border-border my-1"
283
+ }), MenusList?.middleMenus?.map((item, k) => jsx("div", {
284
+ className: "px-1 py-1",
285
+ children: item.modal ? getMenuItemModal(item) : getMenuItemPath(item)
286
+ }, k)), profile && accountMenuItems?.children && jsx("div", {
287
+ className: "py-2",
288
+ children: accountMenuItems.children.map(item => jsxs(Link, {
289
+ className: "flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer transition-colors",
290
+ to: generateMenuPath(item.path, routeParams),
291
+ children: [jsxs("div", {
292
+ className: "flex items-center",
293
+ children: [jsx("span", {
294
+ className: "mr-3 text-base",
295
+ children: item.icon
296
+ }), jsx("span", {
297
+ children: item.name
298
+ })]
299
+ }), item.hasNotification && jsx("div", {
300
+ className: "w-2 h-2 bg-blue-500 rounded-full"
301
+ })]
302
+ }, item.key))
303
+ }), profile && jsx("hr", {
304
+ className: "border-border my-1"
305
+ }), profile && jsxs("div", {
306
+ className: "flex items-center px-4 py-2",
307
+ children: [jsx("div", {
308
+ className: "w-8 h-8 rounded-full bg-red-500 flex items-center justify-center overflow-hidden mr-3",
309
+ children: picture ? jsx("img", {
310
+ src: picture,
311
+ alt: nickname || 'Guest',
312
+ className: "w-full h-full object-cover"
313
+ }) : jsx("span", {
314
+ className: "text-white text-sm font-medium",
315
+ children: (nickname || 'Guest').charAt(0).toUpperCase()
316
+ })
317
+ }), jsx("span", {
318
+ className: "text-sm font-medium",
319
+ children: nickname || 'Guest'
320
+ })]
321
+ }), logoutMenuItems?.length > 0 && jsx("hr", {
322
+ className: "border-border my-1"
323
+ }), logoutMenuItems?.map((item, k) => jsx("div", {
324
+ className: "px-1 py-1",
325
+ children: item.modal ? getMenuItemModal(item) : getMenuItemPath(item)
326
+ }, k))]
327
+ })]
328
+ }), getMenuModals()]
329
+ });
330
+ };export{BottomMenu};//# sourceMappingURL=BottomMenu.js.map