From 758ff47a80949b243b7d93cd36b8ca85706084bd Mon Sep 17 00:00:00 2001 From: freddyheredia4 Date: Tue, 27 Jun 2023 13:46:39 -0500 Subject: [PATCH] ejemplo next 12 --- .env | 1 + .env.development | 1 + README.md | 9 + components/Button.tsx | 36 + components/Input.tsx | 26 + components/Manytoone.tsx | 55 ++ components/Toolbar.tsx | 52 ++ components/oneToMany/Manytooneform.tsx | 54 ++ components/oneToMany/Onetomany.tsx | 112 +++ components/oneToMany/TableHeadForm.tsx | 22 + components/table/Table.tsx | 25 + components/table/TableBody.tsx | 76 ++ components/table/TableHead.tsx | 21 + hooks/postBasicAuth.ts | 39 + hooks/saveWithAuth.ts | 41 + hooks/useFetchWithAuth.ts | 36 + middleware.ts | 19 + next.config.js | 3 + package-lock.json | 1112 +++++++++++++++++++++++- package.json | 9 + pages/_document.tsx | 13 + pages/cliente/form.tsx | 91 ++ pages/cliente/index.tsx | 18 + pages/compania/form.tsx | 88 ++ pages/compania/index.tsx | 18 + pages/flexbox/index.tsx | 21 + pages/home.tsx | 15 + pages/index.tsx | 3 +- pages/layout/MainLayout.tsx | 36 + pages/layout/Navbar.tsx | 43 + pages/layout/Sidebar.tsx | 33 + pages/login/index.tsx | 58 ++ pages/pedido/form.tsx | 103 +++ pages/pedido/index.tsx | 18 + pages/producto/form.tsx | 92 ++ pages/producto/index.tsx | 18 + postcss.config.js | 6 + public/logo.png | Bin 0 -> 12657 bytes styles/globals.css | 29 +- tailwind.config.js | 19 + 40 files changed, 2441 insertions(+), 30 deletions(-) create mode 100644 .env create mode 100644 .env.development create mode 100644 components/Button.tsx create mode 100644 components/Input.tsx create mode 100644 components/Manytoone.tsx create mode 100644 components/Toolbar.tsx create mode 100644 components/oneToMany/Manytooneform.tsx create mode 100644 components/oneToMany/Onetomany.tsx create mode 100644 components/oneToMany/TableHeadForm.tsx create mode 100644 components/table/Table.tsx create mode 100644 components/table/TableBody.tsx create mode 100644 components/table/TableHead.tsx create mode 100644 hooks/postBasicAuth.ts create mode 100644 hooks/saveWithAuth.ts create mode 100644 hooks/useFetchWithAuth.ts create mode 100644 middleware.ts create mode 100644 pages/_document.tsx create mode 100644 pages/cliente/form.tsx create mode 100644 pages/cliente/index.tsx create mode 100644 pages/compania/form.tsx create mode 100644 pages/compania/index.tsx create mode 100644 pages/flexbox/index.tsx create mode 100644 pages/home.tsx create mode 100644 pages/layout/MainLayout.tsx create mode 100644 pages/layout/Navbar.tsx create mode 100644 pages/layout/Sidebar.tsx create mode 100644 pages/login/index.tsx create mode 100644 pages/pedido/form.tsx create mode 100644 pages/pedido/index.tsx create mode 100644 pages/producto/form.tsx create mode 100644 pages/producto/index.tsx create mode 100644 postcss.config.js create mode 100644 public/logo.png create mode 100644 tailwind.config.js diff --git a/.env b/.env new file mode 100644 index 0000000..fd2fa8e --- /dev/null +++ b/.env @@ -0,0 +1 @@ +API_URL= \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..893ae22 --- /dev/null +++ b/.env.development @@ -0,0 +1 @@ +API_URL=http://localhost:8082 \ No newline at end of file diff --git a/README.md b/README.md index c87e042..02416a2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ +Crear el proyecto: + +npx create-next-app NombreProyecto + + + + + + This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Getting Started diff --git a/components/Button.tsx b/components/Button.tsx new file mode 100644 index 0000000..80aad69 --- /dev/null +++ b/components/Button.tsx @@ -0,0 +1,36 @@ +import { FC } from 'react' + +interface Props { + title:string, + onClick?(): void, + type?:"button" | "submit" | "reset" | undefined + style?: "primary" | "secundary" | "info" +} + +export const Button:FC = ({title,onClick,type='button', style="primary"}) => { + + let className = "rounded-3xl m-2 px-4 py-2 shadow-md hover:shadow-xl uppercase"; + switch (style) { + case "primary": + className = className + " bg-sky-300 hover:bg-sky-400" + break; + case "secundary": + className = className + " hover:bg-sky-200" + break; + default: + className = className + " bg-sky-300 hover:bg-sky-400" + } + + + return ( + <> + + + ) +} \ No newline at end of file diff --git a/components/Input.tsx b/components/Input.tsx new file mode 100644 index 0000000..05ec2a3 --- /dev/null +++ b/components/Input.tsx @@ -0,0 +1,26 @@ +import React from 'react'; +import { FC } from 'react' +import { UseFormRegister,FieldValues } from 'react-hook-form'; + +interface Props { + id: string, + label: string, + type?:"text"|"password"|"checkbox"|"hidden"|"number"|"date"|"datetime-local", + register: UseFormRegister +} + +export const Input:FC = ({id,label,type="text", register}) => { + return ( + <> +
+ + +
+ + + ) +} diff --git a/components/Manytoone.tsx b/components/Manytoone.tsx new file mode 100644 index 0000000..a3770a7 --- /dev/null +++ b/components/Manytoone.tsx @@ -0,0 +1,55 @@ +import React, { FC, useEffect, useState } from 'react' +import { FieldValues, Controller, Control } from 'react-hook-form'; +import { useFetchWithAuth } from '../hooks/useFetchWithAuth'; + +interface Props { + + entity: string, + control: Control +} + +export const Manytoone: FC = ({entity, control }) => { + + + + const [data, setData] = useState([{id:0,nombre:'Select one'}]); + useEffect(() => { + async function fetchData() { + try { + const { data, error } = await useFetchWithAuth(entity.toLowerCase()); + setData(data); + + } catch (trace) { + console.error(trace); + } + } + fetchData(); + }, [entity]); + + return ( + <> + + ( + + )} + name={entity} + control={control} + /> + + + + ) +} + + + diff --git a/components/Toolbar.tsx b/components/Toolbar.tsx new file mode 100644 index 0000000..0ffa258 --- /dev/null +++ b/components/Toolbar.tsx @@ -0,0 +1,52 @@ +import { FC } from 'react' +import Link from 'next/link' + +interface Props { + pathForm: string + pathList: string + entityName: string + currentEntity: string +} + +export const Toolbar: FC = ({ + pathForm, + pathList, + entityName, + currentEntity, +}) => { + return ( + <> +
+ + + +

+
+ +
+

+
+ + ) +} diff --git a/components/oneToMany/Manytooneform.tsx b/components/oneToMany/Manytooneform.tsx new file mode 100644 index 0000000..5f5b8e9 --- /dev/null +++ b/components/oneToMany/Manytooneform.tsx @@ -0,0 +1,54 @@ + +import React, { FC, useEffect, useState } from 'react' +import { useFetchWithAuth } from '../../hooks/useFetchWithAuth'; + +import { Control, Controller, FieldValues, useFieldArray, useForm, UseFormRegister } from 'react-hook-form'; + +interface Props { + attribute: string, + keyRegiter?: any, + control: Control, +} + +export const Manytooneform: FC = ({ attribute, keyRegiter, control }) => { + if (!keyRegiter){ + keyRegiter=attribute; + } + const [data, setData] = useState([{id:0,nombre:'Select one', documentNumber: 0} ]); + useEffect(() => { + async function fetchData() { + try { + const { data, error } = await useFetchWithAuth(attribute.toLowerCase()); + setData(data); + } catch (error) { + console.error(error); + } + } + fetchData(); + }, [attribute]); + + return ( +
+ ( + + )} + name={keyRegiter} + control={control} + /> + +
+ ) +} + + + diff --git a/components/oneToMany/Onetomany.tsx b/components/oneToMany/Onetomany.tsx new file mode 100644 index 0000000..924f9e3 --- /dev/null +++ b/components/oneToMany/Onetomany.tsx @@ -0,0 +1,112 @@ +import React from 'react' +import { useEffect } from 'react'; +import { Control, FieldValues, useFieldArray, useForm, UseFormRegister, UseFormSetValue } from 'react-hook-form'; +import { useFetchWithAuth } from '../../hooks/useFetchWithAuth'; +import { Manytooneform } from './Manytooneform'; +import TableHeadForm from './TableHeadForm'; + +interface Props { + entityName: string, + entityId: number, + element:string, + oneToManyHeader: {id:string, name:string}[], + control: Control, + register: UseFormRegister, + setValue: UseFormSetValue + + +} + +export const Onetomany = ({entityName, entityId, element, oneToManyHeader, control, register, setValue }:Props) => { + + const { fields, append, remove } = useFieldArray({ + control, + name: element + }); + + + const getInitData = async () => { + + const { data, error } = await useFetchWithAuth(entityName + "/" + entityId); + if (!error) { + + setValue(element,data[element]); + } else { + console.log(error) + } +} + + useEffect(() => { + getInitData(); +}, [entityId]) + + + const renderElement = (key:string, attribute: string) => { + + switch (attribute){ + case 'String': + return ; + case "ManyToOne": + return + case 'Long': + return ; + case 'Boolean': + return ; + case 'BigDecimal': + return ; + case 'LocalDateTime': + return ; + default: + console.log(key) + return {key}; + } + } + + const columnNames = oneToManyHeader.map(column => (column.id)) + let defaultvalue = ""; + if (columnNames.length>0){ + defaultvalue = columnNames.reduce((acc, curr) => { + acc = ""; + return acc; + }, ); + }else{ + + } + + + return ( +
+ + + + + { + + fields.map((line, index) => { + return ( + + + { + oneToManyHeader.map(column => ( + + )) + } + + + ) + }) + } + +
+ + {renderElement(`${element}.${index}.${column.id}`,column.name)} +
+ +
+ ) +} diff --git a/components/oneToMany/TableHeadForm.tsx b/components/oneToMany/TableHeadForm.tsx new file mode 100644 index 0000000..4acf0c5 --- /dev/null +++ b/components/oneToMany/TableHeadForm.tsx @@ -0,0 +1,22 @@ + + +interface Props { + columns:{id:string, name:string} [] +} + +export const TableHeadForm = ({ columns }:Props) => { + return ( + + + + {columns.map( + (col => ( + {col['id']} + )) + )} + + + ) +} + +export default TableHeadForm \ No newline at end of file diff --git a/components/table/Table.tsx b/components/table/Table.tsx new file mode 100644 index 0000000..8c4e4bd --- /dev/null +++ b/components/table/Table.tsx @@ -0,0 +1,25 @@ +import TableBody from "./TableBody" +import TableHead from "./TableHead" + + +interface Props { + columns:string[] + endpoint: string +} + +const Table = ({ columns, endpoint }:Props) => { + + + return ( +
+ + + +
+
+ + ) +} + +export default Table + diff --git a/components/table/TableBody.tsx b/components/table/TableBody.tsx new file mode 100644 index 0000000..c2d2e97 --- /dev/null +++ b/components/table/TableBody.tsx @@ -0,0 +1,76 @@ + +import Link from 'next/link'; +import { useEffect, useState } from 'react'; +import { useFetchWithAuth } from '../../hooks/useFetchWithAuth'; + + +interface Props { + endpoint: string + columns:string [] +} + +const TableBody = ({ columns,endpoint }:Props) => { + + let defaultData:[] = []; + + const [entities, setEntities] = useState(defaultData); + + + const getInitData = async () => { + + const { data, error } = await useFetchWithAuth(endpoint); + + if (!error) { + setEntities(data); + } else { + console.log(error) + } + } + + useEffect(() => { + getInitData(); + }, [endpoint]) + + + return ( + + + { + entities.map((entity) => { + return ( + + + + + + + + + + + + {columns.map( + (col => ( + + {entity[col]} + + )) + )} + + ) + }) + } + + + + ); +}; + +export default TableBody; \ No newline at end of file diff --git a/components/table/TableHead.tsx b/components/table/TableHead.tsx new file mode 100644 index 0000000..1915822 --- /dev/null +++ b/components/table/TableHead.tsx @@ -0,0 +1,21 @@ + +interface Props { + columns:string [] +} + +export const TableHead = ({ columns }:Props) => { + return ( + + + + {columns.map( + (col => ( + {col.toLocaleUpperCase()} + )) + )} + + + ) +} + +export default TableHead \ No newline at end of file diff --git a/hooks/postBasicAuth.ts b/hooks/postBasicAuth.ts new file mode 100644 index 0000000..db4a114 --- /dev/null +++ b/hooks/postBasicAuth.ts @@ -0,0 +1,39 @@ + + +const fecher = async (url: string, token: string) => { + return await fetch(url, { + method: 'POST', + mode: 'cors', + headers: { + 'Authorization' :'Basic '+token + }, + }); + } + + export const postBasicAuth = async (url: string, username:string, password: string) => { + //url= process.env.API_URL+url; + const token = Buffer.from(username + ':' + password).toString('base64'); + let data; + let error; + try{ + + const response = await fecher(url, token) + + if (response.ok){ + const token = response.headers.get('Authorization') ; + if (token){ + data = token.replaceAll("Basic ","") + } + }else { + const trace = await response.json(); + error = "Servidor: "+ trace.message; + } + }catch (trace){ + error = "Cliente: "+trace; + } + return { + data, + error + } + + } \ No newline at end of file diff --git a/hooks/saveWithAuth.ts b/hooks/saveWithAuth.ts new file mode 100644 index 0000000..eb762c7 --- /dev/null +++ b/hooks/saveWithAuth.ts @@ -0,0 +1,41 @@ +import Cookies from 'js-cookie'; + +const fecher = async (url: string, id:string, token: string, data:any) => { + return await fetch(url, { + method: id==="0" ? 'POST': 'PATCH', + mode: 'cors', + headers: { + 'Authorization' :token, + 'Content-Type': 'application/json', + 'Accept':'application/json' + }, + body: data, + }); + } + + export const saveWithAuth = async (url: string, id:string, body:any) => { + url= process.env.API_URL+"/api/"+url+"/"; + if ( Number(id)>0){ + url = url + id +"/" + } + const token = Cookies.get('token') || ""; + let data; + let error; + try{ + data = JSON.stringify(body); + console.log(url) + const response = await fecher(url, id, token, data) + if (response.ok){ + data = await response.json(); + }else { + error = "Servidor: "+ ((await response.json()).trace).substring(1,300); + } + }catch (e){ + error = "Cliente: "+e; + } + return { + data, + error + } + + } \ No newline at end of file diff --git a/hooks/useFetchWithAuth.ts b/hooks/useFetchWithAuth.ts new file mode 100644 index 0000000..d51ab6e --- /dev/null +++ b/hooks/useFetchWithAuth.ts @@ -0,0 +1,36 @@ +import Cookies from 'js-cookie'; + +const fecher = async (url: string, token: string) => { + return await fetch(url, { + method: "GET", + headers: { + "Content-Type": "application/json", + "Authorization":token + }, + }); +} + +export const useFetchWithAuth = async (url: string) => { + + url= process.env.API_URL+"/api/"+url+"/"; + const token = Cookies.get('token') || ""; + let data; + let error; + try{ + const response = await fecher(url, token) + if (response.ok){ + data = await response.json(); + }else { + console.log(url) + error = "Servidor: "+ ((await response.json()).trace); + } + }catch (e){ + error = "Cliente: "+e; + } + + return { + data, + error + } + +} diff --git a/middleware.ts b/middleware.ts new file mode 100644 index 0000000..3f7a43f --- /dev/null +++ b/middleware.ts @@ -0,0 +1,19 @@ +// middleware.ts +import { NextResponse } from 'next/server' +import type { NextRequest } from 'next/server' + + +export async function middleware(request: NextRequest) { + + //Validar si la url solicitada está dentro del listado de enlaces permitidos + const token = request.cookies.get('token')?.value + + if (!token) { + return NextResponse.rewrite(new URL('/login', request.url)) + } +} + +// See "Matching Paths" below to learn more +export const config = { + matcher: ['/((?!api|_next/static|_next/image|favicon.ico|login).*)',], +} \ No newline at end of file diff --git a/next.config.js b/next.config.js index ae88795..be8957e 100644 --- a/next.config.js +++ b/next.config.js @@ -2,6 +2,9 @@ const nextConfig = { reactStrictMode: true, swcMinify: true, + env: { + API_URL: "http://localhost:8081", + } } module.exports = nextConfig diff --git a/package-lock.json b/package-lock.json index fd0967d..ecbf16d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,10 +11,19 @@ "@types/node": "18.15.11", "@types/react": "18.0.31", "@types/react-dom": "18.2.4", + "js-cookie": "^3.0.1", "next": "13.4.4", "react": "18.2.0", "react-dom": "18.2.0", + "react-hook-form": "^7.44.3", "typescript": "5.0.2" + }, + "devDependencies": { + "@types/js-cookie": "^3.0.3", + "autoprefixer": "^10.4.14", + "daisyui": "^3.0.20", + "postcss": "^8.4.21", + "tailwindcss": "^3.3.0" } }, "node_modules/@next/env": { @@ -157,6 +166,41 @@ "node": ">= 10" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@swc/helpers": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", @@ -165,6 +209,12 @@ "tslib": "^2.4.0" } }, + "node_modules/@types/js-cookie": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.3.tgz", + "integrity": "sha512-Xe7IImK09HP1sv2M/aI+48a20VX+TdRJucfq4vfRVy6nWN8PYPOEnlMRSgxJAgYQIXJVL8dZ4/ilAM7dWNaOww==", + "dev": true + }, "node_modules/@types/node": { "version": "18.15.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", @@ -198,6 +248,129 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==" }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/autoprefixer": { + "version": "10.4.14", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", + "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + } + ], + "dependencies": { + "browserslist": "^4.21.5", + "caniuse-lite": "^1.0.30001464", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/busboy": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", @@ -209,6 +382,15 @@ "node": ">=10.16.0" } }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001472", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001472.tgz", @@ -228,21 +410,398 @@ } ] }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", + "dev": true + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/css-selector-tokenizer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz", + "integrity": "sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "fastparse": "^1.1.2" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/csstype": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, + "node_modules/daisyui": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-3.0.20.tgz", + "integrity": "sha512-EQ0ryTM/+YfkTaRPdUvolsA8pThYnrjjvj2IEXQg31dRVxrEh+ovx5iBknKPXO6XJh2auYYfPonHBN7P88DNeQ==", + "dev": true, + "dependencies": { + "colord": "^2.9", + "css-selector-tokenizer": "^0.8", + "postcss-js": "^4", + "tailwindcss": "^3" + }, + "engines": { + "node": ">=16.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/daisyui" + }, + "peerDependencies": { + "postcss": "^8" + } + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.342", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.342.tgz", + "integrity": "sha512-dTei3VResi5bINDENswBxhL+N0Mw5YnfWyTqO75KGsVldurEkhC9+CelJVAse8jycWyP8pv3VSj4BSyP8wTWJA==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fastparse": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", + "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fraction.js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/infusion" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", + "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", + "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==", + "engines": { + "node": ">=12" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -254,6 +813,51 @@ "loose-envify": "cli.js" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -320,15 +924,135 @@ } } }, + "node_modules/next/node_modules/postcss": { + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/node-releases": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "dev": true, "funding": [ { "type": "opencollective", @@ -348,6 +1072,141 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-import": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", + "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dev": true, + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", + "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.10" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", + "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -371,6 +1230,92 @@ "react": "^18.2.0" } }, + "node_modules/react-hook-form": { + "version": "7.44.3", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.44.3.tgz", + "integrity": "sha512-/tHId6p2ViAka1wECMw8FEPn/oz/w226zehHrJyQ1oIzCBNMIJCaj6ZkQcv+MjDxYh9MWR7RQic7Qqwe4a5nkw==", + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-hook-form" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", @@ -417,6 +1362,120 @@ } } }, + "node_modules/sucrase": { + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.31.0.tgz", + "integrity": "sha512-6QsHnkqyVEzYcaiHsOKkzOtOgdJcb8i54x6AV2hDwyZcY9ZyykGZVw6L/YN98xC0evwTP6utsWWrKRaa8QlfEQ==", + "dev": true, + "dependencies": { + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.0.tgz", + "integrity": "sha512-hOXlFx+YcklJ8kXiCAfk/FMyr4Pm9ck477G0m/us2344Vuj355IpoEDB5UmGAsSpTBmr+4ZhjzW04JuFXkb/fw==", + "dev": true, + "dependencies": { + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "color-name": "^1.1.4", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.2.12", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.17.2", + "lilconfig": "^2.0.6", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.0.9", + "postcss-import": "^14.1.0", + "postcss-js": "^4.0.0", + "postcss-load-config": "^3.1.4", + "postcss-nested": "6.0.0", + "postcss-selector-parser": "^6.0.11", + "postcss-value-parser": "^4.2.0", + "quick-lru": "^5.1.1", + "resolve": "^1.22.1", + "sucrase": "^3.29.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "node_modules/tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", @@ -434,6 +1493,53 @@ "node": ">=12.20" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/zod": { "version": "3.21.4", "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", diff --git a/package.json b/package.json index 5da73e0..7a291ec 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,18 @@ "@types/node": "18.15.11", "@types/react": "18.0.31", "@types/react-dom": "18.2.4", + "js-cookie": "^3.0.1", "next": "13.4.4", "react": "18.2.0", "react-dom": "18.2.0", + "react-hook-form": "^7.44.3", "typescript": "5.0.2" + }, + "devDependencies": { + "@types/js-cookie": "^3.0.3", + "autoprefixer": "^10.4.14", + "daisyui": "^3.0.20", + "postcss": "^8.4.21", + "tailwindcss": "^3.3.0" } } diff --git a/pages/_document.tsx b/pages/_document.tsx new file mode 100644 index 0000000..6d9f6c2 --- /dev/null +++ b/pages/_document.tsx @@ -0,0 +1,13 @@ +import { Html, Head, Main, NextScript } from 'next/document' + +export default function Document() { + return ( + + + +
+ + + + ) +} \ No newline at end of file diff --git a/pages/cliente/form.tsx b/pages/cliente/form.tsx new file mode 100644 index 0000000..b74984c --- /dev/null +++ b/pages/cliente/form.tsx @@ -0,0 +1,91 @@ +import type { NextPage } from 'next'; +import { MainLayout } from '../layout/MainLayout'; +import { Input } from '../../components/Input'; +import { useForm } from 'react-hook-form'; +import { Button } from '../../components/Button'; +import { useRouter } from 'next/router'; +import { useEffect } from 'react'; +import { Toolbar } from '../../components/Toolbar'; +import { useFetchWithAuth } from '../../hooks/useFetchWithAuth'; +import { Manytoone } from '../../components/Manytoone'; +import { saveWithAuth } from '../../hooks/saveWithAuth'; + +const ClientePage: NextPage = () => { + + const router = useRouter(); + const entityId: string = !!router.query.id ? router.query.id as string : "0"; + const baseUrl = process.env.API_URL; + const { control, register, setValue,getValues,handleSubmit, formState: { isSubmitSuccessful, errors } } = useForm( + { + defaultValues: { + id: 0, + nombre: '', + telefono: '', + compania:0 + } + } + ); + + const getInitData = async () => { + if (!entityId || entityId=="0") + return; + const { data, error } = await useFetchWithAuth("cliente/" + entityId); + + if (!error) { + + if (data.id!=0){ + setValue("id", data['id']) + setValue("nombre", data['nombre']) + setValue("telefono", data['telefono']) + if (data['compania']){ + setValue("compania", data['compania'].id) + } + } + + } else { + console.log(error) + } + } + + const onSubmit = async (entity: any) => { + try { + let endpoint = "cliente"; + entity['compania'] = {id: entity['compania']} + const { data, error } = await saveWithAuth(endpoint, entityId, entity); + if (error) { + console.log(error); + } else { + router.push("/"+endpoint+"/form" + "?id=" + data.id) + } + } catch (e) { + console.log("Post error:"); + console.table(e); + } + } + + + useEffect(() => { + getInitData(); + }, [router.query.id]) + + return ( + <> + + +
+
+ + + + +
+
+ + ) +} + +export default ClientePage \ No newline at end of file diff --git a/pages/cliente/index.tsx b/pages/cliente/index.tsx new file mode 100644 index 0000000..cc5a1f4 --- /dev/null +++ b/pages/cliente/index.tsx @@ -0,0 +1,18 @@ +import type { NextPage } from 'next'; +import { MainLayout } from '../layout/MainLayout'; +import { Toolbar } from '../../components/Toolbar'; +import Table from '../../components/table/Table'; + +const clientePage: NextPage = () => { + + return ( + <> + + + + + + ) +} + +export default clientePage \ No newline at end of file diff --git a/pages/compania/form.tsx b/pages/compania/form.tsx new file mode 100644 index 0000000..1ee5313 --- /dev/null +++ b/pages/compania/form.tsx @@ -0,0 +1,88 @@ +import type { NextPage } from 'next'; +import { MainLayout } from '../layout/MainLayout'; +import { Input } from '../../components/Input'; +import { Form, useForm } from 'react-hook-form'; +import { Button } from '../../components/Button'; +import Cookies from 'js-cookie'; +import { useRouter } from 'next/router'; +import { useEffect } from 'react'; +import { Toolbar } from '../../components/Toolbar'; +import { useFetchWithAuth } from '../../hooks/useFetchWithAuth'; + +const CompaniaPage: NextPage = () => { + + const router = useRouter(); + const entityId: string = !!router.query.id ? router.query.id as string : "0"; + const baseUrl = process.env.API_URL; + const { control, register,reset, setValue, formState: { isSubmitSuccessful, errors } } = useForm( + { + defaultValues: { + id: 0, + ruc: '', + nombre: '', + direccion: '' + } + } + ); + + const getInitData = async () => { + if (!entityId || entityId=="0") + return; + const { data, error } = await useFetchWithAuth("compania/" + entityId); + + if (!error) { + + if (data.id!=0){ + setValue("id", data['id']) + setValue("ruc", data['ruc']) + setValue("nombre", data['nombre']) + setValue("direccion", data['direccion']) + } + + } else { + console.log(error) + } + } + + + useEffect(() => { + getInitData(); + }, [router.query.id]) + + useEffect(() => { + reset({ + id:0, + ruc: "", + nombre: '', + direccion: '' + }); + }, [isSubmitSuccessful]) + + return ( + <> + + +
+
+ + + + + +
+
+ + ) +} + +export default CompaniaPage \ No newline at end of file diff --git a/pages/compania/index.tsx b/pages/compania/index.tsx new file mode 100644 index 0000000..76b0cf8 --- /dev/null +++ b/pages/compania/index.tsx @@ -0,0 +1,18 @@ +import type { NextPage } from 'next'; +import { MainLayout } from '../layout/MainLayout'; +import { Toolbar } from '../../components/Toolbar'; +import Table from '../../components/table/Table'; + +const CompaniaPage: NextPage = () => { + + return ( + <> + + +
+ + + ) +} + +export default CompaniaPage \ No newline at end of file diff --git a/pages/flexbox/index.tsx b/pages/flexbox/index.tsx new file mode 100644 index 0000000..d8e3b33 --- /dev/null +++ b/pages/flexbox/index.tsx @@ -0,0 +1,21 @@ +import type { NextPage } from 'next'; +import { Button } from '../../components/Button'; +import Cookies from 'js-cookie'; +import { useRouter } from 'next/router'; + +const FlexboxPage: NextPage = () => { + + const router = useRouter(); + return ( + <> +
+ + + ) +} + +export default pedidoPage \ No newline at end of file diff --git a/pages/producto/form.tsx b/pages/producto/form.tsx new file mode 100644 index 0000000..3fe359b --- /dev/null +++ b/pages/producto/form.tsx @@ -0,0 +1,92 @@ +import type { NextPage } from 'next'; +import { MainLayout } from '../layout/MainLayout'; +import { Input } from '../../components/Input'; +import { useForm } from 'react-hook-form'; +import { Button } from '../../components/Button'; +import { useRouter } from 'next/router'; +import { useEffect } from 'react'; +import { Toolbar } from '../../components/Toolbar'; +import { useFetchWithAuth } from '../../hooks/useFetchWithAuth'; +import { Manytoone } from '../../components/Manytoone'; +import { saveWithAuth } from '../../hooks/saveWithAuth'; + +const productoPage: NextPage = () => { + + const router = useRouter(); + const entityId: string = !!router.query.id ? router.query.id as string : "0"; + const baseUrl = process.env.API_URL; + const { control, register, setValue,getValues,handleSubmit, formState: { isSubmitSuccessful, errors } } = useForm( + { + defaultValues: { + id: 0, + nombre: '', + codigo: '', + precio: 0.00, + creado: new Date() + } + } + ); + + const getInitData = async () => { + if (!entityId || entityId=="0") + return; + const { data, error } = await useFetchWithAuth("producto/" + entityId); + + if (!error) { + + if (data.id!=0){ + setValue("id", data['id']) + setValue("nombre", data['nombre']) + setValue("codigo", data['codigo']) + setValue("precio", Number(data["precio"])) + setValue("creado",data["creado"]) + } + + } else { + console.log(error) + } + } + + const onSubmit = async (entity: any) => { + try { + let endpoint = "producto"; + //entity['compania'] = {id: entity['compania']} (Ejemplo de conversion de manytoone) + const { data, error } = await saveWithAuth(endpoint, entityId, entity); + if (error) { + console.log(error); + } else { + router.push("/"+endpoint+"/form" + "?id=" + data.id) + } + } catch (e) { + console.log("Post error:"); + console.table(e); + } + } + + + useEffect(() => { + getInitData(); + }, [router.query.id]) + + return ( + <> + + +
+
+ + + + + +
+
+ + ) +} + +export default productoPage \ No newline at end of file diff --git a/pages/producto/index.tsx b/pages/producto/index.tsx new file mode 100644 index 0000000..7b7f5fd --- /dev/null +++ b/pages/producto/index.tsx @@ -0,0 +1,18 @@ +import type { NextPage } from 'next'; +import { MainLayout } from '../layout/MainLayout'; +import { Toolbar } from '../../components/Toolbar'; +import Table from '../../components/table/Table'; + +const productoPage: NextPage = () => { + + return ( + <> + + +
+ + + ) +} + +export default productoPage \ No newline at end of file diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/public/logo.png b/public/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d98659072be64d899c728fae15663cb3a985d162 GIT binary patch literal 12657 zcmV-%F^pXfT_W_kpK@N4+$Zl)vjbqE;tZMFs8fPvb8&N&-=&B?#_-@vSd3n?fHC0nw@^{ zJ->U}z2^#L+WK_UJh*&J;rDMA_rh`dgZ4#rFD!dBst14$1KA05C`w<@3J@0|1F{?Y7#9q(p_ttUEQQq@^zYNxW0GC&n>wYVfl&fHC0%Ja0KDzMxmW796 z+{1v;Crn%Bx-V}-UE3CbPAV_e2vH7g?CrNB?pw-t_+Y*3?%!4&O&wHE(5|6uq>b9Ee{w) zU?H?$s)@89pfm^+E&Mhgz_JXH zi+J;`Ioxoxa_8%C?q20~Edyk0OO57}P^N(H(V?Ws1Hvla@>0a|0b~V$B<%s=sb3AC zFJiO-i=`-Q5vvW?X+y;EKp+t;sl=GxpaU_w8$t}_FjU8Q08uc;1^$YWlR1B{72LBF z&f2xyre%O^1zV$TK?Uf~Q1jCcfni%9HrOS=VFkc}FC~Ke9zYbt!ICt}Z?W7b`1TH& zE&BfZm-a@ilTi0!jE=$>8`X6n-$I=iIA^$W?_2QwJ<4re2FPa8%?ozMnBRgPS6X5S z*fvuz$`$mV>n}%jpar!O;))IN{|PR-GP@%g2T2U z5`l;f6%l_wQhYqWA2?@6{LNa4ZC}Z8L-t|PkiTHdnoq23A}ct3*IAst%XV0H5{p0b z;Jbr-DN}CyvIObO=9mw)qoHoWI52-gb(`Yu#Fq{cyC6YqtAx#A6&vfpn1}EfSU+dt zz<+&e<$PcnoVK&KKYiIaM2-fT!KphgDl3JYh21i+fl%`vn zd*Si|XriQARRjvF*hmjb4%-S36Ip=B@k|)>8naiy#KE8KdU#+dWssBsQfzmqfN&?O z=d`OG%Puy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{Ix89e-)RFo(fEDciXg$IYp z_3L>Zm_QquH}M9kdMgNtw33?;H+f_(3HKkkxn%$1=qBi5N*HgaBWSvrZ=L@O=J+JoY`$n6@z$z#GU2Wm$W51P~Ds*L7DkG^X>DqYjM6d8wg+L^O5)B7G^Hxb~xDs^P70 zti|uOceX66pSJII-TG9+8~%5p3aO?v@mPF-YLC{oVBRlV~qwKcZZX;CHnBT*eGzx0dT{-0ay&ogFtl! zS5&uga|>Kn1vkwb1oSVIS6aDz^s0a)@U8>6VcwUpC^6B=%5wRrLg4l01#sC&xM|)F zbT%{6uz??qSy^;XcPU<7Jl%85{$n`w&;vWTwx)a2K7p7&?KN5*<*;#MyZ?P%ocbCM zc-P_`d}HpK#3rW6#y2qqHc_*AnO&1Ps$P%!Qq;}-{pZ8*y6UUXQizH_t9F6KOhz#?+XchjHw6!QpfY%Ut8FV(a fBiDZs)++h`Jt@RIBMnUM00000NkvXXu0mjf8JU%4 literal 0 HcmV?d00001 diff --git a/styles/globals.css b/styles/globals.css index 4f18421..bd6213e 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -1,26 +1,3 @@ -html, -body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; -} - -a { - color: inherit; - text-decoration: none; -} - -* { - box-sizing: border-box; -} - -@media (prefers-color-scheme: dark) { - html { - color-scheme: dark; - } - body { - color: white; - background: black; - } -} +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..7cc7276 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,19 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "./app/**/*.{js,ts,jsx,tsx,mdx}", + "./pages/**/*.{js,ts,jsx,tsx,mdx}", + "./components/**/*.{js,ts,jsx,tsx,mdx}", + + // Or if using `src` directory: + "./src/**/*.{js,ts,jsx,tsx,mdx}", + ], + theme: { + extend: {}, + }, + daisyui: { + themes: ["cupcake", "dark", "cmyk"], + }, + plugins: [require("daisyui")], +} +