@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.
- package/.eslintignore +0 -1
- package/.github/workflows/publish.yml +6 -1
- package/LICENSE +201 -0
- package/bun.lock +20 -30
- package/package.json +4 -1
- package/src/assets/illustrations/avatar-shape.jsx +10 -8
- package/src/assets/illustrations/background-shape.jsx +0 -2
- package/src/assets/illustrations/booking-illustration.jsx +8 -6
- package/src/assets/illustrations/check-in-illustration.jsx +8 -6
- package/src/assets/illustrations/check-out-illustration.jsx +8 -6
- package/src/assets/illustrations/coming-soon-illustration.jsx +8 -6
- package/src/assets/illustrations/forbidden-illustration.jsx +8 -6
- package/src/assets/illustrations/maintenance-illustration.jsx +8 -6
- package/src/assets/illustrations/motivation-illustration.jsx +8 -6
- package/src/assets/illustrations/order-complete-illustration.jsx +8 -6
- package/src/assets/illustrations/page-not-found-illustration.jsx +8 -6
- package/src/assets/illustrations/seo-illustration.jsx +8 -6
- package/src/assets/illustrations/sever-error-illustration.jsx +8 -6
- package/src/assets/illustrations/upgrade-storage-illustration.jsx +8 -6
- package/src/assets/illustrations/upload-illustration.jsx +8 -6
- package/src/components/Iconify/Iconify.jsx +0 -1
- package/src/components/chart/chart.js +0 -2
- package/src/components/chart/index.js +0 -2
- package/src/components/chart/use-chart.js +0 -2
- package/src/components/custom-popover/styles.js +0 -2
- package/src/components/custom-popover/use-popover.js +0 -2
- package/src/components/custom-popover/utils.js +0 -2
- package/src/components/file-thumbnail/utils.js +0 -12
- package/src/components/image/utils.js +0 -2
- package/src/components/label/styles.js +0 -2
- package/src/components/logo/logo.jsx +1 -1
- package/src/components/scrollbar/styles.js +0 -2
- package/src/components/settings/context/settings-context.js +0 -2
- package/src/hooks/use-boolean.js +0 -2
- package/src/hooks/use-event-listener.js +0 -2
- package/src/hooks/use-local-storage.js +0 -4
- package/src/hooks/use-off-set-top.js +0 -2
- package/src/hooks/use-responsive.js +0 -4
- package/src/hooks/use-scroll-to-top.js +0 -2
- package/src/layouts/CompactLayout/CompactLayout.jsx +0 -2
- package/src/layouts/DashboardLayout/DashboardLayout.jsx +0 -2
- package/src/layouts/DashboardLayout/main.jsx +0 -2
- package/src/layouts/DashboardLayout/nav-horizontal.jsx +0 -2
- package/src/layouts/DashboardLayout/nav-vertical.jsx +6 -5
- package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +3 -4
- package/src/layouts/FullScreenLayout/nav-horizontal.jsx +0 -2
- package/src/layouts/FullScreenLayout/nav-vertical.jsx +4 -5
- package/src/layouts/MainLayout/header.jsx +1 -3
- package/src/layouts/MainLayout/nav/desktop/index.jsx +0 -2
- package/src/layouts/MainLayout/nav/desktop/nav-item.jsx +0 -6
- package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +16 -16
- package/src/layouts/MainLayout/nav/mobile/index.jsx +1 -3
- package/src/layouts/MainLayout/nav/mobile/nav-item.jsx +0 -4
- package/src/layouts/MainLayout/nav/mobile/nav-list.jsx +0 -2
- package/src/layouts/TwoSideLayout/TwoSideLayout.jsx +0 -1
- package/src/layouts/auth/classic.jsx +3 -4
- package/src/layouts/auth/modern-compact.jsx +0 -2
- package/src/layouts/auth/modern.jsx +0 -2
- package/src/layouts/common/ProjectBar/utils.js +0 -10
- package/src/layouts/common/account-popover.jsx +0 -2
- package/src/layouts/common/header-shadow.jsx +0 -2
- package/src/layouts/common/header-sim.jsx +7 -4
- package/src/layouts/common/header-simple.jsx +14 -8
- package/src/layouts/common/nav-toggle-button.jsx +1 -3
- package/src/layouts/common/notifications-popover/index.jsx +9 -10
- package/src/layouts/common/notifications-popover/notification-item.jsx +20 -17
- package/src/layouts/common/settings-button.jsx +0 -2
- package/src/layouts/config-layout.js +0 -2
- package/src/lib/ChatMessage/AIMessage.tsx +163 -0
- package/src/lib/ChatMessage/ErrorMessage.tsx +63 -0
- package/src/lib/ChatMessage/HumanMessage.tsx +142 -0
- package/src/lib/ChatMessage/LoadingMessage.tsx +27 -0
- package/src/lib/ChatMessage/MessageList.tsx +81 -0
- package/src/lib/ChatMessage/ToolMessage.tsx +346 -0
- package/src/lib/ChatMessage/index.js +6 -0
- package/src/lib/Image/utils.js +0 -2
- package/src/lib/PresetSelector/PresetSelector.tsx +112 -0
- package/src/lib/PresetSelector/index.js +1 -0
- package/src/lib/Scrollbar/styles.js +0 -2
- package/src/lib/SidebarChat/ChatDrawer.tsx +407 -0
- package/src/lib/SidebarChat/SessionPopover.tsx +221 -0
- package/src/lib/SidebarChat/SidebarChat.tsx +222 -0
- package/src/lib/SidebarChat/SidebarSessionList.tsx +304 -0
- package/src/lib/SidebarChat/assets.d.ts +4 -0
- package/src/lib/SidebarChat/cleanIconName.ts +4 -0
- package/src/lib/SidebarChat/index.js +1 -0
- package/src/lib/SidebarChat/messageSFX.mp3 +0 -0
- package/src/lib/SidebarChat/types.ts +14 -0
- package/src/lib/index.js +11 -0
- package/src/pages/404.jsx +0 -2
- package/src/routes/components/router-link.jsx +0 -2
- package/src/routes/hooks/use-active-link.js +0 -2
- package/src/routes/hooks/use-pathname.js +0 -2
- package/src/routes/hooks/use-router.js +0 -2
- package/src/theme/css.js +0 -12
- package/src/theme/custom-shadows.js +0 -2
- package/src/theme/options/contrast.js +0 -2
- package/src/theme/options/presets.js +0 -4
- package/src/theme/options/right-to-left.jsx +0 -2
- package/src/theme/overrides/components/accordion.js +0 -2
- package/src/theme/overrides/components/alert.js +0 -4
- package/src/theme/overrides/components/appbar.js +0 -2
- package/src/theme/overrides/components/autocomplete.js +0 -2
- package/src/theme/overrides/components/avatar.js +0 -4
- package/src/theme/overrides/components/backdrop.js +0 -2
- package/src/theme/overrides/components/badge.js +0 -2
- package/src/theme/overrides/components/breadcrumbs.js +0 -2
- package/src/theme/overrides/components/button-group.js +0 -4
- package/src/theme/overrides/components/button.js +0 -4
- package/src/theme/overrides/components/card.js +0 -2
- package/src/theme/overrides/components/checkbox.js +0 -2
- package/src/theme/overrides/components/chip.js +0 -4
- package/src/theme/overrides/components/css-baseline.js +0 -2
- package/src/theme/overrides/components/data-grid.js +0 -2
- package/src/theme/overrides/components/date-picker.jsx +0 -2
- package/src/theme/overrides/components/dialog.js +0 -2
- package/src/theme/overrides/components/drawer.js +0 -2
- package/src/theme/overrides/components/fab.js +0 -4
- package/src/theme/overrides/components/form.js +0 -2
- package/src/theme/overrides/components/list.js +0 -2
- package/src/theme/overrides/components/loading-button.js +0 -2
- package/src/theme/overrides/components/menu.js +0 -2
- package/src/theme/overrides/components/pagination.js +0 -4
- package/src/theme/overrides/components/paper.js +0 -2
- package/src/theme/overrides/components/popover.js +0 -2
- package/src/theme/overrides/components/progress.js +0 -4
- package/src/theme/overrides/components/radio.js +0 -2
- package/src/theme/overrides/components/rating.js +0 -2
- package/src/theme/overrides/components/select.js +0 -2
- package/src/theme/overrides/components/skeleton.js +0 -2
- package/src/theme/overrides/components/slider.js +0 -2
- package/src/theme/overrides/components/stepper.js +0 -2
- package/src/theme/overrides/components/svg-icon.js +0 -2
- package/src/theme/overrides/components/switch.js +0 -2
- package/src/theme/overrides/components/table.js +0 -2
- package/src/theme/overrides/components/tabs.js +0 -2
- package/src/theme/overrides/components/textfield.js +0 -2
- package/src/theme/overrides/components/timeline.js +0 -2
- package/src/theme/overrides/components/toggle-button.js +0 -4
- package/src/theme/overrides/components/tooltip.js +0 -2
- package/src/theme/overrides/components/tree-view.js +0 -2
- package/src/theme/overrides/components/typography.js +0 -2
- package/src/theme/overrides/default-props.jsx +4 -7
- package/src/theme/palette.js +0 -4
- package/src/theme/shadows.js +0 -2
- package/src/theme/typography.js +0 -4
- package/src/utils/flatten-array.js +0 -2
- package/src/utils/format-number.js +0 -2
- package/src/utils/format-time.js +0 -2
- package/src/utils/storage-available.js +0 -2
- package/src/widgets/Login/Login.jsx +0 -2
- package/src/widgets/error/not-found-view.jsx +0 -2
- package/vite/vite.js +8 -1
- package/project/.eslintrc.cjs +0 -22
- package/project/config.js +0 -18
- package/project/config.menu.js +0 -39
- package/project/config.template.js +0 -31
- package/project/cypress/e2e/layouts.cy.js +0 -170
- package/project/cypress/e2e/login.cy.js +0 -35
- package/project/cypress/e2e/selectbar.cy.js +0 -80
- package/project/cypress/fixtures/CONFIG/MENU_CONFIG.js +0 -39
- package/project/cypress/fixtures/EMPEROR/EMPERORS_GET.json +0 -51
- package/project/cypress/fixtures/EMPEROR/EMPERORS_POST.json +0 -9
- package/project/cypress/fixtures/OAUTH/GITHUB/user.json +0 -46
- package/project/cypress/fixtures/example.json +0 -5
- package/project/cypress/support/commands.js +0 -104
- package/project/cypress/support/e2e.js +0 -1
- package/project/cypress.config.js +0 -10
- package/project/index.html +0 -12
- package/project/media/ProjectIcons/3d.png +0 -0
- package/project/media/ProjectIcons/box.png +0 -0
- package/project/media/ProjectIcons/cafe.png +0 -0
- package/project/media/ProjectIcons/cargo.png +0 -0
- package/project/media/ProjectIcons/cloud.png +0 -0
- package/project/media/ProjectIcons/code.png +0 -0
- package/project/media/ProjectIcons/company.png +0 -0
- package/project/media/ProjectIcons/conversation.png +0 -0
- package/project/media/ProjectIcons/distributed.png +0 -0
- package/project/media/ProjectIcons/fingerprint.png +0 -0
- package/project/media/ProjectIcons/forest.png +0 -0
- package/project/media/ProjectIcons/headphones.png +0 -0
- package/project/media/ProjectIcons/office.png +0 -0
- package/project/media/ProjectIcons/path.png +0 -0
- package/project/media/ProjectIcons/printer.png +0 -0
- package/project/media/ProjectIcons/project.png +0 -0
- package/project/media/ProjectIcons/resume.png +0 -0
- package/project/media/ProjectIcons/rocket.png +0 -0
- package/project/media/ProjectIcons/rtruck.png +0 -0
- package/project/media/ProjectIcons/sign.png +0 -0
- package/project/media/ProjectIcons/site.png +0 -0
- package/project/media/ProjectIcons/truck.png +0 -0
- package/project/media/logo.png +0 -0
- package/project/package-lock.json +0 -22434
- package/project/package.json +0 -42
- package/project/public/assets/background/overlay_2.jpg +0 -0
- package/project/public/assets/illustrations/illustration_dashboard.png +0 -0
- package/project/public/media/largeLogo.png +0 -0
- package/project/public/media/logo.png +0 -0
- package/project/public/vite.svg +0 -1
- package/project/routes.jsx +0 -47
- package/project/server/mock.json +0 -110
- package/project/server/oauthMock.js +0 -27
- package/project/server/package-lock.json +0 -1505
- package/project/server/package.json +0 -20
- package/project/server/server.js +0 -127
- package/project/src/Container.jsx +0 -7
- package/project/src/components/ActionButton.jsx +0 -18
- package/project/src/hooks/useEmperor.jsx +0 -21
- package/project/src/http/index.js +0 -39
- package/project/src/main.jsx +0 -10
- package/project/src/pages/Battles.jsx +0 -16
- package/project/src/pages/Emperor.jsx +0 -50
- package/project/src/pages/index.jsx +0 -33
- package/project/src/theme.js +0 -151
- package/project/src/widgets/ActionButton.jsx +0 -68
- package/project/src/widgets/AddNewEmperor.jsx +0 -120
- package/project/src/widgets/ProjectContainer.jsx +0 -27
- package/project/vite.config.js +0 -6
- package/project/vite.config.js.timestamp-1709564450418-45fdd27900806.mjs +0 -341
- 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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
@@ -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,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") {
|
|
@@ -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 =
|
|
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%",
|
package/src/hooks/use-boolean.js
CHANGED
|
@@ -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
|
|
|
@@ -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:
|
|
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 />
|
|
@@ -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
|