From c5da6c9730515e4aef5ccae78638facf9ecc239b Mon Sep 17 00:00:00 2001 From: Laurian-Dufrechou Date: Sun, 30 Apr 2023 19:57:01 +0200 Subject: [PATCH] refactor(userProfile + tsx instead of jsx): created custom components for form userProfile --- package-lock.json | 40 +- package.json | 3 +- ...orGeoLocation.jsx => ErrorGeoLocation.tsx} | 0 .../{ErrorPage.jsx => ErrorPage.tsx} | 0 .../{LoadingPage.jsx => LoadingPage.tsx} | 0 .../card_user/{CardUser.jsx => CardUser.tsx} | 18 +- ...{SearchFailCard.jsx => SearchFailCard.tsx} | 0 .../{LeftPanel.jsx => LeftPanel.tsx} | 0 .../map/{MarkerBar.jsx => MarkerBar.tsx} | 0 ...{CustomCheckbox.jsx => CustomCheckbox.tsx} | 0 .../layout/user_profile/CustomEditable.tsx | 53 +++ .../user_profile/CustomEditableArea.tsx | 54 +++ .../layout/user_profile/CustomRadioGender.tsx | 60 +++ .../layout/user_profile/CustomRangeSlider.tsx | 93 ++++ .../layout/user_profile/CustomSlider.tsx | 80 ++++ ...oosePassion.jsx => ModalChoosePassion.tsx} | 0 ...ModifyImages.jsx => ModalModifyImages.tsx} | 0 ...{ProfileTagList.jsx => ProfileTagList.tsx} | 2 +- src/pages/userProfile.tsx | 413 ++++-------------- yarn.lock | 30 ++ 20 files changed, 512 insertions(+), 334 deletions(-) rename src/components/{ErrorGeoLocation.jsx => ErrorGeoLocation.tsx} (100%) rename src/components/{ErrorPage.jsx => ErrorPage.tsx} (100%) rename src/components/{LoadingPage.jsx => LoadingPage.tsx} (100%) rename src/components/layout/dashboard/card_user/{CardUser.jsx => CardUser.tsx} (97%) rename src/components/layout/dashboard/card_user/{SearchFailCard.jsx => SearchFailCard.tsx} (100%) rename src/components/layout/dashboard/left_panel/{LeftPanel.jsx => LeftPanel.tsx} (100%) rename src/components/layout/map/{MarkerBar.jsx => MarkerBar.tsx} (100%) rename src/components/layout/user_profile/{CustomCheckbox.jsx => CustomCheckbox.tsx} (100%) create mode 100644 src/components/layout/user_profile/CustomEditable.tsx create mode 100644 src/components/layout/user_profile/CustomEditableArea.tsx create mode 100644 src/components/layout/user_profile/CustomRadioGender.tsx create mode 100644 src/components/layout/user_profile/CustomRangeSlider.tsx create mode 100644 src/components/layout/user_profile/CustomSlider.tsx rename src/components/layout/user_profile/{ModalChoosePassion.jsx => ModalChoosePassion.tsx} (100%) rename src/components/layout/user_profile/{ModalModifyImages.jsx => ModalModifyImages.tsx} (100%) rename src/components/layout/user_profile/{ProfileTagList.jsx => ProfileTagList.tsx} (84%) diff --git a/package-lock.json b/package-lock.json index b7c550e..232102e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,8 @@ "react-leaflet": "^4.2.1", "react-query": "^3.39.3", "socket.io": "^4.6.1", - "socket.io-client": "^4.6.1" + "socket.io-client": "^4.6.1", + "yup": "^1.1.1" }, "devDependencies": { "@types/bcrypt": "^5.0.0", @@ -6888,6 +6889,11 @@ "react-is": "^16.13.1" } }, + "node_modules/property-expr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.5.tgz", + "integrity": "sha512-IJUkICM5dP5znhCckHSv30Q4b5/JA5enCtkRHYaOVOAocnH/1BQEYTC5NMfT3AVl/iXKdr3aqQbQn9DxyWknwA==" + }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -8021,6 +8027,11 @@ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, + "node_modules/tiny-case": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz", + "integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==" + }, "node_modules/tiny-glob": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", @@ -8071,6 +8082,11 @@ "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" }, + "node_modules/toposort": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", + "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==" + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -8530,6 +8546,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/yup": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yup/-/yup-1.1.1.tgz", + "integrity": "sha512-KfCGHdAErqFZWA5tZf7upSUnGKuTOnsI3hUsLr7fgVtx+DK04NPV01A68/FslI4t3s/ZWpvXJmgXhd7q6ICnag==", + "dependencies": { + "property-expr": "^2.0.5", + "tiny-case": "^1.0.3", + "toposort": "^2.0.2", + "type-fest": "^2.19.0" + } + }, + "node_modules/yup/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zip-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", diff --git a/package.json b/package.json index c91e79f..0c02b9e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ "react-leaflet": "^4.2.1", "react-query": "^3.39.3", "socket.io": "^4.6.1", - "socket.io-client": "^4.6.1" + "socket.io-client": "^4.6.1", + "yup": "^1.1.1" }, "devDependencies": { "@types/bcrypt": "^5.0.0", diff --git a/src/components/ErrorGeoLocation.jsx b/src/components/ErrorGeoLocation.tsx similarity index 100% rename from src/components/ErrorGeoLocation.jsx rename to src/components/ErrorGeoLocation.tsx diff --git a/src/components/ErrorPage.jsx b/src/components/ErrorPage.tsx similarity index 100% rename from src/components/ErrorPage.jsx rename to src/components/ErrorPage.tsx diff --git a/src/components/LoadingPage.jsx b/src/components/LoadingPage.tsx similarity index 100% rename from src/components/LoadingPage.jsx rename to src/components/LoadingPage.tsx diff --git a/src/components/layout/dashboard/card_user/CardUser.jsx b/src/components/layout/dashboard/card_user/CardUser.tsx similarity index 97% rename from src/components/layout/dashboard/card_user/CardUser.jsx rename to src/components/layout/dashboard/card_user/CardUser.tsx index 8e19a4a..4e2611a 100644 --- a/src/components/layout/dashboard/card_user/CardUser.jsx +++ b/src/components/layout/dashboard/card_user/CardUser.tsx @@ -18,16 +18,14 @@ import { useState } from "react"; import SearchFailCard from "./SearchFailCard"; import LoadingPage from "@/components/LoadingPage"; -export default function CardUser(props) { - const { - users, - loggedUser, - userLikes, - setUserLikes, - userDislikes, - setUserDislikes, - } = props; - +export default function CardUser({ + users, + loggedUser, + userLikes, + setUserLikes, + userDislikes, + setUserDislikes, +}) { const toast = useToast({ position: "top", duration: 2000, diff --git a/src/components/layout/dashboard/card_user/SearchFailCard.jsx b/src/components/layout/dashboard/card_user/SearchFailCard.tsx similarity index 100% rename from src/components/layout/dashboard/card_user/SearchFailCard.jsx rename to src/components/layout/dashboard/card_user/SearchFailCard.tsx diff --git a/src/components/layout/dashboard/left_panel/LeftPanel.jsx b/src/components/layout/dashboard/left_panel/LeftPanel.tsx similarity index 100% rename from src/components/layout/dashboard/left_panel/LeftPanel.jsx rename to src/components/layout/dashboard/left_panel/LeftPanel.tsx diff --git a/src/components/layout/map/MarkerBar.jsx b/src/components/layout/map/MarkerBar.tsx similarity index 100% rename from src/components/layout/map/MarkerBar.jsx rename to src/components/layout/map/MarkerBar.tsx diff --git a/src/components/layout/user_profile/CustomCheckbox.jsx b/src/components/layout/user_profile/CustomCheckbox.tsx similarity index 100% rename from src/components/layout/user_profile/CustomCheckbox.jsx rename to src/components/layout/user_profile/CustomCheckbox.tsx diff --git a/src/components/layout/user_profile/CustomEditable.tsx b/src/components/layout/user_profile/CustomEditable.tsx new file mode 100644 index 0000000..3b8318a --- /dev/null +++ b/src/components/layout/user_profile/CustomEditable.tsx @@ -0,0 +1,53 @@ +import { + Editable, + EditableInput, + EditablePreview, + FormControl, + FormErrorMessage, + FormLabel, +} from "@chakra-ui/react"; +import { Controller, ControllerProps } from "react-hook-form"; + +type CustomEditableProps = { + label: string; + isDisabled?: boolean; +} & Omit; + +export default function CustomEditable(props: CustomEditableProps) { + const { + defaultValue, + label, + name, + isDisabled = false, + ...controllerProps + } = props; + + return ( + { + return ( + + + {label} + + + + + + {error?.message} + + ); + }} + /> + ); +} diff --git a/src/components/layout/user_profile/CustomEditableArea.tsx b/src/components/layout/user_profile/CustomEditableArea.tsx new file mode 100644 index 0000000..945b71e --- /dev/null +++ b/src/components/layout/user_profile/CustomEditableArea.tsx @@ -0,0 +1,54 @@ +import { + Editable, + EditablePreview, + EditableTextarea, + FormControl, + FormErrorMessage, + FormLabel, +} from "@chakra-ui/react"; +import { Controller, ControllerProps } from "react-hook-form"; + +type CustomEditableProps = { + label: string; + isDisabled?: boolean; +} & Omit; + +export default function CustomEditableArea(props: CustomEditableProps) { + const { + defaultValue, + label, + name, + isDisabled = false, + ...controllerProps + } = props; + + return ( + { + return ( + + + {label} + + + + + + {error?.message} + + ); + }} + /> + ); +} diff --git a/src/components/layout/user_profile/CustomRadioGender.tsx b/src/components/layout/user_profile/CustomRadioGender.tsx new file mode 100644 index 0000000..157262b --- /dev/null +++ b/src/components/layout/user_profile/CustomRadioGender.tsx @@ -0,0 +1,60 @@ +import { FormLabel, HStack, Radio, RadioGroup } from "@chakra-ui/react"; +import { Gender } from "@prisma/client"; +import { Controller, ControllerProps } from "react-hook-form"; + +type CustomRadioGenderProps = { + label: string; +} & Omit; + +export default function CustomRadioGender(props: CustomRadioGenderProps) { + const { defaultValue, label, name, ...controllerProps } = props; + + const getTextGender = (gender: string) => { + switch (gender) { + case Gender.MALE: + return "Homme"; + case Gender.FEMALE: + return "Femme"; + case Gender.OTHER: + return "Autre"; + case Gender.UNKNOWN: + return "Non renseigné"; + } + }; + + return ( + <> + + {label} + + { + return ( + + + {getTextGender(Gender.MALE)} + + {getTextGender(Gender.FEMALE)} + + + {getTextGender(Gender.OTHER)} + + + {getTextGender(Gender.UNKNOWN)} + + + + ); + }} + /> + + ); +} diff --git a/src/components/layout/user_profile/CustomRangeSlider.tsx b/src/components/layout/user_profile/CustomRangeSlider.tsx new file mode 100644 index 0000000..a5c6165 --- /dev/null +++ b/src/components/layout/user_profile/CustomRangeSlider.tsx @@ -0,0 +1,93 @@ +import { + Box, + FormLabel, + RangeSlider, + RangeSliderFilledTrack, + RangeSliderThumb, + RangeSliderTrack, + Tooltip, +} from "@chakra-ui/react"; +import { Controller, ControllerProps } from "react-hook-form"; + +import { FaGreaterThan, FaLessThan } from "react-icons/fa"; + +type CustomRangeSliderProps = { + label: string; + defaultValue: [number, number]; + sliderAgeValue: number[]; + setSliderAgeValue: React.Dispatch>; + showTooltipAge: boolean; + setShowTooltipAge: React.Dispatch>; + name: string; +} & Omit; + +export default function CustomRangeSlider(props: CustomRangeSliderProps) { + const { + defaultValue, + label, + setSliderAgeValue, + setShowTooltipAge, + showTooltipAge, + sliderAgeValue, + name, + ...controllerProps + } = props; + + return ( + <> + + {label} + + ( + { + setSliderAgeValue(v); + onChange(v); + }} + onMouseEnter={() => setShowTooltipAge(true)} + onMouseLeave={() => setShowTooltipAge(false)} + > + + + + + + + + + + + + + + + + )} + /> + + ); +} diff --git a/src/components/layout/user_profile/CustomSlider.tsx b/src/components/layout/user_profile/CustomSlider.tsx new file mode 100644 index 0000000..d725d0a --- /dev/null +++ b/src/components/layout/user_profile/CustomSlider.tsx @@ -0,0 +1,80 @@ +import { + Box, + FormLabel, + Slider, + SliderFilledTrack, + SliderThumb, + SliderTrack, + Tooltip, +} from "@chakra-ui/react"; +import { Controller, ControllerProps } from "react-hook-form"; + +import { FaWalking } from "react-icons/fa"; + +type CustomSliderProps = { + label: string; + defaultValue: [number, number]; + sliderDistanceValue: number; + setSliderDistanceValue: React.Dispatch>; + showTooltipDistance: boolean; + setShowTooltipDistance: React.Dispatch>; + name: string; +} & Omit; + +export default function CustomSlider(props: CustomSliderProps) { + const { + defaultValue, + label, + sliderDistanceValue, + setSliderDistanceValue, + showTooltipDistance, + setShowTooltipDistance, + name, + ...controllerProps + } = props; + + return ( + <> + + {label} + + ( + { + setSliderDistanceValue(v); + onChange(v); + }} + onMouseEnter={() => setShowTooltipDistance(true)} + onMouseLeave={() => setShowTooltipDistance(false)} + > + + + + + + + + + + )} + /> + + ); +} diff --git a/src/components/layout/user_profile/ModalChoosePassion.jsx b/src/components/layout/user_profile/ModalChoosePassion.tsx similarity index 100% rename from src/components/layout/user_profile/ModalChoosePassion.jsx rename to src/components/layout/user_profile/ModalChoosePassion.tsx diff --git a/src/components/layout/user_profile/ModalModifyImages.jsx b/src/components/layout/user_profile/ModalModifyImages.tsx similarity index 100% rename from src/components/layout/user_profile/ModalModifyImages.jsx rename to src/components/layout/user_profile/ModalModifyImages.tsx diff --git a/src/components/layout/user_profile/ProfileTagList.jsx b/src/components/layout/user_profile/ProfileTagList.tsx similarity index 84% rename from src/components/layout/user_profile/ProfileTagList.jsx rename to src/components/layout/user_profile/ProfileTagList.tsx index 2b66100..9ad92ef 100644 --- a/src/components/layout/user_profile/ProfileTagList.jsx +++ b/src/components/layout/user_profile/ProfileTagList.tsx @@ -6,7 +6,7 @@ export default function ProfileBadgeList(props) { {userPassions.map((idPassion, index) => ( - {passions !== null && passions !== undefined + {passions !== null && passions !== undefined && passions.length > 0 ? passions.find((element) => element.id === idPassion).name : ""} diff --git a/src/pages/userProfile.tsx b/src/pages/userProfile.tsx index e032b45..d2a1825 100644 --- a/src/pages/userProfile.tsx +++ b/src/pages/userProfile.tsx @@ -9,27 +9,9 @@ import { Center, Container, Divider, - Editable, - EditableInput, - EditablePreview, - EditableTextarea, Flex, - FormControl, - FormErrorMessage, FormLabel, - HStack, - Radio, - RadioGroup, - RangeSlider, - RangeSliderFilledTrack, - RangeSliderThumb, - RangeSliderTrack, - Slider, - SliderFilledTrack, - SliderThumb, - SliderTrack, Text, - Tooltip, useToast, VStack, } from "@chakra-ui/react"; @@ -38,11 +20,14 @@ import ModalModifyImages from "@/components/layout/user_profile/ModalModifyImage import ModalChoosePassion from "@/components/layout/user_profile/ModalChoosePassion"; import ProfileTagList from "@/components/layout/user_profile/ProfileTagList"; import LoadingPage from "@/components/LoadingPage"; - -import { FaGreaterThan, FaLessThan, FaWalking } from "react-icons/fa"; +import CustomEditable from "@/components/layout/user_profile/CustomEditable"; +import CustomEditableArea from "@/components/layout/user_profile/CustomEditableArea"; +import CustomRadioGender from "@/components/layout/user_profile/CustomRadioGender"; +import CustomRangeSlider from "@/components/layout/user_profile/CustomRangeSlider"; +import CustomSlider from "@/components/layout/user_profile/CustomSlider"; import { useEffect, useState } from "react"; -import { useForm, Controller } from "react-hook-form"; +import { useForm } from "react-hook-form"; import { useQuery } from "@tanstack/react-query"; export default function UserProfile() { @@ -50,18 +35,18 @@ export default function UserProfile() { const toast = useToast({ position: "top", isClosable: true }); const [currentlyLoading, setCurrentlyLoading] = useState(false); - const [passions, setPassions] = useState(null); + const [passions, setPassions] = useState([] as any[]); - const [showTooltipAge, setShowTooltipAge] = useState(true); - const [sliderAgeValue, setSliderAgeValue] = useState([] as number[]); - // const [showTooltipDistance, setShowTooltipDistance] = useState(true); - // const [sliderDistanceValue, setSliderDistanceValue] = useState([]); + const [showTooltipAge, setShowTooltipAge] = useState(false); + const [sliderAgeValue, setSliderAgeValue] = useState([[] as number[]]); + const [showTooltipDistance, setShowTooltipDistance] = useState(false); + const [sliderDistanceValue, setSliderDistanceValue] = useState(0); const { handleSubmit, control, formState: { errors }, - } = useForm(); + } = useForm({ mode: "onBlur" }); useEffect(() => { fetch(`/api/passions`) @@ -88,7 +73,7 @@ export default function UserProfile() { const { user } = session as unknown as Session; setSliderAgeValue([user.ageMin, user.ageMax]); - // setSliderDistanceValue(user.distance); + setSliderDistanceValue(user.distance); return fetch(`/api/users/${user.id}`) .then((res) => res.json()) @@ -112,19 +97,6 @@ export default function UserProfile() { if (status === "unauthenticated") router.push("/"); } - const getTextGender = (gender: string) => { - switch (gender) { - case Gender.MALE: - return "Homme"; - case Gender.FEMALE: - return "Femme"; - case Gender.OTHER: - return "Autre"; - case Gender.UNKNOWN: - return "Non renseigné"; - } - }; - const saveData = (values: any) => { let trueValues = {}; console.log(values); @@ -208,77 +180,34 @@ export default function UserProfile() { - - - Prénom : - - { - return ( - - - - - ); - }} - /> - - {errors.firstName?.message} - - + - - - Nom : - - ( - - - - - )} - /> - - {errors.lastName?.message} - - + - - Date de naissance : - - - - + control={control} + label={"Date de naissance :"} + /> - - Ville : - - - - + control={control} + label={"Ville :"} + /> - - Adresse mail : - - - - + control={control} + label={"Adresse mail :"} + /> - - - À propos : - - ( - - - - - )} - /> - - {errors?.bio?.message ?? ""} - - + - - Genre : - - ( - - - - {getTextGender(Gender.MALE)} - - - {getTextGender(Gender.FEMALE)} - - - {getTextGender(Gender.OTHER)} - - - {getTextGender(Gender.UNKNOWN)} - - - - )} + defaultValue={ + userData.gender === null ? Gender.UNKNOWN : userData.gender + } /> @@ -426,139 +298,39 @@ export default function UserProfile() { - - Genre : - - ( - - - - {getTextGender(Gender.MALE)} - - - {getTextGender(Gender.FEMALE)} - - - {getTextGender(Gender.OTHER)} - - - {getTextGender(Gender.UNKNOWN)} - - - - )} + defaultValue={ + userData.prefGender === null + ? Gender.UNKNOWN + : userData.gender + } /> - - Age : - - ( - { - setSliderAgeValue(v); - onChange(v); - }} - onMouseEnter={() => setShowTooltipAge(true)} - onMouseLeave={() => setShowTooltipAge(false)} - > - - - - - - - - - - - - - - - - )} + label={"Age :"} + name={"age"} + defaultValue={[userData.ageMin, userData.ageMax]} + setSliderAgeValue={setSliderAgeValue} + setShowTooltipAge={setShowTooltipAge} + showTooltipAge={showTooltipAge} + sliderAgeValue={sliderAgeValue} /> - {/* - - Distance : - - ( - { - setSliderDistanceValue(v); - onChange(v); - }} - onMouseEnter={() => setShowTooltipDistance(true)} - onMouseLeave={() => setShowTooltipDistance(false)} - > - - - - - - - - - - )} - /> - */} +
@@ -584,5 +356,4 @@ export default function UserProfile() { ); - // } } diff --git a/yarn.lock b/yarn.lock index 9cd14e3..977634e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4267,6 +4267,11 @@ "object-assign" "^4.1.1" "react-is" "^16.13.1" +"property-expr@^2.0.5": + "integrity" "sha512-IJUkICM5dP5znhCckHSv30Q4b5/JA5enCtkRHYaOVOAocnH/1BQEYTC5NMfT3AVl/iXKdr3aqQbQn9DxyWknwA==" + "resolved" "https://registry.npmjs.org/property-expr/-/property-expr-2.0.5.tgz" + "version" "2.0.5" + "punycode@^2.1.0": "integrity" "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" "resolved" "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz" @@ -4954,6 +4959,11 @@ "resolved" "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" "version" "0.2.0" +"tiny-case@^1.0.3": + "integrity" "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==" + "resolved" "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz" + "version" "1.0.3" + "tiny-glob@^0.2.9": "integrity" "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==" "resolved" "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz" @@ -4991,6 +5001,11 @@ "resolved" "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz" "version" "1.0.6" +"toposort@^2.0.2": + "integrity" "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==" + "resolved" "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz" + "version" "2.0.2" + "tr46@~0.0.3": "integrity" "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" "resolved" "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" @@ -5094,6 +5109,11 @@ "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" "version" "0.8.1" +"type-fest@^2.19.0": + "integrity" "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz" + "version" "2.19.0" + "typed-array-length@^1.0.4": "integrity" "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==" "resolved" "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" @@ -5312,6 +5332,16 @@ "resolved" "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" "version" "0.1.0" +"yup@^1.1.1": + "integrity" "sha512-KfCGHdAErqFZWA5tZf7upSUnGKuTOnsI3hUsLr7fgVtx+DK04NPV01A68/FslI4t3s/ZWpvXJmgXhd7q6ICnag==" + "resolved" "https://registry.npmjs.org/yup/-/yup-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "property-expr" "^2.0.5" + "tiny-case" "^1.0.3" + "toposort" "^2.0.2" + "type-fest" "^2.19.0" + "zip-stream@^4.1.0": "integrity" "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==" "resolved" "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz"