@admin-layout/tailwind-design-pro 12.0.16-alpha.6 → 12.0.16-alpha.61

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 (259) hide show
  1. package/README.md +30 -0
  2. package/lib/cdm-locales/en/menu.json +2 -1
  3. package/lib/cdm-locales/es/menu.json +2 -1
  4. package/lib/cdm-locales/index.d.ts +2 -0
  5. package/lib/cdm-locales/index.d.ts.map +1 -0
  6. package/lib/cdm-locales/index.ts +1 -0
  7. package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
  8. package/lib/components/LanguageMenu/LanguageMenu.js +20 -8
  9. package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
  10. package/lib/components/Layout/BasicLayout/index.d.ts +2 -1
  11. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  12. package/lib/components/Layout/BasicLayout/index.js +121 -31
  13. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  14. package/lib/components/Layout/BasicLayout/utils.d.ts +2 -0
  15. package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
  16. package/lib/components/Layout/BasicLayout/utils.js +16 -13
  17. package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
  18. package/lib/components/Layout/GlobalFooter/Account.d.ts +4 -0
  19. package/lib/components/Layout/GlobalFooter/Account.d.ts.map +1 -0
  20. package/lib/components/Layout/GlobalFooter/Account.js +147 -0
  21. package/lib/components/Layout/GlobalFooter/Account.js.map +1 -0
  22. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
  23. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +7 -12
  24. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
  25. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  26. package/lib/components/Layout/GlobalHeader/Header.js +32 -9
  27. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  28. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +0 -2
  29. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
  30. package/lib/components/Layout/GlobalHeader/MainHeader.js +32 -83
  31. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
  32. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +1 -1
  33. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
  34. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -0
  35. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  36. package/lib/components/Layout/GlobalHeader/RightContent.js +73 -6
  37. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
  38. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
  39. package/lib/components/Layout/GlobalHeader/RightMenu.js +2 -4
  40. package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
  41. package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
  42. package/lib/components/Layout/GlobalHeader/index.d.ts +0 -1
  43. package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -1
  44. package/lib/components/Layout/ProTailwindLayout.d.ts +2 -2
  45. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
  46. package/lib/components/Layout/ProTailwindLayout.js +69 -7
  47. package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
  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/{Sidebar.js → MainSidebar.js} +37 -9
  53. package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -0
  54. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +4 -0
  55. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -0
  56. package/lib/components/Layout/Sidebar/MainSidebarMenu.js +294 -0
  57. package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -0
  58. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts +5 -0
  59. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -0
  60. package/lib/components/Layout/Sidebar/PerplexSidebar.js +192 -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 +330 -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 +71 -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/HeaderSearchBar.js.map +1 -1
  73. package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
  74. package/lib/components/Layout/slot-fill/Logo.d.ts +4 -0
  75. package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -0
  76. package/lib/components/Layout/slot-fill/Logo.js +7 -0
  77. package/lib/components/Layout/slot-fill/Logo.js.map +1 -0
  78. package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
  79. package/lib/components/Layout/util.js +1 -1
  80. package/lib/components/Layout/util.js.map +1 -1
  81. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
  82. package/lib/components/SettingDrawer/CheckBoxTheme.js +13 -3
  83. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
  84. package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +1 -1
  85. package/lib/components/SettingDrawer/InvitationSettings.js +10 -6
  86. package/lib/components/SettingDrawer/InvitationSettings.js.map +1 -1
  87. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
  88. package/lib/components/SettingDrawer/LayoutChange.js +23 -16
  89. package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
  90. package/lib/components/SettingDrawer/MenuVisibilitySettings.d.ts +20 -0
  91. package/lib/components/SettingDrawer/MenuVisibilitySettings.d.ts.map +1 -0
  92. package/lib/components/SettingDrawer/MenuVisibilitySettings.js +120 -0
  93. package/lib/components/SettingDrawer/MenuVisibilitySettings.js.map +1 -0
  94. package/lib/components/SettingDrawer/NavigationsModes.d.ts +1 -1
  95. package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -1
  96. package/lib/components/SettingDrawer/NavigationsModes.js +103 -15
  97. package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -1
  98. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
  99. package/lib/components/SettingDrawer/RegionalSettings.js +54 -177
  100. package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
  101. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  102. package/lib/components/SettingDrawer/SettingDrawer.js +423 -62
  103. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  104. package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
  105. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
  106. package/lib/components/SettingDrawer/ThemeColor.js +15 -3
  107. package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
  108. package/lib/components/SettingDrawer/types.d.ts +12 -0
  109. package/lib/components/SettingDrawer/types.d.ts.map +1 -1
  110. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +8 -5
  111. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
  112. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +278 -4
  113. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -1
  114. package/lib/components/index.d.ts +0 -1
  115. package/lib/components/index.d.ts.map +1 -1
  116. package/lib/components/index.js +1 -1
  117. package/lib/components/typings.d.ts +14 -6
  118. package/lib/components/typings.d.ts.map +1 -1
  119. package/lib/compute.d.ts.map +1 -1
  120. package/lib/compute.js +10 -2
  121. package/lib/compute.js.map +1 -1
  122. package/lib/config/analytics-config.js +9 -0
  123. package/lib/config/analytics-config.js.map +1 -0
  124. package/lib/config/constants.js.map +1 -1
  125. package/lib/config/env-config.d.ts +3 -0
  126. package/lib/config/env-config.d.ts.map +1 -1
  127. package/lib/config/env-config.js +10 -0
  128. package/lib/config/env-config.js.map +1 -1
  129. package/lib/helpers/DynamicIcon.js.map +1 -1
  130. package/lib/hooks/index.d.ts +0 -3
  131. package/lib/hooks/index.d.ts.map +1 -1
  132. package/lib/hooks/useMediaQuery.js.map +1 -1
  133. package/lib/hooks/useScrollThreshold.js.map +1 -1
  134. package/lib/hooks/useTailwindTheme.js.map +1 -1
  135. package/lib/icons.d.ts +2 -0
  136. package/lib/icons.d.ts.map +1 -1
  137. package/lib/icons.js +4 -2
  138. package/lib/icons.js.map +1 -1
  139. package/lib/index.d.ts +1 -0
  140. package/lib/index.d.ts.map +1 -1
  141. package/lib/index.js +1 -1
  142. package/lib/index.js.map +1 -1
  143. package/lib/machines/selectors.d.ts +118 -0
  144. package/lib/machines/selectors.d.ts.map +1 -0
  145. package/lib/machines/settingsMachine.d.ts +25 -2
  146. package/lib/machines/settingsMachine.d.ts.map +1 -1
  147. package/lib/machines/settingsMachine.js +217 -161
  148. package/lib/machines/settingsMachine.js.map +1 -1
  149. package/lib/machines/settingsMachine.test.d.ts +2 -0
  150. package/lib/machines/settingsMachine.test.d.ts.map +1 -0
  151. package/lib/machines/types.d.ts +106 -9
  152. package/lib/machines/types.d.ts.map +1 -1
  153. package/lib/machines/types.js.map +1 -1
  154. package/lib/module.js.map +1 -1
  155. package/lib/redux/searchReducer.js.map +1 -1
  156. package/lib/routes.json +9 -1
  157. package/lib/tailwindConfig.js.map +1 -1
  158. package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
  159. package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
  160. package/lib/utils/configOverrides.d.ts +213 -0
  161. package/lib/utils/configOverrides.d.ts.map +1 -0
  162. package/lib/utils/configOverrides.js +91 -0
  163. package/lib/utils/configOverrides.js.map +1 -0
  164. package/lib/utils/isBrowser/index.js.map +1 -1
  165. package/lib/utils/settingsUtils.d.ts +20 -0
  166. package/lib/utils/settingsUtils.d.ts.map +1 -0
  167. package/lib/utils/settingsUtils.js +74 -0
  168. package/lib/utils/settingsUtils.js.map +1 -0
  169. package/lib/utils/utils/index.js.map +1 -1
  170. package/package.json +6 -16
  171. package/lib/components/Layout/GlobalHeader/Logo.d.ts +0 -4
  172. package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +0 -1
  173. package/lib/components/Layout/GlobalHeader/Logo.js +0 -141
  174. package/lib/components/Layout/GlobalHeader/Logo.js.map +0 -1
  175. package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -5
  176. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
  177. package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
  178. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -4
  179. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
  180. package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -176
  181. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
  182. package/lib/components/UI/CardList.d.ts +0 -61
  183. package/lib/components/UI/CardList.d.ts.map +0 -1
  184. package/lib/components/UI/CardList.js +0 -43
  185. package/lib/components/UI/CardList.js.map +0 -1
  186. package/lib/components/UI/CategoriesTypeList.d.ts +0 -29
  187. package/lib/components/UI/CategoriesTypeList.d.ts.map +0 -1
  188. package/lib/components/UI/CategoriesTypeList.js +0 -139
  189. package/lib/components/UI/CategoriesTypeList.js.map +0 -1
  190. package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +0 -83
  191. package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +0 -1
  192. package/lib/components/UI/LazyLoadingGoogleMarker.js +0 -107
  193. package/lib/components/UI/LazyLoadingGoogleMarker.js.map +0 -1
  194. package/lib/components/UI/Pagination.d.ts +0 -6
  195. package/lib/components/UI/Pagination.d.ts.map +0 -1
  196. package/lib/components/UI/Pagination.js +0 -56
  197. package/lib/components/UI/Pagination.js.map +0 -1
  198. package/lib/components/UI/ParamSearchResultContainer.d.ts +0 -99
  199. package/lib/components/UI/ParamSearchResultContainer.d.ts.map +0 -1
  200. package/lib/components/UI/ParamSearchResultContainer.js +0 -120
  201. package/lib/components/UI/ParamSearchResultContainer.js.map +0 -1
  202. package/lib/components/UI/PropertyCard.d.ts +0 -24
  203. package/lib/components/UI/PropertyCard.d.ts.map +0 -1
  204. package/lib/components/UI/PropertyCard.js +0 -420
  205. package/lib/components/UI/PropertyCard.js.map +0 -1
  206. package/lib/components/UI/PropertyCardOnMap.d.ts +0 -10
  207. package/lib/components/UI/PropertyCardOnMap.d.ts.map +0 -1
  208. package/lib/components/UI/PropertyCardOnMap.js +0 -108
  209. package/lib/components/UI/PropertyCardOnMap.js.map +0 -1
  210. package/lib/components/UI/VehicleCard/PricePopover.d.ts +0 -8
  211. package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +0 -1
  212. package/lib/components/UI/VehicleCard/PricePopover.js +0 -98
  213. package/lib/components/UI/VehicleCard/PricePopover.js.map +0 -1
  214. package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +0 -7
  215. package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +0 -1
  216. package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +0 -9
  217. package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +0 -1
  218. package/lib/components/UI/VehicleCard/VehicleFeature.js +0 -22
  219. package/lib/components/UI/VehicleCard/VehicleFeature.js.map +0 -1
  220. package/lib/components/UI/VehicleCard/types.d.ts +0 -59
  221. package/lib/components/UI/VehicleCard/types.d.ts.map +0 -1
  222. package/lib/components/UI/VehicleCard.d.ts +0 -15
  223. package/lib/components/UI/VehicleCard.d.ts.map +0 -1
  224. package/lib/components/UI/VehicleCard.js +0 -166
  225. package/lib/components/UI/VehicleCard.js.map +0 -1
  226. package/lib/components/UI/VehicleCardList.d.ts +0 -14
  227. package/lib/components/UI/VehicleCardList.d.ts.map +0 -1
  228. package/lib/components/UI/VehicleCardList.js +0 -38
  229. package/lib/components/UI/VehicleCardList.js.map +0 -1
  230. package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +0 -90
  231. package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +0 -1
  232. package/lib/components/UI/icons/LocationIcon.d.ts +0 -7
  233. package/lib/components/UI/icons/LocationIcon.d.ts.map +0 -1
  234. package/lib/components/UI/icons/LocationIcon.js +0 -18
  235. package/lib/components/UI/icons/LocationIcon.js.map +0 -1
  236. package/lib/components/UI/icons/index.d.ts +0 -2
  237. package/lib/components/UI/icons/index.d.ts.map +0 -1
  238. package/lib/components/UI/index.d.ts +0 -10
  239. package/lib/components/UI/index.d.ts.map +0 -1
  240. package/lib/components/typings.js +0 -6
  241. package/lib/components/typings.js.map +0 -1
  242. package/lib/hooks/use-get-current-lat-long.d.ts +0 -18
  243. package/lib/hooks/use-get-current-lat-long.d.ts.map +0 -1
  244. package/lib/hooks/use-get-current-lat-long.js +0 -29
  245. package/lib/hooks/use-get-current-lat-long.js.map +0 -1
  246. package/lib/hooks/useWindowSize.d.ts +0 -6
  247. package/lib/hooks/useWindowSize.d.ts.map +0 -1
  248. package/lib/hooks/useWindowSize.js +0 -20
  249. package/lib/hooks/useWindowSize.js.map +0 -1
  250. package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +0 -6
  251. package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +0 -1
  252. package/lib/middlewares/bookingCarRentalMiddleware.d.ts +0 -6
  253. package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +0 -1
  254. package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +0 -7
  255. package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +0 -1
  256. package/lib/middlewares/datasourcesMiddleware.d.ts +0 -6
  257. package/lib/middlewares/datasourcesMiddleware.d.ts.map +0 -1
  258. package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +0 -7
  259. package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +0 -1
@@ -1,32 +1,90 @@
1
- import {jsx}from'react/jsx-runtime';import {useLayoutSettings}from'@admin-layout/client';import {userSelector}from'@adminide-stack/user-auth0-client';import {useMachine}from'@xstate/react';import React__default,{useMemo,useCallback}from'react';import {connect,useSelector}from'react-redux';import {settingsMachine}from'../../machines/settingsMachine.js';import {TailwindThemeProvider}from'@admin-layout/tailwind-ui';import {BasicLayout}from'./BasicLayout/index.js';import {useRouteLoaderData}from'@remix-run/react';function BasicLayoutWithAuthorities(props) {
1
+ import {jsx}from'react/jsx-runtime';import {useLayoutSettings}from'@admin-layout/client';import {TailwindThemeProvider}from'@admin-layout/tailwind-ui';import {userSelector}from'@adminide-stack/user-auth0-client';import {useLocation,useRouteLoaderData,useMatches}from'@remix-run/react';import {useMachine}from'@xstate/react';import React__default,{useMemo,useCallback}from'react';import {connect,useSelector}from'react-redux';import {settingsMachine}from'../../machines/settingsMachine.js';import {BasicLayout}from'./BasicLayout/index.js';function BasicLayoutWithAuthorities(props) {
2
2
  const userData = useSelector(userSelector);
3
+ const location = useLocation();
3
4
  const {
4
5
  settings: settingsFromLoader
5
6
  } = useRouteLoaderData('root');
6
7
  const {
7
- settings,
8
+ settings: reduxSettings,
8
9
  setSettings
9
10
  } = useLayoutSettings();
11
+ const matches = useMatches();
12
+ const current = matches[matches.length - 1];
13
+ // Use settingsFromLoader if available, fallback to Redux settings
14
+ // This ensures the machine always has valid settings input
15
+ const initialSettings = settingsFromLoader || reduxSettings;
16
+ console.log('🎯 TailwindLayout - Settings check:', {
17
+ hasSettingsFromLoader: !!settingsFromLoader,
18
+ hasReduxSettings: !!reduxSettings,
19
+ loaderSettingsKeys: settingsFromLoader ? Object.keys(settingsFromLoader) : [],
20
+ reduxSettingsKeys: reduxSettings ? Object.keys(reduxSettings) : [],
21
+ loaderShowSettingPanel: settingsFromLoader?.showSettingPanel,
22
+ reduxShowSettingPanel: reduxSettings?.showSettingPanel,
23
+ usingSettings: initialSettings ? 'provided' : 'none',
24
+ initialSettingsKeys: initialSettings ? Object.keys(initialSettings) : [],
25
+ initialShowSettingPanel: initialSettings?.showSettingPanel,
26
+ hasUilayoutInLoader: !!settingsFromLoader?.uilayout,
27
+ hasUilayoutInRedux: !!reduxSettings?.uilayout
28
+ });
29
+ // Log the actual keys when count is 42 (after settings panel update)
30
+ if (reduxSettings && Object.keys(reduxSettings).length > 20) {
31
+ console.log('🚨 Redux has too many keys (42):', Object.keys(reduxSettings));
32
+ console.log('🚨 Redux settings structure:', reduxSettings);
33
+ }
10
34
  const [state, send, settingsActor] = useMachine(settingsMachine.provide({
11
35
  actions: {
12
36
  updateReduxSettings: ({
13
- context
37
+ context,
38
+ event
14
39
  }) => {
15
- setSettings(context);
40
+ console.log('🔥 updateReduxSettings called:', {
41
+ eventType: event?.type,
42
+ hasContext: !!context,
43
+ hasPublic: !!context.public,
44
+ hasInternal: !!context.internal
45
+ });
46
+ if (event?.type === 'UISETTING_ROUTE_CHANGE') return;
47
+ // REVOLUTIONARY APPROACH: No filtering needed!
48
+ // The context is already separated into public and internal namespaces.
49
+ // We simply sync context.public to Redux - that's it!
50
+ //
51
+ // WHY THIS ELIMINATES LOOPS:
52
+ // - context.public contains ONLY user-facing settings
53
+ // - context.internal.configModel changes don't affect context.public
54
+ // - No manual filtering means no chance of mistakes
55
+ // - Type system enforces the separation at compile time
56
+ const publicSettings = context.public;
57
+ console.log('🔥 Sending PUBLIC settings to Redux:', {
58
+ publicKeys: Object.keys(publicSettings).slice(0, 10),
59
+ navTheme: publicSettings.navTheme,
60
+ logo: publicSettings.logo
61
+ });
62
+ setSettings(publicSettings);
16
63
  }
17
64
  }
18
65
  }), {
19
66
  input: {
20
- settings: settingsFromLoader
67
+ settings: initialSettings,
68
+ currentRoute: location.pathname,
69
+ routePattern: current?.id
21
70
  }
22
71
  });
23
- const settingXstate = state?.context;
72
+ // Access public settings only - internal state is never exposed
73
+ const settingXstate = state?.context?.public;
74
+ console.log('🔧 XState Context after initialization:', {
75
+ showSettingPanel: settingXstate?.showSettingPanel,
76
+ hasAllKeys: !!settingXstate,
77
+ contextKeys: settingXstate ? Object.keys(settingXstate).slice(0, 15) : [],
78
+ navTheme: settingXstate?.navTheme,
79
+ primaryColor: settingXstate?.primaryColor,
80
+ hasUilayout: !!settingXstate?.uilayout
81
+ });
24
82
  const {
25
83
  permissions
26
84
  } = props;
27
85
  const mainHeaderProps = useMemo(() => ({
28
- picture: userData ? userData?.profile?.picture : null
29
- }), [userData]);
86
+ picture: userData?.profile?.picture || null
87
+ }), [userData?.profile?.picture]);
30
88
  const onSettingChange = useCallback(config => {
31
89
  // Update Redux first
32
90
  setSettings(config);
@@ -37,8 +95,10 @@ import {jsx}from'react/jsx-runtime';import {useLayoutSettings}from'@admin-layout
37
95
  orgName
38
96
  } = {}
39
97
  } = props;
98
+ // Use base settings directly (overrides are already applied to the context)
99
+ const mergedSettings = settingXstate;
40
100
  return jsx(TailwindThemeProvider, {
41
- settings: settingXstate,
101
+ settings: mergedSettings,
42
102
  actor: settingsActor,
43
103
  children: jsx(BasicLayout, {
44
104
  routeParams: orgName,
@@ -47,7 +107,8 @@ import {jsx}from'react/jsx-runtime';import {useLayoutSettings}from'@admin-layout
47
107
  mainHeaderProps: mainHeaderProps,
48
108
  actor: settingsActor,
49
109
  ...props,
50
- settings: settingXstate
110
+ settings: mergedSettings,
111
+ routePattern: current?.id
51
112
  })
52
113
  });
53
114
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TailwindLayout.js","sources":["../../../src/components/Layout/TailwindLayout.tsx"],"sourcesContent":[null],"names":[],"mappings":"mgBAUA,SAAS,0BAA0B,CAAC,KAAgF,EAAA;AAChH,EAAA,MAAA,WAAiB,WAAA,CAAA,YAAY,CAAA;QACvB;IACN,QAAQ;AAER,GAAA,GAAA,kBAAoB,CAAA,MAAA,CAAA;AAEZ,EAAA,MAAA;AACI,IAAA,QAAA;;uBAEC,EAAA;AACJ,EAAA,MAAA,CAAA,KAAA,EAAA,IAAA,EAAA,aAAA,CAAA,GAAA,UAAA,CAAA,eAAA,CAAA,OAAA,CAAA;AACJ,IAAA,OACD,EAAA;AACI,MAAA,mBAAO,EAAA,CAAA;AACH,QAAA;AACH,OAAA,KAAA;AACJ,QACH,WAAA,CAAA,OAAA,CAAA;AAEF;AAEA;AAEA,GAAA,CAAA,EAAA;AAEQ,IAAA,KAAA,EAAA;AACH,MAAC,QACO,EAAA;AAGb;;QAGQ,aAAkB,GAAA,KAAE,EAAA,OAAA;AACxB,EAAA,MACC;IAGL;MACM,KAAA;QAEC,eACmB,GAAA,OAAA,CAAA,OAAA;AAY9B,IAAC,OAAA,EAAA,QAAA,GAAA,QAAA,EAAA,OAAA,EAAA,OAAA,GAAA;AAED,GAAM,CAAA,EAAA,CAAA,QAAW,CAAA,CAAA;QACL,eAAA,GAAA,WAAA,CAAA,MAAA,IAAA;;AAEX,IAAE,WAAA,CAAA,MAAA,CAAA;AAMH,GAAA,EAAA,CAAM,WAAY,CAAA,CAAA;AAIlB;AAKA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"TailwindLayout.js","sources":["../../../src/components/Layout/TailwindLayout.tsx"],"sourcesContent":[null],"names":[],"mappings":"0hBAYA,SAAS,0BAA0B,CAAC,KAAqC,EAAA;AACrE,EAAA,MAAA,WAAc,WAAG,CAAA,YAAY,CAAA;AAC7B,EAAA,MAAA,QAAM,GAAQ,WAAG,EAAW;Q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,EAAA;AACI,MAAA,EAAA,EAAA,EAAA;cACA,EAAA;AACH,KAAA;;MAGL,QAAK,GAAQ,cAAG,CAAA,IAAA;UACZ,CAAA,MAAO,KAAA,KAAA,IAAA,cAAA,CAAA,MAAA,IAAA,aAAA,EAAA;AACH,IAAA,QAAA,GAAA,aAAgB,CAAA;AAChB,MAAA,EAAA,EAAA,cAAI,CAAA,MAAe,IAAA,EAAM;AACzB,MAAA,cAAQ,EAAE,cAAS,CAAA;;;AAG3B,EAAA,IAAA,CAAA,QAAI,EAAA;WACA;AACI,MAAA,KAAA,EAAA,SAAO;AACP,MAAA,EAAA,EAAA,cAAI,CAAA,MAAe,IAAA,EAAM;cACzB,EAAA;;;MAGD,CAAA,KAAA,EAAA;AACH,IAAA,OAAA;AACA,MAAA,KAAE,EAAE,QAAA;QACJ,EAAA,cAAQ,CAAA,MAAA,IAAA,EAAA;MACV;AACN,KAAE;AAEF,EAAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AdditionalSettings.js","sources":["../../../../src/components/Layout/slot-fill/AdditionalSettings.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"oFAIO,MAAM,kCAAkC,GAAG;AAErC,MAAA,sBAAsB,GAAG,KAAC,IAAS;SACrCA,GAAA,CAAA,IAAK,EAAA;AAChB,IAAE,IAAA,EAAA,kCAAA;AAEF,IAAA,SAAa,EAAA;IACT;AACJ"}
1
+ {"version":3,"file":"AdditionalSettings.js","sources":["../../../../src/components/Layout/slot-fill/AdditionalSettings.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"oFAIO,MAAM,kCAAkC,GAAG;AAE3C,MAAM,sBAAsB,GAAG,KAAC,IAAO;SAC1CA,GAAO,CAAA,IAAC,EAAI;AAChB,IAAE,IAAA,EAAA,kCAAA;AAEF,IAAA,SAAa,EAAA;IACT;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.js","sources":["../../../../src/components/Layout/slot-fill/Footer.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"oFAEO,MAAM,qBAAqB,GAAG;AAExB,MAAA,UAAU,GAAG,KAAC,IAAS;SACzBA,GAAA,CAAA,IAAK,EAAA;AAChB,IAAE,IAAA,EAAA,qBAAA;AAEF,IAAA,SAAa,EAAA;IACT;AACJ"}
1
+ {"version":3,"file":"Footer.js","sources":["../../../../src/components/Layout/slot-fill/Footer.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"oFAEO,MAAM,qBAAqB,GAAG;AAE9B,MAAM,UAAU,GAAG,KAAC,IAAO;SAC9BA,GAAO,CAAA,IAAC,EAAI;AAChB,IAAE,IAAA,EAAA,qBAAA;AAEF,IAAA,SAAa,EAAA;IACT;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderSearchBar.js","sources":["../../../../src/components/Layout/slot-fill/HeaderSearchBar.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"8LAKa,MAAA,mBAAmB,GAAG,KAAC,IAAS;SAClCA,GAAA,CAAA,IAAK,EAAA;AAChB,IAAE,IAAA,EAAA,qBAAA;;;"}
1
+ {"version":3,"file":"HeaderSearchBar.js","sources":["../../../../src/components/Layout/slot-fill/HeaderSearchBar.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"8LAKO,MAAM,mBAAmB,GAAG,KAAC,IAAO;SACvCA,GAAO,CAAA,IAAC,EAAI;AAChB,IAAE,IAAA,EAAA,qBAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderSearchButton.js","sources":["../../../../src/components/Layout/slot-fill/HeaderSearchButton.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"kMAKa,MAAA,sBAAsB,GAAG,KAAC,IAAS;SACrCA,GAAA,CAAA,IAAK,EAAA;AAChB,IAAE,IAAA,EAAA,yBAAA;;;"}
1
+ {"version":3,"file":"HeaderSearchButton.js","sources":["../../../../src/components/Layout/slot-fill/HeaderSearchButton.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"kMAKO,MAAM,sBAAsB,GAAG,KAAC,IAAO;SAC1CA,GAAO,CAAA,IAAC,EAAI;AAChB,IAAE,IAAA,EAAA,yBAAA;;;"}
@@ -0,0 +1,4 @@
1
+ export declare const LOGO_SLOT_FILL_NAME = "logo-fill";
2
+ export declare const LogoSlot: (props: any) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const LogoCard: (props: any) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=Logo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/slot-fill/Logo.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,eAAO,MAAM,QAAQ,GAAI,UAAK,4CAE7B,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,UAAK,4CAE7B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import {jsx}from'react/jsx-runtime';import {Slot}from'@common-stack/components-pro';const LOGO_SLOT_FILL_NAME = 'logo-fill';
2
+ const LogoSlot = props => {
3
+ return jsx(Slot, {
4
+ name: LOGO_SLOT_FILL_NAME,
5
+ fillProps: props
6
+ });
7
+ };export{LOGO_SLOT_FILL_NAME,LogoSlot};//# sourceMappingURL=Logo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logo.js","sources":["../../../../src/components/Layout/slot-fill/Logo.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"oFAEO,MAAM,mBAAmB,GAAG;AAE5B,MAAM,QAAQ,GAAG,KAAC,IAAO;SAC5BA,GAAO,CAAA,IAAC,EAAI;AAChB,IAAE,IAAA,EAAA,mBAAA;AAEF,IAAA,SAAa,EAAA;IACT;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/slot-fill/RightContent.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"2LAKa,MAAA,gBAAgB,GAAG,KAAC,IAAS;SAC/BA,GAAA,CAAA,IAAK,EAAA;AAChB,IAAE,IAAA,EAAA,kBAAA;;;"}
1
+ {"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/slot-fill/RightContent.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"2LAKO,MAAM,gBAAgB,GAAG,KAAC,IAAO;SACpCA,GAAO,CAAA,IAAC,EAAI;AAChB,IAAE,IAAA,EAAA,kBAAA;;;"}
@@ -1,4 +1,4 @@
1
- import {generatePath}from'react-router';/* eslint-disable import/no-extraneous-dependencies */
1
+ import {generatePath}from'@remix-run/router';/* eslint-disable import/no-extraneous-dependencies */
2
2
  const generateMenuPath = (path, params) => {
3
3
  try {
4
4
  const generatedPath = generatePath(path, params);
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../src/components/Layout/util.ts"],"sourcesContent":[null],"names":[],"mappings":"wCAAA;MAGa,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAI;AAC7C,EAAA,IAAA;UACU,aAAA,GAAA,YAA4B,CAAA,IAAC,QAAM,CAAA;AACzC,IAAA,OAAA;IACJ,OAAC,GAAA,EAAA;;;;;SAIA,IAAA;AACD"}
1
+ {"version":3,"file":"util.js","sources":["../../../src/components/Layout/util.ts"],"sourcesContent":[null],"names":[],"mappings":"6CAAA;MAGa,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAI;AAC7C,EAAA,IAAA;UACI,aAAM,GAAA,YAAgB,CAAA,IAAa,QAAM,CAAA;AACzC,IAAA,OAAA;IACJ,OAAC,GAAA,EAAA;;;;;SAIA,IAAA;AACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckBoxTheme.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/CheckBoxTheme.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAsD9C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,mBAAmB,2CAiC/D"}
1
+ {"version":3,"file":"CheckBoxTheme.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/CheckBoxTheme.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAwD9C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,mBAAmB,2CAuC/D"}
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';const themelist = [{
1
+ import {jsx,jsxs}from'react/jsx-runtime';import'react';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';import {getSettingValue}from'../../utils/settingsUtils.js';const themelist = [{
2
2
  key: 'light',
3
3
  title: 'Light',
4
4
  svg: jsxs("svg", {
@@ -93,8 +93,18 @@ function CheckBoxTheme(props) {
93
93
  const {
94
94
  list,
95
95
  changeSetting,
96
- settings
96
+ settings,
97
+ location,
98
+ routePattern,
99
+ applyToAllRoutes = false
97
100
  } = props;
101
+ const {
102
+ isMobile
103
+ } = useMediaQuery();
104
+ const currentRoute = routePattern || location?.pathname || '/';
105
+ const deviceType = isMobile ? 'mobile' : 'desktop';
106
+ // Use getSettingValue to get the correct navTheme based on applyToAllRoutes
107
+ const navThemeValue = getSettingValue(settings, 'navTheme', applyToAllRoutes, currentRoute, deviceType, 'light');
98
108
  return jsx("div", {
99
109
  className: "flex flex-row gap-4",
100
110
  children: themelist.map((themeItems, index) => {
@@ -108,7 +118,7 @@ function CheckBoxTheme(props) {
108
118
  changeSetting('primaryColor', settings?.primaryColor);
109
119
  },
110
120
  children: jsxs("div", {
111
- children: [themeItems.svg, settings?.navTheme === themeItems.key && jsx("svg", {
121
+ children: [themeItems.svg, navThemeValue === themeItems.key && jsx("svg", {
112
122
  className: "absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-6 h-6 text-blue-500",
113
123
  viewBox: "0 0 24 24",
114
124
  fill: "currentColor",
@@ -1 +1 @@
1
- {"version":3,"file":"CheckBoxTheme.js","sources":["../../../src/components/SettingDrawer/CheckBoxTheme.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"yCAGA,MAAM,SAAS,GAAG,CAAA;AACd,EAAA,GAAA,EAAA,OAAA;AACI,EAAA,KAAA,EAAA,OAAY;AACZ,EAAA,GAAA,EAAAA,IAAA,CAAK,KAAS,EAAA;SACX,EAAA,IACM;AASZ,IAAA,MAAA,EAAA,IAAA;AACD,IAAA,OAAA,EAAA,WAAA;AACI,IAAA,KAAA,EAAG,4BAAY;AACf,IAAA,QAAA,GAAOC,GAAU,CAAA,MAAA,EAAA;cAEb,EAAAA,GAAA,CAAA,QAAK,EAAK;AAcjB,QAAA,EAAA,EAAA,YAAA;AACD,QAAA,CAAA,EAAA,MAAA;AACI,QAAA,CAAA,EAAG,MAAQ;AACX,QAAA,KAAK,EAAE,MAAM;QACb,MACI,EAAK,MAAA;AAWZ,QAAA,QAAA,EAAAA,GAAA,CAAA,cAAA,EAAA;UACH,EAAA,EAAA,GAAA;AAEF,UAAO,EAAA,EAAO,GAAU;UACd,YAAQ,EAAA,GAAA;AACd,UAAA,UACI,EAAA,SAAc;AAEN,UAAA,YAGQ,EAAA;AAGI,SAAA;AACA,OAAA;AACJ,KAAA,CAAA,EAAAA,GAAA,CAAA;SAiBX,GACC;AAEd,MAAC,CAAA,EAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CheckBoxTheme.js","sources":["../../../src/components/SettingDrawer/CheckBoxTheme.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"kQAKA,MAAM,SAAS,GAAG,CAAA;AACd,EAAA,GAAA,EAAA,OAAA;AACI,EAAA,KAAA,EAAA,OAAK;AACL,EAAA,GAAA,EAAAA,IAAA,CAAK,KAAE,EAAA;SACP,EAAG,IACC;AASP,IAAA,MAAA,EAAA,IAAA;AACD,IAAA,OAAA,EAAA,WAAA;AACI,IAAA,KAAA,EAAG,4BAAY;AACf,IAAA,QAAA,GAAOC,GAAA,CAAA,MAAU,EAAA;cAEb,EAAAA,GAAA,CAAA,QAAK,EAAA;AAcZ,QAAA,EAAA,EAAA,YAAA;AACD,QAAA,CAAA,EAAA,MAAA;AACI,QAAA,CAAA,EAAG,MAAE;AACL,QAAA,KAAK,EAAE,MAAM;QACb,MACI,EAAA,MAAA;AAWP,QAAA,QAAA,EAAAA,GAAA,CAAA,cAAA,EAAA;UACH,EAAA,EAAA,GAAA;AAEF,UAAO,EAAA,EAAO,GAAA;AACV,UAAM,YAAQ,EAAA,GAAA;AACd,UAAM,UAAU,EAAE,SAAG;UACf,YAAY;SAClB;OAEA;AACA,KAAA,CAAA,EAAAA;AACA,MAAA,CAAA,EAAA,GACI;AAEQ,MAAA,CAAA,EAAA,GAAA;AAMY,MAAA,KAAA,EAAA,IAAA;AACA,MAAA,MAAA,EAAA,IAAA;AACJ,MAAA,EAAA,EAAA,GAAA;UAiBV,EAAA,SAER;AACN,MAAC,MAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"InvitationSettings.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/InvitationSettings.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAG/C,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,2CA6D3E"}
1
+ {"version":3,"file":"InvitationSettings.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/InvitationSettings.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,2CAsE3E"}
@@ -1,8 +1,10 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';import'react';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import'../../hooks/use-get-current-lat-long.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';function InvitationSettings(props) {
1
+ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';import {getSettingValue}from'../../utils/settingsUtils.js';function InvitationSettings(props) {
2
2
  const {
3
3
  settings,
4
4
  changeSetting,
5
- location
5
+ location,
6
+ routePattern,
7
+ applyToAllRoutes = false
6
8
  } = props;
7
9
  const {
8
10
  t
@@ -10,10 +12,12 @@ import {jsxs,jsx}from'react/jsx-runtime';import {useTranslation}from'react-i18ne
10
12
  const {
11
13
  isMobile
12
14
  } = useMediaQuery();
13
- const currentRoute = location?.pathname || '/';
14
- settings?.routeSettings?.[currentRoute] || settings?.routeSettings?.['/'] || settings;
15
- // Fallback to global if not found in route
16
- const invitations = settings?.organization?.members?.invitations || {};
15
+ const currentRoute = routePattern || location?.pathname || '/';
16
+ const deviceType = isMobile ? 'mobile' : 'desktop';
17
+ // Get organization invitations using the utility function
18
+ const invitations = React.useMemo(() => {
19
+ return getSettingValue(settings, 'organization.members.invitations', applyToAllRoutes, currentRoute, deviceType, {});
20
+ }, [settings, applyToAllRoutes, currentRoute, deviceType]);
17
21
  const handleInvitationChange = (key, value) => {
18
22
  if (!changeSetting) return;
19
23
  const newInvitations = {
@@ -1 +1 @@
1
- {"version":3,"file":"InvitationSettings.js","sources":["../../../src/components/SettingDrawer/InvitationSettings.tsx"],"sourcesContent":[null],"names":[],"mappings":"yUAMwB,SAAA,kBAAkB,CAAC,KAAiC,EAAA;QAClE;IACN,QAAQ;AACR,IAAA,aAAgB;AAChB,IAAA;AACA,GAAA,GAAA;QACM;IACN;MACM,cAAA,CAAW,UAAG,CAAQ;AAE5B,EAAA,MAAA;AACI,IAAA;mBAA2B,EAAA;AAC3B,EAAA,MAAA,uBAAuB,EAAA,QAAA,IAAA,GAAA;AACnB,EAAc,QAAA,EAAA,aAAA,GAAA,YAAA,CAAA,IAAA,QAAA,EAAA,aAAA,GAAA,GAAA,CAAA,IAAA;;AAIlB,EAAA,MAAA,WAAA,GAAc,QAAA,EAAA,YAAA,EAAA,OAAA,EAAA,WAAoC,IAAA,EAAc;AACpE,EAAA,MAAE,sBAAA,GAAA,CAAA,GAAA,EAAA,KAAA,KAAA;AAEF,IAAA,IAAA,CAAA,aAAkB,EAAE;IAEpB,MAAO,cAEC,GAAA;AAqCZ,MAAC,GAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"InvitationSettings.js","sources":["../../../src/components/SettingDrawer/InvitationSettings.tsx"],"sourcesContent":[null],"names":[],"mappings":"kWAOc,SAAU,kBAAkB,CAAC,KAAiC,EAAA;AACxE,EAAA,MAAA;IACA,QAAQ;AACR,IAAA,aAAQ;IACR,QAAM;IACN,YAAM;IAEN,gBAAA,GAAA;AACA,GAAA,GAAA;AACI,EAAA,MAAA;IAQJ;AAEA,GAAA,GAAA,0BAA4B;AACxB,EAAA,MAAA;;AACA,GAAA,GAAA;AACI,EAAA,MAAA,YAAG,GAAA,YAAW,IAAA,QAAA,EAAA,QAAA,IAAA,GAAA;kBACT,GAAE,QAAK,GAAA,QAAA,GAAA,SAAA;;AAGhB,EAAA,MAAA,WAAA,GAAc,KAAA,CAAA,OAAA,CAAA,MAAA;AAClB,IAAA,OAAE,eAAA,CAAA,QAAA,EAAA,kCAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,EAAA,CAAA;AAEF,EAAA,CAAA,EAAA,CAAA,0BAA2B,EAAA,YAAU,EAAA,YAAmB;QAExD,sBACI,GAAA,CAAA,GAAA,EACI,KAAA,KAAA;AAqCZ,IAAC,IAAA,CAAA,aAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutChange.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/LayoutChange.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAG/C,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,2CA2GrE"}
1
+ {"version":3,"file":"LayoutChange.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/LayoutChange.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,2CAwIrE"}
@@ -1,8 +1,10 @@
1
- import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';import'react';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import'../../hooks/use-get-current-lat-long.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';function LayoutChange(props) {
1
+ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useMemo}from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';import {getSettingValue}from'../../utils/settingsUtils.js';function LayoutChange(props) {
2
2
  const {
3
3
  settings,
4
4
  changeSetting,
5
- location
5
+ location,
6
+ routePattern,
7
+ applyToAllRoutes = false
6
8
  } = props;
7
9
  const {
8
10
  t
@@ -10,19 +12,24 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useTranslation}from're
10
12
  const {
11
13
  isMobile
12
14
  } = useMediaQuery();
13
- const currentRoute = location?.pathname || '/';
15
+ const currentRoute = routePattern || location?.pathname || '/';
14
16
  const {
15
17
  navTheme
16
18
  } = settings || {};
17
- const routeSettings = settings?.routeSettings?.[currentRoute] || settings?.routeSettings?.['/'] || settings;
18
19
  const deviceType = isMobile ? 'mobile' : 'desktop';
19
- const deviceLayout = routeSettings?.layout?.[deviceType] || {};
20
+ // Get layout values using the utility function
21
+ const layoutValues = useMemo(() => ({
22
+ fixedHeader: getSettingValue(settings, 'fixedHeader', applyToAllRoutes, currentRoute, deviceType, true),
23
+ fixedSidebar: getSettingValue(settings, 'fixedSidebar', applyToAllRoutes, currentRoute, deviceType, true),
24
+ splitMenus: getSettingValue(settings, 'splitMenus', applyToAllRoutes, currentRoute, deviceType, false),
25
+ upperMenuDividerName: getSettingValue(settings, 'upperMenuDividerName', applyToAllRoutes, currentRoute, deviceType, 'Navigation'),
26
+ middleMenuDividerName: getSettingValue(settings, 'middleMenuDividerName', applyToAllRoutes, currentRoute, deviceType, 'Dashboard'),
27
+ lowerMenuDividerName: getSettingValue(settings, 'lowerMenuDividerName', applyToAllRoutes, currentRoute, deviceType, 'Admin')
28
+ }), [settings, applyToAllRoutes, currentRoute, deviceType]);
20
29
  const handleLayoutChange = (key, value) => {
21
30
  if (!changeSetting) return;
22
- changeSetting(`routeSettings.${currentRoute}.layout.${deviceType}`, {
23
- ...deviceLayout,
24
- [key]: value
25
- });
31
+ // Pass simple key - handleSettingChange in SettingDrawer will decide if it's global or route-specific
32
+ changeSetting(key, value);
26
33
  };
27
34
  const textColor = {
28
35
  color: navTheme === 'dark' ? '#ffff' : 'black'
@@ -37,7 +44,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useTranslation}from're
37
44
  }), jsx("div", {
38
45
  className: "flex-grow"
39
46
  }), jsx(Switch, {
40
- value: deviceLayout.fixedHeader,
47
+ value: layoutValues.fixedHeader,
41
48
  onChange: checked => handleLayoutChange('fixedHeader', checked)
42
49
  })]
43
50
  }), jsxs("div", {
@@ -49,7 +56,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useTranslation}from're
49
56
  }), jsx("div", {
50
57
  className: "flex-grow"
51
58
  }), jsx(Switch, {
52
- value: deviceLayout.fixedSidebar,
59
+ value: layoutValues.fixedSidebar,
53
60
  onChange: checked => handleLayoutChange('fixedSidebar', checked)
54
61
  })]
55
62
  }), jsxs("div", {
@@ -61,10 +68,10 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useTranslation}from're
61
68
  }), jsx("div", {
62
69
  className: "flex-grow"
63
70
  }), jsx(Switch, {
64
- value: deviceLayout.splitMenus,
71
+ value: layoutValues.splitMenus,
65
72
  onChange: checked => handleLayoutChange('splitMenus', checked)
66
73
  })]
67
- }), deviceLayout.splitMenus && jsxs(Fragment, {
74
+ }), layoutValues.splitMenus && jsxs(Fragment, {
68
75
  children: [jsx("div", {
69
76
  className: "mt-6 mb-2",
70
77
  children: jsx("p", {
@@ -83,7 +90,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useTranslation}from're
83
90
  }), jsx("input", {
84
91
  type: "text",
85
92
  className: "px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",
86
- value: deviceLayout?.upperMenuDividerName,
93
+ value: layoutValues.upperMenuDividerName,
87
94
  onChange: e => {
88
95
  handleLayoutChange('upperMenuDividerName', e.target.value);
89
96
  }
@@ -97,7 +104,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useTranslation}from're
97
104
  }), jsx("input", {
98
105
  type: "text",
99
106
  className: "px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",
100
- value: deviceLayout?.middleMenuDividerName,
107
+ value: layoutValues.middleMenuDividerName,
101
108
  onChange: e => {
102
109
  handleLayoutChange('middleMenuDividerName', e.target.value);
103
110
  }
@@ -111,7 +118,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useTranslation}from're
111
118
  }), jsx("input", {
112
119
  type: "text",
113
120
  className: "px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",
114
- value: deviceLayout?.lowerMenuDividerName,
121
+ value: layoutValues.lowerMenuDividerName,
115
122
  onChange: e => {
116
123
  handleLayoutChange('lowerMenuDividerName', e.target.value);
117
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutChange.js","sources":["../../../src/components/SettingDrawer/LayoutChange.tsx"],"sourcesContent":[null],"names":[],"mappings":"kVAMwB,SAAA,YAAY,CAAC,KAAiC,EAAA;QAC5D;IACN,QAAQ;AACR,IAAA,aAAgB;AAChB,IAAA;AACA,GAAA,GAAA;AACA,EAAA,MAAA;IACA;MACM,cAAA,CAAA,UAAe,CAAA;AAErB,EAAA,MAAA;AACI,IAAA;mBAA2B,EAAA;AAE3B,EAAA,MAAA,YAAA,GAA+B,QAAA,EAAA,QAAA,IAAA,GAAA;AAC3B,EAAA,MAAA;;AAEH,GAAA,GAAA,QAAE,IAAA,EAAA;AACP,EAAA,MAAE,aAAA,GAAA,QAAA,EAAA,aAAA,GAAA,YAAA,CAAA,IAAA,QAAA,EAAA,aAAA,GAAA,GAAA,CAAA,IAAA,QAAA;AAEF,EAAA,MAAA,aAAkB,QAAO,WAAe,GAAA,SAAQ;QAEzC,YAEC,GAAA,aAAA,EAAA,MAAA,GAAA,UAAc,CAAA,IAAA,EAAC;6CAiD2B;AACtB,IAAA,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AO,aAAU,CAAA;kDAQT,EAAA,wCAA8C,EAAA,YAAc,EAAA,UAAA,EAAA,OAAA;AAChE,GAAA,CAAA,EAAA,CAAA,QAAA,EAAA,gBAAA,EAAA,YACF,EACA;6CAUM;AACJ,IAAA,IAAA,CAAA,aAAA,EAAA;AAQhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,20 @@
1
+ interface MenuItem {
2
+ key: string;
3
+ name: string;
4
+ path: string;
5
+ position?: string;
6
+ children?: MenuItem[];
7
+ tab?: string;
8
+ [key: string]: any;
9
+ }
10
+ interface MenuVisibilitySettingsProps {
11
+ fullMenuData: MenuItem[];
12
+ settings: {
13
+ hiddenMenuKeys?: string[];
14
+ [key: string]: any;
15
+ };
16
+ changeSetting: (key: string, value: any) => void;
17
+ }
18
+ export default function MenuVisibilitySettings({ fullMenuData, settings, changeSetting }: MenuVisibilitySettingsProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
20
+ //# sourceMappingURL=MenuVisibilitySettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuVisibilitySettings.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/MenuVisibilitySettings.tsx"],"names":[],"mappings":"AAQA,UAAU,QAAQ;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,UAAU,2BAA2B;IACjC,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,QAAQ,EAAE;QACN,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACtB,CAAC;IACF,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,2BAA2B,2CAqFpH"}
@@ -0,0 +1,120 @@
1
+ import {jsxs,jsx}from'react/jsx-runtime';import {useState,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';// Constants
2
+ // all keys included now ['usermenu', 'topmenu']
3
+ const EXCLUDED_MENU_KEYS = [];
4
+ const MENU_POSITIONS = ['UPPER', 'MIDDLE', 'LOWER', 'BOTTOM'];
5
+ function MenuVisibilitySettings({
6
+ fullMenuData,
7
+ settings,
8
+ changeSetting
9
+ }) {
10
+ const {
11
+ t
12
+ } = useTranslation('settings');
13
+ const [isExpanded, setIsExpanded] = useState(false);
14
+ // Get deduplicated hidden menu keys
15
+ const hiddenMenuKeys = useMemo(() => {
16
+ return settings.hiddenMenuKeys ? Array.from(new Set(settings.hiddenMenuKeys)) : [];
17
+ }, [settings.hiddenMenuKeys]);
18
+ // Organize menu items by position
19
+ const allMenuItems = useMemo(() => {
20
+ const categories = [];
21
+ if (fullMenuData?.length) {
22
+ MENU_POSITIONS.forEach(position => {
23
+ const positionItems = fullMenuData.filter(item => item.position === position && item.key && !EXCLUDED_MENU_KEYS.includes(item.key));
24
+ categories.push(...positionItems);
25
+ });
26
+ const itemsWithoutPosition = fullMenuData.filter(item => !item.position && item.key && !EXCLUDED_MENU_KEYS.includes(item.key));
27
+ categories.push(...itemsWithoutPosition);
28
+ }
29
+ return categories;
30
+ }, [fullMenuData]);
31
+ // Create bound functions with current dependencies
32
+ const boundGetDisplayName = useCallback(item => getDisplayName(item, t), [t]);
33
+ const boundToggleMenuItem = useCallback(itemKey => toggleMenuItem(itemKey, hiddenMenuKeys, changeSetting), [hiddenMenuKeys, changeSetting]);
34
+ // Memoize rendered menu items to prevent unnecessary JSX creation
35
+ const renderedMenuItems = useMemo(() => {
36
+ return renderMenuItems(allMenuItems, 0, hiddenMenuKeys, boundGetDisplayName, boundToggleMenuItem);
37
+ }, [allMenuItems, hiddenMenuKeys, boundGetDisplayName, boundToggleMenuItem]);
38
+ return jsxs("div", {
39
+ className: "space-y-4",
40
+ children: [jsx("div", {
41
+ className: "flex items-center mb-2",
42
+ children: jsxs("button", {
43
+ onClick: () => setIsExpanded(!isExpanded),
44
+ className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200",
45
+ children: [jsx("svg", {
46
+ className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isExpanded ? 'rotate-180' : ''}`,
47
+ fill: "none",
48
+ stroke: "currentColor",
49
+ viewBox: "0 0 24 24",
50
+ children: jsx("path", {
51
+ strokeLinecap: "round",
52
+ strokeLinejoin: "round",
53
+ strokeWidth: 2,
54
+ d: "M19 9l-7 7-7-7"
55
+ })
56
+ }), jsx("p", {
57
+ className: "text-md font-medium text-black dark:text-white",
58
+ children: t('menu_visibility.title') || 'Menu Visibility'
59
+ })]
60
+ })
61
+ }), jsx("div", {
62
+ className: `grid transition-all duration-300 ease-in-out ${isExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`,
63
+ children: jsx("div", {
64
+ className: "overflow-hidden",
65
+ children: jsx("div", {
66
+ className: "ml-4 mb-4 border-l-2 border-gray-200 dark:border-gray-600 pl-4",
67
+ children: jsx("div", {
68
+ className: "space-y-2",
69
+ children: allMenuItems.length === 0 ? jsx("div", {
70
+ className: "text-center text-gray-500 dark:text-gray-400 py-4",
71
+ children: t('menu_visibility.no_items') || 'No menu items found'
72
+ }) : renderedMenuItems
73
+ })
74
+ })
75
+ })
76
+ })]
77
+ });
78
+ }
79
+ // Helper functions
80
+ function getDisplayName(item, t) {
81
+ if (item.tab) return item.tab;
82
+ if (item.name?.startsWith('menu.')) {
83
+ const parts = item.name.split('.');
84
+ return parts.length > 1 ? parts[parts.length - 1].charAt(0).toUpperCase() + parts[parts.length - 1].slice(1) : item.name;
85
+ }
86
+ return t(item.name) || item.name;
87
+ }
88
+ function toggleMenuItem(itemKey, hiddenMenuKeys, changeSetting) {
89
+ const uniqueKeys = new Set(hiddenMenuKeys);
90
+ uniqueKeys.has(itemKey) ? uniqueKeys.delete(itemKey) : uniqueKeys.add(itemKey);
91
+ changeSetting('hiddenMenuKeys', Array.from(uniqueKeys));
92
+ }
93
+ function renderMenuItems(items, indent, hiddenMenuKeys, getDisplayNameFn, toggleMenuItemFn) {
94
+ return items.map(item => {
95
+ const isVisible = !hiddenMenuKeys.includes(item.key);
96
+ const displayName = getDisplayNameFn(item);
97
+ return jsxs("div", {
98
+ children: [jsxs("div", {
99
+ className: "flex items-center py-0.5",
100
+ children: [jsx("input", {
101
+ type: "checkbox",
102
+ id: `menu-item-${item.key}`,
103
+ className: "mr-2 h-3 w-3 rounded border-gray-300 dark:border-gray-600 focus:ring-primary dark:focus:ring-primary bg-white dark:bg-gray-700 accent-primary",
104
+ checked: isVisible,
105
+ onChange: () => toggleMenuItemFn(item.key)
106
+ }), jsx("label", {
107
+ htmlFor: `menu-item-${item.key}`,
108
+ className: "text-xs text-black dark:text-white cursor-pointer flex-1",
109
+ style: {
110
+ paddingLeft: `${indent * 12}px`
111
+ },
112
+ children: displayName
113
+ })]
114
+ }), isVisible && item.children && item.children.length > 0 && jsx("div", {
115
+ className: "ml-6",
116
+ children: renderMenuItems(item.children, indent + 1, hiddenMenuKeys, getDisplayNameFn, toggleMenuItemFn)
117
+ })]
118
+ }, item.key);
119
+ });
120
+ }export{MenuVisibilitySettings as default};//# sourceMappingURL=MenuVisibilitySettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuVisibilitySettings.js","sources":["../../../src/components/SettingDrawer/MenuVisibilitySettings.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"qIAGA;AACA;AACA,M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@@
1
1
  import { NavMenuSelectorProps } from './types';
2
- export default function NavigationModes({ changeSetting, settings, location }: NavMenuSelectorProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function NavigationModes({ changeSetting, settings, location, routePattern, applyToAllRoutes, }: NavMenuSelectorProps): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=NavigationsModes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationsModes.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/NavigationsModes.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AA4E/C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CA8ElG"}
1
+ {"version":3,"file":"NavigationsModes.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/NavigationsModes.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAgG/C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,gBAAwB,GAC3B,EAAE,oBAAoB,2CA+FtB"}