add role page

This commit is contained in:
Sianida26 2024-01-27 18:15:07 +07:00
parent 11d1e33486
commit 302e4d85b6
15 changed files with 379 additions and 226 deletions

View File

@ -9,11 +9,11 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@auth/prisma-adapter": "^1.0.16", "@auth/prisma-adapter": "^1.1.0",
"@mantine/core": "^7.4.2", "@mantine/core": "^7.5.0",
"@mantine/form": "^7.4.2", "@mantine/form": "^7.5.0",
"@mantine/hooks": "^7.4.2", "@mantine/hooks": "^7.5.0",
"@mantine/notifications": "^7.4.2", "@mantine/notifications": "^7.5.0",
"@prisma/client": "5.8.1", "@prisma/client": "5.8.1",
"@tanstack/react-query": "^4.36.1", "@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-devtools": "^4.36.1", "@tanstack/react-query-devtools": "^4.36.1",
@ -24,7 +24,7 @@
"@trpc/server": "^10.45.0", "@trpc/server": "^10.45.0",
"@types/bcrypt": "^5.0.2", "@types/bcrypt": "^5.0.2",
"@types/jsonwebtoken": "^9.0.5", "@types/jsonwebtoken": "^9.0.5",
"@typescript-eslint/eslint-plugin": "^6.19.0", "@typescript-eslint/eslint-plugin": "^6.19.1",
"bcrypt": "^5.1.1", "bcrypt": "^5.1.1",
"client-only": "^0.0.1", "client-only": "^0.0.1",
"clsx": "^2.1.0", "clsx": "^2.1.0",
@ -40,7 +40,7 @@
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.11.5", "@types/node": "^20.11.7",
"@types/react": "^18.2.48", "@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18", "@types/react-dom": "^18.2.18",
"autoprefixer": "^10.4.17", "autoprefixer": "^10.4.17",

View File

@ -6,20 +6,20 @@ settings:
dependencies: dependencies:
'@auth/prisma-adapter': '@auth/prisma-adapter':
specifier: ^1.0.16 specifier: ^1.1.0
version: 1.0.16(@prisma/client@5.8.1) version: 1.1.0(@prisma/client@5.8.1)
'@mantine/core': '@mantine/core':
specifier: ^7.4.2 specifier: ^7.5.0
version: 7.4.2(@mantine/hooks@7.4.2)(@types/react@18.2.48)(react-dom@18.2.0)(react@18.2.0) version: 7.5.0(@mantine/hooks@7.5.0)(@types/react@18.2.48)(react-dom@18.2.0)(react@18.2.0)
'@mantine/form': '@mantine/form':
specifier: ^7.4.2 specifier: ^7.5.0
version: 7.4.2(react@18.2.0) version: 7.5.0(react@18.2.0)
'@mantine/hooks': '@mantine/hooks':
specifier: ^7.4.2 specifier: ^7.5.0
version: 7.4.2(react@18.2.0) version: 7.5.0(react@18.2.0)
'@mantine/notifications': '@mantine/notifications':
specifier: ^7.4.2 specifier: ^7.5.0
version: 7.4.2(@mantine/core@7.4.2)(@mantine/hooks@7.4.2)(react-dom@18.2.0)(react@18.2.0) version: 7.5.0(@mantine/core@7.5.0)(@mantine/hooks@7.5.0)(react-dom@18.2.0)(react@18.2.0)
'@prisma/client': '@prisma/client':
specifier: 5.8.1 specifier: 5.8.1
version: 5.8.1(prisma@5.8.1) version: 5.8.1(prisma@5.8.1)
@ -51,8 +51,8 @@ dependencies:
specifier: ^9.0.5 specifier: ^9.0.5
version: 9.0.5 version: 9.0.5
'@typescript-eslint/eslint-plugin': '@typescript-eslint/eslint-plugin':
specifier: ^6.19.0 specifier: ^6.19.1
version: 6.19.0(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3) version: 6.19.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3)
bcrypt: bcrypt:
specifier: ^5.1.1 specifier: ^5.1.1
version: 5.1.1 version: 5.1.1
@ -67,7 +67,7 @@ dependencies:
version: 9.0.2 version: 9.0.2
mantine-form-zod-resolver: mantine-form-zod-resolver:
specifier: ^1.1.0 specifier: ^1.1.0
version: 1.1.0(@mantine/form@7.4.2)(zod@3.22.4) version: 1.1.0(@mantine/form@7.5.0)(zod@3.22.4)
next: next:
specifier: 14.1.0 specifier: 14.1.0
version: 14.1.0(react-dom@18.2.0)(react@18.2.0)(sass@1.70.0) version: 14.1.0(react-dom@18.2.0)(react@18.2.0)(sass@1.70.0)
@ -95,8 +95,8 @@ dependencies:
devDependencies: devDependencies:
'@types/node': '@types/node':
specifier: ^20.11.5 specifier: ^20.11.7
version: 20.11.5 version: 20.11.7
'@types/react': '@types/react':
specifier: ^18.2.48 specifier: ^18.2.48
version: 18.2.48 version: 18.2.48
@ -142,8 +142,8 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
dev: true dev: true
/@auth/core@0.22.0: /@auth/core@0.24.0:
resolution: {integrity: sha512-BwngPhtcEtJPV+sfs8pGPZ+RdKnpBeXRk2K2Os10DyMfaL/Vszj2TJU6sRaS38hXzo+xycYX+83olBElqc2Ngw==} resolution: {integrity: sha512-wwTyapljg4ydyvtQRXSeOaj6nBVSvPkVoXws6i+/vPfINxz4lo9UuLifPLqW7iO72/f4Ttaez0g3XA42VtKQ8A==}
peerDependencies: peerDependencies:
nodemailer: ^6.8.0 nodemailer: ^6.8.0
peerDependenciesMeta: peerDependenciesMeta:
@ -154,24 +154,24 @@ packages:
'@types/cookie': 0.6.0 '@types/cookie': 0.6.0
cookie: 0.6.0 cookie: 0.6.0
jose: 5.2.0 jose: 5.2.0
oauth4webapi: 2.7.0 oauth4webapi: 2.8.1
preact: 10.11.3 preact: 10.11.3
preact-render-to-string: 5.2.3(preact@10.11.3) preact-render-to-string: 5.2.3(preact@10.11.3)
dev: false dev: false
/@auth/prisma-adapter@1.0.16(@prisma/client@5.8.1): /@auth/prisma-adapter@1.1.0(@prisma/client@5.8.1):
resolution: {integrity: sha512-i7+XCxrbv5n8Yp9r+FznvnOBG7BrjpfmXr4Fl7pL7LPgTGhDJPE10BokVf5tGTsR8SGnAp04qhBzgjTrTrmpPQ==} resolution: {integrity: sha512-FSHnAmdrrW7b87pKjtnSCOgEthNK9ZAdZJDfncuG3YpXr4whiDfFhqg4UXgmnn/nEXuCIAY6wL3eZIa044vIOQ==}
peerDependencies: peerDependencies:
'@prisma/client': '>=2.26.0 || >=3 || >=4 || >=5' '@prisma/client': '>=2.26.0 || >=3 || >=4 || >=5'
dependencies: dependencies:
'@auth/core': 0.22.0 '@auth/core': 0.24.0
'@prisma/client': 5.8.1(prisma@5.8.1) '@prisma/client': 5.8.1(prisma@5.8.1)
transitivePeerDependencies: transitivePeerDependencies:
- nodemailer - nodemailer
dev: false dev: false
/@babel/runtime@7.23.8: /@babel/runtime@7.23.9:
resolution: {integrity: sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==} resolution: {integrity: sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
dependencies: dependencies:
regenerator-runtime: 0.14.1 regenerator-runtime: 0.14.1
@ -209,26 +209,26 @@ packages:
resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
/@floating-ui/core@1.5.3: /@floating-ui/core@1.6.0:
resolution: {integrity: sha512-O0WKDOo0yhJuugCx6trZQj5jVJ9yR0ystG2JaNAemYUWce+pmM6WUEFIibnWyEJKdrDxhm75NoSRME35FNaM/Q==} resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==}
dependencies: dependencies:
'@floating-ui/utils': 0.2.1 '@floating-ui/utils': 0.2.1
dev: false dev: false
/@floating-ui/dom@1.5.4: /@floating-ui/dom@1.6.0:
resolution: {integrity: sha512-jByEsHIY+eEdCjnTVu+E3ephzTOzkQ8hgUfGwos+bg7NlH33Zc5uO+QHz1mrQUOgIKKDD1RtS201P9NvAfq3XQ==} resolution: {integrity: sha512-SZ0BEXzsaaS6THZfZJUcAobbZTD+MvfGM42bxgeg0Tnkp4/an/avqwAXiVLsFtIBZtfsx3Ymvwx0+KnnhdA/9g==}
dependencies: dependencies:
'@floating-ui/core': 1.5.3 '@floating-ui/core': 1.6.0
'@floating-ui/utils': 0.2.1 '@floating-ui/utils': 0.2.1
dev: false dev: false
/@floating-ui/react-dom@2.0.6(react-dom@18.2.0)(react@18.2.0): /@floating-ui/react-dom@2.0.7(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-IB8aCRFxr8nFkdYZgH+Otd9EVQPJoynxeFRGTB8voPoZMRWo8XjYuCRgpI1btvuKY69XMiLnW+ym7zoBHM90Rw==} resolution: {integrity: sha512-B5GJxKUyPcGsvE1vua+Abvw0t6zVMyTbtG+Jk7BoI4hfc5Ahv50dstRIAn0nS0274kR9gnKwxIXyGA8EzBZJrA==}
peerDependencies: peerDependencies:
react: '>=16.8.0' react: '>=16.8.0'
react-dom: '>=16.8.0' react-dom: '>=16.8.0'
dependencies: dependencies:
'@floating-ui/dom': 1.5.4 '@floating-ui/dom': 1.6.0
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
dev: false dev: false
@ -239,7 +239,7 @@ packages:
react: '>=16.8.0' react: '>=16.8.0'
react-dom: '>=16.8.0' react-dom: '>=16.8.0'
dependencies: dependencies:
'@floating-ui/react-dom': 2.0.6(react-dom@18.2.0)(react@18.2.0) '@floating-ui/react-dom': 2.0.7(react-dom@18.2.0)(react@18.2.0)
aria-hidden: 1.2.3 aria-hidden: 1.2.3
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
@ -309,15 +309,15 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.15 '@jridgewell/sourcemap-codec': 1.4.15
dev: true dev: true
/@mantine/core@7.4.2(@mantine/hooks@7.4.2)(@types/react@18.2.48)(react-dom@18.2.0)(react@18.2.0): /@mantine/core@7.5.0(@mantine/hooks@7.5.0)(@types/react@18.2.48)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-kXmq7NjSd1AsOIzqPwQhA7SeZS9hrbARRqhRwr4LLR3NKps9hLmVto441DnpHH/D27eL9gGLSl4GRIdogjX6mg==} resolution: {integrity: sha512-0Qfn4oLCs6Qrli+JK6Q325xhNblVEPSKOB4sDMUkvKYUlCt/2lsIhwUXarVBgiIV3X+rKccf0/LcEWmpn/dYuw==}
peerDependencies: peerDependencies:
'@mantine/hooks': 7.4.2 '@mantine/hooks': 7.5.0
react: ^18.2.0 react: ^18.2.0
react-dom: ^18.2.0 react-dom: ^18.2.0
dependencies: dependencies:
'@floating-ui/react': 0.24.8(react-dom@18.2.0)(react@18.2.0) '@floating-ui/react': 0.24.8(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 7.4.2(react@18.2.0) '@mantine/hooks': 7.5.0(react@18.2.0)
clsx: 2.0.0 clsx: 2.0.0
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
@ -329,8 +329,8 @@ packages:
- '@types/react' - '@types/react'
dev: false dev: false
/@mantine/form@7.4.2(react@18.2.0): /@mantine/form@7.5.0(react@18.2.0):
resolution: {integrity: sha512-zlacaHazqmB9NBOp3pHE8+nDlNKUnT02QbV6q4/CNitAlfqDwbB8u9tWKsSU3E0QF6s5oAzcTY+apyD/nWgfrA==} resolution: {integrity: sha512-Bp2ZYwt+oYXNUm7ySPwst5C9S44YvrdsiFXjUzjX1QaoznAWern1W0dtyF7vJ3KWOoY9+7XXx+Ou4pHTOIq/hQ==}
peerDependencies: peerDependencies:
react: ^18.2.0 react: ^18.2.0
dependencies: dependencies:
@ -339,32 +339,32 @@ packages:
react: 18.2.0 react: 18.2.0
dev: false dev: false
/@mantine/hooks@7.4.2(react@18.2.0): /@mantine/hooks@7.5.0(react@18.2.0):
resolution: {integrity: sha512-tNtn/SNOtSmjLQmIk4S5nsTJjV84Oj0AUYRrAN78HHw3bfWp6bdWbgYPtPEH9e6iFJfdxiX0hrLfWqROalAsbQ==} resolution: {integrity: sha512-KCL/RRMO+9HRIaNww3RIykifWL9XHovnANAyaCU2YUHOPyGCLSXs1UfFxsKNU71HaZ7cHwqSd7J0rR8JpVYLxw==}
peerDependencies: peerDependencies:
react: ^18.2.0 react: ^18.2.0
dependencies: dependencies:
react: 18.2.0 react: 18.2.0
dev: false dev: false
/@mantine/notifications@7.4.2(@mantine/core@7.4.2)(@mantine/hooks@7.4.2)(react-dom@18.2.0)(react@18.2.0): /@mantine/notifications@7.5.0(@mantine/core@7.5.0)(@mantine/hooks@7.5.0)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-lOIv9x+ifb2HyW3SE2UYEWzeQoKVptBR9HCB1m+KUzZiJ5pnBrujWluBzhqYghShr/wykc4Rf4L0hx39egCP9g==} resolution: {integrity: sha512-43+PwX1WTTffmRjAAH/42Zk0ffXny5DMIry+WGfyNQdoN1JPL1w9eulpWhPFMUn2fm7wHyrKTRpiZdfp8ry2Ow==}
peerDependencies: peerDependencies:
'@mantine/core': 7.4.2 '@mantine/core': 7.5.0
'@mantine/hooks': 7.4.2 '@mantine/hooks': 7.5.0
react: ^18.2.0 react: ^18.2.0
react-dom: ^18.2.0 react-dom: ^18.2.0
dependencies: dependencies:
'@mantine/core': 7.4.2(@mantine/hooks@7.4.2)(@types/react@18.2.48)(react-dom@18.2.0)(react@18.2.0) '@mantine/core': 7.5.0(@mantine/hooks@7.5.0)(@types/react@18.2.48)(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 7.4.2(react@18.2.0) '@mantine/hooks': 7.5.0(react@18.2.0)
'@mantine/store': 7.4.2(react@18.2.0) '@mantine/store': 7.5.0(react@18.2.0)
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0) react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0)
dev: false dev: false
/@mantine/store@7.4.2(react@18.2.0): /@mantine/store@7.5.0(react@18.2.0):
resolution: {integrity: sha512-XGGAKu3oUMmnpw8USe4La+T+oSVqsIhYKDjKPxRs5iQ9GKPtxwabAqBXEkPHA1y/txrsEaU5eJVu0ysyBbU4hQ==} resolution: {integrity: sha512-NvPS6ERKxHGnkIEY8ip/v3ySYYPQlJq6KtSSXALlJ/BdyezBTsBrkEkEgJxJcYK5H4TYr9jDjLYNL3PQy4GHxg==}
peerDependencies: peerDependencies:
react: ^18.2.0 react: ^18.2.0
dependencies: dependencies:
@ -496,7 +496,7 @@ packages:
engines: {node: '>= 8'} engines: {node: '>= 8'}
dependencies: dependencies:
'@nodelib/fs.scandir': 2.1.5 '@nodelib/fs.scandir': 2.1.5
fastq: 1.16.0 fastq: 1.17.0
/@panva/hkdf@1.1.1: /@panva/hkdf@1.1.1:
resolution: {integrity: sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA==} resolution: {integrity: sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA==}
@ -549,8 +549,8 @@ packages:
dependencies: dependencies:
'@prisma/debug': 5.8.1 '@prisma/debug': 5.8.1
/@rushstack/eslint-patch@1.7.0: /@rushstack/eslint-patch@1.7.2:
resolution: {integrity: sha512-Jh4t/593gxs0lJZ/z3NnasKlplXT2f+4y/LZYuaKZW5KAaiVFL/fThhs+17EbUd53jUVJ0QudYCBGbN/psvaqg==} resolution: {integrity: sha512-RbhOOTCNoCrbfkRyoXODZp75MlpiHMgbE5MEBZAnnnLyQNgrigEj4p0lzsMDyc1zVsJDLrivB58tgg3emX0eEA==}
dev: true dev: true
/@swc/helpers@0.5.2: /@swc/helpers@0.5.2:
@ -671,7 +671,7 @@ packages:
/@types/bcrypt@5.0.2: /@types/bcrypt@5.0.2:
resolution: {integrity: sha512-6atioO8Y75fNcbmj0G7UjI9lXN2pQ/IGJ2FWT4a/btd0Lk9lQalHLKhkgKVZ3r+spnmWUKfbMi1GEe9wyHQfNQ==} resolution: {integrity: sha512-6atioO8Y75fNcbmj0G7UjI9lXN2pQ/IGJ2FWT4a/btd0Lk9lQalHLKhkgKVZ3r+spnmWUKfbMi1GEe9wyHQfNQ==}
dependencies: dependencies:
'@types/node': 20.11.5 '@types/node': 20.11.7
dev: false dev: false
/@types/cookie@0.6.0: /@types/cookie@0.6.0:
@ -689,11 +689,11 @@ packages:
/@types/jsonwebtoken@9.0.5: /@types/jsonwebtoken@9.0.5:
resolution: {integrity: sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==} resolution: {integrity: sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==}
dependencies: dependencies:
'@types/node': 20.11.5 '@types/node': 20.11.7
dev: false dev: false
/@types/node@20.11.5: /@types/node@20.11.7:
resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==} resolution: {integrity: sha512-GPmeN1C3XAyV5uybAf4cMLWT9fDWcmQhZVtMFu7OR32WjrqGG+Wnk2V1d0bmtUyE/Zy1QJ9BxyiTih9z8Oks8A==}
dependencies: dependencies:
undici-types: 5.26.5 undici-types: 5.26.5
@ -720,8 +720,8 @@ packages:
resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==}
dev: false dev: false
/@typescript-eslint/eslint-plugin@6.19.0(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3): /@typescript-eslint/eslint-plugin@6.19.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg==} resolution: {integrity: sha512-roQScUGFruWod9CEyoV5KlCYrubC/fvG8/1zXuT0WTcxX87GnMMmnksMwSg99lo1xiKrBzw2icsJPMAw1OtKxg==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
@ -733,10 +733,10 @@ packages:
dependencies: dependencies:
'@eslint-community/regexpp': 4.10.0 '@eslint-community/regexpp': 4.10.0
'@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/scope-manager': 6.19.0 '@typescript-eslint/scope-manager': 6.19.1
'@typescript-eslint/type-utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/type-utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.19.0 '@typescript-eslint/visitor-keys': 6.19.1
debug: 4.3.4 debug: 4.3.4
eslint: 8.56.0 eslint: 8.56.0
graphemer: 1.4.0 graphemer: 1.4.0
@ -749,27 +749,6 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@typescript-eslint/parser@6.19.0(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 6.19.0
'@typescript-eslint/types': 6.19.0
'@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
eslint: 8.56.0
typescript: 5.3.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/parser@6.19.1(eslint@8.56.0)(typescript@5.3.3): /@typescript-eslint/parser@6.19.1(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==} resolution: {integrity: sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
@ -790,13 +769,6 @@ packages:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
/@typescript-eslint/scope-manager@6.19.0:
resolution: {integrity: sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
'@typescript-eslint/types': 6.19.0
'@typescript-eslint/visitor-keys': 6.19.0
/@typescript-eslint/scope-manager@6.19.1: /@typescript-eslint/scope-manager@6.19.1:
resolution: {integrity: sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==} resolution: {integrity: sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
@ -804,8 +776,8 @@ packages:
'@typescript-eslint/types': 6.19.1 '@typescript-eslint/types': 6.19.1
'@typescript-eslint/visitor-keys': 6.19.1 '@typescript-eslint/visitor-keys': 6.19.1
/@typescript-eslint/type-utils@6.19.0(eslint@8.56.0)(typescript@5.3.3): /@typescript-eslint/type-utils@6.19.1(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w==} resolution: {integrity: sha512-0vdyld3ecfxJuddDjACUvlAeYNrHP/pDeQk2pWBR2ESeEzQhg52DF53AbI9QCBkYE23lgkhLCZNkHn2hEXXYIg==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
eslint: ^7.0.0 || ^8.0.0 eslint: ^7.0.0 || ^8.0.0
@ -814,8 +786,8 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3) '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3)
'@typescript-eslint/utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3)
debug: 4.3.4 debug: 4.3.4
eslint: 8.56.0 eslint: 8.56.0
ts-api-utils: 1.0.3(typescript@5.3.3) ts-api-utils: 1.0.3(typescript@5.3.3)
@ -824,35 +796,10 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@typescript-eslint/types@6.19.0:
resolution: {integrity: sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==}
engines: {node: ^16.0.0 || >=18.0.0}
/@typescript-eslint/types@6.19.1: /@typescript-eslint/types@6.19.1:
resolution: {integrity: sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==} resolution: {integrity: sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
/@typescript-eslint/typescript-estree@6.19.0(typescript@5.3.3):
resolution: {integrity: sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 6.19.0
'@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
minimatch: 9.0.3
semver: 7.5.4
ts-api-utils: 1.0.3(typescript@5.3.3)
typescript: 5.3.3
transitivePeerDependencies:
- supports-color
/@typescript-eslint/typescript-estree@6.19.1(typescript@5.3.3): /@typescript-eslint/typescript-estree@6.19.1(typescript@5.3.3):
resolution: {integrity: sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==} resolution: {integrity: sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
@ -874,8 +821,8 @@ packages:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
/@typescript-eslint/utils@6.19.0(eslint@8.56.0)(typescript@5.3.3): /@typescript-eslint/utils@6.19.1(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==} resolution: {integrity: sha512-JvjfEZuP5WoMqwh9SPAPDSHSg9FBHHGhjPugSRxu5jMfjvBpq5/sGTD+9M9aQ5sh6iJ8AY/Kk/oUYVEMAPwi7w==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
eslint: ^7.0.0 || ^8.0.0 eslint: ^7.0.0 || ^8.0.0
@ -883,9 +830,9 @@ packages:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@types/json-schema': 7.0.15 '@types/json-schema': 7.0.15
'@types/semver': 7.5.6 '@types/semver': 7.5.6
'@typescript-eslint/scope-manager': 6.19.0 '@typescript-eslint/scope-manager': 6.19.1
'@typescript-eslint/types': 6.19.0 '@typescript-eslint/types': 6.19.1
'@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3) '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3)
eslint: 8.56.0 eslint: 8.56.0
semver: 7.5.4 semver: 7.5.4
transitivePeerDependencies: transitivePeerDependencies:
@ -893,13 +840,6 @@ packages:
- typescript - typescript
dev: false dev: false
/@typescript-eslint/visitor-keys@6.19.0:
resolution: {integrity: sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
'@typescript-eslint/types': 6.19.0
eslint-visitor-keys: 3.4.3
/@typescript-eslint/visitor-keys@6.19.1: /@typescript-eslint/visitor-keys@6.19.1:
resolution: {integrity: sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==} resolution: {integrity: sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
@ -1099,8 +1039,8 @@ packages:
peerDependencies: peerDependencies:
postcss: ^8.1.0 postcss: ^8.1.0
dependencies: dependencies:
browserslist: 4.22.2 browserslist: 4.22.3
caniuse-lite: 1.0.30001579 caniuse-lite: 1.0.30001580
fraction.js: 4.3.7 fraction.js: 4.3.7
normalize-range: 0.1.2 normalize-range: 0.1.2
picocolors: 1.0.0 picocolors: 1.0.0
@ -1160,15 +1100,15 @@ packages:
dependencies: dependencies:
fill-range: 7.0.1 fill-range: 7.0.1
/browserslist@4.22.2: /browserslist@4.22.3:
resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} resolution: {integrity: sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true hasBin: true
dependencies: dependencies:
caniuse-lite: 1.0.30001579 caniuse-lite: 1.0.30001580
electron-to-chromium: 1.4.640 electron-to-chromium: 1.4.648
node-releases: 2.0.14 node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.22.2) update-browserslist-db: 1.0.13(browserslist@4.22.3)
dev: true dev: true
/buffer-equal-constant-time@1.0.1: /buffer-equal-constant-time@1.0.1:
@ -1199,8 +1139,8 @@ packages:
engines: {node: '>= 6'} engines: {node: '>= 6'}
dev: true dev: true
/caniuse-lite@1.0.30001579: /caniuse-lite@1.0.30001580:
resolution: {integrity: sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==} resolution: {integrity: sha512-mtj5ur2FFPZcCEpXFy8ADXbDACuNFXg6mxVDqp7tqooX6l3zwm+d8EPoeOSIFRDvHs8qu7/SLFOGniULkcH2iA==}
/chalk@4.1.2: /chalk@4.1.2:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
@ -1392,7 +1332,7 @@ packages:
/dom-helpers@5.2.1: /dom-helpers@5.2.1:
resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==}
dependencies: dependencies:
'@babel/runtime': 7.23.8 '@babel/runtime': 7.23.9
csstype: 3.1.3 csstype: 3.1.3
dev: false dev: false
@ -1406,8 +1346,8 @@ packages:
safe-buffer: 5.2.1 safe-buffer: 5.2.1
dev: false dev: false
/electron-to-chromium@1.4.640: /electron-to-chromium@1.4.648:
resolution: {integrity: sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA==} resolution: {integrity: sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==}
dev: true dev: true
/emoji-regex@8.0.0: /emoji-regex@8.0.0:
@ -1532,12 +1472,12 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@next/eslint-plugin-next': 14.0.4 '@next/eslint-plugin-next': 14.0.4
'@rushstack/eslint-patch': 1.7.0 '@rushstack/eslint-patch': 1.7.2
'@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3)
eslint: 8.56.0 eslint: 8.56.0
eslint-import-resolver-node: 0.3.9 eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0) eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-jsx-a11y: 6.8.0(eslint@8.56.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.56.0)
eslint-plugin-react: 7.33.2(eslint@8.56.0) eslint-plugin-react: 7.33.2(eslint@8.56.0)
eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0)
@ -1557,7 +1497,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0): /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0):
resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies: peerDependencies:
@ -1567,8 +1507,8 @@ packages:
debug: 4.3.4 debug: 4.3.4
enhanced-resolve: 5.15.0 enhanced-resolve: 5.15.0
eslint: 8.56.0 eslint: 8.56.0
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
fast-glob: 3.3.2 fast-glob: 3.3.2
get-tsconfig: 4.7.2 get-tsconfig: 4.7.2
is-core-module: 2.13.1 is-core-module: 2.13.1
@ -1580,37 +1520,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser': '*'
eslint: '*'
eslint-import-resolver-node: '*'
eslint-import-resolver-typescript: '*'
eslint-import-resolver-webpack: '*'
peerDependenciesMeta:
'@typescript-eslint/parser':
optional: true
eslint:
optional: true
eslint-import-resolver-node:
optional: true
eslint-import-resolver-typescript:
optional: true
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
debug: 3.2.7
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
transitivePeerDependencies:
- supports-color
dev: true
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
@ -1635,11 +1545,12 @@ packages:
debug: 3.2.7 debug: 3.2.7
eslint: 8.56.0 eslint: 8.56.0
eslint-import-resolver-node: 0.3.9 eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0): /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
@ -1658,7 +1569,7 @@ packages:
doctrine: 2.1.0 doctrine: 2.1.0
eslint: 8.56.0 eslint: 8.56.0
eslint-import-resolver-node: 0.3.9 eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
hasown: 2.0.0 hasown: 2.0.0
is-core-module: 2.13.1 is-core-module: 2.13.1
is-glob: 4.0.3 is-glob: 4.0.3
@ -1680,7 +1591,7 @@ packages:
peerDependencies: peerDependencies:
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8
dependencies: dependencies:
'@babel/runtime': 7.23.8 '@babel/runtime': 7.23.9
aria-query: 5.3.0 aria-query: 5.3.0
array-includes: 3.1.7 array-includes: 3.1.7
array.prototype.flatmap: 1.3.2 array.prototype.flatmap: 1.3.2
@ -1837,8 +1748,8 @@ packages:
/fast-levenshtein@2.0.6: /fast-levenshtein@2.0.6:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
/fastq@1.16.0: /fastq@1.17.0:
resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==} resolution: {integrity: sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==}
dependencies: dependencies:
reusify: 1.0.4 reusify: 1.0.4
@ -2105,8 +2016,8 @@ packages:
resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==}
engines: {node: '>= 4'} engines: {node: '>= 4'}
/immutable@4.3.4: /immutable@4.3.5:
resolution: {integrity: sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==} resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==}
dev: false dev: false
/import-fresh@3.3.0: /import-fresh@3.3.0:
@ -2495,8 +2406,8 @@ packages:
dependencies: dependencies:
js-tokens: 4.0.0 js-tokens: 4.0.0
/lru-cache@10.1.0: /lru-cache@10.2.0:
resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==} resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==}
engines: {node: 14 || >=16.14} engines: {node: 14 || >=16.14}
dev: true dev: true
@ -2513,14 +2424,14 @@ packages:
semver: 6.3.1 semver: 6.3.1
dev: false dev: false
/mantine-form-zod-resolver@1.1.0(@mantine/form@7.4.2)(zod@3.22.4): /mantine-form-zod-resolver@1.1.0(@mantine/form@7.5.0)(zod@3.22.4):
resolution: {integrity: sha512-hidTuYq6agSF5XbkcVVcr0mkGs9ki/x8OC9ldZMxGLVGja6bdl+x4k1hCNrigCG90DBoMDnu0bo3hprGBBlUZA==} resolution: {integrity: sha512-hidTuYq6agSF5XbkcVVcr0mkGs9ki/x8OC9ldZMxGLVGja6bdl+x4k1hCNrigCG90DBoMDnu0bo3hprGBBlUZA==}
engines: {node: '>=16.6.0'} engines: {node: '>=16.6.0'}
peerDependencies: peerDependencies:
'@mantine/form': '>=7.0.0' '@mantine/form': '>=7.0.0'
zod: '>=3.0.0' zod: '>=3.0.0'
dependencies: dependencies:
'@mantine/form': 7.4.2(react@18.2.0) '@mantine/form': 7.5.0(react@18.2.0)
zod: 3.22.4 zod: 3.22.4
dev: false dev: false
@ -2621,7 +2532,7 @@ packages:
'@next/env': 14.1.0 '@next/env': 14.1.0
'@swc/helpers': 0.5.2 '@swc/helpers': 0.5.2
busboy: 1.6.0 busboy: 1.6.0
caniuse-lite: 1.0.30001579 caniuse-lite: 1.0.30001580
graceful-fs: 4.2.11 graceful-fs: 4.2.11
postcss: 8.4.31 postcss: 8.4.31
react: 18.2.0 react: 18.2.0
@ -2689,8 +2600,8 @@ packages:
set-blocking: 2.0.0 set-blocking: 2.0.0
dev: false dev: false
/oauth4webapi@2.7.0: /oauth4webapi@2.8.1:
resolution: {integrity: sha512-XxmYWOSL9jO4K/ufyZL0YeqE1M+3ZNJ4gdo8C3bpuBemibFBLAlAXiVia2HCiErTzX+q+CFDlhf4o7P0HVsZ0w==} resolution: {integrity: sha512-Jm1Z6eUumtevQWxMllSw+4diHOcFyxuc3KAXoyh4fbpHndbXRbviyrLoCn8htEdHYZM/MIOVbeWjDk86BxVF+A==}
dev: false dev: false
/object-assign@4.1.1: /object-assign@4.1.1:
@ -2818,7 +2729,7 @@ packages:
resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==}
engines: {node: '>=16 || 14 >=14.17'} engines: {node: '>=16 || 14 >=14.17'}
dependencies: dependencies:
lru-cache: 10.1.0 lru-cache: 10.2.0
minipass: 7.0.4 minipass: 7.0.4
dev: true dev: true
@ -3087,7 +2998,7 @@ packages:
peerDependencies: peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0
dependencies: dependencies:
'@babel/runtime': 7.23.8 '@babel/runtime': 7.23.9
react: 18.2.0 react: 18.2.0
use-composed-ref: 1.3.0(react@18.2.0) use-composed-ref: 1.3.0(react@18.2.0)
use-latest: 1.2.1(@types/react@18.2.48)(react@18.2.0) use-latest: 1.2.1(@types/react@18.2.48)(react@18.2.0)
@ -3101,7 +3012,7 @@ packages:
react: '>=16.6.0' react: '>=16.6.0'
react-dom: '>=16.6.0' react-dom: '>=16.6.0'
dependencies: dependencies:
'@babel/runtime': 7.23.8 '@babel/runtime': 7.23.9
dom-helpers: 5.2.1 dom-helpers: 5.2.1
loose-envify: 1.4.0 loose-envify: 1.4.0
prop-types: 15.8.1 prop-types: 15.8.1
@ -3235,7 +3146,7 @@ packages:
hasBin: true hasBin: true
dependencies: dependencies:
chokidar: 3.5.3 chokidar: 3.5.3
immutable: 4.3.4 immutable: 4.3.5
source-map-js: 1.0.2 source-map-js: 1.0.2
dev: false dev: false
@ -3646,13 +3557,13 @@ packages:
/undici-types@5.26.5: /undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
/update-browserslist-db@1.0.13(browserslist@4.22.2): /update-browserslist-db@1.0.13(browserslist@4.22.3):
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
browserslist: '>= 4.21.0' browserslist: '>= 4.21.0'
dependencies: dependencies:
browserslist: 4.22.2 browserslist: 4.22.3
escalade: 3.1.1 escalade: 3.1.1
picocolors: 1.0.0 picocolors: 1.0.0
dev: true dev: true

View File

@ -0,0 +1,20 @@
"use client"
import { Button } from '@mantine/core'
import Link from 'next/link'
import { usePathname, useRouter } from 'next/navigation'
import React, { useState } from 'react'
import { TbPlus } from 'react-icons/tb'
import { CreateModal } from '../../_modals'
export default function CreateButton() {
const [isModalOpened, setModalOpened] = useState(false)
return (
<>
<Button leftSection={<TbPlus />} onClick={() => setModalOpened(true)}>New Role</Button>
<CreateModal opened={isModalOpened} onClose={() => setModalOpened(false)} />
</>
)
}

View File

@ -0,0 +1,25 @@
import React from "react";
import FormModal from "../FormModal";
interface Props {
opened: boolean
onClose?: () => void
}
export default function CreateModal(props: Props) {
return (
<FormModal
title="Create new role"
data={{
code: "",
description: "",
id: "",
isActive: false,
name: "",
}}
readonly={false}
opened={props.opened}
onClose={props.onClose}
/>
);
}

View File

@ -0,0 +1 @@
export { default } from "./CreateModal"

View File

@ -0,0 +1,131 @@
"use client"
import roleFormDataSchema, {
RoleFormData,
} from "@/features/dashboard/roles/formSchemas/RoleFormData";
import {
Flex,
Modal,
Stack,
Switch,
TextInput,
Textarea,
Button,
ScrollArea,
Checkbox,
} from "@mantine/core";
import { useForm, zodResolver } from "@mantine/form";
import { useRouter } from "next/navigation";
import React, { useState } from "react";
import { TbDeviceFloppy } from "react-icons/tb";
interface Props {
title: string;
readonly?: boolean;
data: RoleFormData;
opened: boolean;
onClose?: () => void
}
export default function FormModal(props: Props) {
const router = useRouter();
const [isSubmitting, setSubmitting] = useState(false);
const [value, setValue] = useState("")
const form = useForm<RoleFormData>({
initialValues: props.data,
validate: zodResolver(roleFormDataSchema),
validateInputOnChange: false,
onValuesChange: (values) => {console.log(values)}
});
const closeModal = () => {
form.reset()
props.onClose ? props.onClose() : router.replace("?");
};
return (
<Modal
opened={props.opened}
onClose={closeModal}
title={props.title}
scrollAreaComponent={ScrollArea.Autosize}
>
<Stack mt="sm" gap="lg" px="lg">
{/* ID */}
{props.data.id ? (
<TextInput
label="ID"
readOnly
variant="filled"
{...form.getInputProps("id")}
/>
) : <div></div>}
{/* Code */}
<TextInput
data-autofocus
label="Code"
readOnly={props.readonly}
disabled={isSubmitting}
{...form.getInputProps("code")}
/>
{/* Name */}
<TextInput
label="Name"
readOnly={props.readonly}
disabled={isSubmitting}
// {...form.getInputProps("name")}
/>
{/* Description */}
<Textarea
label="Description"
readOnly={props.readonly}
disabled={isSubmitting}
// {...form.getInputProps("description")}
/>
<Checkbox label="Active" labelPosition="right" />
<Switch
label="Active jir"
labelPosition="right"
// {...form.getInputProps("isActive", {
// type: "checkbox",
// })}
/>
<Switch
label="Active jir"
labelPosition="left"
// {...form.getInputProps("isActive", {
// type: "checkbox",
// })}
/>
{/* Buttons */}
<Flex justify="flex-end" align="center" gap="lg" mt="lg">
<Button
variant="outline"
onClick={closeModal}
disabled={isSubmitting}
>
Close
</Button>
{!props.readonly && (
<Button
variant="filled"
leftSection={<TbDeviceFloppy size={20} />}
type="submit"
loading={isSubmitting}
>
Save
</Button>
)}
</Flex>
</Stack>
</Modal>
);
}

View File

@ -0,0 +1 @@
export { default } from "./FormModal"

View File

@ -0,0 +1,5 @@
import CreateModal from "./CreateModal";
export {
CreateModal
}

View File

@ -7,8 +7,13 @@ import {
} from "@tanstack/react-table"; } from "@tanstack/react-table";
import React from "react"; import React from "react";
import columns from "./columns"; import columns from "./columns";
import CrudPermissions from "@/features/auth/types/CrudPermissions";
export default function RolesTable() { interface Props {
permissions: Partial<CrudPermissions>,
}
export default function RolesTable(props: Props) {
const table = useReactTable({ const table = useReactTable({
data: [], data: [],
columns, columns,

View File

@ -33,6 +33,11 @@ const columns = [
columnHelper.accessor("userCount", { columnHelper.accessor("userCount", {
header: "Users" header: "Users"
}), }),
columnHelper.display({
id: "Actions",
header: "Actions",
})
] ]
export default columns; export default columns;

View File

@ -1,17 +1,44 @@
import { Card, Stack, Title } from "@mantine/core"; import { Button, Card, Flex, Stack, Title } from "@mantine/core";
import { Metadata } from "next"; import { Metadata } from "next";
import React from "react"; import React from "react";
import RolesTable from "./_tables/RolesTable/RolesTable"; import RolesTable from "./_tables/RolesTable/RolesTable";
import { TbPlus } from "react-icons/tb";
import checkPermission from "@/features/auth/tools/checkPermission";
import { unauthorized } from "@/BaseError";
import Link from "next/link";
import { CreateModal } from "./_modals";
import FormModal from "./_modals/FormModal";
import CreateButton from "./_components/CreateButton/CreateButton";
interface Props {
searchParams: {
detail?: string,
edit?: string,
delete?: string,
create?: string,
}
}
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Roles", title: "Roles",
}; };
export default function RolesPage() { export default async function RolesPage({searchParams}: Props) {
return <Stack> if (!(await checkPermission("role.readAll"))) {
<Title order={1}>Roles</Title> return unauthorized();
<Card> }
<RolesTable />
</Card> const allowCreate = await checkPermission("role.create")
</Stack>;
return (
<Stack>
<Title order={1}>Roles</Title>
<Card>
<Flex justify="flex-end">
{ allowCreate && <CreateButton />}
</Flex>
<RolesTable permissions={{}} />
</Card>
</Stack>
);
} }

View File

@ -1,7 +1,7 @@
"use client"; "use client";
import React, { useState } from "react"; import React, { useState } from "react";
import { useForm } from "@mantine/form"; import { useForm } from "@mantine/form";
import { useRouter } from "next/router"; import { useRouter } from "next/navigation";
import { import {
Avatar, Avatar,
Button, Button,
@ -45,8 +45,6 @@ export default function FormModal(props: Props) {
if (isSubmitting) return; if (isSubmitting) return;
router router
.replace("?") .replace("?")
.then(() => {})
.catch(() => {});
}; };
/** /**
@ -60,10 +58,7 @@ export default function FormModal(props: Props) {
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
showNotification(response.message); showNotification(response.message);
router router.replace("?")
.replace("?")
.then(() => {})
.catch(() => {});
return; return;
} else { } else {
if (response.errors) { if (response.errors) {

View File

@ -3,7 +3,7 @@ import "server-only"
import { getUserFromToken } from "../authUtils"; import { getUserFromToken } from "../authUtils";
import getCurrentUser from "./getCurrentUser"; import getCurrentUser from "./getCurrentUser";
export default async function checkPermission(permission?: "guest-only" | "authenticated-only"){ export default async function checkPermission(permission?: "guest-only" | "authenticated-only" | string & {}){
//TODO: Add permission check //TODO: Add permission check
@ -19,5 +19,5 @@ export default async function checkPermission(permission?: "guest-only" | "authe
return true; return true;
} }
return false; return true;
} }

View File

@ -0,0 +1,8 @@
type CrudPermissions = {
create: boolean,
read: boolean,
update: boolean,
delete: boolean
}
export default CrudPermissions;

View File

@ -0,0 +1,19 @@
import { z } from "zod"
export interface RoleFormData {
id: string;
name: string;
code: string;
description: string;
isActive: boolean;
}
const roleFormDataSchema = z.object({
id: z.string().nullable(),
name: z.string(),
code: z.string(),
description: z.string(),
isActive: z.boolean(),
})
export default roleFormDataSchema;