@admin-layout/tailwind-design-pro 10.0.4-alpha.19

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 (161) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/lib/cdm-locales/en/common.json +30 -0
  4. package/lib/cdm-locales/en/menu.json +115 -0
  5. package/lib/cdm-locales/en/pages.json +56 -0
  6. package/lib/cdm-locales/en/settings.json +19 -0
  7. package/lib/cdm-locales/es/common.json +30 -0
  8. package/lib/cdm-locales/es/menu.json +115 -0
  9. package/lib/cdm-locales/es/pages.json +56 -0
  10. package/lib/cdm-locales/es/settings.json +19 -0
  11. package/lib/components/LanguageMenu/LanguageMenu.d.ts +2 -0
  12. package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -0
  13. package/lib/components/LanguageMenu/LanguageMenu.js +95 -0
  14. package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -0
  15. package/lib/components/LanguageMenu/index.d.ts +2 -0
  16. package/lib/components/LanguageMenu/index.d.ts.map +1 -0
  17. package/lib/components/Layout/BasicLayout/index.d.ts +19 -0
  18. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -0
  19. package/lib/components/Layout/BasicLayout/index.js +203 -0
  20. package/lib/components/Layout/BasicLayout/index.js.map +1 -0
  21. package/lib/components/Layout/BasicLayout/utils.d.ts +14 -0
  22. package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -0
  23. package/lib/components/Layout/BasicLayout/utils.js +130 -0
  24. package/lib/components/Layout/BasicLayout/utils.js.map +1 -0
  25. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +12 -0
  26. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -0
  27. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +72 -0
  28. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -0
  29. package/lib/components/Layout/GlobalFooter/Copyright.d.ts +5 -0
  30. package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -0
  31. package/lib/components/Layout/GlobalFooter/Copyright.js +8 -0
  32. package/lib/components/Layout/GlobalFooter/Copyright.js.map +1 -0
  33. package/lib/components/Layout/GlobalFooter/Footer.d.ts +5 -0
  34. package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -0
  35. package/lib/components/Layout/GlobalFooter/Footer.js +22 -0
  36. package/lib/components/Layout/GlobalFooter/Footer.js.map +1 -0
  37. package/lib/components/Layout/GlobalHeader/Header.d.ts +18 -0
  38. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -0
  39. package/lib/components/Layout/GlobalHeader/Header.js +74 -0
  40. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -0
  41. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +16 -0
  42. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -0
  43. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +73 -0
  44. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -0
  45. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +18 -0
  46. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -0
  47. package/lib/components/Layout/GlobalHeader/styles.d.ts +2 -0
  48. package/lib/components/Layout/GlobalHeader/styles.d.ts.map +1 -0
  49. package/lib/components/Layout/ProTailwindLayout.d.ts +23 -0
  50. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -0
  51. package/lib/components/Layout/ProTailwindLayout.js +95 -0
  52. package/lib/components/Layout/ProTailwindLayout.js.map +1 -0
  53. package/lib/components/Layout/Sidebar/Divider.d.ts +33 -0
  54. package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -0
  55. package/lib/components/Layout/Sidebar/Divider.js +47 -0
  56. package/lib/components/Layout/Sidebar/Divider.js.map +1 -0
  57. package/lib/components/Layout/Sidebar/Sidebar.d.ts +15 -0
  58. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -0
  59. package/lib/components/Layout/Sidebar/Sidebar.js +139 -0
  60. package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -0
  61. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +6 -0
  62. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -0
  63. package/lib/components/Layout/Sidebar/SidebarMenu.js +89 -0
  64. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -0
  65. package/lib/components/Layout/TailwindLayout.d.ts +12 -0
  66. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -0
  67. package/lib/components/Layout/TailwindLayout.js +42 -0
  68. package/lib/components/Layout/TailwindLayout.js.map +1 -0
  69. package/lib/components/Layout/getPageTitle.d.ts +26 -0
  70. package/lib/components/Layout/getPageTitle.d.ts.map +1 -0
  71. package/lib/components/Layout/getPageTitle.js +56 -0
  72. package/lib/components/Layout/getPageTitle.js.map +1 -0
  73. package/lib/components/Layout/slot-fill/Footer.d.ts +4 -0
  74. package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -0
  75. package/lib/components/Layout/slot-fill/Footer.js +7 -0
  76. package/lib/components/Layout/slot-fill/Footer.js.map +1 -0
  77. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +4 -0
  78. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -0
  79. package/lib/components/Layout/slot-fill/index.d.ts +3 -0
  80. package/lib/components/Layout/slot-fill/index.d.ts.map +1 -0
  81. package/lib/components/Layout/util.d.ts +6 -0
  82. package/lib/components/Layout/util.d.ts.map +1 -0
  83. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +8 -0
  84. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -0
  85. package/lib/components/SettingDrawer/CheckBoxTheme.js +48 -0
  86. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -0
  87. package/lib/components/SettingDrawer/LayoutChange.d.ts +7 -0
  88. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -0
  89. package/lib/components/SettingDrawer/LayoutChange.js +69 -0
  90. package/lib/components/SettingDrawer/LayoutChange.js.map +1 -0
  91. package/lib/components/SettingDrawer/RegionalSettings.d.ts +8 -0
  92. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -0
  93. package/lib/components/SettingDrawer/RegionalSettings.js +95 -0
  94. package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -0
  95. package/lib/components/SettingDrawer/SettingDrawer.d.ts +27 -0
  96. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -0
  97. package/lib/components/SettingDrawer/SettingDrawer.js +392 -0
  98. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -0
  99. package/lib/components/SettingDrawer/Switch/index.d.ts +9 -0
  100. package/lib/components/SettingDrawer/Switch/index.d.ts.map +1 -0
  101. package/lib/components/SettingDrawer/Switch/index.js +39 -0
  102. package/lib/components/SettingDrawer/Switch/index.js.map +1 -0
  103. package/lib/components/SettingDrawer/ThemeColor.d.ts +8 -0
  104. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -0
  105. package/lib/components/SettingDrawer/ThemeColor.js +32 -0
  106. package/lib/components/SettingDrawer/ThemeColor.js.map +1 -0
  107. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.d.ts +2 -0
  108. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.d.ts.map +1 -0
  109. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.js +1 -0
  110. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.js.map +1 -0
  111. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +6 -0
  112. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -0
  113. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +4 -0
  114. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -0
  115. package/lib/components/defaultSettings.d.ts +4 -0
  116. package/lib/components/defaultSettings.d.ts.map +1 -0
  117. package/lib/components/defaultSettings.js +14 -0
  118. package/lib/components/defaultSettings.js.map +1 -0
  119. package/lib/components/typings.d.ts +73 -0
  120. package/lib/components/typings.d.ts.map +1 -0
  121. package/lib/compute.d.ts +4 -0
  122. package/lib/compute.d.ts.map +1 -0
  123. package/lib/compute.js +36 -0
  124. package/lib/compute.js.map +1 -0
  125. package/lib/config/env-config.d.ts +4 -0
  126. package/lib/config/env-config.d.ts.map +1 -0
  127. package/lib/config/env-config.js +7 -0
  128. package/lib/config/env-config.js.map +1 -0
  129. package/lib/helpers/DynamicIcon.d.ts +12 -0
  130. package/lib/helpers/DynamicIcon.d.ts.map +1 -0
  131. package/lib/index.d.ts +7 -0
  132. package/lib/index.d.ts.map +1 -0
  133. package/lib/index.js +2 -0
  134. package/lib/index.js.map +1 -0
  135. package/lib/index.server.d.ts +2 -0
  136. package/lib/index.server.d.ts.map +1 -0
  137. package/lib/index.server.js +1 -0
  138. package/lib/index.server.js.map +1 -0
  139. package/lib/module.d.ts +6 -0
  140. package/lib/module.d.ts.map +1 -0
  141. package/lib/module.js +22 -0
  142. package/lib/module.js.map +1 -0
  143. package/lib/routes.json +41 -0
  144. package/lib/styles/index.css +51 -0
  145. package/lib/utils/index.d.ts +2 -0
  146. package/lib/utils/index.d.ts.map +1 -0
  147. package/lib/utils/index.js +13 -0
  148. package/lib/utils/index.js.map +1 -0
  149. package/lib/utils/isBrowser/index.d.ts +3 -0
  150. package/lib/utils/isBrowser/index.d.ts.map +1 -0
  151. package/lib/utils/isBrowser/index.js +7 -0
  152. package/lib/utils/isBrowser/index.js.map +1 -0
  153. package/lib/utils/menu.d.ts +4 -0
  154. package/lib/utils/menu.d.ts.map +1 -0
  155. package/lib/utils/test-utils.d.ts +12 -0
  156. package/lib/utils/test-utils.d.ts.map +1 -0
  157. package/lib/utils/utils/index.d.ts +14 -0
  158. package/lib/utils/utils/index.d.ts.map +1 -0
  159. package/lib/utils/utils/index.js +3 -0
  160. package/lib/utils/utils/index.js.map +1 -0
  161. package/package.json +65 -0
@@ -0,0 +1,203 @@
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {createContext,useState,useRef,useEffect,useContext}from'react';import {Sidebar}from'../Sidebar/Sidebar.js';import {GlobalHeader}from'../GlobalHeader/Header.js';import {useLocation,Outlet}from'@remix-run/react';import warning from'warning';import {omit}from'lodash-es';import {SettingDrawer}from'../../SettingDrawer/SettingDrawer.js';import {defaultSettings,useComponentSize,getMenuSeparation}from'@admin-layout/client';import isBrowser from'../../../utils/isBrowser/index.js';import {getPageTitleInfo}from'../getPageTitle.js';import {GlobalFooter}from'../GlobalFooter/Footer.js';const ThemeContext = createContext(undefined);
2
+ const useTheme = () => {
3
+ const context = useContext(ThemeContext);
4
+ return context;
5
+ };
6
+ const useHorizontalScroll = ({
7
+ scrolled,
8
+ setScrolled,
9
+ setSearchOptionsShown,
10
+ onScrollReachEnd
11
+ }) => {
12
+ const elRef = useRef();
13
+ useEffect(() => {
14
+ const el = elRef.current || null;
15
+ if (el) {
16
+ const onWheel = e => {
17
+ if (e.deltaY == 0) return;
18
+ e.preventDefault();
19
+ setSearchOptionsShown(false);
20
+ if (window.scrollY > 50) {
21
+ setScrolled(true);
22
+ }
23
+ if (window.scrollY < 25) {
24
+ setScrolled(false);
25
+ }
26
+ if (window.innerHeight + window.scrollY >= document.body.scrollHeight) {
27
+ onScrollReachEnd();
28
+ }
29
+ };
30
+ window.addEventListener('scroll', onWheel);
31
+ return () => {
32
+ window.removeEventListener('scroll', onWheel);
33
+ };
34
+ }
35
+ }, []);
36
+ return elRef;
37
+ };
38
+ const defaultPageTitleRender = (pageProps, props) => {
39
+ const {
40
+ pageTitleRender
41
+ } = props;
42
+ const pageTitleInfo = getPageTitleInfo(pageProps);
43
+ if (pageTitleRender === false) {
44
+ return {
45
+ title: props.title || '',
46
+ id: '',
47
+ pageName: ''
48
+ };
49
+ }
50
+ if (pageTitleRender) {
51
+ const title = pageTitleRender(pageProps, pageTitleInfo.title, pageTitleInfo);
52
+ if (typeof title === 'string') {
53
+ return {
54
+ ...pageTitleInfo,
55
+ title
56
+ };
57
+ }
58
+ warning(typeof title === 'string', 'pro-layout: renderPageTitle return value should be a string');
59
+ }
60
+ return pageTitleInfo;
61
+ };
62
+ const BasicLayout = props => {
63
+ const propsWithSettings = {
64
+ ...defaultSettings,
65
+ ...props
66
+ };
67
+ const [scrolled, setScrolled] = useState(false);
68
+ const [collapsed, setCollapsed] = useState();
69
+ const {
70
+ children,
71
+ onCollapse: propsOnCollapse,
72
+ // contentStyle,
73
+ defaultCollapsed,
74
+ menuData,
75
+ // style,
76
+ // disableContentMargin,
77
+ siderWidth = 208,
78
+ menu,
79
+ // isChildrenLayout: propsIsChildrenLayout,
80
+ menuDataRender,
81
+ loading,
82
+ // location,
83
+ routeParams,
84
+ settings,
85
+ authorities,
86
+ primaryColor,
87
+ onSettingChange,
88
+ mainHeaderProps
89
+ } = propsWithSettings;
90
+ const [isSideMenuOpen, setIsSideMenuOpen] = useState(false);
91
+ const [isDarkMode, setIsDarkMode] = useState(false);
92
+ const location = useLocation();
93
+ const [scrollEnd, setScrollEnd] = useState(false);
94
+ const [searchOptionsShown, setSearchOptionsShown] = useState(false);
95
+ const onScrollReachEnd = () => {
96
+ setScrollEnd(prevScrollEnd => !prevScrollEnd);
97
+ };
98
+ useHorizontalScroll({
99
+ scrolled,
100
+ setScrolled,
101
+ setSearchOptionsShown,
102
+ onScrollReachEnd
103
+ });
104
+ const defaultProps = omit({
105
+ ...propsWithSettings
106
+ }, ['layout']);
107
+ defaultPageTitleRender({
108
+ pathname: location?.pathname,
109
+ ...defaultProps
110
+ }, propsWithSettings);
111
+ const settingRef = useRef(settings);
112
+ useEffect(() => {
113
+ // Only update if the primaryColor actually needs to change
114
+ if (settingRef.current?.primaryColor === '#3FA541C' && primaryColor !== '#3FA541C') {
115
+ const newState = {
116
+ ...settingRef.current,
117
+ primaryColor
118
+ };
119
+ onSettingChange(newState);
120
+ }
121
+ }, [primaryColor, isBrowser, settingRef]);
122
+ const {
123
+ ref: refHeader,
124
+ height: heightHeader
125
+ } = useComponentSize();
126
+ const {
127
+ ref: refBody,
128
+ height: heightBody
129
+ } = useComponentSize();
130
+ const {
131
+ ref: refFooter,
132
+ height: heightFooter
133
+ } = useComponentSize();
134
+ const [footerFixed, setFooterFixed] = useState(false);
135
+ useEffect(() => {
136
+ if (heightHeader && heightBody && heightFooter) {
137
+ if (heightBody < window.innerHeight - heightHeader - heightFooter) setFooterFixed(true);else setFooterFixed(false);
138
+ }
139
+ }, [heightHeader, heightBody, heightFooter]);
140
+ useEffect(() => {
141
+ const savedTheme = localStorage.getItem('theme');
142
+ const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
143
+ if (savedTheme === 'dark' || !savedTheme && prefersDark) {
144
+ setIsDarkMode(true);
145
+ document.documentElement.classList.add('dark');
146
+ }
147
+ }, []);
148
+ const toggleTheme = () => {
149
+ setIsDarkMode(!isDarkMode);
150
+ if (isDarkMode) {
151
+ document.documentElement.classList.remove('dark');
152
+ localStorage.setItem('theme', 'light');
153
+ } else {
154
+ document.documentElement.classList.add('dark');
155
+ localStorage.setItem('theme', 'dark');
156
+ }
157
+ };
158
+ const toggleSideMenu = () => {
159
+ setIsSideMenuOpen(!isSideMenuOpen);
160
+ };
161
+ const closeSideMenu = () => {
162
+ setIsSideMenuOpen(false);
163
+ };
164
+ return jsx(ThemeContext.Provider, {
165
+ value: {
166
+ isDarkMode,
167
+ toggleTheme
168
+ },
169
+ children: jsxs("div", {
170
+ className: `flex h-screen bg-gray-50 dark:bg-gray-900`,
171
+ children: [jsx(Sidebar, {
172
+ isSideMenuOpen: isSideMenuOpen,
173
+ closeSideMenu: closeSideMenu,
174
+ menuData: menuData,
175
+ collapsed: children,
176
+ routeParams: routeParams,
177
+ settings: settings
178
+ }), jsxs("div", {
179
+ className: "flex flex-col flex-1 w-full",
180
+ children: [jsx(GlobalHeader, {
181
+ toggleSideMenu: toggleSideMenu,
182
+ settings: settings,
183
+ upperMenus: getMenuSeparation(menuData).upperMenus,
184
+ routeParams: routeParams,
185
+ collapsed: collapsed
186
+ }), jsx(SettingDrawer, {
187
+ primaryColor: primaryColor,
188
+ settings: settings,
189
+ onSettingChange: onSettingChange
190
+ }), jsx("main", {
191
+ className: "h-full overflow-y-auto",
192
+ children: jsx("div", {
193
+ className: "container px-6 mx-auto grid",
194
+ children: jsx(Outlet, {})
195
+ })
196
+ }), jsx(GlobalFooter, {
197
+ settings: settings,
198
+ active: settings?.showFooter
199
+ })]
200
+ })]
201
+ })
202
+ });
203
+ };export{BasicLayout,useHorizontalScroll,useTheme};//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Layout/BasicLayout/index.tsx"],"sourcesContent":[null],"names":[],"mappings":"onBAuBA,MAAM,YAAY,GAAG,aAAa,CAA+B,SAAS,CAAC;AAEpE,MAAM,QAAQ,GAAG,MAAK;AACzB,EAAA,MAAA,UAAgB,UAAA,CAAA,YAAW,CAAA;AAE3B,EAAA,OAAA;AACJ;AACO,MAAM,mBAAmB,GAAG,CAAC;AAChC,EAAA,QAAM;aAEG;AACL,EAAA,qBAAW;;AAEP,CAAA,KAAA;AACI,EAAA,MAAA,KAAA,GAAA,MAAM,EAAM;;oBACI,CAAA,OAAA,IAAA,IAAG;;AAEnB,MAAA,MAAA,OAAA,QAAW;oBACP,IAAW,CAAA,EAAA;wBACd,EAAA;AACD,QAAA,qBAAW,CAAA,KAAU,CAAA;0BACN,GAAA,EAAA,EAAM;qBACpB,CAAA,IAAA,CAAA;AACD;AACI,QAAA,IAAA,MAAA,CAAA,OAAA,GAAA,EAAA,EAAA;qBACH,CAAA,KAAA,CAAA;AACL;AAEA,QAAA,IAAA,MAAM,CAAC,WAAgB,GAAA,cAAW,IAAA,QAAS,CAAA,IAAA,CAAA,YAAA,EAAA;AAC3C,UAAA,gBAAY,EAAA;AACR;AACJ,OAAA;YACH,CAAA,gBAAA,CAA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 'react';
2
+ export declare const defaultFooterDom: import("react/jsx-runtime").JSX.Element;
3
+ export declare const UserView: React.NamedExoticComponent<{
4
+ collapsed: boolean;
5
+ }>;
6
+ export declare const FooterSubMenuItemRender: React.NamedExoticComponent<{
7
+ item: any;
8
+ collapsed: boolean;
9
+ }>;
10
+ export declare const handleMenuPopup: () => void;
11
+ export declare const itemRender: (route: any, params: any, routes: any, paths: any) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const breadCrumbs: (routers?: any[]) => any[];
13
+ export declare const generateLightShade: (color: string, percent: number) => string;
14
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/BasicLayout/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,gBAAgB,yCAwB5B,CAAC;AAEF,eAAO,MAAM,QAAQ;eAA2B,OAAO;EAyD7C,CAAC;AAEX,eAAO,MAAM,uBAAuB;UAAsB,GAAG;eAAa,OAAO;EAK/E,CAAC;AAEH,eAAO,MAAM,eAAe,YAU3B,CAAC;AAEF,eAAO,MAAM,UAAU,+FAStB,CAAC;AAEF,eAAO,MAAM,WAAW,4BAUvB,CAAC;AAGF,eAAO,MAAM,kBAAkB,UAAW,MAAM,WAAW,MAAM,WAchE,CAAC"}
@@ -0,0 +1,130 @@
1
+ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {Link}from'react-router-dom';import {isEmpty}from'lodash-es';import {useAppSelector,useLayoutSettings}from'@admin-layout/client';jsxs("footer", {
2
+ className: "flex flex-col items-center justify-center py-4",
3
+ children: [jsxs("div", {
4
+ className: "flex space-x-8 mb-2",
5
+ children: [jsx("a", {
6
+ href: "https://cdebase.com",
7
+ target: "_blank",
8
+ rel: "noopener noreferrer",
9
+ className: "text-gray-600 hover:text-gray-800 transition-colors",
10
+ children: "CDEBase Pro"
11
+ }), jsx("a", {
12
+ href: "https://github.com/cdebase",
13
+ target: "_blank",
14
+ rel: "noopener noreferrer",
15
+ className: "text-gray-600 hover:text-gray-800 transition-colors",
16
+ children: jsx("svg", {
17
+ className: "w-6 h-6",
18
+ fill: "currentColor",
19
+ viewBox: "0 0 24 24",
20
+ children: jsx("path", {
21
+ d: "M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"
22
+ })
23
+ })
24
+ })]
25
+ }), jsx("div", {
26
+ className: "text-gray-500 text-sm",
27
+ children: `${new Date().getFullYear()} By CDMBase LLC`
28
+ })]
29
+ });
30
+ const UserView = React.memo(({
31
+ collapsed
32
+ }) => {
33
+ const {
34
+ profile = {}
35
+ } = useAppSelector(state => state?.user || {});
36
+ const {
37
+ settings
38
+ } = useLayoutSettings();
39
+ const {
40
+ isTest,
41
+ mock,
42
+ nickname,
43
+ picture
44
+ } = profile || {};
45
+ if (isEmpty(profile) || isTest || mock) {
46
+ return jsx("div", {
47
+ className: "flex",
48
+ children: jsx("div", {
49
+ className: "xl:w-2/3",
50
+ children: jsxs(Link, {
51
+ to: "/login",
52
+ children: [!collapsed && jsxs("button", {
53
+ className: "bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded flex items-center w-40 transition-colors",
54
+ children: [jsx("svg", {
55
+ className: "w-5 h-5 mr-2",
56
+ fill: "none",
57
+ stroke: "currentColor",
58
+ viewBox: "0 0 24 24",
59
+ children: jsx("path", {
60
+ strokeLinecap: "round",
61
+ strokeLinejoin: "round",
62
+ strokeWidth: 2,
63
+ d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
64
+ })
65
+ }), "Login"]
66
+ }), collapsed && jsx("svg", {
67
+ className: "w-6 h-6",
68
+ fill: "none",
69
+ stroke: "currentColor",
70
+ viewBox: "0 0 24 24",
71
+ children: jsx("path", {
72
+ strokeLinecap: "round",
73
+ strokeLinejoin: "round",
74
+ strokeWidth: 2,
75
+ d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
76
+ })
77
+ })]
78
+ })
79
+ })
80
+ });
81
+ }
82
+ return jsx("span", {
83
+ "data-user": nickname,
84
+ id: !isEmpty(profile) || isTest || mock ? `cde-user-placeholder` : 'cde-user',
85
+ className: `${settings?.themeType === 'dark' ? 'text-white' : ''}`,
86
+ children: jsxs("div", {
87
+ className: "flex items-center",
88
+ children: [jsx("div", {
89
+ className: "w-8 h-8 rounded-full bg-gray-300 flex items-center justify-center overflow-hidden ml-1 mb-1",
90
+ children: picture ? jsx("img", {
91
+ src: picture,
92
+ alt: nickname || 'Guest',
93
+ className: "w-full h-full object-cover"
94
+ }) : jsx("span", {
95
+ className: "text-sm",
96
+ children: (nickname || 'Guest').charAt(0)
97
+ })
98
+ }), !collapsed && jsx("span", {
99
+ className: "pl-2",
100
+ children: nickname || 'Guest'
101
+ })]
102
+ })
103
+ });
104
+ });
105
+ const FooterSubMenuItemRender = React.memo(({
106
+ item,
107
+ collapsed
108
+ }) => {
109
+ if (item?.key === 'usermenu') {
110
+ return jsx(UserView, {
111
+ collapsed: collapsed
112
+ });
113
+ }
114
+ return jsx("span", {
115
+ children: item?.name
116
+ });
117
+ });
118
+ // Function for generate lighter shade form colorPrimary
119
+ const generateLightShade = (color, percent) => {
120
+ let r = parseInt(color.slice(1, 3), 16);
121
+ let g = parseInt(color.slice(3, 5), 16);
122
+ let b = parseInt(color.slice(5, 7), 16);
123
+ r += Math.round((255 - r) * percent);
124
+ g += Math.round((255 - g) * percent);
125
+ b += Math.round((255 - b) * percent);
126
+ r = Math.min(r, 255);
127
+ g = Math.min(g, 255);
128
+ b = Math.min(b, 255);
129
+ return '#' + r.toString(16).padStart(2, '0') + g.toString(16).padStart(2, '0') + b.toString(16).padStart(2, '0');
130
+ };export{FooterSubMenuItemRender,UserView,generateLightShade};//# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../src/components/Layout/BasicLayout/utils.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"6MAKgCA,IAC5B,CAAA,QAAA,EAAA;AAyBJ,EAAA,SAAO,EAAM,gDAAiE;AAC1E,EAAA,QAAM,EAAE,CAAOA,IAAA,CAAA,KAAK,EAAE;AACtB,IAAA,SAAgB,EAAA,qBAAK;AACrB,IAAA,QAAQ,EAAA,CAAAC,GAAQ,CAAA,GAAA,EAAM;MAElB,IAAA,EAAA,qBAA0B;YACnB,EAAA,QACE;MA8BZ,GAAA,EAAA,qBAAA;MAEM,SAEY,EAAA,qDACS;AAehC,MAAW,QAAA,EAAA;AAEX,KAAA,CAAM,EAACA,GAAA,CAAM,GAAuB,EAAA;AAChC,MAAA,MAAQ,4BAAuB;AAC3B,MAAA,MAAA,EAAA,QAAgB;MACnB,GAAA,EAAA,qBAAA;AACD,MAAA,SAAc,EAAA,qDAAmB;AACrC,MAAG,QAAA,EAAAA,GAAA,CAAA,KAAA,EAAA;AAEH,QAAO,SAAqB,EAAA,SAAA;A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Params: {
6
+ orgName?: string;
7
+ [key: string]: string;
8
+ };
9
+ }
10
+ declare const BottomMenuDropDown: React.FC<BottomMenuDropDownProps>;
11
+ export default BottomMenuDropDown;
12
+ //# sourceMappingURL=BottomMenuDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomMenuDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalFooter/BottomMenuDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACzB,CAAC;CACL;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA2EzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,72 @@
1
+ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {generateMenuPath}from'@admin-layout/client';import {useNavigate}from'@remix-run/react';import {FooterSubMenuItemRender}from'../BasicLayout/utils.js';const BottomMenuDropDown = props => {
2
+ const {
3
+ menus,
4
+ collapsed,
5
+ routeParams
6
+ } = props;
7
+ const navigate = useNavigate();
8
+ const [isOpen, setIsOpen] = React.useState(false);
9
+ const dropdownRef = React.useRef(null);
10
+ React.useEffect(() => {
11
+ const handleClickOutside = event => {
12
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
13
+ setIsOpen(false);
14
+ }
15
+ };
16
+ document.addEventListener('mousedown', handleClickOutside);
17
+ return () => {
18
+ document.removeEventListener('mousedown', handleClickOutside);
19
+ };
20
+ }, []);
21
+ const handleClick = key => {
22
+ let path = '';
23
+ for (let element of menus.menuData[0].children) {
24
+ if (element.key === key) {
25
+ path = element.path;
26
+ break;
27
+ }
28
+ }
29
+ navigate(generateMenuPath(path, routeParams));
30
+ setIsOpen(false);
31
+ };
32
+ const handleToggleDropdown = () => {
33
+ setIsOpen(!isOpen);
34
+ };
35
+ const menuItems = menus?.menuData[0]?.children?.map(menu => {
36
+ return {
37
+ label: menu.name,
38
+ key: menu.key,
39
+ path: menu.path,
40
+ icon: menu.icon
41
+ };
42
+ });
43
+ return jsxs("div", {
44
+ className: "relative",
45
+ ref: dropdownRef,
46
+ children: [jsx("div", {
47
+ className: "cursor-pointer",
48
+ onClick: handleToggleDropdown,
49
+ onContextMenu: e => {
50
+ e.preventDefault();
51
+ handleToggleDropdown();
52
+ },
53
+ children: jsx(FooterSubMenuItemRender, {
54
+ item: menus.menuData[0],
55
+ collapsed: collapsed
56
+ })
57
+ }), isOpen && jsx("div", {
58
+ className: "absolute bottom-full left-0 mb-1 bg-white border border-gray-200 rounded shadow-lg z-10 min-w-40",
59
+ children: jsx("div", {
60
+ className: "py-1",
61
+ children: menuItems?.map(item => jsxs("div", {
62
+ className: "flex items-center px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer",
63
+ onClick: () => handleClick(item.key),
64
+ children: [item.icon && jsx("span", {
65
+ className: "mr-2",
66
+ children: item.icon
67
+ }), item.label]
68
+ }, item.key))
69
+ })
70
+ })]
71
+ });
72
+ };export{BottomMenuDropDown as default};//# sourceMappingURL=BottomMenuDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomMenuDropdown.js","sources":["../../../../src/components/Layout/GlobalFooter/BottomMenuDropdown.tsx"],"sourcesContent":[null],"names":["_jsxs"],"mappings":"kOAcA,MAAM,kBAAkB,GAAsC,KAAC,IAAS;QAC9D;AACN,IAAA,KAAA;AACA,IAAA,SAAO;IACP;AAEA,GAAA,GAAA,KAAM;AACF,EAAA,MAAA,QAAwB,GAAA,WAAA,EAAA;AACpB,EAAA,MAAA,CAAA,MAAA,YAAe,GAAC,KAAO,CAAI,eAAY;mBAC1B,GAAA,KAA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 //# sourceMappingURL=Copyright.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Copyright.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalFooter/Copyright.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS;;6CAId,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ import {jsxs}from'react/jsx-runtime';const Copyright = ({
2
+ title
3
+ }) => jsxs("div", {
4
+ style: {
5
+ color: '#555353'
6
+ },
7
+ children: ["Copyright \u00A9 ", new Date().getFullYear(), " ", title, " All rights reserved."]
8
+ });export{Copyright as default};//# sourceMappingURL=Copyright.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Copyright.js","sources":["../../../../src/components/Layout/GlobalFooter/Copyright.tsx"],"sourcesContent":[null],"names":[],"mappings":"qCAEA,MAAM,SAAS,GAAG,CAAC;AAMnB,EAAA;;;;;;"}
@@ -0,0 +1,5 @@
1
+ export declare const GlobalFooter: ({ settings, active }: {
2
+ settings: any;
3
+ active: any;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=Footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalFooter/Footer.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;6CAexB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import {jsxs,jsx}from'react/jsx-runtime';import {Link}from'@remix-run/react';import Copyright from'./Copyright.js';const GlobalFooter = ({
2
+ settings,
3
+ active
4
+ }) => {
5
+ const {
6
+ title
7
+ } = settings;
8
+ if (!active) return null;
9
+ return jsxs("footer", {
10
+ className: "py-6 text-center",
11
+ children: [jsx("div", {
12
+ className: "my-8",
13
+ children: jsx(Link, {
14
+ to: "#",
15
+ className: "text-gray-600 hover:text-gray-800 transition-colors",
16
+ children: "Privacy Policy"
17
+ })
18
+ }), jsx(Copyright, {
19
+ title: title
20
+ })]
21
+ });
22
+ };export{GlobalFooter};//# sourceMappingURL=Footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.js","sources":["../../../../src/components/Layout/GlobalFooter/Footer.tsx"],"sourcesContent":[null],"names":[],"mappings":"mHAIa,MAAA,YAAY,GAAG,CAAC;AACzB,EAAA,QAAM;AAEN,EAAA;AAAa,CAAA,KAAA;AAEb,EAAA,MAAA;AAUJ,IAAE;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,18 @@
1
+ import 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
+ toggleSideMenu?: any;
15
+ }
16
+ export declare const GlobalHeader: React.FC<GlobalHeaderRightProps>;
17
+ export default GlobalHeader;
18
+ //# sourceMappingURL=Header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,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;IACvB,cAAc,CAAC,EAAE,GAAG,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA4EzD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,74 @@
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 => {
2
+ const {
3
+ theme,
4
+ layout,
5
+ upperMenus,
6
+ routeParams,
7
+ collapsed,
8
+ settings,
9
+ toggleSideMenu
10
+ } = props;
11
+ useState(false);
12
+ useState(false);
13
+ 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
@@ -0,0 +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,EAAyC,QAAA,CAAA,KAAA;EACP,QAAA,CAAA,KAAA;AACtC,EAAA,MAAE;IAEF,UAAa;AAAc,IAAA;AAC3B,GAAA,GAAA,QACY,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,16 @@
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
+ }
14
+ declare const OrganizationDropDown: React.FC<GlobalHeaderRightProps>;
15
+ export default OrganizationDropDown;
16
+ //# sourceMappingURL=OrganizationDropdown.d.ts.map
@@ -0,0 +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"}