@canmingir/link 1.2.55 → 1.2.57

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 (220) hide show
  1. package/.eslintignore +0 -1
  2. package/.github/workflows/publish.yml +6 -1
  3. package/LICENSE +201 -0
  4. package/bun.lock +20 -30
  5. package/package.json +4 -1
  6. package/src/assets/illustrations/avatar-shape.jsx +10 -8
  7. package/src/assets/illustrations/background-shape.jsx +0 -2
  8. package/src/assets/illustrations/booking-illustration.jsx +8 -6
  9. package/src/assets/illustrations/check-in-illustration.jsx +8 -6
  10. package/src/assets/illustrations/check-out-illustration.jsx +8 -6
  11. package/src/assets/illustrations/coming-soon-illustration.jsx +8 -6
  12. package/src/assets/illustrations/forbidden-illustration.jsx +8 -6
  13. package/src/assets/illustrations/maintenance-illustration.jsx +8 -6
  14. package/src/assets/illustrations/motivation-illustration.jsx +8 -6
  15. package/src/assets/illustrations/order-complete-illustration.jsx +8 -6
  16. package/src/assets/illustrations/page-not-found-illustration.jsx +8 -6
  17. package/src/assets/illustrations/seo-illustration.jsx +8 -6
  18. package/src/assets/illustrations/sever-error-illustration.jsx +8 -6
  19. package/src/assets/illustrations/upgrade-storage-illustration.jsx +8 -6
  20. package/src/assets/illustrations/upload-illustration.jsx +8 -6
  21. package/src/components/Iconify/Iconify.jsx +0 -1
  22. package/src/components/chart/chart.js +0 -2
  23. package/src/components/chart/index.js +0 -2
  24. package/src/components/chart/use-chart.js +0 -2
  25. package/src/components/custom-popover/styles.js +0 -2
  26. package/src/components/custom-popover/use-popover.js +0 -2
  27. package/src/components/custom-popover/utils.js +0 -2
  28. package/src/components/file-thumbnail/utils.js +0 -12
  29. package/src/components/image/utils.js +0 -2
  30. package/src/components/label/styles.js +0 -2
  31. package/src/components/logo/logo.jsx +1 -1
  32. package/src/components/scrollbar/styles.js +0 -2
  33. package/src/components/settings/context/settings-context.js +0 -2
  34. package/src/hooks/use-boolean.js +0 -2
  35. package/src/hooks/use-event-listener.js +0 -2
  36. package/src/hooks/use-local-storage.js +0 -4
  37. package/src/hooks/use-off-set-top.js +0 -2
  38. package/src/hooks/use-responsive.js +0 -4
  39. package/src/hooks/use-scroll-to-top.js +0 -2
  40. package/src/layouts/CompactLayout/CompactLayout.jsx +0 -2
  41. package/src/layouts/DashboardLayout/DashboardLayout.jsx +0 -2
  42. package/src/layouts/DashboardLayout/main.jsx +0 -2
  43. package/src/layouts/DashboardLayout/nav-horizontal.jsx +0 -2
  44. package/src/layouts/DashboardLayout/nav-vertical.jsx +6 -5
  45. package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +3 -4
  46. package/src/layouts/FullScreenLayout/nav-horizontal.jsx +0 -2
  47. package/src/layouts/FullScreenLayout/nav-vertical.jsx +4 -5
  48. package/src/layouts/MainLayout/header.jsx +1 -3
  49. package/src/layouts/MainLayout/nav/desktop/index.jsx +0 -2
  50. package/src/layouts/MainLayout/nav/desktop/nav-item.jsx +0 -6
  51. package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +16 -16
  52. package/src/layouts/MainLayout/nav/mobile/index.jsx +1 -3
  53. package/src/layouts/MainLayout/nav/mobile/nav-item.jsx +0 -4
  54. package/src/layouts/MainLayout/nav/mobile/nav-list.jsx +0 -2
  55. package/src/layouts/TwoSideLayout/TwoSideLayout.jsx +0 -1
  56. package/src/layouts/auth/classic.jsx +3 -4
  57. package/src/layouts/auth/modern-compact.jsx +0 -2
  58. package/src/layouts/auth/modern.jsx +0 -2
  59. package/src/layouts/common/ProjectBar/utils.js +0 -10
  60. package/src/layouts/common/account-popover.jsx +0 -2
  61. package/src/layouts/common/header-shadow.jsx +0 -2
  62. package/src/layouts/common/header-sim.jsx +7 -4
  63. package/src/layouts/common/header-simple.jsx +14 -8
  64. package/src/layouts/common/nav-toggle-button.jsx +1 -3
  65. package/src/layouts/common/notifications-popover/index.jsx +9 -10
  66. package/src/layouts/common/notifications-popover/notification-item.jsx +20 -17
  67. package/src/layouts/common/settings-button.jsx +0 -2
  68. package/src/layouts/config-layout.js +0 -2
  69. package/src/lib/ChatMessage/AIMessage.tsx +163 -0
  70. package/src/lib/ChatMessage/ErrorMessage.tsx +63 -0
  71. package/src/lib/ChatMessage/HumanMessage.tsx +142 -0
  72. package/src/lib/ChatMessage/LoadingMessage.tsx +27 -0
  73. package/src/lib/ChatMessage/MessageList.tsx +81 -0
  74. package/src/lib/ChatMessage/ToolMessage.tsx +346 -0
  75. package/src/lib/ChatMessage/index.js +6 -0
  76. package/src/lib/Image/utils.js +0 -2
  77. package/src/lib/PresetSelector/PresetSelector.tsx +112 -0
  78. package/src/lib/PresetSelector/index.js +1 -0
  79. package/src/lib/Scrollbar/styles.js +0 -2
  80. package/src/lib/SidebarChat/ChatDrawer.tsx +407 -0
  81. package/src/lib/SidebarChat/SessionPopover.tsx +221 -0
  82. package/src/lib/SidebarChat/SidebarChat.tsx +222 -0
  83. package/src/lib/SidebarChat/SidebarSessionList.tsx +304 -0
  84. package/src/lib/SidebarChat/assets.d.ts +4 -0
  85. package/src/lib/SidebarChat/cleanIconName.ts +4 -0
  86. package/src/lib/SidebarChat/index.js +1 -0
  87. package/src/lib/SidebarChat/messageSFX.mp3 +0 -0
  88. package/src/lib/SidebarChat/types.ts +14 -0
  89. package/src/lib/index.js +11 -0
  90. package/src/pages/404.jsx +0 -2
  91. package/src/routes/components/router-link.jsx +0 -2
  92. package/src/routes/hooks/use-active-link.js +0 -2
  93. package/src/routes/hooks/use-pathname.js +0 -2
  94. package/src/routes/hooks/use-router.js +0 -2
  95. package/src/theme/css.js +0 -12
  96. package/src/theme/custom-shadows.js +0 -2
  97. package/src/theme/options/contrast.js +0 -2
  98. package/src/theme/options/presets.js +0 -4
  99. package/src/theme/options/right-to-left.jsx +0 -2
  100. package/src/theme/overrides/components/accordion.js +0 -2
  101. package/src/theme/overrides/components/alert.js +0 -4
  102. package/src/theme/overrides/components/appbar.js +0 -2
  103. package/src/theme/overrides/components/autocomplete.js +0 -2
  104. package/src/theme/overrides/components/avatar.js +0 -4
  105. package/src/theme/overrides/components/backdrop.js +0 -2
  106. package/src/theme/overrides/components/badge.js +0 -2
  107. package/src/theme/overrides/components/breadcrumbs.js +0 -2
  108. package/src/theme/overrides/components/button-group.js +0 -4
  109. package/src/theme/overrides/components/button.js +0 -4
  110. package/src/theme/overrides/components/card.js +0 -2
  111. package/src/theme/overrides/components/checkbox.js +0 -2
  112. package/src/theme/overrides/components/chip.js +0 -4
  113. package/src/theme/overrides/components/css-baseline.js +0 -2
  114. package/src/theme/overrides/components/data-grid.js +0 -2
  115. package/src/theme/overrides/components/date-picker.jsx +0 -2
  116. package/src/theme/overrides/components/dialog.js +0 -2
  117. package/src/theme/overrides/components/drawer.js +0 -2
  118. package/src/theme/overrides/components/fab.js +0 -4
  119. package/src/theme/overrides/components/form.js +0 -2
  120. package/src/theme/overrides/components/list.js +0 -2
  121. package/src/theme/overrides/components/loading-button.js +0 -2
  122. package/src/theme/overrides/components/menu.js +0 -2
  123. package/src/theme/overrides/components/pagination.js +0 -4
  124. package/src/theme/overrides/components/paper.js +0 -2
  125. package/src/theme/overrides/components/popover.js +0 -2
  126. package/src/theme/overrides/components/progress.js +0 -4
  127. package/src/theme/overrides/components/radio.js +0 -2
  128. package/src/theme/overrides/components/rating.js +0 -2
  129. package/src/theme/overrides/components/select.js +0 -2
  130. package/src/theme/overrides/components/skeleton.js +0 -2
  131. package/src/theme/overrides/components/slider.js +0 -2
  132. package/src/theme/overrides/components/stepper.js +0 -2
  133. package/src/theme/overrides/components/svg-icon.js +0 -2
  134. package/src/theme/overrides/components/switch.js +0 -2
  135. package/src/theme/overrides/components/table.js +0 -2
  136. package/src/theme/overrides/components/tabs.js +0 -2
  137. package/src/theme/overrides/components/textfield.js +0 -2
  138. package/src/theme/overrides/components/timeline.js +0 -2
  139. package/src/theme/overrides/components/toggle-button.js +0 -4
  140. package/src/theme/overrides/components/tooltip.js +0 -2
  141. package/src/theme/overrides/components/tree-view.js +0 -2
  142. package/src/theme/overrides/components/typography.js +0 -2
  143. package/src/theme/overrides/default-props.jsx +4 -7
  144. package/src/theme/palette.js +0 -4
  145. package/src/theme/shadows.js +0 -2
  146. package/src/theme/typography.js +0 -4
  147. package/src/utils/flatten-array.js +0 -2
  148. package/src/utils/format-number.js +0 -2
  149. package/src/utils/format-time.js +0 -2
  150. package/src/utils/storage-available.js +0 -2
  151. package/src/widgets/Login/Login.jsx +0 -2
  152. package/src/widgets/error/not-found-view.jsx +0 -2
  153. package/vite/vite.js +8 -1
  154. package/project/.eslintrc.cjs +0 -22
  155. package/project/config.js +0 -18
  156. package/project/config.menu.js +0 -39
  157. package/project/config.template.js +0 -31
  158. package/project/cypress/e2e/layouts.cy.js +0 -170
  159. package/project/cypress/e2e/login.cy.js +0 -35
  160. package/project/cypress/e2e/selectbar.cy.js +0 -80
  161. package/project/cypress/fixtures/CONFIG/MENU_CONFIG.js +0 -39
  162. package/project/cypress/fixtures/EMPEROR/EMPERORS_GET.json +0 -51
  163. package/project/cypress/fixtures/EMPEROR/EMPERORS_POST.json +0 -9
  164. package/project/cypress/fixtures/OAUTH/GITHUB/user.json +0 -46
  165. package/project/cypress/fixtures/example.json +0 -5
  166. package/project/cypress/support/commands.js +0 -104
  167. package/project/cypress/support/e2e.js +0 -1
  168. package/project/cypress.config.js +0 -10
  169. package/project/index.html +0 -12
  170. package/project/media/ProjectIcons/3d.png +0 -0
  171. package/project/media/ProjectIcons/box.png +0 -0
  172. package/project/media/ProjectIcons/cafe.png +0 -0
  173. package/project/media/ProjectIcons/cargo.png +0 -0
  174. package/project/media/ProjectIcons/cloud.png +0 -0
  175. package/project/media/ProjectIcons/code.png +0 -0
  176. package/project/media/ProjectIcons/company.png +0 -0
  177. package/project/media/ProjectIcons/conversation.png +0 -0
  178. package/project/media/ProjectIcons/distributed.png +0 -0
  179. package/project/media/ProjectIcons/fingerprint.png +0 -0
  180. package/project/media/ProjectIcons/forest.png +0 -0
  181. package/project/media/ProjectIcons/headphones.png +0 -0
  182. package/project/media/ProjectIcons/office.png +0 -0
  183. package/project/media/ProjectIcons/path.png +0 -0
  184. package/project/media/ProjectIcons/printer.png +0 -0
  185. package/project/media/ProjectIcons/project.png +0 -0
  186. package/project/media/ProjectIcons/resume.png +0 -0
  187. package/project/media/ProjectIcons/rocket.png +0 -0
  188. package/project/media/ProjectIcons/rtruck.png +0 -0
  189. package/project/media/ProjectIcons/sign.png +0 -0
  190. package/project/media/ProjectIcons/site.png +0 -0
  191. package/project/media/ProjectIcons/truck.png +0 -0
  192. package/project/media/logo.png +0 -0
  193. package/project/package-lock.json +0 -22434
  194. package/project/package.json +0 -42
  195. package/project/public/assets/background/overlay_2.jpg +0 -0
  196. package/project/public/assets/illustrations/illustration_dashboard.png +0 -0
  197. package/project/public/media/largeLogo.png +0 -0
  198. package/project/public/media/logo.png +0 -0
  199. package/project/public/vite.svg +0 -1
  200. package/project/routes.jsx +0 -47
  201. package/project/server/mock.json +0 -110
  202. package/project/server/oauthMock.js +0 -27
  203. package/project/server/package-lock.json +0 -1505
  204. package/project/server/package.json +0 -20
  205. package/project/server/server.js +0 -127
  206. package/project/src/Container.jsx +0 -7
  207. package/project/src/components/ActionButton.jsx +0 -18
  208. package/project/src/hooks/useEmperor.jsx +0 -21
  209. package/project/src/http/index.js +0 -39
  210. package/project/src/main.jsx +0 -10
  211. package/project/src/pages/Battles.jsx +0 -16
  212. package/project/src/pages/Emperor.jsx +0 -50
  213. package/project/src/pages/index.jsx +0 -33
  214. package/project/src/theme.js +0 -151
  215. package/project/src/widgets/ActionButton.jsx +0 -68
  216. package/project/src/widgets/AddNewEmperor.jsx +0 -120
  217. package/project/src/widgets/ProjectContainer.jsx +0 -27
  218. package/project/vite.config.js +0 -6
  219. package/project/vite.config.js.timestamp-1709564450418-45fdd27900806.mjs +0 -341
  220. package/src/layouts/MainLayout/footer.jsx +0 -153
@@ -4,8 +4,6 @@ import React from "react";
4
4
  import { memo } from "react";
5
5
  import { useTheme } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  function MaintenanceIllustration({ ...other }) {
10
8
  const theme = useTheme();
11
9
 
@@ -23,10 +21,14 @@ function MaintenanceIllustration({ ...other }) {
23
21
  viewBox="0 0 480 360"
24
22
  xmlns="http://www.w3.org/2000/svg"
25
23
  {...other}
26
- sx={[{
27
- width: "100%",
28
- height: "100%"
29
- }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]}>
24
+ sx={[
25
+ {
26
+ width: "100%",
27
+ height: "100%",
28
+ },
29
+ ...(Array.isArray(other.sx) ? other.sx : [other.sx]),
30
+ ]}
31
+ >
30
32
  <BackgroundShape />
31
33
  <path
32
34
  fill={PRIMARY_MAIN}
@@ -4,8 +4,6 @@ import React from "react";
4
4
  import { memo } from "react";
5
5
  import { useTheme } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  function MotivationIllustration({ ...other }) {
10
8
  const theme = useTheme();
11
9
 
@@ -21,10 +19,14 @@ function MotivationIllustration({ ...other }) {
21
19
  viewBox="0 0 480 360"
22
20
  xmlns="http://www.w3.org/2000/svg"
23
21
  {...other}
24
- sx={[{
25
- width: "100%",
26
- height: "100%"
27
- }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]}>
22
+ sx={[
23
+ {
24
+ width: "100%",
25
+ height: "100%",
26
+ },
27
+ ...(Array.isArray(other.sx) ? other.sx : [other.sx]),
28
+ ]}
29
+ >
28
30
  <BackgroundShape />
29
31
  <image
30
32
  href="/assets/illustrations/characters/character_2.png"
@@ -4,8 +4,6 @@ import React from "react";
4
4
  import { memo } from "react";
5
5
  import { useTheme } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  function OrderCompleteIllustration({ ...other }) {
10
8
  const theme = useTheme();
11
9
 
@@ -23,10 +21,14 @@ function OrderCompleteIllustration({ ...other }) {
23
21
  viewBox="0 0 480 360"
24
22
  xmlns="http://www.w3.org/2000/svg"
25
23
  {...other}
26
- sx={[{
27
- width: "100%",
28
- height: "100%"
29
- }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]}>
24
+ sx={[
25
+ {
26
+ width: "100%",
27
+ height: "100%",
28
+ },
29
+ ...(Array.isArray(other.sx) ? other.sx : [other.sx]),
30
+ ]}
31
+ >
30
32
  <BackgroundShape />
31
33
  <image
32
34
  href="/assets/illustrations/characters/character_10.png"
@@ -4,8 +4,6 @@ import React from "react";
4
4
  import { memo } from "react";
5
5
  import { useTheme } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  function PageNotFoundIllustration({ ...other }) {
10
8
  const theme = useTheme();
11
9
 
@@ -23,10 +21,14 @@ function PageNotFoundIllustration({ ...other }) {
23
21
  viewBox="0 0 480 360"
24
22
  xmlns="http://www.w3.org/2000/svg"
25
23
  {...other}
26
- sx={[{
27
- width: "100%",
28
- height: "100%"
29
- }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]}>
24
+ sx={[
25
+ {
26
+ width: "100%",
27
+ height: "100%",
28
+ },
29
+ ...(Array.isArray(other.sx) ? other.sx : [other.sx]),
30
+ ]}
31
+ >
30
32
  <BackgroundShape />
31
33
  <image
32
34
  href="/assets/illustrations/characters/character_6.png"
@@ -4,8 +4,6 @@ import React from "react";
4
4
  import { memo } from "react";
5
5
  import { useTheme } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  function SeoIllustration({ ...other }) {
10
8
  const theme = useTheme();
11
9
 
@@ -19,10 +17,14 @@ function SeoIllustration({ ...other }) {
19
17
  viewBox="0 0 480 360"
20
18
  xmlns="http://www.w3.org/2000/svg"
21
19
  {...other}
22
- sx={[{
23
- width: "100%",
24
- height: "100%"
25
- }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]}>
20
+ sx={[
21
+ {
22
+ width: "100%",
23
+ height: "100%",
24
+ },
25
+ ...(Array.isArray(other.sx) ? other.sx : [other.sx]),
26
+ ]}
27
+ >
26
28
  <BackgroundShape />
27
29
  <path
28
30
  fill={PRIMARY_DARK}
@@ -4,8 +4,6 @@ import React from "react";
4
4
  import { memo } from "react";
5
5
  import { useTheme } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  function SeverErrorIllustration({ ...other }) {
10
8
  const theme = useTheme();
11
9
 
@@ -25,10 +23,14 @@ function SeverErrorIllustration({ ...other }) {
25
23
  viewBox="0 0 480 360"
26
24
  xmlns="http://www.w3.org/2000/svg"
27
25
  {...other}
28
- sx={[{
29
- width: "100%",
30
- height: "100%"
31
- }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]}>
26
+ sx={[
27
+ {
28
+ width: "100%",
29
+ height: "100%",
30
+ },
31
+ ...(Array.isArray(other.sx) ? other.sx : [other.sx]),
32
+ ]}
33
+ >
32
34
  <BackgroundShape />
33
35
  <image
34
36
  href="/assets/illustrations/characters/character_8.png"
@@ -4,8 +4,6 @@ import React from "react";
4
4
  import { memo } from "react";
5
5
  import { useTheme } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  function UpgradeStorageIllustration({ ...other }) {
10
8
  const theme = useTheme();
11
9
 
@@ -23,10 +21,14 @@ function UpgradeStorageIllustration({ ...other }) {
23
21
  viewBox="0 0 480 360"
24
22
  xmlns="http://www.w3.org/2000/svg"
25
23
  {...other}
26
- sx={[{
27
- width: "100%",
28
- height: "100%"
29
- }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]}>
24
+ sx={[
25
+ {
26
+ width: "100%",
27
+ height: "100%",
28
+ },
29
+ ...(Array.isArray(other.sx) ? other.sx : [other.sx]),
30
+ ]}
31
+ >
30
32
  <BackgroundShape />
31
33
  <image
32
34
  href="/assets/illustrations/characters/character_2.png"
@@ -4,8 +4,6 @@ import React from "react";
4
4
  import { memo } from "react";
5
5
  import { useTheme } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  function UploadIllustration({ ...other }) {
10
8
  const theme = useTheme();
11
9
 
@@ -21,10 +19,14 @@ function UploadIllustration({ ...other }) {
21
19
  viewBox="0 0 480 360"
22
20
  xmlns="http://www.w3.org/2000/svg"
23
21
  {...other}
24
- sx={[{
25
- width: "100%",
26
- height: "100%"
27
- }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]}>
22
+ sx={[
23
+ {
24
+ width: "100%",
25
+ height: "100%",
26
+ },
27
+ ...(Array.isArray(other.sx) ? other.sx : [other.sx]),
28
+ ]}
29
+ >
28
30
  <BackgroundShape />
29
31
  <defs>
30
32
  <linearGradient
@@ -2,7 +2,6 @@ import Box from "@mui/material/Box";
2
2
  import { Icon } from "@iconify/react";
3
3
  import React from "react";
4
4
  import { forwardRef } from "react";
5
- // ----------------------------------------------------------------------
6
5
 
7
6
  const Iconify = forwardRef(({ icon, width = 20, sx, ...other }, ref) => (
8
7
  <Box
@@ -4,8 +4,6 @@ import { memo } from "react";
4
4
 
5
5
  import { alpha, styled } from "@mui/material/styles";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  const Chart = styled(ApexChart)(({ theme }) => ({
10
8
  "& .apexcharts-canvas": {
11
9
  // Tooltip
@@ -1,5 +1,3 @@
1
- // ----------------------------------------------------------------------
2
-
3
1
  export { default } from "./chart";
4
2
 
5
3
  export { default as useChart } from "./use-chart";
@@ -3,8 +3,6 @@ import { useResponsive } from "../../hooks/use-responsive";
3
3
 
4
4
  import { alpha, useTheme } from "@mui/material/styles";
5
5
 
6
- // ----------------------------------------------------------------------
7
-
8
6
  export default function useChart(options) {
9
7
  const theme = useTheme();
10
8
 
@@ -2,8 +2,6 @@ import { bgBlur } from "../../theme/css";
2
2
 
3
3
  import { alpha, styled } from "@mui/material/styles";
4
4
 
5
- // ----------------------------------------------------------------------
6
-
7
5
  export const StyledArrow = styled("span")(({ arrow, theme }) => {
8
6
  const SIZE = 14;
9
7
 
@@ -1,7 +1,5 @@
1
1
  import { useCallback, useState } from "react";
2
2
 
3
- // ----------------------------------------------------------------------
4
-
5
3
  export default function usePopover() {
6
4
  const [open, setOpen] = useState(null);
7
5
 
@@ -1,5 +1,3 @@
1
- // ----------------------------------------------------------------------
2
-
3
1
  export function getPosition(arrow) {
4
2
  let props;
5
3
 
@@ -1,5 +1,3 @@
1
- // ----------------------------------------------------------------------
2
-
3
1
  // Define more types here
4
2
  const FORMAT_PDF = ["pdf"];
5
3
  const FORMAT_TEXT = ["txt"];
@@ -15,8 +13,6 @@ const FORMAT_VIDEO = ["m4v", "avi", "mpg", "mp4", "webm"];
15
13
 
16
14
  const iconUrl = (icon) => `/assets/icons/files/${icon}.svg`;
17
15
 
18
- // ----------------------------------------------------------------------
19
-
20
16
  export function fileFormat(fileUrl) {
21
17
  let format;
22
18
 
@@ -61,8 +57,6 @@ export function fileFormat(fileUrl) {
61
57
  return format;
62
58
  }
63
59
 
64
- // ----------------------------------------------------------------------
65
-
66
60
  export function fileThumb(fileUrl) {
67
61
  let thumb;
68
62
 
@@ -109,20 +103,14 @@ export function fileThumb(fileUrl) {
109
103
  return thumb;
110
104
  }
111
105
 
112
- // ----------------------------------------------------------------------
113
-
114
106
  export function fileTypeByUrl(fileUrl = "") {
115
107
  return (fileUrl && fileUrl.split(".").pop()) || "";
116
108
  }
117
109
 
118
- // ----------------------------------------------------------------------
119
-
120
110
  export function fileNameByUrl(fileUrl) {
121
111
  return fileUrl.split("/").pop();
122
112
  }
123
113
 
124
- // ----------------------------------------------------------------------
125
-
126
114
  export function fileData(file) {
127
115
  // Url
128
116
  if (typeof file === "string") {
@@ -1,5 +1,3 @@
1
- // ----------------------------------------------------------------------
2
-
3
1
  export function getRatio(ratio = "1/1") {
4
2
  return {
5
3
  "4/3": "calc(100% / 4 * 3)",
@@ -2,8 +2,6 @@ import Box from "@mui/material/Box";
2
2
 
3
3
  import { alpha, styled } from "@mui/material/styles";
4
4
 
5
- // ----------------------------------------------------------------------
6
-
7
5
  export const StyledLabel = styled(Box)(({ theme, ownerState }) => {
8
6
  const lightMode = theme.palette.mode === "light";
9
7
 
@@ -5,7 +5,7 @@ import Link from "@mui/material/Link";
5
5
  import { RouterLink } from "../../routes/components";
6
6
  import config from "../../config/config";
7
7
 
8
- const Logo = ({ disabledLink = false, sx, maxSize = 65, isLogin = false }) => {
8
+ const Logo = ({ disabledLink = false, sx, maxSize = 100, isLogin = false }) => {
9
9
  const { icon } = config().template.login;
10
10
 
11
11
  const [isSquare, setIsSquare] = useState(false);
@@ -2,8 +2,6 @@ import SimpleBar from "simplebar-react";
2
2
 
3
3
  import { alpha, styled } from "@mui/material/styles";
4
4
 
5
- // ----------------------------------------------------------------------
6
-
7
5
  export const StyledRootScrollbar = styled("div")(() => ({
8
6
  flexGrow: 1,
9
7
  height: "100%",
@@ -1,7 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
2
 
3
- // ----------------------------------------------------------------------
4
-
5
3
  export const SettingsContext = createContext({});
6
4
 
7
5
  export const useSettingsContext = () => {
@@ -1,7 +1,5 @@
1
1
  import { useCallback, useState } from "react";
2
2
 
3
- // ----------------------------------------------------------------------
4
-
5
3
  export function useBoolean(defaultValue) {
6
4
  const [value, setValue] = useState(!!defaultValue);
7
5
 
@@ -1,7 +1,5 @@
1
1
  import { useEffect, useLayoutEffect, useRef } from "react";
2
2
 
3
- // ----------------------------------------------------------------------
4
-
5
3
  const useIsomorphicLayoutEffect =
6
4
  typeof window !== "undefined" ? useLayoutEffect : useEffect;
7
5
 
@@ -1,7 +1,5 @@
1
1
  import { useCallback, useEffect, useState } from "react";
2
2
 
3
- // ----------------------------------------------------------------------
4
-
5
3
  export function useLocalStorage(key, initialState) {
6
4
  const [state, setState] = useState(initialState);
7
5
 
@@ -54,8 +52,6 @@ export function useLocalStorage(key, initialState) {
54
52
  };
55
53
  }
56
54
 
57
- // ----------------------------------------------------------------------
58
-
59
55
  export const getStorage = (key) => {
60
56
  let value = null;
61
57
 
@@ -2,8 +2,6 @@ import { useScroll } from "framer-motion";
2
2
 
3
3
  import { useCallback, useEffect, useMemo, useState } from "react";
4
4
 
5
- // ----------------------------------------------------------------------
6
-
7
5
  export function useOffSetTop(top = 0, options) {
8
6
  const { scrollY } = useScroll(options);
9
7
 
@@ -1,8 +1,6 @@
1
1
  import useMediaQuery from "@mui/material/useMediaQuery";
2
2
  import { useTheme } from "@mui/material/styles";
3
3
 
4
- // ----------------------------------------------------------------------
5
-
6
4
  export function useResponsive(query, start, end) {
7
5
  const theme = useTheme();
8
6
 
@@ -29,8 +27,6 @@ export function useResponsive(query, start, end) {
29
27
  return mediaOnly;
30
28
  }
31
29
 
32
- // ----------------------------------------------------------------------
33
-
34
30
  export function useWidth() {
35
31
  const theme = useTheme();
36
32
 
@@ -1,8 +1,6 @@
1
1
  import { useEffect } from "react";
2
2
  import { useLocation } from "react-router-dom";
3
3
 
4
- // ----------------------------------------------------------------------
5
-
6
4
  export function useScrollToTop() {
7
5
  const { pathname } = useLocation();
8
6
 
@@ -4,8 +4,6 @@ import { Outlet } from "react-router";
4
4
  import React from "react";
5
5
  import Stack from "@mui/material/Stack";
6
6
 
7
- // ----------------------------------------------------------------------
8
-
9
7
  const CompactLayout = () => {
10
8
  return (
11
9
  <>
@@ -10,8 +10,6 @@ import { useBoolean } from "../../hooks/use-boolean";
10
10
  import { useResponsive } from "../../hooks/use-responsive";
11
11
  import { useSettingsContext } from "../../components/settings";
12
12
 
13
- // ----------------------------------------------------------------------
14
-
15
13
  export default function DashboardLayout() {
16
14
  const settings = useSettingsContext();
17
15
 
@@ -5,8 +5,6 @@ import { useSettingsContext } from "../../components/settings";
5
5
 
6
6
  import { HEADER, NAV } from "../config-layout";
7
7
 
8
- // ----------------------------------------------------------------------
9
-
10
8
  const SPACING = 8;
11
9
 
12
10
  export default function Main({ children, sx, ...other }) {
@@ -11,8 +11,6 @@ import { memo } from "react";
11
11
  import { useTheme } from "@mui/material/styles";
12
12
  import { useUser } from "../../hooks/use-user";
13
13
 
14
- // ----------------------------------------------------------------------
15
-
16
14
  function NavHorizontal() {
17
15
  const theme = useTheme();
18
16
 
@@ -1,3 +1,6 @@
1
+ import { Button, Typography } from "@mui/material";
2
+ import { useEffect, useState } from "react";
3
+
1
4
  import Box from "@mui/material/Box";
2
5
  import Drawer from "@mui/material/Drawer";
3
6
  import Iconify from "../../components/Iconify";
@@ -17,9 +20,6 @@ import { usePathname } from "../../routes/hooks/use-pathname";
17
20
  import { useResponsive } from "../../hooks/use-responsive";
18
21
  import { useUser } from "../../hooks/use-user";
19
22
 
20
- import { Button, Typography } from "@mui/material";
21
- import { useEffect, useState } from "react";
22
-
23
23
  // ----------------------------------------------------------------------
24
24
 
25
25
  export default function NavVertical({ openNav, onCloseNav }) {
@@ -33,7 +33,7 @@ export default function NavVertical({ openNav, onCloseNav }) {
33
33
 
34
34
  useEffect(() => {
35
35
  const index = sideMenu.findIndex(
36
- (item) => item.subheader === hideSubheader.subheader
36
+ (item) => item.subheader === hideSubheader.subheader,
37
37
  );
38
38
 
39
39
  if (index !== -1) {
@@ -100,6 +100,7 @@ export default function NavVertical({ openNav, onCloseNav }) {
100
100
  sx={{
101
101
  display: "flex",
102
102
  alignItems: "center",
103
+ justifyContent: "center",
103
104
  ml: 1,
104
105
  mt: 3,
105
106
  }}
@@ -107,7 +108,7 @@ export default function NavVertical({ openNav, onCloseNav }) {
107
108
  <Logo sx={{ ml: 4 }} />
108
109
  <Typography
109
110
  sx={{
110
- ml: 1,
111
+ ml: 2,
111
112
  }}
112
113
  >
113
114
  {name}
@@ -10,8 +10,6 @@ import { useResponsive } from "../../hooks/use-responsive";
10
10
 
11
11
  import React, { useEffect, useState } from "react";
12
12
 
13
- // ----------------------------------------------------------------------
14
-
15
13
  export default function FullScreenLayout() {
16
14
  const { fullScreenLayout } = config().menu;
17
15
 
@@ -66,8 +64,9 @@ export default function FullScreenLayout() {
66
64
  <Stack
67
65
  sx={{
68
66
  width: "100%",
69
- mt: 7
70
- }}>
67
+ mt: 7,
68
+ }}
69
+ >
71
70
  <Outlet />
72
71
  </Stack>
73
72
  </>
@@ -9,8 +9,6 @@ import { memo } from "react";
9
9
  import { useTheme } from "@mui/material/styles";
10
10
  import { useUser } from "../../hooks/use-user";
11
11
 
12
- // ----------------------------------------------------------------------
13
-
14
12
  function NavHorizontal() {
15
13
  const theme = useTheme();
16
14
 
@@ -17,8 +17,6 @@ import { useUser } from "../../hooks/use-user";
17
17
 
18
18
  import React, { useState } from "react";
19
19
 
20
- // ----------------------------------------------------------------------
21
-
22
20
  export default function NavVertical({ openNav, onCloseNav }) {
23
21
  const { user } = useUser();
24
22
 
@@ -69,8 +67,9 @@ export default function NavVertical({ openNav, onCloseNav }) {
69
67
  marginBottom: lgUp ? 3 : 0,
70
68
  position: lgUp ? "static" : "fixed",
71
69
  bottom: lgUp ? "auto" : 66,
72
- width: "100%"
73
- }}>
70
+ width: "100%",
71
+ }}
72
+ >
74
73
  {actionButtons &&
75
74
  actionButtons.map((Action, index) => (
76
75
  <Box key={index} component={Action}></Box>
@@ -124,7 +123,7 @@ export default function NavVertical({ openNav, onCloseNav }) {
124
123
  sx: {
125
124
  width: NAV.W_VERTICAL,
126
125
  },
127
- }
126
+ },
128
127
  }}
129
128
  >
130
129
  {renderContent}
@@ -19,8 +19,6 @@ import { useOffSetTop } from "../../hooks/use-off-set-top";
19
19
  import { useResponsive } from "../../hooks/use-responsive";
20
20
  import { useTheme } from "@mui/material/styles";
21
21
 
22
- // ----------------------------------------------------------------------
23
-
24
22
  export default function Header() {
25
23
  const { topMenu } = config().menu;
26
24
  const projectBar = config().template?.projectBar;
@@ -63,7 +61,7 @@ export default function Header() {
63
61
  <Stack
64
62
  direction={{ xs: "row", md: "row-reverse" }}
65
63
  sx={{
66
- alignItems: "center"
64
+ alignItems: "center",
67
65
  }}
68
66
  >
69
67
  <NotificationsPopover />
@@ -2,8 +2,6 @@ import NavList from "./nav-list";
2
2
  import React from "react";
3
3
  import Stack from "@mui/material/Stack";
4
4
 
5
- // ----------------------------------------------------------------------
6
-
7
5
  export default function NavDesktop({ data }) {
8
6
  return (
9
7
  <Stack
@@ -9,8 +9,6 @@ import { forwardRef } from "react";
9
9
  import { motion } from "framer-motion";
10
10
  import { styled } from "@mui/material/styles";
11
11
 
12
- // ----------------------------------------------------------------------
13
-
14
12
  export const NavItem = forwardRef(
15
13
  (
16
14
  { title, path, open, active, hasChild, externalLink, subItem, ...other },
@@ -64,8 +62,6 @@ export const NavItem = forwardRef(
64
62
  }
65
63
  );
66
64
 
67
- // ----------------------------------------------------------------------
68
-
69
65
  const StyledNavItem = styled(ListItemButton, {
70
66
  shouldForwardProp: (prop) => prop !== "active" && prop !== "subItem",
71
67
  })(({ open, active, subItem, theme }) => {
@@ -145,8 +141,6 @@ const StyledNavItem = styled(ListItemButton, {
145
141
  };
146
142
  });
147
143
 
148
- // ----------------------------------------------------------------------
149
-
150
144
  export function NavItemDashboard({ path, sx, ...other }) {
151
145
  return (
152
146
  <Link