@admin-layout/tailwind-design-pro 11.0.4-alpha.4 → 11.2.1-alpha.1

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 (357) hide show
  1. package/README.md +471 -1
  2. package/lib/cdm-locales/en/menu.json +2 -1
  3. package/lib/cdm-locales/en/settings.json +40 -1
  4. package/lib/cdm-locales/es/menu.json +2 -1
  5. package/lib/cdm-locales/es/settings.json +42 -3
  6. package/lib/cdm-locales/index.d.ts +2 -0
  7. package/lib/cdm-locales/index.d.ts.map +1 -0
  8. package/lib/cdm-locales/index.ts +1 -0
  9. package/lib/components/LanguageMenu/LanguageMenu.d.ts +2 -1
  10. package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
  11. package/lib/components/LanguageMenu/LanguageMenu.js +40 -61
  12. package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
  13. package/lib/components/Layout/BasicLayout/index.d.ts +6 -12
  14. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  15. package/lib/components/Layout/BasicLayout/index.js +274 -108
  16. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  17. package/lib/components/Layout/BasicLayout/utils.d.ts +4 -2
  18. package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
  19. package/lib/components/Layout/BasicLayout/utils.js +80 -109
  20. package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
  21. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +1 -8
  22. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
  23. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +28 -38
  24. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
  25. package/lib/components/Layout/GlobalFooter/Copyright.d.ts +2 -1
  26. package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
  27. package/lib/components/Layout/GlobalFooter/Footer.d.ts +2 -1
  28. package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
  29. package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -15
  30. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  31. package/lib/components/Layout/GlobalHeader/Header.js +107 -65
  32. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  33. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +4 -0
  34. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
  35. package/lib/components/Layout/GlobalHeader/MainHeader.js +187 -0
  36. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -0
  37. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +1 -12
  38. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
  39. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +26 -30
  40. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
  41. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +3 -16
  42. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  43. package/lib/components/Layout/GlobalHeader/RightContent.js +86 -0
  44. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
  45. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts +4 -0
  46. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -0
  47. package/lib/components/Layout/GlobalHeader/RightMenu.js +248 -0
  48. package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -0
  49. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +9 -0
  50. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -0
  51. package/lib/components/Layout/GlobalHeader/SearchBar.js +109 -0
  52. package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
  53. package/lib/components/Layout/GlobalHeader/index.d.ts +3 -0
  54. package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
  55. package/lib/components/Layout/ProTailwindLayout.d.ts +3 -1
  56. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
  57. package/lib/components/Layout/ProTailwindLayout.js +77 -12
  58. package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
  59. package/lib/components/Layout/Sidebar/BottomMenu.d.ts +4 -0
  60. package/lib/components/Layout/Sidebar/BottomMenu.d.ts.map +1 -0
  61. package/lib/components/Layout/Sidebar/BottomMenu.js +294 -0
  62. package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -0
  63. package/lib/components/Layout/Sidebar/Divider.d.ts +2 -31
  64. package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
  65. package/lib/components/Layout/Sidebar/Divider.js +26 -28
  66. package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
  67. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +5 -0
  68. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
  69. package/lib/components/Layout/Sidebar/DynamicIcon.js +50 -0
  70. package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
  71. package/lib/components/Layout/Sidebar/MainSidebar.d.ts +5 -0
  72. package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -0
  73. package/lib/components/Layout/Sidebar/MainSidebar.js +224 -0
  74. package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -0
  75. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +6 -0
  76. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -0
  77. package/lib/components/Layout/Sidebar/MainSidebarMenu.js +451 -0
  78. package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -0
  79. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts +4 -0
  80. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -0
  81. package/lib/components/Layout/Sidebar/PerplexSidebar.js +254 -0
  82. package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -0
  83. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts +4 -0
  84. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -0
  85. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +318 -0
  86. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -0
  87. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  88. package/lib/components/Layout/TailwindLayout.js +46 -13
  89. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  90. package/lib/components/Layout/getPageTitle.d.ts +1 -16
  91. package/lib/components/Layout/getPageTitle.d.ts.map +1 -1
  92. package/lib/components/Layout/getPageTitle.js +1 -1
  93. package/lib/components/Layout/getPageTitle.js.map +1 -1
  94. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +5 -0
  95. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
  96. package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
  97. package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
  98. package/lib/components/Layout/slot-fill/Footer.d.ts +4 -3
  99. package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
  100. package/lib/components/Layout/slot-fill/Footer.js +6 -6
  101. package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
  102. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +3 -2
  103. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
  104. package/lib/components/Layout/slot-fill/HeaderNotice.js +7 -0
  105. package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -0
  106. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +4 -0
  107. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -0
  108. package/lib/components/Layout/slot-fill/HeaderSearchBar.js +6 -0
  109. package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -0
  110. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +4 -0
  111. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -0
  112. package/lib/components/Layout/slot-fill/HeaderSearchButton.js +6 -0
  113. package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -0
  114. package/lib/components/Layout/slot-fill/Logo.d.ts +5 -0
  115. package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -0
  116. package/lib/components/Layout/slot-fill/Logo.js +7 -0
  117. package/lib/components/Layout/slot-fill/Logo.js.map +1 -0
  118. package/lib/components/Layout/slot-fill/RightContent.d.ts +4 -0
  119. package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -0
  120. package/lib/components/Layout/slot-fill/RightContent.js +6 -0
  121. package/lib/components/Layout/slot-fill/RightContent.js.map +1 -0
  122. package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +5 -0
  123. package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -0
  124. package/lib/components/Layout/slot-fill/SideMenuLogo.js +7 -0
  125. package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -0
  126. package/lib/components/Layout/slot-fill/index.d.ts +6 -0
  127. package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
  128. package/lib/components/Layout/util.d.ts.map +1 -1
  129. package/lib/components/Layout/util.js +12 -0
  130. package/lib/components/Layout/util.js.map +1 -0
  131. package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -25
  132. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  133. package/lib/components/SettingDrawer/SettingDrawer.js +203 -382
  134. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  135. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +8 -0
  136. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -0
  137. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +21 -0
  138. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -0
  139. package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +4 -0
  140. package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -0
  141. package/lib/components/SettingDrawer/components/CheckBoxTheme.js +119 -0
  142. package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -0
  143. package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +8 -0
  144. package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -0
  145. package/lib/components/SettingDrawer/components/DeviceTabs.js +74 -0
  146. package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -0
  147. package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +4 -0
  148. package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -0
  149. package/lib/components/SettingDrawer/components/InvitationSettings.js +72 -0
  150. package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -0
  151. package/lib/components/SettingDrawer/components/LayoutChange.d.ts +4 -0
  152. package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -0
  153. package/lib/components/SettingDrawer/components/LayoutChange.js +111 -0
  154. package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -0
  155. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +21 -0
  156. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -0
  157. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +106 -0
  158. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -0
  159. package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +4 -0
  160. package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -0
  161. package/lib/components/SettingDrawer/components/NavigationsModes.js +322 -0
  162. package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -0
  163. package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +4 -0
  164. package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -0
  165. package/lib/components/SettingDrawer/components/RegionalSettings.js +519 -0
  166. package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -0
  167. package/lib/components/SettingDrawer/components/SettingsActions.d.ts +13 -0
  168. package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -0
  169. package/lib/components/SettingDrawer/components/SettingsActions.js +42 -0
  170. package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -0
  171. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +5 -0
  172. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -0
  173. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +22 -0
  174. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -0
  175. package/lib/components/SettingDrawer/components/Switch.d.ts +4 -0
  176. package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -0
  177. package/lib/components/SettingDrawer/components/Switch.js +20 -0
  178. package/lib/components/SettingDrawer/components/Switch.js.map +1 -0
  179. package/lib/components/SettingDrawer/components/ThemeColor.d.ts +4 -0
  180. package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -0
  181. package/lib/components/SettingDrawer/components/ThemeColor.js +45 -0
  182. package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -0
  183. package/lib/components/SettingDrawer/components/ThemeSelector.d.ts +4 -0
  184. package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -0
  185. package/lib/components/SettingDrawer/components/ThemeSelector.js +16 -0
  186. package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -0
  187. package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +4 -0
  188. package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -0
  189. package/lib/components/SettingDrawer/components/WebFontsSelector.js +22 -0
  190. package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -0
  191. package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts +18 -0
  192. package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -0
  193. package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +115 -0
  194. package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -0
  195. package/lib/components/SettingDrawer/utils/constants.d.ts +11 -0
  196. package/lib/components/SettingDrawer/utils/constants.d.ts.map +1 -0
  197. package/lib/components/SettingDrawer/utils/constants.js +77 -0
  198. package/lib/components/SettingDrawer/utils/constants.js.map +1 -0
  199. package/lib/components/SettingDrawer/utils/helper.d.ts +37 -0
  200. package/lib/components/SettingDrawer/utils/helper.d.ts.map +1 -0
  201. package/lib/components/SettingDrawer/utils/helper.js +154 -0
  202. package/lib/components/SettingDrawer/utils/helper.js.map +1 -0
  203. package/lib/components/SettingDrawer/utils/transformers.d.ts +15 -0
  204. package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -0
  205. package/lib/components/SettingDrawer/utils/transformers.js +73 -0
  206. package/lib/components/SettingDrawer/utils/transformers.js.map +1 -0
  207. package/lib/components/SettingDrawer/utils/types.d.ts +105 -0
  208. package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
  209. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +16 -1
  210. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
  211. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +97 -4
  212. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -1
  213. package/lib/components/index.d.ts +2 -0
  214. package/lib/components/index.d.ts.map +1 -0
  215. package/lib/components/index.js +1 -0
  216. package/lib/components/index.js.map +1 -0
  217. package/lib/components/typings.d.ts +154 -50
  218. package/lib/components/typings.d.ts.map +1 -1
  219. package/lib/compute.d.ts.map +1 -1
  220. package/lib/compute.js +16 -6
  221. package/lib/compute.js.map +1 -1
  222. package/lib/config/analytics-config.d.ts +59 -0
  223. package/lib/config/analytics-config.d.ts.map +1 -0
  224. package/lib/config/constants.d.ts +8 -0
  225. package/lib/config/constants.d.ts.map +1 -0
  226. package/lib/config/constants.js +32 -0
  227. package/lib/config/constants.js.map +1 -0
  228. package/lib/config/env-config.d.ts +21 -0
  229. package/lib/config/env-config.d.ts.map +1 -1
  230. package/lib/config/env-config.js +86 -1
  231. package/lib/config/env-config.js.map +1 -1
  232. package/lib/config/index.d.ts +3 -0
  233. package/lib/config/index.d.ts.map +1 -0
  234. package/lib/helpers/DynamicIcon.d.ts +8 -5
  235. package/lib/helpers/DynamicIcon.d.ts.map +1 -1
  236. package/lib/helpers/DynamicIcon.js +50 -0
  237. package/lib/helpers/DynamicIcon.js.map +1 -0
  238. package/lib/hooks/index.d.ts +3 -0
  239. package/lib/hooks/index.d.ts.map +1 -0
  240. package/lib/hooks/useMediaQuery.d.ts +14 -0
  241. package/lib/hooks/useMediaQuery.d.ts.map +1 -0
  242. package/lib/hooks/useMediaQuery.js +48 -0
  243. package/lib/hooks/useMediaQuery.js.map +1 -0
  244. package/lib/hooks/useScrollThreshold.d.ts +12 -0
  245. package/lib/hooks/useScrollThreshold.d.ts.map +1 -0
  246. package/lib/hooks/useScrollThreshold.js +60 -0
  247. package/lib/hooks/useScrollThreshold.js.map +1 -0
  248. package/lib/hooks/useTailwindTheme.d.ts +34 -0
  249. package/lib/hooks/useTailwindTheme.d.ts.map +1 -0
  250. package/lib/hooks/useTailwindTheme.js +82 -0
  251. package/lib/hooks/useTailwindTheme.js.map +1 -0
  252. package/lib/icons.d.ts +18 -0
  253. package/lib/icons.d.ts.map +1 -0
  254. package/lib/icons.js +14 -0
  255. package/lib/icons.js.map +1 -0
  256. package/lib/index.d.ts +3 -3
  257. package/lib/index.d.ts.map +1 -1
  258. package/lib/index.js +1 -1
  259. package/lib/index.js.map +1 -1
  260. package/lib/machines/selectors.d.ts +118 -0
  261. package/lib/machines/selectors.d.ts.map +1 -0
  262. package/lib/machines/settingsMachine.d.ts +29 -0
  263. package/lib/machines/settingsMachine.d.ts.map +1 -0
  264. package/lib/machines/settingsMachine.js +171 -0
  265. package/lib/machines/settingsMachine.js.map +1 -0
  266. package/lib/machines/types.d.ts +272 -0
  267. package/lib/machines/types.d.ts.map +1 -0
  268. package/lib/machines/types.js +5 -0
  269. package/lib/machines/types.js.map +1 -0
  270. package/lib/module.d.ts +0 -1
  271. package/lib/module.d.ts.map +1 -1
  272. package/lib/module.js +14 -15
  273. package/lib/module.js.map +1 -1
  274. package/lib/redux/index.d.ts +2 -0
  275. package/lib/redux/index.d.ts.map +1 -0
  276. package/lib/redux/searchReducer.d.ts +42 -0
  277. package/lib/redux/searchReducer.d.ts.map +1 -0
  278. package/lib/redux/searchReducer.js +64 -0
  279. package/lib/redux/searchReducer.js.map +1 -0
  280. package/lib/routes.json +10 -1
  281. package/lib/styles/index.css +667 -45
  282. package/lib/tailwindConfig.d.ts +100 -0
  283. package/lib/tailwindConfig.d.ts.map +1 -0
  284. package/lib/tailwindConfig.js +101 -0
  285. package/lib/tailwindConfig.js.map +1 -0
  286. package/lib/utils/__tests__/analytics-utils.test.d.ts +2 -0
  287. package/lib/utils/__tests__/analytics-utils.test.d.ts.map +1 -0
  288. package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
  289. package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
  290. package/lib/utils/__tests__/menu.test.d.ts +2 -0
  291. package/lib/utils/__tests__/menu.test.d.ts.map +1 -0
  292. package/lib/utils/__tests__/selectors.test.d.ts +2 -0
  293. package/lib/utils/__tests__/selectors.test.d.ts.map +1 -0
  294. package/lib/utils/__tests__/settingsMachine.test.d.ts +2 -0
  295. package/lib/utils/__tests__/settingsMachine.test.d.ts.map +1 -0
  296. package/lib/utils/__tests__/settingsUtils.test.d.ts +2 -0
  297. package/lib/utils/__tests__/settingsUtils.test.d.ts.map +1 -0
  298. package/lib/utils/analytics-utils.d.ts +43 -0
  299. package/lib/utils/analytics-utils.d.ts.map +1 -0
  300. package/lib/utils/analytics.d.ts +48 -0
  301. package/lib/utils/analytics.d.ts.map +1 -0
  302. package/lib/utils/configOverrides.d.ts +213 -0
  303. package/lib/utils/configOverrides.d.ts.map +1 -0
  304. package/lib/utils/configOverrides.js +91 -0
  305. package/lib/utils/configOverrides.js.map +1 -0
  306. package/lib/utils/formateCarData.d.ts +2 -0
  307. package/lib/utils/formateCarData.d.ts.map +1 -0
  308. package/lib/utils/isBrowser/index.js.map +1 -1
  309. package/lib/utils/menu.d.ts.map +1 -1
  310. package/lib/utils/settingsUtils.d.ts +20 -0
  311. package/lib/utils/settingsUtils.d.ts.map +1 -0
  312. package/lib/utils/settingsUtils.js +74 -0
  313. package/lib/utils/settingsUtils.js.map +1 -0
  314. package/lib/utils/test-utils.d.ts.map +1 -1
  315. package/lib/utils/utils/index.d.ts.map +1 -1
  316. package/lib/utils/utils/index.js.map +1 -1
  317. package/package.json +7 -15
  318. package/lib/components/Layout/GlobalFooter/Copyright.js +0 -8
  319. package/lib/components/Layout/GlobalFooter/Copyright.js.map +0 -1
  320. package/lib/components/Layout/GlobalFooter/Footer.js +0 -22
  321. package/lib/components/Layout/GlobalFooter/Footer.js.map +0 -1
  322. package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -15
  323. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
  324. package/lib/components/Layout/Sidebar/Sidebar.js +0 -141
  325. package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
  326. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -6
  327. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
  328. package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -89
  329. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
  330. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -8
  331. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
  332. package/lib/components/SettingDrawer/CheckBoxTheme.js +0 -48
  333. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
  334. package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -7
  335. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
  336. package/lib/components/SettingDrawer/LayoutChange.js +0 -69
  337. package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
  338. package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -8
  339. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
  340. package/lib/components/SettingDrawer/RegionalSettings.js +0 -95
  341. package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
  342. package/lib/components/SettingDrawer/Switch/index.d.ts +0 -9
  343. package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
  344. package/lib/components/SettingDrawer/Switch/index.js +0 -39
  345. package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
  346. package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -8
  347. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
  348. package/lib/components/SettingDrawer/ThemeColor.js +0 -32
  349. package/lib/components/SettingDrawer/ThemeColor.js.map +0 -1
  350. package/lib/components/defaultSettings.d.ts +0 -4
  351. package/lib/components/defaultSettings.d.ts.map +0 -1
  352. package/lib/components/defaultSettings.js +0 -14
  353. package/lib/components/defaultSettings.js.map +0 -1
  354. package/lib/utils/index.d.ts +0 -2
  355. package/lib/utils/index.d.ts.map +0 -1
  356. package/lib/utils/index.js +0 -13
  357. package/lib/utils/index.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {useState}from'react';import {Menu,Search,Sun,Moon}from'lucide-react';import {useTheme}from'../BasicLayout/index.js';import OrganizationDropDown from'./OrganizationDropdown.js';import {LanguageMenu}from'../../LanguageMenu/LanguageMenu.js';const GlobalHeader = props => {
1
+ import React__default from'react';import {Link}from'@remix-run/react';import {useDispatch,useSelector}from'react-redux';import {RightContent}from'./RightContent.js';import {icons}from'../../../icons.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';import {SearchBar}from'./SearchBar.js';import {HeaderNoticeSlot}from'../slot-fill/HeaderNotice.js';import'@common-stack/components-pro';import'reflect-metadata';import'@admin-layout/client/lib/constants/layout.js';const GlobalHeader = props => {
2
2
  const {
3
3
  theme,
4
4
  layout,
@@ -6,69 +6,111 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useState}from'react';import {Me
6
6
  routeParams,
7
7
  collapsed,
8
8
  settings,
9
- toggleSideMenu
9
+ toggleSideMenu,
10
+ location
10
11
  } = props;
11
- const [isNotificationsMenuOpen, setIsNotificationsMenuOpen] = useState(false);
12
- const [isProfileMenuOpen, setIsProfileMenuOpen] = useState(false);
13
12
  const {
14
- isDarkMode,
15
- toggleTheme
16
- } = useTheme();
17
- if (!settings?.showHeader) return null;
18
- return jsx("header", {
19
- className: "z-10 py-4 bg-white shadow-md dark:bg-gray-800",
20
- children: jsxs("div", {
21
- className: "container flex items-center justify-end h-full px-6 mx-auto text-gray-700 dark:text-gray-200",
22
- children: [jsx("button", {
23
- className: "p-1 mr-5 -ml-1 rounded-md md:hidden focus:outline-none focus:shadow-outline-purple",
24
- onClick: toggleSideMenu,
25
- "aria-label": "Menu",
26
- children: jsx(Menu, {
27
- className: "w-6 h-6"
28
- })
29
- }), settings?.searchBarRender && jsx("div", {
30
- className: "flex justify-center flex-1 lg:mr-32",
31
- children: jsxs("div", {
32
- className: "relative w-full max-w-xl mr-6 focus-within:text-purple-500",
33
- children: [jsx("div", {
34
- className: "absolute inset-y-0 flex items-center pl-2",
35
- children: jsx(Search, {
36
- className: "w-4 h-4"
37
- })
38
- }), jsx("input", {
39
- className: "w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input",
40
- type: "text",
41
- placeholder: "Search",
42
- "aria-label": "Search"
43
- })]
44
- })
45
- }), jsxs("ul", {
46
- className: "flex items-center flex-shrink-0 space-x-6",
47
- children: [jsx("li", {
48
- className: "flex",
49
- children: jsx("button", {
50
- className: "rounded-md focus:outline-none focus:shadow-outline-purple",
51
- onClick: toggleTheme,
52
- "aria-label": "Toggle color mode",
53
- children: isDarkMode ? jsx(Sun, {
54
- className: "w-5 h-5"
55
- }) : jsx(Moon, {
56
- className: "w-5 h-5"
57
- })
58
- })
59
- }), jsx("li", {
60
- className: "relative",
61
- children: jsx(LanguageMenu, {})
62
- }), jsx("li", {
63
- className: "relative",
64
- children: jsx(OrganizationDropDown, {
65
- upperMenus: upperMenus,
66
- routeParams: routeParams,
67
- collapsed: collapsed,
68
- settings: settings
69
- })
70
- })]
71
- })]
72
- })
73
- });
74
- };export{GlobalHeader,GlobalHeader as default};//# sourceMappingURL=Header.js.map
13
+ MenuIcon
14
+ } = icons;
15
+ const {
16
+ isMobile
17
+ } = useMediaQuery();
18
+ useDispatch();
19
+ const {
20
+ searchQuery,
21
+ isSearching
22
+ } = useSelector(state => state.search);
23
+ const currentRoute = location?.pathname || '/';
24
+ const deviceType = isMobile ? 'mobile' : 'desktop';
25
+ // Helper function to get value from uilayout with route/device override support
26
+ const getUILayoutValue = path => {
27
+ // Check for route/device-specific override first
28
+ const routeDeviceKey = `[${currentRoute}][${deviceType}]`;
29
+ const uiOverride = settings?.uiSettings?.[routeDeviceKey];
30
+ if (uiOverride) {
31
+ const value = path.split('.').reduce((obj, key) => obj?.[key], uiOverride);
32
+ if (value !== undefined) return value;
33
+ }
34
+ // Fallback to settings (flattened uilayout from configuration-registries)
35
+ return path.split('.').reduce((obj, key) => obj?.[key], settings);
36
+ };
37
+ // Get device settings directly from uilayout
38
+ const deviceSettings = {
39
+ header: getUILayoutValue('header'),
40
+ background: getUILayoutValue('background')
41
+ };
42
+ // Get layout settings directly from uilayout
43
+ const layoutSettings = {
44
+ contentWidth: getUILayoutValue('contentWidth'),
45
+ navigationMode: getUILayoutValue('navigationMode'),
46
+ sideMenuType: getUILayoutValue('sideMenuType'),
47
+ fixedHeader: getUILayoutValue('fixedHeader'),
48
+ fixedSidebar: getUILayoutValue('fixedSidebar'),
49
+ splitMenus: getUILayoutValue('splitMenus'),
50
+ upperMenuDividerName: getUILayoutValue('upperMenuDividerName'),
51
+ middleMenuDividerName: getUILayoutValue('middleMenuDividerName'),
52
+ lowerMenuDividerName: getUILayoutValue('lowerMenuDividerName')
53
+ };
54
+ const headerSettings = deviceSettings?.header || {};
55
+ const backgroundSettings = deviceSettings?.background || {};
56
+ // Use CSS classes instead of theme-based styling
57
+ const getHeaderClasses = () => {
58
+ let classes = `z-10 py-4 top-0 border-b border-border header-container relative ${layoutSettings?.fixedHeader ? 'sticky' : 'relative'}`;
59
+ if (backgroundSettings.type === 'image' && backgroundSettings.image) {
60
+ classes += ' bg-cover bg-center';
61
+ }
62
+ return classes;
63
+ };
64
+ const getHeaderStyles = () => {
65
+ const baseStyles = {};
66
+ if (backgroundSettings.type === 'image' && backgroundSettings.image) {
67
+ baseStyles.backgroundImage = `url(${backgroundSettings.image})`;
68
+ } else if (backgroundSettings.type === 'color' && backgroundSettings.color !== 'inherit') {
69
+ baseStyles.backgroundColor = backgroundSettings.color;
70
+ }
71
+ // Add dark theme styling
72
+ if (settings?.navTheme === 'realDark') {
73
+ baseStyles.backgroundColor = '#222';
74
+ baseStyles.color = '#fff !important';
75
+ }
76
+ return baseStyles;
77
+ };
78
+ // Early return if header is disabled
79
+ if (!headerSettings?.showHeader) return null;
80
+ // Determine if search bar should be shown
81
+ const showSearchBar = headerSettings?.showSearchSlot && headerSettings?.searchBarRender;
82
+ // Determine if right content should be shown
83
+ const showRightContent = headerSettings?.showRightContent && layoutSettings?.navigationMode !== 'sidebar';
84
+ return React__default.createElement("header", {
85
+ className: getHeaderClasses(),
86
+ style: getHeaderStyles()
87
+ }, React__default.createElement("div", {
88
+ className: `flex items-center justify-between h-full px-4 sm:px-6 mx-auto relative z-10 ${settings?.navTheme === 'realDark' ? 'text-white' : 'text-foreground'}`
89
+ }, isMobile && headerSettings?.showMenuToggle && React__default.createElement("button", {
90
+ className: "p-1 -ml-1 rounded-md md:hidden focus:outline-none focus-themed",
91
+ onClick: toggleSideMenu,
92
+ "aria-label": "Menu"
93
+ }, React__default.createElement(MenuIcon, {
94
+ className: "w-6 h-6"
95
+ })), headerSettings?.showLogo && React__default.createElement("div", null, React__default.createElement(Link, {
96
+ to: "/",
97
+ className: "ml-6 flex items-center gap-2.5 text-lg font-bold text-foreground"
98
+ }, typeof settings?.logo === 'string' ? React__default.createElement("img", {
99
+ src: settings?.logo,
100
+ alt: "Logo",
101
+ className: "w-[28px]"
102
+ }) : settings?.logo, !isMobile && headerSettings?.showPageTitle && React__default.createElement("span", {
103
+ style: {
104
+ color: settings?.navTheme === 'realDark' ? '#fff' : undefined
105
+ }
106
+ }, settings?.title))), showSearchBar && React__default.createElement("div", {
107
+ className: "flex-1 max-w-xl mx-4 hidden md:block"
108
+ }, React__default.createElement(SearchBar, null)), React__default.createElement("div", null, React__default.createElement("span", {
109
+ className: "pull-right pt-2 mr-2"
110
+ }, React__default.createElement(HeaderNoticeSlot, null))), showRightContent && React__default.createElement(RightContent, {
111
+ upperMenus: upperMenus,
112
+ collapsed: collapsed,
113
+ routeParams: routeParams,
114
+ settings: settings
115
+ })));
116
+ };export{GlobalHeader};//# sourceMappingURL=Header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sources":["../../../../src/components/Layout/GlobalHeader/Header.tsx"],"sourcesContent":[null],"names":[],"mappings":"+RAsBa,MAAA,YAAY,GAAqC,KAAC,IAAS;AACpE,EAAA,MAAA;IACA,KAAM;IACN,MAAM;IACN;IAEA,WAAM;AACF,IAAA,SAAA;YACoB;AACxB,IAAA;MAEM,KAAA;AACF,EAAA,MAAA,CAAA,uBAAuC,EAAA,0BAAE,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;QACzC,CAA0B,iBAAA,EAAA,oBAAQ,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;AACtC,EAAA,MAAE;IAEF,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C,CAAA,KAAA;IAC7C;;AAIQ,IAAA,IAAA,QAAA,EAAA,QAAA,KAAA;AAMK,MAAA,UAAA,CAAA,eAAY,GAAA,MAAgB;AAMrB,MAAA,UAAA,CAAA,KAAA,GAAA;;qBAOA;AACK,EAAA,CAAA;AAKA;AAYZ,EAAA,IAAA,CAAA,cAAA,EAAA,UACG,EAAA,OAAA,IAAA;;AAKJ,EAAA,MAAA,aAAA,GAAA,cAAA,EAAA,cAAA,IAAA,cAAA,EAAA,eAAA;;wBAEQ,GAAA,cAAC,EAAA,gBAAgB,IAAG,cAEtB,EAAA,cAAA,KAAA,SAAA;uBAGL,CAAA,aAAgB,CAAA,QACb,EAAA;AAUpB,IAAE,SAAA,EAAA,gBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import { MainHeaderProps, PrivateHeaderProps } from '../../typings';
3
+ export declare const MainHeader: React.FC<MainHeaderProps & PrivateHeaderProps>;
4
+ //# sourceMappingURL=MainHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MainHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/MainHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMpE,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,GAAG,kBAAkB,CA0PrE,CAAC"}
@@ -0,0 +1,187 @@
1
+ import*as React from'react';import {getMenuSeparation}from'@admin-layout/client';import {Link}from'@remix-run/react';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';import {SearchBarBehavior}from'../../../machines/types.js';import'@common-stack/components-pro';import {HeaderSearchBarSlot}from'../slot-fill/HeaderSearchBar.js';import {HeaderSearchButtonSlot}from'../slot-fill/HeaderSearchButton.js';import {RightContentSlot}from'../slot-fill/RightContent.js';import {LogoSlot}from'../slot-fill/Logo.js';import {RightMenu}from'./RightMenu.js';const MainHeader = props => {
2
+ const {
3
+ rightContentRender,
4
+ setSettingToggle,
5
+ settingToggle,
6
+ menuData,
7
+ routeParams,
8
+ navTheme,
9
+ layout,
10
+ location,
11
+ showSettings,
12
+ settings,
13
+ primaryColor,
14
+ pageTitleInfo,
15
+ scrolled,
16
+ searchOptionsShown,
17
+ setSearchOptionsShown,
18
+ authorities,
19
+ picture,
20
+ componentVisibility,
21
+ showMenu,
22
+ toggleSideMenu
23
+ } = props;
24
+ const {
25
+ isMobile
26
+ } = useMediaQuery();
27
+ const currentRoute = location?.pathname || '/';
28
+ const deviceType = isMobile ? 'mobile' : 'desktop';
29
+ // Helper function to get value from uilayout with route/device override support
30
+ const getUILayoutValue = path => {
31
+ // Check for route/device-specific override first
32
+ const routeDeviceKey = `[${currentRoute}][${deviceType}]`;
33
+ const uiOverride = settings?.uiSettings?.[routeDeviceKey];
34
+ if (uiOverride) {
35
+ const value = path.split('.').reduce((obj, key) => obj?.[key], uiOverride);
36
+ if (value !== undefined) return value;
37
+ }
38
+ // Fallback to settings (flattened uilayout from configuration-registries)
39
+ return path.split('.').reduce((obj, key) => obj?.[key], settings);
40
+ };
41
+ // Get device regions directly from uilayout
42
+ const deviceRegions = {
43
+ header: getUILayoutValue('header')
44
+ };
45
+ const headerSettings = deviceRegions?.header || {};
46
+ // State to track reduced motion preference
47
+ const [prefersReducedMotion, setPrefersReducedMotion] = React.useState(false);
48
+ const [showSearchBar, setShowSearchBar] = React.useState(false);
49
+ React.useEffect(() => {
50
+ // Check reduced motion preference - only in browser
51
+ if (typeof window !== 'undefined') {
52
+ setPrefersReducedMotion(window.matchMedia('(prefers-reduced-motion: reduce)').matches);
53
+ // Optional: add listener for preference changes
54
+ const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
55
+ const handleMediaChange = e => {
56
+ setPrefersReducedMotion(e.matches);
57
+ };
58
+ mediaQuery.addEventListener('change', handleMediaChange);
59
+ return () => {
60
+ mediaQuery.removeEventListener('change', handleMediaChange);
61
+ };
62
+ }
63
+ }, []);
64
+ React.useEffect(() => {
65
+ if (!deviceRegions?.header?.searchBarRender || !headerSettings?.showSearchSlot) {
66
+ setShowSearchBar(false);
67
+ return;
68
+ }
69
+ if (deviceRegions?.header?.searchBarBehavior === SearchBarBehavior.ON_SCROLL) {
70
+ // Show search bar only when scrolling
71
+ setShowSearchBar(componentVisibility['search-bar']);
72
+ } else {
73
+ // Show search bar by default when PERMANENT
74
+ setShowSearchBar(true);
75
+ }
76
+ }, [componentVisibility['search-bar'], scrolled, deviceRegions?.header?.searchBarRender, deviceRegions?.header?.searchBarBehavior, headerSettings?.showSearchSlot]);
77
+ // const toggleSettings = () => {
78
+ // setSettingToggle(!settingToggle);
79
+ // };
80
+ // Use CSS classes instead of theme-based styling
81
+ const getHeaderClasses = () => {
82
+ let classes = ` ${isMobile ? headerSettings?.position || 'fixed' : scrolled ? 'fixed' : 'absolute'} w-full top-0 z-[100] px-[8%] transition-all duration-1000 ease-in-out group`;
83
+ if (scrolled) {
84
+ classes += ' py-2 shadow-themed-md';
85
+ } else {
86
+ classes += ' py-2';
87
+ }
88
+ if (searchOptionsShown) {
89
+ classes += ' pb-8';
90
+ }
91
+ if (showMenu) {
92
+ classes += ' border-b';
93
+ }
94
+ if (isMobile) {
95
+ classes += ' border-none';
96
+ }
97
+ return classes;
98
+ };
99
+ const getHeaderStyles = () => {
100
+ if (scrolled) {
101
+ return {
102
+ backgroundColor: 'hsl(var(--card))',
103
+ color: 'hsl(var(--card-foreground))'
104
+ };
105
+ }
106
+ return {
107
+ backgroundColor: 'transparent',
108
+ color: 'hsl(var(--foreground))'
109
+ };
110
+ };
111
+ if (!deviceRegions?.header?.showHeader && deviceRegions?.header?.showHeader !== undefined) {
112
+ return null;
113
+ }
114
+ return React.createElement("div", {
115
+ className: getHeaderClasses(),
116
+ style: getHeaderStyles()
117
+ }, React.createElement("div", {
118
+ className: "flex flex-col"
119
+ }, React.createElement("div", {
120
+ className: `
121
+ justify-around items-start ${deviceRegions?.header?.searchBarRender ? 'pt-0' : 'pt-[7px]'}
122
+ ${deviceRegions?.header?.hidden ? 'hidden' : 'flex'}
123
+ `
124
+ }, isMobile && showMenu && React.createElement("button", {
125
+ onClick: toggleSideMenu,
126
+ className: "flex items-center justify-center p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors duration-200",
127
+ "aria-label": "Toggle sidebar"
128
+ }, React.createElement("svg", {
129
+ className: "w-6 h-6 text-gray-600 dark:text-gray-300",
130
+ fill: "none",
131
+ stroke: "currentColor",
132
+ viewBox: "0 0 24 24",
133
+ xmlns: "http://www.w3.org/2000/svg"
134
+ }, React.createElement("path", {
135
+ strokeLinecap: "round",
136
+ strokeLinejoin: "round",
137
+ strokeWidth: 2,
138
+ d: "M4 6h16M4 12h16M4 18h16"
139
+ }))), headerSettings?.showLogo && React.createElement(Link, {
140
+ to: "/",
141
+ className: "text-foreground"
142
+ }, React.createElement(LogoSlot, {
143
+ settings: settings,
144
+ scrolled: scrolled,
145
+ location: location,
146
+ prefersReducedMotion: prefersReducedMotion,
147
+ layout: layout
148
+ })), React.createElement("div", {
149
+ className: "flex-grow"
150
+ }), headerSettings?.showSearchSlot && React.createElement("div", {
151
+ className: "relative flex items-start justify-center"
152
+ }, React.createElement("div", {
153
+ className: `transition-all duration-300 ease-in-out ${searchOptionsShown ? 'opacity-0 absolute' : 'opacity-100'}`
154
+ }, showSearchBar && !searchOptionsShown ? React.createElement(HeaderSearchButtonSlot, {
155
+ transform: "scale",
156
+ transitionDuration: "1.5s",
157
+ transitionTimingFunction: "ease-in",
158
+ setSearchOptionsShown: () => {
159
+ setSearchOptionsShown(true);
160
+ }
161
+ }) : null), React.createElement("div", {
162
+ className: `transition-all duration-300 ease-in-out ${searchOptionsShown ? 'opacity-100' : 'opacity-0 absolute'}`
163
+ }, showSearchBar && searchOptionsShown ? React.createElement(HeaderSearchBarSlot, {
164
+ searchOptionsShown: searchOptionsShown,
165
+ listId: "navbar_searchbox",
166
+ onClose: () => {
167
+ setSearchOptionsShown(false);
168
+ setShowSearchBar(deviceRegions?.header?.searchBarBehavior !== SearchBarBehavior.ON_SCROLL || scrolled);
169
+ }
170
+ }) : null)), React.createElement("div", {
171
+ className: "flex-grow"
172
+ }), headerSettings?.showRightContent && React.createElement("div", {
173
+ className: "flex space-x-1 md:space-x-4"
174
+ }, React.createElement(RightContentSlot, {
175
+ scrolled: scrolled,
176
+ navTheme: settings?.navTheme
177
+ }), React.createElement(RightMenu, {
178
+ match: null,
179
+ menuData: menuData,
180
+ settings: settings,
181
+ routeParams: routeParams,
182
+ getMenuSeparation: getMenuSeparation,
183
+ scrolled: scrolled,
184
+ authorities: authorities,
185
+ picture: picture
186
+ })))));
187
+ };export{MainHeader};//# sourceMappingURL=MainHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MainHeader.js","sources":["../../../../src/components/Layout/GlobalHeader/MainHeader.tsx"],"sourcesContent":[null],"names":[],"mappings":"ioBAWO,MAAM,UAAU,GAAmD,KAAC,IAAO;AAC9E,EAAA,MAAA;AAuBA,IAAA,kBAAkB;AAClB,IAAA;IACA,aAAM;IAEN,QAAA;AACA,IAAA,WAAM;YACF;AACA,IAAA,MAAA;YACA;gBAEI;YACA;gBACI;AAAqB,IAAA,aAAA;YAC5B;sBAED;yBACiB;AACrB,IAAA,WAAE;IAEF,OAAA;AACA,IAAA,mBAAmB;AACf,IAAA,QAAA;;AAGJ,GAAA,GAAA;QAEA;AACA,IAAA;AACA,GAAA,GAAA,aAAO,EAAA;AAEP,EAAA,MAAA,YAAgB,GAAG,QAAE,EAAA,QAAA,IAAA,GAAA;QACjB,UAAA,GAAA,QAAA,GAAA,QAAA,GAAA,SAAA;AACA;wBACI,GAAA,IAAA,IAAuB;;wBAGjB,GAAA,CAAU,GAA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;AAEQ,GAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;mDAQ3B,EAAA,aAAU,EAAW,MAAO,EAAA,eAAA,GAAA,MAAA,GAAA,UAAA;AAGhC,wBAAA,EAAA,aAAgB,EAAA,MAAA,EAAgB,MAC7B,GAAA,QAAA,GAAA,MAAA;oBACI;AACA,GAAA,EAAA,QAAA,IAAA,QAAA,IAAA,KAAA,CAAA,cAAU,QACN;AAehC,IAAE,OAAA,EAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,16 +1,5 @@
1
1
  import React from 'react';
2
- import { ProSettings } from '@ant-design/pro-layout';
3
- export interface GlobalHeaderRightProps {
4
- theme?: string;
5
- layout?: any;
6
- upperMenus: any;
7
- routeParams: {
8
- orgName?: string;
9
- [key: string]: string;
10
- };
11
- collapsed?: boolean;
12
- settings?: ProSettings | any;
13
- }
2
+ import { GlobalHeaderRightProps } from '../../typings';
14
3
  declare const OrganizationDropDown: React.FC<GlobalHeaderRightProps>;
15
4
  export default OrganizationDropDown;
16
5
  //# sourceMappingURL=OrganizationDropdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrganizationDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,MAAM,WAAW,sBAAsB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,GAAG,CAAC;IAChB,WAAW,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACzB,CAAC;IACF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,GAAG,GAAG,CAAC;CAChC;AAED,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA0E1D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"OrganizationDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAuE1D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,4 +1,4 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import {useState,useRef,useEffect}from'react';import {Link}from'react-router-dom';import {useTranslation}from'react-i18next';import {generateMenuPath}from'@admin-layout/client';const OrganizationDropDown = props => {
1
+ import React__default,{useState,useRef,useEffect}from'react';import {Link}from'@remix-run/react';import {useTranslation}from'react-i18next';import {generateMenuPath}from'@admin-layout/client';const OrganizationDropDown = props => {
2
2
  const {
3
3
  theme,
4
4
  layout,
@@ -38,36 +38,32 @@ import {jsxs,jsx}from'react/jsx-runtime';import {useState,useRef,useEffect}from'
38
38
  const handleMouseLeave = () => {
39
39
  setIsProfileMenuOpen(false);
40
40
  };
41
- return jsxs("div", {
41
+ return React__default.createElement("div", {
42
42
  ref: dropdownRef,
43
43
  className: "relative",
44
44
  onMouseEnter: handleMouseEnter,
45
- onMouseLeave: handleMouseLeave,
46
- children: [jsxs("button", {
47
- className: "align-middle rounded-full flex items-center focus:shadow-outline-purple focus:outline-none",
48
- onClick: toggleProfileMenu,
49
- "aria-label": "Account",
50
- "aria-haspopup": "true",
51
- children: [jsx("img", {
52
- className: "object-cover w-8 h-8 rounded-full",
53
- src: "https://e7.pngegg.com/pngimages/241/832/png-clipart-business-management-computer-software-apartment-organization-user-avatar-blue-angle.png",
54
- alt: "",
55
- "aria-hidden": "true"
56
- }), jsx("span", {
57
- className: "ml-2",
58
- children: routeParams?.orgName
59
- })]
60
- }), isProfileMenuOpen && jsx("ul", {
61
- className: "absolute right-0 w-56 p-2 space-y-2 text-gray-600 bg-white border border-gray-100 rounded-md shadow-md dark:border-gray-700 dark:text-gray-300 dark:bg-gray-700",
62
- "aria-label": "submenu",
63
- children: upperMenus && upperMenus[0]?.children?.map(menu => jsx("li", {
64
- className: "flex",
65
- children: jsx(Link, {
66
- to: generateMenuPath(menu?.path, routeParams),
67
- className: "w-full px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors duration-150",
68
- children: t(menu?.name)
69
- }, menu?.key || menu?.name)
70
- }, menu?.key || menu?.name))
71
- })]
72
- });
45
+ onMouseLeave: handleMouseLeave
46
+ }, React__default.createElement("button", {
47
+ className: "align-middle rounded-full flex items-center focus-themed",
48
+ onClick: toggleProfileMenu,
49
+ "aria-label": "Account",
50
+ "aria-haspopup": "true"
51
+ }, React__default.createElement("img", {
52
+ className: "object-cover w-8 h-8 rounded-full",
53
+ src: "https://e7.pngegg.com/pngimages/241/832/png-clipart-business-management-computer-software-apartment-organization-user-avatar-blue-angle.png",
54
+ alt: "",
55
+ "aria-hidden": "true"
56
+ }), React__default.createElement("span", {
57
+ className: "ml-2 text-foreground"
58
+ }, routeParams?.orgName)), isProfileMenuOpen && React__default.createElement("ul", {
59
+ className: "absolute right-0 w-56 p-2 space-y-2 themed-dropdown",
60
+ "aria-label": "submenu"
61
+ }, upperMenus && upperMenus[0]?.children?.map(menu => React__default.createElement("li", {
62
+ className: "flex",
63
+ key: menu?.key || menu?.name
64
+ }, React__default.createElement(Link, {
65
+ key: menu?.key || menu?.name,
66
+ to: generateMenuPath(menu?.path, routeParams),
67
+ className: "w-full px-3 py-2 hover:bg-muted rounded-themed transition-colors duration-150 text-foreground"
68
+ }, t(menu?.name))))));
73
69
  };export{OrganizationDropDown as default};//# sourceMappingURL=OrganizationDropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrganizationDropdown.js","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"sourcesContent":[null],"names":[],"mappings":"0NAkBA,MAAM,oBAAoB,GAAqC,KAAC,IAAS;AACrE,EAAA,MAAA;IACA,KAAM;IACN,MAAM;AACN,IAAA;IACA,WAAW;IAEX,SAAsB;IACtB;AACI,GAAA,GAAA,KAAA;QACA,CAA0B,uBAAA,EAAA,0BAAQ,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;AACtC,EAAA,MAAE,CAAA,iBAAA,EAAA,oBAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;QAE2C,WAAA,GAAA,MAAA,CAAA,IAAA,CAAA;QACpC;AACL,IAAA,CAAA;AACI,IAAA;oBACwB,CAAA,MAAA,CAAA;;AAE5B,EAAA,MAAA,iBAAE,GAAA,MAAA;AAEF,IAAA,oBAAyB,CAAA,CAAA;AACzB,IAAA,0BAAY,CAAA,KAAA,CAAA;AACR,GAAA;AACJ;WACG,CAAA,MAAA;IAEP,MAAsB,kBAAA,GAAA,KAAA,IAAA;MAChB,IAAA,WAAA,CAAA,OAAmB,IAAK,CAAA,WAAA,CAAA,OAAA,CAAA,QAAA,CAAA,KAAA,CAAA,MAAA,CAAA,EAAA;QAC1B,oBAAoB,CAAC,KAAK,CAAC;AAC/B;KAEM;YACkB,CAAA,gBAAC,CAAK,WAAE,EAAA,kBAAA,CAAA;AAChC,IAAA,OAAE,MAAA;AAEF,MAAA,QACI,CAAA,+BAAuB,EAAA,kBAAoB,CAAC;AAsB5B,KAAA;AAexB,GAAE,EAAA,EAAA,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"OrganizationDropdown.js","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"sourcesContent":[null],"names":[],"mappings":"gMAMA,MAAM,oBAAoB,GAAqC,KAAC,IAAO;AACnE,EAAA,MAAA;IACA,KAAA;IACA,MAAM;AACN,IAAA;IACA,WAAW;IAEX,SAAA;IACA;AACI,GAAA,GAAA,KAAA;QACA,CAAA,uBAAA,EAA0B,0BAAQ,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;AACtC,EAAA,MAAE,CAAA,iBAAA,EAAA,oBAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;QAEF,WAAA,GAAA,MAAA,CAAA,IAAA,CAAA;QACA;AACI,IAAA,CAAA;AACI,IAAA;oBACI,CAAA,MAAA,CAAA;;AAER,EAAA,MAAA,iBAAE,GAAA,MAAA;AAEF,IAAA,oBAAS,CAAA,CAAA;AACT,IAAA,0BAAY,CAAA,KAAA,CAAA;AACR,EAAA,CAAA;AACJ;WACG,CAAA,MAAA;IAEP,MAAA,kBAAsB,GAAA,KAAA,IAAA;MACtB,IAAM,WAAA,CAAA,OAAmB,IAAG,CAAE,WAAA,CAAA,OAAA,CAAA,QAAA,CAAA,KAAA,CAAA,MAAA,CAAA,EAAA;QAC1B,oBAAoB,CAAC,KAAK,CAAC;AAC/B,MAAE;IAEF,CAAA;YACI,CAAA,gBAAqB,CAAA,WAAO,EAAA,kBAAA,CAAA;AAChC,IAAA,OAAE,MAAA;AAEF,MAAA,QACI,CAAA,mBAAA,CAAA,WAAU,EAAA,kBAAa,CAAA;;AAOf,EAAA,CAAA,EAAA,EAAA,CAAA;;QASH,gBAAA,GAAiB,MACd;wBAEoB,CAAC,IAAE,CAAA;AAEP,EAAA,CAAA;AAahC,EAAE,MAAA,gBAAA,GAAA,MAAA;AAEF,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,18 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ProSettings } from '@admin-layout/client';
3
- export interface GlobalHeaderRightProps {
4
- theme?: string;
5
- layout?: any;
6
- upperMenus: any;
7
- routeParams: {
8
- orgName?: string;
9
- [key: string]: string;
10
- };
11
- formatMessage?: any;
12
- collapsed?: boolean;
13
- settings?: ProSettings;
14
- }
15
- export declare const useHorizontalScroll: () => React.MutableRefObject<undefined>;
16
- declare const GlobalHeaderRight: React.FC<GlobalHeaderRightProps>;
17
- export default GlobalHeaderRight;
2
+ import { GlobalHeaderRightProps } from '../../typings';
3
+ export declare const useHorizontalScroll: () => React.MutableRefObject<HTMLDivElement>;
4
+ export declare const RightContent: React.FC<GlobalHeaderRightProps>;
18
5
  //# sourceMappingURL=RightContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RightContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAInD,MAAM,WAAW,sBAAsB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,GAAG,CAAC;IAChB,WAAW,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACzB,CAAC;IACF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,eAAO,MAAM,mBAAmB,yCAsB/B,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAkEvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"RightContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,eAAO,MAAM,mBAAmB,8CAsB/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA8EzD,CAAC"}
@@ -0,0 +1,86 @@
1
+ import*as React from'react';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 => {
23
+ const {
24
+ theme,
25
+ layout,
26
+ upperMenus,
27
+ routeParams,
28
+ collapsed,
29
+ settings
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
+ };
62
+ return React.createElement("div", {
63
+ className: `flex items-center ${collapsed ? 'ml-2.5' : 'ml-0'}`
64
+ }, React.createElement("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
+ }, navBarItems.map((item, index) => {
69
+ if (item.position === 'right' && item.component) {
70
+ return React.createElement("div", {
71
+ key: index,
72
+ className: "flex-shrink-0"
73
+ }, item.component(props));
74
+ }
75
+ return null;
76
+ })), React.createElement("div", {
77
+ className: "relative"
78
+ }, React.createElement(LanguageMenu, null)), React.createElement("div", {
79
+ className: "relative"
80
+ }, React.createElement(OrganizationDropDown, {
81
+ upperMenus: upperMenus,
82
+ routeParams: routeParams,
83
+ collapsed: collapsed,
84
+ settings: settings
85
+ })));
86
+ };export{RightContent,useHorizontalScroll};//# sourceMappingURL=RightContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"sourcesContent":[null],"names":[],"mappings":"oMAOO,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;mBAClB,CAAA;gBACF,EAAE,CAAC,UAAS,GAAA,CAAA,CAAA,MAAA;AACR,UAAA,QAAA,EAAA;AACA,SAAA,CAAA;AACH,MAAA,CAAA;AACL,MAAA,EAAA,CAAA,gBAAE,CAAA,OAAA,EAAA,OAAA,CAAA;AACF,MAAA,OAAA,MAAG;AACH,QAAA,EAAA,CAAA,mBAAY,CAAA,OAAA,EAA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 import React from 'react';
2
+ import { IRightMenuProps } from '../../typings';
3
+ export declare const RightMenu: React.FC<IRightMenuProps>;
4
+ //# sourceMappingURL=RightMenu.d.ts.map
@@ -0,0 +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,CAiR/C,CAAC"}