From bd0e4f551dc1e058749d492ee013411463385b37 Mon Sep 17 00:00:00 2001
From: himan7991
Date: Fri, 12 Jan 2024 14:44:52 +0200
Subject: [PATCH] feat(supported countries): now get fetched from API
---
src/App.tsx | 9 +
src/components/Header.tsx | 2 +-
src/components/modals/ModalCountry.tsx | 16 +-
src/constants/SupportedCountries.ts | 442 -------------------------
src/context/AppContext.tsx | 4 +-
src/pages/Page2.tsx | 3 +-
src/pages/Page3.tsx | 3 +-
src/types/SupportedCountries.ts | 4 +
yarn.lock | 166 +++++-----
9 files changed, 110 insertions(+), 539 deletions(-)
delete mode 100644 src/constants/SupportedCountries.ts
create mode 100644 src/types/SupportedCountries.ts
diff --git a/src/App.tsx b/src/App.tsx
index e97693f..14934b5 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -4,10 +4,12 @@ import Content from './components/Content'
import { useEffect, useState } from 'react'
import AppContext from './context/AppContext'
import { getDaysInYear, getPublicHolidays, getWeekends } from './functions/functions'
+import { Country } from './types/SupportedCountries'
export default function App() {
// context
const [year, setYear] = useState(new Date().getFullYear())
+ const [supportedCountries, setSupportedCountries] = useState([{ countryCode: 'US', name: 'United States' }])
const [countryCode, setCountryCode] = useState('US')
const [daysInYear, setDaysInYear] = useState(365)
const [weekends, setWeekends] = useState([])
@@ -23,6 +25,8 @@ export default function App() {
setDaysInYear,
weekends,
setWeekends,
+ supportedCountries,
+ setSupportedCountries,
publicHolidays,
setPublicHolidays
}
@@ -30,6 +34,11 @@ export default function App() {
useEffect(() => {
let countryCode = localStorage.getItem('countryCode')
+ fetch('https://date.nager.at/api/v3/AvailableCountries')
+ .then((res) => res.json())
+ .then((data) => setSupportedCountries(data))
+ .catch((error) => console.error(error))
+
if (countryCode) {
setCountryCode(countryCode)
fetch(`https://date.nager.at/api/v3/PublicHolidays/${year}/${countryCode}`)
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index ad9c6ea..0f4dcc0 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -57,7 +57,7 @@ export default function Header() {
return (
<>
- HS.
+ HS.
{isMobileNavOpen ? (
void }) {
- const { countryCode, setCountryCode } = useContext(AppContext)
+ const { supportedCountries, countryCode, setCountryCode } = useContext(AppContext)
return (
@@ -16,7 +14,7 @@ export default function CountryModal({ isOpen, setIsOpen }: { isOpen: boolean; s
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
onClick={() => setIsOpen(false)}
- className="fixed inset-0 z-50 grid cursor-pointer overflow-y-scroll bg-background/30 p-8 backdrop-blur lg:place-items-center"
+ className="fixed inset-0 z-50 grid cursor-pointer overflow-y-scroll bg-background/30 backdrop-blur lg:place-items-center"
>
Vacation Time Optimizer supports over 100 countries! Choose yours below.
-
diff --git a/src/constants/SupportedCountries.ts b/src/constants/SupportedCountries.ts
deleted file mode 100644
index e854540..0000000
--- a/src/constants/SupportedCountries.ts
+++ /dev/null
@@ -1,442 +0,0 @@
-export const supportedCountries = [
- {
- countryCode: 'AD',
- name: 'Andorra'
- },
- {
- countryCode: 'AL',
- name: 'Albania'
- },
- {
- countryCode: 'AR',
- name: 'Argentina'
- },
- {
- countryCode: 'AT',
- name: 'Austria'
- },
- {
- countryCode: 'AU',
- name: 'Australia'
- },
- {
- countryCode: 'AX',
- name: 'ร
land Islands'
- },
- {
- countryCode: 'BA',
- name: 'Bosnia and Herzegovina'
- },
- {
- countryCode: 'BB',
- name: 'Barbados'
- },
- {
- countryCode: 'BE',
- name: 'Belgium'
- },
- {
- countryCode: 'BG',
- name: 'Bulgaria'
- },
- {
- countryCode: 'BJ',
- name: 'Benin'
- },
- {
- countryCode: 'BO',
- name: 'Bolivia'
- },
- {
- countryCode: 'BR',
- name: 'Brazil'
- },
- {
- countryCode: 'BS',
- name: 'Bahamas'
- },
- {
- countryCode: 'BW',
- name: 'Botswana'
- },
- {
- countryCode: 'BY',
- name: 'Belarus'
- },
- {
- countryCode: 'BZ',
- name: 'Belize'
- },
- {
- countryCode: 'CA',
- name: 'Canada'
- },
- {
- countryCode: 'CH',
- name: 'Switzerland'
- },
- {
- countryCode: 'CL',
- name: 'Chile'
- },
- {
- countryCode: 'CN',
- name: 'China'
- },
- {
- countryCode: 'CO',
- name: 'Colombia'
- },
- {
- countryCode: 'CR',
- name: 'Costa Rica'
- },
- {
- countryCode: 'CU',
- name: 'Cuba'
- },
- {
- countryCode: 'CY',
- name: 'Cyprus'
- },
- {
- countryCode: 'CZ',
- name: 'Czechia'
- },
- {
- countryCode: 'DE',
- name: 'Germany'
- },
- {
- countryCode: 'DK',
- name: 'Denmark'
- },
- {
- countryCode: 'DO',
- name: 'Dominican Republic'
- },
- {
- countryCode: 'EC',
- name: 'Ecuador'
- },
- {
- countryCode: 'EE',
- name: 'Estonia'
- },
- {
- countryCode: 'EG',
- name: 'Egypt'
- },
- {
- countryCode: 'ES',
- name: 'Spain'
- },
- {
- countryCode: 'FI',
- name: 'Finland'
- },
- {
- countryCode: 'FO',
- name: 'Faroe Islands'
- },
- {
- countryCode: 'FR',
- name: 'France'
- },
- {
- countryCode: 'GA',
- name: 'Gabon'
- },
- {
- countryCode: 'GB',
- name: 'United Kingdom'
- },
- {
- countryCode: 'GD',
- name: 'Grenada'
- },
- {
- countryCode: 'GG',
- name: 'Guernsey'
- },
- {
- countryCode: 'GI',
- name: 'Gibraltar'
- },
- {
- countryCode: 'GL',
- name: 'Greenland'
- },
- {
- countryCode: 'GM',
- name: 'Gambia'
- },
- {
- countryCode: 'GR',
- name: 'Greece'
- },
- {
- countryCode: 'GT',
- name: 'Guatemala'
- },
- {
- countryCode: 'GY',
- name: 'Guyana'
- },
- {
- countryCode: 'HN',
- name: 'Honduras'
- },
- {
- countryCode: 'HR',
- name: 'Croatia'
- },
- {
- countryCode: 'HT',
- name: 'Haiti'
- },
- {
- countryCode: 'HU',
- name: 'Hungary'
- },
- {
- countryCode: 'ID',
- name: 'Indonesia'
- },
- {
- countryCode: 'IE',
- name: 'Ireland'
- },
- {
- countryCode: 'IM',
- name: 'Isle of Man'
- },
- {
- countryCode: 'IS',
- name: 'Iceland'
- },
- {
- countryCode: 'IT',
- name: 'Italy'
- },
- {
- countryCode: 'JE',
- name: 'Jersey'
- },
- {
- countryCode: 'JM',
- name: 'Jamaica'
- },
- {
- countryCode: 'JP',
- name: 'Japan'
- },
- {
- countryCode: 'KR',
- name: 'South Korea'
- },
- {
- countryCode: 'LI',
- name: 'Liechtenstein'
- },
- {
- countryCode: 'LS',
- name: 'Lesotho'
- },
- {
- countryCode: 'LT',
- name: 'Lithuania'
- },
- {
- countryCode: 'LU',
- name: 'Luxembourg'
- },
- {
- countryCode: 'LV',
- name: 'Latvia'
- },
- {
- countryCode: 'MA',
- name: 'Morocco'
- },
- {
- countryCode: 'MC',
- name: 'Monaco'
- },
- {
- countryCode: 'MD',
- name: 'Moldova'
- },
- {
- countryCode: 'ME',
- name: 'Montenegro'
- },
- {
- countryCode: 'MG',
- name: 'Madagascar'
- },
- {
- countryCode: 'MK',
- name: 'North Macedonia'
- },
- {
- countryCode: 'MN',
- name: 'Mongolia'
- },
- {
- countryCode: 'MS',
- name: 'Montserrat'
- },
- {
- countryCode: 'MT',
- name: 'Malta'
- },
- {
- countryCode: 'MX',
- name: 'Mexico'
- },
- {
- countryCode: 'MZ',
- name: 'Mozambique'
- },
- {
- countryCode: 'NA',
- name: 'Namibia'
- },
- {
- countryCode: 'NE',
- name: 'Niger'
- },
- {
- countryCode: 'NG',
- name: 'Nigeria'
- },
- {
- countryCode: 'NI',
- name: 'Nicaragua'
- },
- {
- countryCode: 'NL',
- name: 'Netherlands'
- },
- {
- countryCode: 'NO',
- name: 'Norway'
- },
- {
- countryCode: 'NZ',
- name: 'New Zealand'
- },
- {
- countryCode: 'PA',
- name: 'Panama'
- },
- {
- countryCode: 'PE',
- name: 'Peru'
- },
- {
- countryCode: 'PG',
- name: 'Papua New Guinea'
- },
- {
- countryCode: 'PL',
- name: 'Poland'
- },
- {
- countryCode: 'PR',
- name: 'Puerto Rico'
- },
- {
- countryCode: 'PT',
- name: 'Portugal'
- },
- {
- countryCode: 'PY',
- name: 'Paraguay'
- },
- {
- countryCode: 'RO',
- name: 'Romania'
- },
- {
- countryCode: 'RS',
- name: 'Serbia'
- },
- {
- countryCode: 'RU',
- name: 'Russia'
- },
- {
- countryCode: 'SE',
- name: 'Sweden'
- },
- {
- countryCode: 'SG',
- name: 'Singapore'
- },
- {
- countryCode: 'SI',
- name: 'Slovenia'
- },
- {
- countryCode: 'SJ',
- name: 'Svalbard and Jan Mayen'
- },
- {
- countryCode: 'SK',
- name: 'Slovakia'
- },
- {
- countryCode: 'SM',
- name: 'San Marino'
- },
- {
- countryCode: 'SR',
- name: 'Suriname'
- },
- {
- countryCode: 'SV',
- name: 'El Salvador'
- },
- {
- countryCode: 'TN',
- name: 'Tunisia'
- },
- {
- countryCode: 'TR',
- name: 'Turkey'
- },
- {
- countryCode: 'UA',
- name: 'Ukraine'
- },
- {
- countryCode: 'US',
- name: 'United States'
- },
- {
- countryCode: 'UY',
- name: 'Uruguay'
- },
- {
- countryCode: 'VA',
- name: 'Vatican City'
- },
- {
- countryCode: 'VE',
- name: 'Venezuela'
- },
- {
- countryCode: 'VN',
- name: 'Vietnam'
- },
- {
- countryCode: 'ZA',
- name: 'South Africa'
- },
- {
- countryCode: 'ZW',
- name: 'Zimbabwe'
- }
-]
diff --git a/src/context/AppContext.tsx b/src/context/AppContext.tsx
index 3071c2c..a7d2a1c 100644
--- a/src/context/AppContext.tsx
+++ b/src/context/AppContext.tsx
@@ -1,5 +1,5 @@
import React from 'react'
-
+import { Country } from '../types/SupportedCountries'
// set the defaults
const AppContext = React.createContext({
year: 2024,
@@ -10,6 +10,8 @@ const AppContext = React.createContext({
setDaysInYear: (arg: number) => {},
weekends: [1, 2, 3],
setWeekends: (arg: number[]) => {},
+ supportedCountries: [{ countryCode: 'string', name: 'string' }],
+ setSupportedCountries: (arg: Country[]) => {},
publicHolidays: [1, 2, 3],
setPublicHolidays: (arg: number[]) => {}
})
diff --git a/src/pages/Page2.tsx b/src/pages/Page2.tsx
index 877fe17..62a95aa 100644
--- a/src/pages/Page2.tsx
+++ b/src/pages/Page2.tsx
@@ -1,10 +1,9 @@
import { motion } from 'framer-motion'
import { useContext, useEffect } from 'react'
import AppContext from '../context/AppContext'
-import { supportedCountries } from '../constants/SupportedCountries'
export default function Page2({ goto }: { goto: (arg: number) => void }) {
- const { countryCode, publicHolidays, year } = useContext(AppContext)
+ const { supportedCountries, countryCode, publicHolidays, year } = useContext(AppContext)
useEffect(() => {
console.log('update')
diff --git a/src/pages/Page3.tsx b/src/pages/Page3.tsx
index 108ed36..47e7209 100644
--- a/src/pages/Page3.tsx
+++ b/src/pages/Page3.tsx
@@ -3,7 +3,6 @@ import { useContext, useEffect, useState } from 'react'
import CalendarDay from '../components/CalendarDay'
import AppContext from '../context/AppContext'
import { daysIntoYear } from '../functions/functions'
-import { supportedCountries } from '../constants/SupportedCountries'
import { getBestDaysToTakeOff } from '../functions/getBestDays'
import { getBestConsecutiveDays } from '../functions/getBestConsecutiveDays'
import ModeToggle from '../components/toggles/ToggleMode'
@@ -23,7 +22,7 @@ export default function Page3() {
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
const weekdays = ['M', 'T', 'W', 'T', 'F', 'S', 'S']
- const { countryCode, daysInYear, weekends, publicHolidays, year } = useContext(AppContext)
+ const { supportedCountries, countryCode, daysInYear, weekends, publicHolidays, year } = useContext(AppContext)
const daysInYearArr: number[] = Array.from({ length: daysInYear }, (_, index) => index + 1)
const workingDays: number[] = daysInYearArr.filter(
(day) => !weekends.includes(day) && !publicHolidays.includes(day) && day > daysIntoYear(new Date())
diff --git a/src/types/SupportedCountries.ts b/src/types/SupportedCountries.ts
new file mode 100644
index 0000000..ceecab1
--- /dev/null
+++ b/src/types/SupportedCountries.ts
@@ -0,0 +1,4 @@
+export type Country = {
+ countryCode: string
+ name: string
+}
diff --git a/yarn.lock b/yarn.lock
index 7d04308..cef92fc 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -148,9 +148,9 @@
integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==
"@babel/helpers@^7.23.7":
- version "7.23.7"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.7.tgz#eb543c36f81da2873e47b76ee032343ac83bba60"
- integrity sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==
+ version "7.23.8"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.8.tgz#fc6b2d65b16847fd50adddbd4232c76378959e34"
+ integrity sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==
dependencies:
"@babel/template" "^7.22.15"
"@babel/traverse" "^7.23.7"
@@ -185,9 +185,9 @@
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/runtime@^7.1.2", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.5":
- version "7.23.7"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.7.tgz#dd7c88deeb218a0f8bd34d5db1aa242e0f203193"
- integrity sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==
+ version "7.23.8"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.8.tgz#8ee6fe1ac47add7122902f257b8ddf55c898f650"
+ integrity sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==
dependencies:
regenerator-runtime "^0.14.0"
@@ -385,12 +385,12 @@
integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==
"@humanwhocodes/config-array@^0.11.13":
- version "0.11.13"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297"
- integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==
+ version "0.11.14"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b"
+ integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==
dependencies:
- "@humanwhocodes/object-schema" "^2.0.1"
- debug "^4.1.1"
+ "@humanwhocodes/object-schema" "^2.0.2"
+ debug "^4.3.1"
minimatch "^3.0.5"
"@humanwhocodes/module-importer@^1.0.1":
@@ -398,10 +398,10 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
-"@humanwhocodes/object-schema@^2.0.1":
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044"
- integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==
+"@humanwhocodes/object-schema@^2.0.2":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917"
+ integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==
"@isaacs/cliui@^8.0.2":
version "8.0.2"
@@ -445,9 +445,9 @@
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9":
- version "0.3.20"
- resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f"
- integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==
+ version "0.3.21"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz#5dc1df7b3dc4a6209e503a924e1ca56097a2bb15"
+ integrity sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==
dependencies:
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"
@@ -569,9 +569,9 @@
integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==
"@types/node@*":
- version "20.10.6"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.6.tgz#a3ec84c22965802bf763da55b2394424f22bfbb5"
- integrity sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==
+ version "20.11.0"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.0.tgz#8e0b99e70c0c1ade1a86c4a282f7b7ef87c9552f"
+ integrity sha512-o9bjXmDNcF7GbM4CNQpmi+TutCgap/K3w1JyKgxAjqx41zp9qlIAVFi0IhCNsJcXolEqLWhbFbEeL0PvYm4pcQ==
dependencies:
undici-types "~5.26.4"
@@ -588,9 +588,9 @@
"@types/react" "*"
"@types/react@*", "@types/react@^18.0.27":
- version "18.2.46"
- resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.46.tgz#f04d6c528f8f136ea66333bc66abcae46e2680df"
- integrity sha512-nNCvVBcZlvX4NU1nRRNV/mFl1nNRuTuslAJglQsq+8ldXe5Xv0Wd2f7WTE3jOxhLH2BFfiZGC6GCp+kHQbgG+w==
+ version "18.2.47"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.47.tgz#85074b27ab563df01fbc3f68dc64bf7050b0af40"
+ integrity sha512-xquNkkOirwyCgoClNk85BjP+aqnIS+ckAJ8i37gAbDs14jfW/J23f2GItAf33oiUPQnqNMALiFeoM9Y5mbjpVQ==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
@@ -763,11 +763,11 @@ acorn-jsx@^5.3.2:
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
acorn-walk@^8.2.0:
- version "8.3.1"
- resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.1.tgz#2f10f5b69329d90ae18c58bf1fa8fccd8b959a43"
- integrity sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==
+ version "8.3.2"
+ resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa"
+ integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==
-acorn@^8.10.0, acorn@^8.8.1, acorn@^8.9.0:
+acorn@^8.10.0, acorn@^8.11.3, acorn@^8.8.1, acorn@^8.9.0:
version "8.11.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a"
integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==
@@ -1061,14 +1061,14 @@ camelcase-css@^2.0.1:
integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001565:
- version "1.0.30001572"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz#1ccf7dc92d2ee2f92ed3a54e11b7b4a3041acfa0"
- integrity sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==
+ version "1.0.30001576"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz#893be772cf8ee6056d6c1e2d07df365b9ec0a5c4"
+ integrity sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==
chai@^4.3.7:
- version "4.3.10"
- resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.10.tgz#d784cec635e3b7e2ffb66446a63b4e33bd390384"
- integrity sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.0.tgz#f9ac79f26726a867ac9d90a9b382120479d5f55b"
+ integrity sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==
dependencies:
assertion-error "^1.1.0"
check-error "^1.0.3"
@@ -1280,7 +1280,7 @@ debug@^3.2.7:
dependencies:
ms "^2.1.1"
-debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
+debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
@@ -1376,9 +1376,9 @@ eastasianwidth@^0.2.0:
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
electron-to-chromium@^1.4.601:
- version "1.4.616"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.616.tgz#4bddbc2c76e1e9dbf449ecd5da3d8119826ea4fb"
- integrity sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==
+ version "1.4.629"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.629.tgz#9cbffe1b08a5627b6a25118360f7fd3965416caf"
+ integrity sha512-5UUkr3k3CZ/k+9Sw7vaaIMyOzMC0XbPyprKI3n0tbKDqkzTDOjK4izm7DxlkueRMim6ZZQ1ja9F7hoFVplHihA==
emoji-regex@^8.0.0:
version "8.0.0"
@@ -1822,9 +1822,9 @@ fraction.js@^4.3.6:
integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==
framer-motion@^10.16.16:
- version "10.16.16"
- resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-10.16.16.tgz#a10a03e1190a717109163cfff212a84c8ad11b0c"
- integrity sha512-je6j91rd7NmUX7L1XHouwJ4v3R+SO4umso2LUcgOct3rHZ0PajZ80ETYZTajzEXEl9DlKyzjyt4AvGQ+lrebOw==
+ version "10.18.0"
+ resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-10.18.0.tgz#1f4fc51403996ea7170af885bd44a7079d255950"
+ integrity sha512-oGlDh1Q1XqYPksuTD/usb0I70hq95OUzmL9+6Zd+Hs4XV0oaISBa/UUMSjYiq6m8EUF32132mOJ8xVZS+I0S6w==
dependencies:
tslib "^2.4.0"
optionalDependencies:
@@ -2443,7 +2443,7 @@ lodash@^4.17.19:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
-loose-envify@^1.1.0, loose-envify@^1.4.0:
+loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@@ -2528,14 +2528,14 @@ minimist@^1.2.0, minimist@^1.2.6:
integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==
mlly@^1.1.0, mlly@^1.2.0:
- version "1.4.2"
- resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.4.2.tgz#7cf406aa319ff6563d25da6b36610a93f2a8007e"
- integrity sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.5.0.tgz#8428a4617d54cc083d3009030ac79739a0e5447a"
+ integrity sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==
dependencies:
- acorn "^8.10.0"
- pathe "^1.1.1"
+ acorn "^8.11.3"
+ pathe "^1.1.2"
pkg-types "^1.0.3"
- ufo "^1.3.0"
+ ufo "^1.3.2"
ms@2.1.2:
version "2.1.2"
@@ -2741,10 +2741,10 @@ path-type@^4.0.0:
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
-pathe@^1.1.0, pathe@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a"
- integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==
+pathe@^1.1.0, pathe@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec"
+ integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==
pathval@^1.1.1:
version "1.1.1"
@@ -2825,9 +2825,9 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.27:
- version "8.4.32"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.32.tgz#1dac6ac51ab19adb21b8b34fd2d93a86440ef6c9"
- integrity sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==
+ version "8.4.33"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.33.tgz#1378e859c9f69bf6f638b990a0212f43e2aaa742"
+ integrity sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==
dependencies:
nanoid "^3.3.7"
picocolors "^1.0.0"
@@ -2839,9 +2839,9 @@ prelude-ls@^1.2.1:
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
prettier-plugin-tailwindcss@^0.5.10:
- version "0.5.10"
- resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.10.tgz#c7a68d8751e4963f290f980fd61f9d9882660b50"
- integrity sha512-9UGSejqFxGG6brYjFfTYlJ8zs4L/lvZg1AngFfaC5Fs1otSskASv5IWKmjPu5MlABQUtTKtMArKyYr/hWpXSUg==
+ version "0.5.11"
+ resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz#1aa9308c3285b3cb7942aaeaec8d0e0775ac54d0"
+ integrity sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w==
prettier@^3.1.1:
version "3.1.1"
@@ -2877,15 +2877,15 @@ queue-microtask@^1.2.2:
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
react-calendar@^4.7.0:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/react-calendar/-/react-calendar-4.7.0.tgz#80df8a31a2daa31121a6bd7f8f20a727c3df5a3c"
- integrity sha512-Sb+oRRbwBo1bzDByIEqMCXOh5JwklLPn3inibzvLKKXDokHo23rqtH2A9vz8LxNMJpzuPjGJ4OSuOJyhia3x5g==
+ version "4.8.0"
+ resolved "https://registry.yarnpkg.com/react-calendar/-/react-calendar-4.8.0.tgz#61edbba6d17e7ef8a8012de9143b5e5ff41104c8"
+ integrity sha512-qFgwo+p58sgv1QYMI1oGNaop90eJVKuHTZ3ZgBfrrpUb+9cAexxsKat0sAszgsizPMVo7vOXedV7Lqa0GQGMvA==
dependencies:
"@wojtekmaj/date-utils" "^1.1.3"
clsx "^2.0.0"
get-user-locale "^2.2.1"
prop-types "^15.6.0"
- tiny-warning "^1.0.0"
+ warning "^4.0.0"
react-dom@^18.2.0:
version "18.2.0"
@@ -2967,9 +2967,9 @@ recharts-scale@^0.4.4:
decimal.js-light "^2.4.1"
recharts@^2.10.3:
- version "2.10.3"
- resolved "https://registry.yarnpkg.com/recharts/-/recharts-2.10.3.tgz#a5dbe219354d744701e8bbd116fe42393af92f6b"
- integrity sha512-G4J96fKTZdfFQd6aQnZjo2nVNdXhp+uuLb00+cBTGLo85pChvm1+E67K3wBOHDE/77spcYb2Cy9gYWVqiZvQCg==
+ version "2.10.4"
+ resolved "https://registry.yarnpkg.com/recharts/-/recharts-2.10.4.tgz#c9b735ad27446c1b49b632f7236f5791ea66fe9a"
+ integrity sha512-/Q7/wdf8bW91lN3NEeCjL9RWfaiXQViJFgdnas4Eix/I8B9HAI3tHHK/CW/zDfgRMh4fzW1zlfjoz1IAapLO1Q==
dependencies:
clsx "^2.0.0"
eventemitter3 "^4.0.1"
@@ -3071,12 +3071,12 @@ safe-array-concat@^1.0.1:
isarray "^2.0.5"
safe-regex-test@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295"
- integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.2.tgz#3ba32bdb3ea35f940ee87e5087c60ee786c3f6c5"
+ integrity sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==
dependencies:
- call-bind "^1.0.2"
- get-intrinsic "^1.1.3"
+ call-bind "^1.0.5"
+ get-intrinsic "^1.2.2"
is-regex "^1.1.4"
scheduler@^0.23.0:
@@ -3325,9 +3325,9 @@ tailwind-merge@^2.2.0:
"@babel/runtime" "^7.23.5"
tailwindcss@^3.2.6:
- version "3.4.0"
- resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.0.tgz#045a9c474e6885ebd0436354e611a76af1c76839"
- integrity sha512-VigzymniH77knD1dryXbyxR+ePHihHociZbXnLZHUyzf2MMs2ZVqlUrZ3FvpXP8pno9JzmILt1sZPD19M3IxtA==
+ version "3.4.1"
+ resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.1.tgz#f512ca5d1dd4c9503c7d3d28a968f1ad8f5c839d"
+ integrity sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==
dependencies:
"@alloc/quick-lru" "^5.2.0"
arg "^5.0.2"
@@ -3385,11 +3385,6 @@ tiny-invariant@^1.3.1:
resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642"
integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==
-tiny-warning@^1.0.0:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
- integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==
-
tinybench@^2.3.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.5.1.tgz#3408f6552125e53a5a48adee31261686fd71587e"
@@ -3510,7 +3505,7 @@ typescript@^4.9.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
-ufo@^1.3.0:
+ufo@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.2.tgz#c7d719d0628a1c80c006d2240e0d169f6e3c0496"
integrity sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==
@@ -3560,9 +3555,9 @@ v8-to-istanbul@^9.0.0:
convert-source-map "^2.0.0"
victory-vendor@^36.6.8:
- version "36.7.0"
- resolved "https://registry.yarnpkg.com/victory-vendor/-/victory-vendor-36.7.0.tgz#e02af33e249e74e659fa65c6d5936042c42e7aa8"
- integrity sha512-nqYuTkLSdTTeACyXcCLbL7rl0y6jpzLPtTNGOtSnajdR+xxMxBdjMxDjfNJNlhR+ZU8vbXz+QejntcbY7h9/ZA==
+ version "36.8.1"
+ resolved "https://registry.yarnpkg.com/victory-vendor/-/victory-vendor-36.8.1.tgz#c012297de51efbd26dc582f1802aa58445462dc2"
+ integrity sha512-T8cXN8D6J9wEtDEHLiXcgrOE5gyKR39s9fCFTGmcOfqDrT8m2XQLt+2p/n007uxEMRvCDH7GYYqy4vV7GIcGhw==
dependencies:
"@types/d3-array" "^3.0.3"
"@types/d3-ease" "^3.0.0"
@@ -3634,6 +3629,13 @@ vitest@0.28.5, vitest@^0.28.5:
vite-node "0.28.5"
why-is-node-running "^2.2.2"
+warning@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"
+ integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==
+ dependencies:
+ loose-envify "^1.0.0"
+
which-boxed-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"