NextJS_DOC/pages/Components/TabulatorData.js

234 lines
12 KiB
JavaScript
Raw Normal View History

2023-03-24 10:11:04 +00:00
import subDays from 'date-fns/subDays';
import startOfWeek from 'date-fns/startOfWeek';
import endOfWeek from 'date-fns/endOfWeek';
import addDays from 'date-fns/addDays';
import startOfMonth from 'date-fns/startOfMonth';
import endOfMonth from 'date-fns/endOfMonth';
import addMonths from 'date-fns/addMonths';
export const tableData = [
{id:1, name:"Billy Bob", age:"12", gender:"male", height:1, col:"red", dob:"", cheese:1},
{id:2, name:"Mary May", age:"1", gender:"female", height:2, col:"blue", dob:"14/05/1982", cheese:true},
{id:3, name:"Christine Lobowski", age:"42", height:0, col:"green", dob:"22/05/1982", cheese:"true"},
{id:4, name:"Brendon Philips", age:"125", gender:"male", height:1, col:"orange", dob:"01/08/1980"},
{id:5, name:"Margret Marmajuke", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:6, name:"Billy Bob", age:"12", gender:"male", height:1, col:"red", dob:"", cheese:1},
{id:7, name:"Mary May", age:"1", gender:"female", height:2, col:"blue", dob:"14/05/1982", cheese:true},
{id:8, name:"Christine Lobowski", age:"42", height:0, col:"green", dob:"22/05/1982", cheese:"true"},
{id:9, name:"Brendon Philips", age:"125", gender:"male", height:1, col:"orange", dob:"01/08/1980"},
{id:10, name:"Margret Marmajuke", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:11, name:"Margretuke", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:12, name:"Magretarmajuke", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:13, name:"MarMarmajuke", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:14, name:"Marmajuke", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:15, name:"Abcd", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:16, name:"Efgh", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:17, name:"Ijklm", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
{id:18, name:"Nopqr", age:"16", gender:"female", height:5, col:"yellow", dob:"31/01/1999"},
]
export const tableData1 = [
{id:"1", micro:"", tier:"Tier 1", name:"Amma Aoddler Alayton", ct:"", rank:"1", score:"1", numevc:"1", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"2", micro:"", tier:"Tier 1", name:"Bmma Boddler Blayton ", ct:"", rank:"2", score:"2", numevc:"2", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"3", micro:"", tier:"Tier 1", name:"Cmma Coddler Clayton", ct:"", rank:"3", score:"3", numevc:"3", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"4", micro:"", tier:"Tier 1", name:"Dmma Doddler Dlayton", ct:"", rank:"4", score:"4", numevc:"4", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"5", micro:"", tier:"Tier 1", name:"Emma Eoddler Elayton", ct:"", rank:"5", score:"5", numevc:"5", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"6", micro:"", tier:"Tier 1", name:"Fmma Foddler Flayton", ct:"", rank:"6", score:"6", numevc:"6", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"7", micro:"", tier:"Tier 1", name:"Gmma Goddler Glayton", ct:"", rank:"7", score:"7", numevc:"7", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"8", micro:"", tier:"Tier 1", name:"Hmma Hoddler Hlayton", ct:"", rank:"8", score:"8", numevc:"8", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"9", micro:"", tier:"Tier 1", name:"Imma Ioddler Ilayton", ct:"", rank:"9", score:"9", numevc:"9", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"10", micro:"", tier:"Tier 1", name:"Jmma Joddler Jlayton", ct:"", rank:"10", score:"10", numevc:"10", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"11", micro:"", tier:"Tier 1", name:"Kmma Koddler Klayton", ct:"", rank:"11", score:"11", numevc:"11", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"12", micro:"", tier:"Tier 1", name:"Mmma Moddler Mlayton", ct:"", rank:"12", score:"12", numevc:"12", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"13", micro:"", tier:"Tier 1", name:"Nmma Noddler Nlayton", ct:"", rank:"13", score:"13", numevc:"13", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"14", micro:"", tier:"Tier 1", name:"Omma Ooddler Olayton", ct:"", rank:"14", score:"14", numevc:"14", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
{id:"15", micro:"", tier:"Tier 1", name:"Pmma Poddler Playton", ct:"", rank:"15", score:"15", numevc:"15", numspc:"7", numocc:"5", numed:"7", numia:"5", numas:"3", numeb:"2", numec:"2", numgc:"4", nump:"4", leadc:"9", numma:"7", numsa:"6", numfa:"5", numla:"8", numtc:"6", numic:"5", ref:"1", kref:"3", oref:"2", profile_type:"test", my_kols:"test"},
]
export const data = [
'Eugenia',
'Bryan',
'Linda',
'Nancy',
'Lloyd',
'Alice',
'Julia',
'Albert',
'Louisa',
'Lester',
'Lola',
'Lydia',
'Hal',
'Hannah',
'Harriet',
'Hattie',
'Hazel',
'Hilda'
].map(item => ({ label: item, value: item }));
export const predefinedRanges = [
{
label: 'Today',
value: [new Date(), new Date()],
placement: 'left'
},
{
label: 'Yesterday',
value: [addDays(new Date(), -1), addDays(new Date(), -1)],
placement: 'left'
},
{
label: 'This week',
value: [startOfWeek(new Date()), endOfWeek(new Date())],
placement: 'left'
},
{
label: 'Last 7 days',
value: [subDays(new Date(), 6), new Date()],
placement: 'left'
},
{
label: 'Last 30 days',
value: [subDays(new Date(), 29), new Date()],
placement: 'left'
},
{
label: 'This month',
value: [startOfMonth(new Date()), new Date()],
placement: 'left'
},
{
label: 'Last month',
value: [startOfMonth(addMonths(new Date(), -1)), endOfMonth(addMonths(new Date(), -1))],
placement: 'left'
},
{
label: 'This year',
value: [new Date(new Date().getFullYear(), 0, 1), new Date()],
placement: 'left'
},
{
label: 'Last year',
value: [new Date(new Date().getFullYear() - 1, 0, 1), new Date(new Date().getFullYear(), 0, 0)],
placement: 'left'
},
{
label: 'All time',
value: [new Date(new Date().getFullYear() - 1, 0, 1), new Date()],
placement: 'left'
},
{
label: 'Last week',
closeOverlay: false,
value: value => {
const [start = new Date()] = value || [];
return [
addDays(startOfWeek(start, { weekStartsOn: 0 }), -7),
addDays(endOfWeek(start, { weekStartsOn: 0 }), -7)
];
},
appearance: 'default'
},
{
label: 'Next week',
closeOverlay: false,
value: value => {
const [start = new Date()] = value || [];
return [
addDays(startOfWeek(start, { weekStartsOn: 0 }), 7),
addDays(endOfWeek(start, { weekStartsOn: 0 }), 7)
];
},
appearance: 'default'
}
];
export const getSearchResults = () => [
{
image: '',
link: 'webtips.dev/how-to-improve-data-fetching-in-react-with-suspense',
title: 'React msncjbdv'
},
{
image: '',
link: 'webtips.dev/how-to-improve-data-fetching-in-react-with-suspense',
title: 'Node smcnjknjsncj'
},
{
image: '',
link: 'webtips.dev/how-to-improve-data-fetching-in-react-with-suspense',
title: 'Next msnjcknsjkcjk'
},
{
image: 'url/to/img.jpg',
link: 'webtips.dev/how-to-improve-data-fetching-in-react-with-suspense',
title: 'Javascript s nc nscn '
},
{
image: 'url/to/img.jpg',
link: 'webtips.dev/how-to-improve-data-fetching-in-react-with-suspense',
title: 'NextJs ncndjnjnsdnscn '
},
];
export const getPieChartData = () =>[
{
value: 1,
title: 'ReactJs Library'
},
{
value: 2,
title: 'NodeJS package manager'
},
{
value: 3,
title: 'Next Framework'
},
{
value: 4,
title: 'Javascript library'
},
{
value: 5,
title: 'PHP Core'
},
{
value: 6,
title: 'Laravel Framework'
},
]
export const getBarchartData = () =>[
{
name : "Forest",
data : [320, 332, 301, 334, 390]
},
{
name : "Steppe",
data : [220, 182, 191, 234, 290]
},
{
name : 'Desert',
data : [150, 232, 240, 154, 190]
},
{
name : 'Wetland',
data : [98, 77, 101, 99, 40]
}
]
export const wordcloudData = () => [
{"x": "Mandarin chinese", "value": 1090000000, category: "Sino-Tibetan"},
{"x": "English", "value": 983000000, category: "Indo-European"},
{"x": "Hindustani", "value": 544000000, category: "Indo-European"},
{"x": "Spanish", "value": 527000000, category: "Indo-European"},
{"x": "Arabic", "value": 422000000, category: "Afro-Asiatic"},
{"x": "Malay", "value": 281000000, category: "Austronesian"},
{"x": "Russian", "value": 267000000, category: "Indo-European"},
{"x": "Bengali", "value": 261000000, category: "Indo-European"},
{"x": "Portuguese", "value": 229000000, category: "Indo-European"},
{"x": "French", "value": 229000000, category: "Indo-European"},
{"x": "Hausa", "value": 150000000, category: "Afro-Asiatic"},
{"x": "Punjabi", "value": 148000000, category: "Indo-European"},
{"x": "Japanese", "value": 129000000, category: "Japonic"},
{"x": "German", "value": 129000000, category: "Indo-European"},
{"x": "Persian", "value": 121000000, category: "Indo-European"}
];