'use client'; import Dropdown from '@/components/dropdown'; import IconArrowLeft from '@/components/icon/icon-arrow-left'; import IconBolt from '@/components/icon/icon-bolt'; import IconCaretDown from '@/components/icon/icon-caret-down'; import IconCaretsDown from '@/components/icon/icon-carets-down'; import IconCashBanknotes from '@/components/icon/icon-cash-banknotes'; import IconChatDots from '@/components/icon/icon-chat-dots'; import IconChecks from '@/components/icon/icon-checks'; import IconChrome from '@/components/icon/icon-chrome'; import IconClock from '@/components/icon/icon-clock'; import IconCreditCard from '@/components/icon/icon-credit-card'; import IconDollarSign from '@/components/icon/icon-dollar-sign'; import IconFile from '@/components/icon/icon-file'; import IconGlobe from '@/components/icon/icon-globe'; import IconHorizontalDots from '@/components/icon/icon-horizontal-dots'; import IconInbox from '@/components/icon/icon-inbox'; import IconLink from '@/components/icon/icon-link'; import IconMail from '@/components/icon/icon-mail'; import IconMultipleForwardRight from '@/components/icon/icon-multiple-forward-right'; import IconNetflix from '@/components/icon/icon-netflix'; import IconPlus from '@/components/icon/icon-plus'; import IconSafari from '@/components/icon/icon-safari'; import IconServer from '@/components/icon/icon-server'; import IconShoppingCart from '@/components/icon/icon-shopping-cart'; import IconSquareCheck from '@/components/icon/icon-square-check'; import IconTag from '@/components/icon/icon-tag'; import IconThumbUp from '@/components/icon/icon-thumb-up'; import IconTrendingUp from '@/components/icon/icon-trending-up'; import IconUser from '@/components/icon/icon-user'; import IconUsersGroup from '@/components/icon/icon-users-group'; import { IRootState } from '@/store'; import Link from 'next/link'; import React, { useEffect, useState } from 'react'; import ReactApexChart from 'react-apexcharts'; import { useSelector } from 'react-redux'; import PerfectScrollbar from 'react-perfect-scrollbar'; const ComponentsWidgets = () => { const isDark = useSelector((state: IRootState) => state.themeConfig.theme === 'dark' || state.themeConfig.isDarkMode); const isRtl = useSelector((state: IRootState) => state.themeConfig.rtlClass) === 'rtl' ? true : false; const [isMounted, setIsMounted] = useState(false); useEffect(() => { setIsMounted(true); }); //Revenue Chart const revenueChart: any = { series: [ { name: 'Income', data: [16800, 16800, 15500, 17800, 15500, 17000, 19000, 16000, 15000, 17000, 14000, 17000], }, { name: 'Expenses', data: [16500, 17500, 16200, 17300, 16000, 19500, 16000, 17000, 16000, 19000, 18000, 19000], }, ], options: { chart: { height: 325, type: 'area', fontFamily: 'Nunito, sans-serif', zoom: { enabled: false, }, toolbar: { show: false, }, }, dataLabels: { enabled: false, }, stroke: { show: true, curve: 'smooth', width: 2, lineCap: 'square', }, dropShadow: { enabled: true, opacity: 0.2, blur: 10, left: -7, top: 22, }, colors: isDark ? ['#2196F3', '#E7515A'] : ['#1B55E2', '#E7515A'], markers: { discrete: [ { seriesIndex: 0, dataPointIndex: 6, fillColor: '#1B55E2', strokeColor: 'transparent', size: 7, }, { seriesIndex: 1, dataPointIndex: 5, fillColor: '#E7515A', strokeColor: 'transparent', size: 7, }, ], }, labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], xaxis: { axisBorder: { show: false, }, axisTicks: { show: false, }, crosshairs: { show: true, }, labels: { offsetX: isRtl ? 2 : 0, offsetY: 5, style: { fontSize: '12px', cssClass: 'apexcharts-xaxis-title', }, }, }, yaxis: { tickAmount: 7, labels: { formatter: (value: number) => { return value / 1000 + 'K'; }, offsetX: isRtl ? -30 : -10, offsetY: 0, style: { fontSize: '12px', cssClass: 'apexcharts-yaxis-title', }, }, opposite: isRtl ? true : false, }, grid: { borderColor: isDark ? '#191E3A' : '#E0E6ED', strokeDashArray: 5, xaxis: { lines: { show: false, }, }, yaxis: { lines: { show: true, }, }, padding: { top: 0, right: 0, bottom: 0, left: 0, }, }, legend: { position: 'top', horizontalAlign: 'right', fontSize: '16px', markers: { width: 10, height: 10, offsetX: -2, }, itemMargin: { horizontal: 10, vertical: 5, }, }, tooltip: { marker: { show: true, }, x: { show: false, }, }, fill: { type: 'gradient', gradient: { shadeIntensity: 1, inverseColors: !1, opacityFrom: isDark ? 0.19 : 0.28, opacityTo: 0.05, stops: isDark ? [100, 100] : [45, 100], }, }, }, }; //Sales By Category const salesByCategory: any = { series: [985, 737, 270], options: { chart: { type: 'donut', height: 460, fontFamily: 'Nunito, sans-serif', }, dataLabels: { enabled: false, }, stroke: { show: true, width: 25, colors: isDark ? '#0e1726' : '#fff', }, colors: isDark ? ['#5c1ac3', '#e2a03f', '#e7515a', '#e2a03f'] : ['#e2a03f', '#5c1ac3', '#e7515a'], legend: { position: 'bottom', horizontalAlign: 'center', fontSize: '14px', markers: { width: 10, height: 10, offsetX: -2, }, height: 50, offsetY: 20, }, plotOptions: { pie: { donut: { size: '65%', background: 'transparent', labels: { show: true, name: { show: true, fontSize: '29px', offsetY: -10, }, value: { show: true, fontSize: '26px', color: isDark ? '#bfc9d4' : undefined, offsetY: 16, formatter: (val: any) => { return val; }, }, total: { show: true, label: 'Total', color: '#888ea8', fontSize: '29px', formatter: (w: any) => { return w.globals.seriesTotals.reduce(function (a: any, b: any) { return a + b; }, 0); }, }, }, }, }, }, labels: ['Apparel', 'Sports', 'Others'], states: { hover: { filter: { type: 'none', value: 0.15, }, }, active: { filter: { type: 'none', value: 0.15, }, }, }, }, }; //Daily Sales const dailySales: any = { series: [ { name: 'Sales', data: [44, 55, 41, 67, 22, 43, 21], }, { name: 'Last Week', data: [13, 23, 20, 8, 13, 27, 33], }, ], options: { chart: { height: 160, type: 'bar', fontFamily: 'Nunito, sans-serif', toolbar: { show: false, }, stacked: true, stackType: '100%', }, dataLabels: { enabled: false, }, stroke: { show: true, width: 1, }, colors: ['#e2a03f', '#e0e6ed'], responsive: [ { breakpoint: 480, options: { legend: { position: 'bottom', offsetX: -10, offsetY: 0, }, }, }, ], xaxis: { labels: { show: false, }, categories: ['Sun', 'Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat'], }, yaxis: { show: false, }, fill: { opacity: 1, }, plotOptions: { bar: { horizontal: false, columnWidth: '25%', }, }, legend: { show: false, }, grid: { show: false, xaxis: { lines: { show: false, }, }, padding: { top: 10, right: -20, bottom: -20, left: -20, }, }, }, }; //Total Orders const totalOrders: any = { series: [ { name: 'Sales', data: [28, 40, 36, 52, 38, 60, 38, 52, 36, 40], }, ], options: { chart: { height: 290, type: 'area', fontFamily: 'Nunito, sans-serif', sparkline: { enabled: true, }, }, stroke: { curve: 'smooth', width: 2, }, colors: isDark ? ['#00ab55'] : ['#00ab55'], labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'], yaxis: { min: 0, show: false, }, grid: { padding: { top: 125, right: 0, bottom: 0, left: 0, }, }, fill: { opacity: 1, type: 'gradient', gradient: { type: 'vertical', shadeIntensity: 1, inverseColors: !1, opacityFrom: 0.3, opacityTo: 0.05, stops: [100, 100], }, }, tooltip: { x: { show: false, }, }, }, }; // totalVisitOptions const totalVisit: any = { series: [{ data: [21, 9, 36, 12, 44, 25, 59, 41, 66, 25] }], options: { chart: { height: 58, type: 'line', fontFamily: 'Nunito, sans-serif', sparkline: { enabled: true, }, dropShadow: { enabled: true, blur: 3, color: '#009688', opacity: 0.4, }, }, stroke: { curve: 'smooth', width: 2, }, colors: ['#009688'], grid: { padding: { top: 5, bottom: 5, left: 5, right: 5, }, }, tooltip: { x: { show: false, }, y: { title: { formatter: () => { return ''; }, }, }, }, }, }; // paidVisitOptions const paidVisit: any = { series: [{ data: [22, 19, 30, 47, 32, 44, 34, 55, 41, 69] }], options: { chart: { height: 58, type: 'line', fontFamily: 'Nunito, sans-serif', sparkline: { enabled: true, }, dropShadow: { enabled: true, blur: 3, color: '#e2a03f', opacity: 0.4, }, }, stroke: { curve: 'smooth', width: 2, }, colors: ['#e2a03f'], grid: { padding: { top: 5, bottom: 5, left: 5, right: 5, }, }, tooltip: { x: { show: false, }, y: { title: { formatter: () => { return ''; }, }, }, }, }, }; // uniqueVisitorSeriesOptions const uniqueVisitorSeries: any = { series: [ { name: 'Direct', data: [58, 44, 55, 57, 56, 61, 58, 63, 60, 66, 56, 63], }, { name: 'Organic', data: [91, 76, 85, 101, 98, 87, 105, 91, 114, 94, 66, 70], }, ], options: { chart: { height: 360, type: 'bar', fontFamily: 'Nunito, sans-serif', toolbar: { show: false, }, }, dataLabels: { enabled: false, }, stroke: { width: 2, colors: ['transparent'], }, colors: ['#5c1ac3', '#ffbb44'], dropShadow: { enabled: true, blur: 3, color: '#515365', opacity: 0.4, }, plotOptions: { bar: { horizontal: false, columnWidth: '55%', borderRadius: 8, borderRadiusApplication: 'end', }, }, legend: { position: 'bottom', horizontalAlign: 'center', fontSize: '14px', itemMargin: { horizontal: 8, vertical: 8, }, }, grid: { borderColor: isDark ? '#191e3a' : '#e0e6ed', padding: { left: 20, right: 20, }, }, xaxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], axisBorder: { show: true, color: isDark ? '#3b3f5c' : '#e0e6ed', }, }, yaxis: { tickAmount: 6, opposite: isRtl ? true : false, labels: { offsetX: isRtl ? -10 : 0, }, }, fill: { type: 'gradient', gradient: { shade: isDark ? 'dark' : 'light', type: 'vertical', shadeIntensity: 0.3, inverseColors: false, opacityFrom: 1, opacityTo: 0.8, stops: [0, 100], }, }, tooltip: { marker: { show: true, }, }, }, }; // followersOptions const followers: any = { series: [ { data: [38, 60, 38, 52, 36, 40, 28], }, ], options: { chart: { height: 160, type: 'area', fontFamily: 'Nunito, sans-serif', sparkline: { enabled: true, }, }, stroke: { curve: 'smooth', width: 2, }, colors: ['#4361ee'], grid: { padding: { top: 5, }, }, yaxis: { show: false, }, tooltip: { x: { show: false, }, y: { title: { formatter: () => { return ''; }, }, }, }, }, }; // referralOptions const referral: any = { series: [ { data: [60, 28, 52, 38, 40, 36, 38], }, ], options: { chart: { height: 160, type: 'area', fontFamily: 'Nunito, sans-serif', sparkline: { enabled: true, }, }, stroke: { curve: 'smooth', width: 2, }, colors: ['#e7515a'], grid: { padding: { top: 5, }, }, yaxis: { show: false, }, tooltip: { x: { show: false, }, y: { title: { formatter: () => { return ''; }, }, }, }, }, }; // engagementOptions const engagement: any = { series: [ { name: 'Sales', data: [28, 50, 36, 60, 38, 52, 38], }, ], options: { chart: { height: 160, type: 'area', fontFamily: 'Nunito, sans-serif', sparkline: { enabled: true, }, }, stroke: { curve: 'smooth', width: 2, }, colors: ['#1abc9c'], grid: { padding: { top: 5, }, }, yaxis: { show: false, }, tooltip: { x: { show: false, }, y: { title: { formatter: () => { return ''; }, }, }, }, }, }; return (
Revenue
} >

Total Profit $10,840

{isMounted ? ( ) : (
)}
Sales By Category
{isMounted ? ( ) : (
)}
Daily Sales Go to columns for details.
{isMounted ? ( ) : (
)}
Summary
} >
Income

$92,600

Profit

$37,515

Expenses

$55,085

3,192 Total Orders
{/* loader */} {isMounted ? ( ) : (
)}
Recent Activities
Updated Server Logs
Just Now
Pending
Send Mail to HR and Admin
2 min ago
Completed
Backup Files EOD
14:00
Pending
Collect documents from Sara
16:00
Completed
Conference call with Marketing Manager.
17:00
In progress
Rebooted Server
17:00
Completed
Send contract details to Freelancer
18:00
Pending
Updated Server Logs
Just Now
Pending
Send Mail to HR and Admin
2 min ago
Completed
Backup Files EOD
14:00
Pending
Collect documents from Sara
16:00
Completed
Conference call with Marketing Manager.
17:00
In progress
Rebooted Server
17:00
Completed
Send contract details to Freelancer
18:00
Pending
Transactions
}>
SP
Shaun Park
10 Jan 1:00PM
+$36.11
Cash withdrawal
04 Jan 1:00PM
-$16.44
Amy Diaz
10 Jan 1:00PM
+$66.44
Netflix
04 Jan 1:00PM
-$32.00
DA
Daisy Anderson
10 Jan 1:00PM
+$10.08
Electricity Bill
04 Jan 1:00PM
-$22.00
avatar Alan Green

Wallet Balance

$2953
Received
$97.99
Spent
$53.00
Pending

Netflix

$ 13.85

BlueHost VPN

$ 15.66

Recent Orders
Customer Product Invoice Price Status
avatar Luke Ivory
Headphone #46894 $56.07 Paid
avatar Andy King
Nike Sport #76894 $126.04 Shipped
avatar Laurie Fox
Sunglasses #66894 $56.07 Paid
avatar Ryan Collins
Sport $110.00 Shipped
avatar Irene Collins
Speakers #46894 $56.07 Paid
Top Selling Product
Product Price Discount Sold Source
avatar

Headphone Digital

$168.09 $60.09 170
avatar

Shoes Faishon

$126.04 $47.09 130
avatar

Watch Accessories

$56.07 $20.00 66
avatar

Laptop Digital

$110.00 $33.00 35
avatar

Camera Digital

$56.07 $26.04 30
{/* statistics */}
Statistics
} >
Total Visits
423,964
{isMounted && }
Paid Visits
7,929
{isMounted && }
Expenses
} >
$ 45,141 this week
57%
Total Balance
$ 41,741.42 + 2453
Unique Visitors
} >
{isMounted && }
Activity Log
} >
New project created :{' '}

27 Feb, 2020

Mail sent to{' '} {' '} and{' '}

28 Feb, 2020

Server Logs Updated

27 Feb, 2020

Task Completed :

01 Mar, 2020

Documents Submitted from

10 Mar, 2020

Server rebooted successfully

06 Apr, 2020

Visitors by Browser
Chrome

65%

Safari

40%

Others

25%

31.6K

Followers
{isMounted && }

1,900

Referral
{isMounted && }

18.2%

Engagement
{isMounted && }
profile1
Jimmy Turner

Monday, Nov 18

{`"Duis aute irure dolor" in reprehenderit in voluptate velit esse cillum "dolore eu fugiat" nulla pariatur. Excepteur sint occaecat cupidatat non proident.`}
551 Likes
profile2
Dev Summit - New York

Bronx, NY

4 Members Going
profile1 profile2 profile3 profile4
} >
Doloribus nisi vel suscipit modi, optio ex repudiandae voluptatibus officiis commodi. Nesciunt quas aut neque incidunt!
5 Tasks

65%

3 Days Left
+6 profile6 profile7 profile8
); }; export default ComponentsWidgets;