From 16110e2bcae15f68bacae1653caa60e5c97a577d Mon Sep 17 00:00:00 2001 From: Hugo Lextrait Date: Mon, 20 Feb 2023 12:40:37 +0100 Subject: [PATCH] :construction: WIP start notification comportment --- .gitignore | 1 + package-lock.json | 504 +++++++++--------- package.json | 11 +- prettier.config.js | 29 +- src/front/Services/EventEmitter.ts | 9 + src/front/Stores/BaseStore.ts | 16 + src/front/Stores/Toasts.tsx | 106 ++++ .../ToastElement/classes.module.scss | 105 ++++ .../ToastsContainer/ToastElement/index.tsx | 102 ++++ .../ToastsContainer/classes.module.scss | 31 ++ .../Toasts/ToastsContainer/index.tsx | 46 ++ .../Toasts/ToastsHandler/index.tsx | 13 + .../DesignSystem/Typography/index.tsx | 2 +- .../LayoutTemplates/DefaultTemplate/index.tsx | 2 + .../components/Layouts/DesignSystem/index.tsx | 23 +- src/front/components/Layouts/Home/index.tsx | 6 +- .../components/Layouts/PageNotFound/index.tsx | 4 +- .../components/Materials/Header/index.tsx | 2 +- src/front/themes/constants.scss | 7 +- src/pages/404.tsx | 2 +- src/pages/_app.tsx | 2 +- src/pages/design-system.tsx | 2 +- src/pages/index.tsx | 2 +- tsconfig.json | 10 +- 24 files changed, 747 insertions(+), 290 deletions(-) create mode 100644 src/front/Services/EventEmitter.ts create mode 100644 src/front/Stores/BaseStore.ts create mode 100644 src/front/Stores/Toasts.tsx create mode 100644 src/front/components/DesignSystem/Toasts/ToastsContainer/ToastElement/classes.module.scss create mode 100644 src/front/components/DesignSystem/Toasts/ToastsContainer/ToastElement/index.tsx create mode 100644 src/front/components/DesignSystem/Toasts/ToastsContainer/classes.module.scss create mode 100644 src/front/components/DesignSystem/Toasts/ToastsContainer/index.tsx create mode 100644 src/front/components/DesignSystem/Toasts/ToastsHandler/index.tsx diff --git a/.gitignore b/.gitignore index c092e34a..f4470a3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + dist .next diff --git a/package-lock.json b/package-lock.json index e7e6c80c..9c4db16e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -83,6 +83,36 @@ "resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.5.tgz", "integrity": "sha512-0Ry4NhJy6qLbXhvxPRUQ1H6RzgtryGdUto7hfgAK0Iw/bScgeVjwLZdfhm2iT7qsOS32apo9cWzLCxjc6iGPsA==" }, + "node_modules/@next/swc-android-arm-eabi": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.5.tgz", + "integrity": "sha512-QAEf3YM9U0qWVQTxgF3Tsh4OeCN1i9Smsf6cVlwZsPzoLyj2nQ879joCoN+ONqDknkBgG6OG/ajefywL3jw9Cg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-android-arm64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.5.tgz", + "integrity": "sha512-ZmtGPTghRuT5YKL0nNcC2bBVSiG1O0is16eIZ2rWSP/hRW64ZCcAew6pxw2rihntNp22UfequjSTHd91WE/tyQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@next/swc-darwin-arm64": { "version": "13.1.5", "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.5.tgz", @@ -98,6 +128,156 @@ "node": ">= 10" } }, + "node_modules/@next/swc-darwin-x64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.5.tgz", + "integrity": "sha512-6mPX0GNRg8NzjV70at8I8pD9YBnPHDpxJCoMuIqysdTjtQhd09Xk6GUhquNhp1kEJzzVk7OW5l2ch4XIJjtY3A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-freebsd-x64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.5.tgz", + "integrity": "sha512-nR4a/SNblG0w8hhYRflTZjk4yD99ld18w/FCftw99ziw8sgciBlOXRICJIiRIaMRU8UH7QLSgBOQVnfNcVNKMA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm-gnueabihf": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.5.tgz", + "integrity": "sha512-EzkltCVKg3gUzamoeKPhGeSgXTTLAhSzc7v/+g1Y+HQa7JKMrlzdRkrJf+H4LJXcz7lnxgNKHGRyZBSXnmJKJw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.5.tgz", + "integrity": "sha512-E7HMkdoxStmTUJU4KzBUU4vZ5DHT4Gd327tC3KFZS5lda0NRerJAOCfsRg+fBj22FvCb1UWsX6XI+weL6xhyeQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.5.tgz", + "integrity": "sha512-qlO0Fd3GQwJS6YpbF9NyL5NGHVZ43dKtZDC/jP4vdeMIYDtSu13HcY/nmA1NdW+RpMwDxSCpx4WKsCCEZGIX8Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.5.tgz", + "integrity": "sha512-GftSBFAay2nocGl+KNqFsj6EVSvomaM/bp86hzezbKsTwQmu76PjOCVcejI1gE+4k7f5zPDgCuorF6F04BV0HQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.5.tgz", + "integrity": "sha512-UD+3lxU4yuAjd+uBkCDfBpAcbGAVfEcE8mX/efIxUGIImmzN0QzgTHYEpKFnY3Lxu02dIBcwQRT3Q5mfO4obng==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.5.tgz", + "integrity": "sha512-uzsvkQY+K3EbL+97IUHPWZPwjsCmCkdH/O5Cf9wCnh0k0gaj7ob1mGKqr1vNNak+9U7HloGwuHcXnZpijWSP7w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.5.tgz", + "integrity": "sha512-v0NaC1w8mPf620GlJaHBdEm3dm4G4AEQMasDqjzQvo0yCRrvtvzMgCIe8MocBxFHzaF6868NybMqvumxP5YxEg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.5.tgz", + "integrity": "sha512-IZHwvd649ccbWyLCfu92IXEpR250NpmBkaRelPV+WVm4jrd62FKRFCNdqdCXq6TrEg9wN8cK4YG8tm44uEZqLA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@prisma/client": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.9.0.tgz", @@ -2270,186 +2450,6 @@ "engines": { "node": ">=6" } - }, - "node_modules/@next/swc-android-arm-eabi": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.5.tgz", - "integrity": "sha512-QAEf3YM9U0qWVQTxgF3Tsh4OeCN1i9Smsf6cVlwZsPzoLyj2nQ879joCoN+ONqDknkBgG6OG/ajefywL3jw9Cg==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-android-arm64": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.5.tgz", - "integrity": "sha512-ZmtGPTghRuT5YKL0nNcC2bBVSiG1O0is16eIZ2rWSP/hRW64ZCcAew6pxw2rihntNp22UfequjSTHd91WE/tyQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.5.tgz", - "integrity": "sha512-6mPX0GNRg8NzjV70at8I8pD9YBnPHDpxJCoMuIqysdTjtQhd09Xk6GUhquNhp1kEJzzVk7OW5l2ch4XIJjtY3A==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-freebsd-x64": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.5.tgz", - "integrity": "sha512-nR4a/SNblG0w8hhYRflTZjk4yD99ld18w/FCftw99ziw8sgciBlOXRICJIiRIaMRU8UH7QLSgBOQVnfNcVNKMA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.5.tgz", - "integrity": "sha512-EzkltCVKg3gUzamoeKPhGeSgXTTLAhSzc7v/+g1Y+HQa7JKMrlzdRkrJf+H4LJXcz7lnxgNKHGRyZBSXnmJKJw==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.5.tgz", - "integrity": "sha512-E7HMkdoxStmTUJU4KzBUU4vZ5DHT4Gd327tC3KFZS5lda0NRerJAOCfsRg+fBj22FvCb1UWsX6XI+weL6xhyeQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.5.tgz", - "integrity": "sha512-qlO0Fd3GQwJS6YpbF9NyL5NGHVZ43dKtZDC/jP4vdeMIYDtSu13HcY/nmA1NdW+RpMwDxSCpx4WKsCCEZGIX8Q==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.5.tgz", - "integrity": "sha512-GftSBFAay2nocGl+KNqFsj6EVSvomaM/bp86hzezbKsTwQmu76PjOCVcejI1gE+4k7f5zPDgCuorF6F04BV0HQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.5.tgz", - "integrity": "sha512-UD+3lxU4yuAjd+uBkCDfBpAcbGAVfEcE8mX/efIxUGIImmzN0QzgTHYEpKFnY3Lxu02dIBcwQRT3Q5mfO4obng==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.5.tgz", - "integrity": "sha512-uzsvkQY+K3EbL+97IUHPWZPwjsCmCkdH/O5Cf9wCnh0k0gaj7ob1mGKqr1vNNak+9U7HloGwuHcXnZpijWSP7w==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.5.tgz", - "integrity": "sha512-v0NaC1w8mPf620GlJaHBdEm3dm4G4AEQMasDqjzQvo0yCRrvtvzMgCIe8MocBxFHzaF6868NybMqvumxP5YxEg==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.5.tgz", - "integrity": "sha512-IZHwvd649ccbWyLCfu92IXEpR250NpmBkaRelPV+WVm4jrd62FKRFCNdqdCXq6TrEg9wN8cK4YG8tm44uEZqLA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } } }, "dependencies": { @@ -2485,12 +2485,84 @@ "resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.5.tgz", "integrity": "sha512-0Ry4NhJy6qLbXhvxPRUQ1H6RzgtryGdUto7hfgAK0Iw/bScgeVjwLZdfhm2iT7qsOS32apo9cWzLCxjc6iGPsA==" }, + "@next/swc-android-arm-eabi": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.5.tgz", + "integrity": "sha512-QAEf3YM9U0qWVQTxgF3Tsh4OeCN1i9Smsf6cVlwZsPzoLyj2nQ879joCoN+ONqDknkBgG6OG/ajefywL3jw9Cg==", + "optional": true + }, + "@next/swc-android-arm64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.5.tgz", + "integrity": "sha512-ZmtGPTghRuT5YKL0nNcC2bBVSiG1O0is16eIZ2rWSP/hRW64ZCcAew6pxw2rihntNp22UfequjSTHd91WE/tyQ==", + "optional": true + }, "@next/swc-darwin-arm64": { "version": "13.1.5", "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.5.tgz", "integrity": "sha512-aeFXK+M/zmG/CNdMJ0tGNs0MWcLueUe7vZ2V6fa+2yz/ZgYJLI7fEfFvVh1p1yBMzupSbZDowvMuCSFTaeg3MA==", "optional": true }, + "@next/swc-darwin-x64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.5.tgz", + "integrity": "sha512-6mPX0GNRg8NzjV70at8I8pD9YBnPHDpxJCoMuIqysdTjtQhd09Xk6GUhquNhp1kEJzzVk7OW5l2ch4XIJjtY3A==", + "optional": true + }, + "@next/swc-freebsd-x64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.5.tgz", + "integrity": "sha512-nR4a/SNblG0w8hhYRflTZjk4yD99ld18w/FCftw99ziw8sgciBlOXRICJIiRIaMRU8UH7QLSgBOQVnfNcVNKMA==", + "optional": true + }, + "@next/swc-linux-arm-gnueabihf": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.5.tgz", + "integrity": "sha512-EzkltCVKg3gUzamoeKPhGeSgXTTLAhSzc7v/+g1Y+HQa7JKMrlzdRkrJf+H4LJXcz7lnxgNKHGRyZBSXnmJKJw==", + "optional": true + }, + "@next/swc-linux-arm64-gnu": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.5.tgz", + "integrity": "sha512-E7HMkdoxStmTUJU4KzBUU4vZ5DHT4Gd327tC3KFZS5lda0NRerJAOCfsRg+fBj22FvCb1UWsX6XI+weL6xhyeQ==", + "optional": true + }, + "@next/swc-linux-arm64-musl": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.5.tgz", + "integrity": "sha512-qlO0Fd3GQwJS6YpbF9NyL5NGHVZ43dKtZDC/jP4vdeMIYDtSu13HcY/nmA1NdW+RpMwDxSCpx4WKsCCEZGIX8Q==", + "optional": true + }, + "@next/swc-linux-x64-gnu": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.5.tgz", + "integrity": "sha512-GftSBFAay2nocGl+KNqFsj6EVSvomaM/bp86hzezbKsTwQmu76PjOCVcejI1gE+4k7f5zPDgCuorF6F04BV0HQ==", + "optional": true + }, + "@next/swc-linux-x64-musl": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.5.tgz", + "integrity": "sha512-UD+3lxU4yuAjd+uBkCDfBpAcbGAVfEcE8mX/efIxUGIImmzN0QzgTHYEpKFnY3Lxu02dIBcwQRT3Q5mfO4obng==", + "optional": true + }, + "@next/swc-win32-arm64-msvc": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.5.tgz", + "integrity": "sha512-uzsvkQY+K3EbL+97IUHPWZPwjsCmCkdH/O5Cf9wCnh0k0gaj7ob1mGKqr1vNNak+9U7HloGwuHcXnZpijWSP7w==", + "optional": true + }, + "@next/swc-win32-ia32-msvc": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.5.tgz", + "integrity": "sha512-v0NaC1w8mPf620GlJaHBdEm3dm4G4AEQMasDqjzQvo0yCRrvtvzMgCIe8MocBxFHzaF6868NybMqvumxP5YxEg==", + "optional": true + }, + "@next/swc-win32-x64-msvc": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.5.tgz", + "integrity": "sha512-IZHwvd649ccbWyLCfu92IXEpR250NpmBkaRelPV+WVm4jrd62FKRFCNdqdCXq6TrEg9wN8cK4YG8tm44uEZqLA==", + "optional": true + }, "@prisma/client": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.9.0.tgz", @@ -4158,78 +4230,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" - }, - "@next/swc-android-arm-eabi": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.5.tgz", - "integrity": "sha512-QAEf3YM9U0qWVQTxgF3Tsh4OeCN1i9Smsf6cVlwZsPzoLyj2nQ879joCoN+ONqDknkBgG6OG/ajefywL3jw9Cg==", - "optional": true - }, - "@next/swc-android-arm64": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.5.tgz", - "integrity": "sha512-ZmtGPTghRuT5YKL0nNcC2bBVSiG1O0is16eIZ2rWSP/hRW64ZCcAew6pxw2rihntNp22UfequjSTHd91WE/tyQ==", - "optional": true - }, - "@next/swc-darwin-x64": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.5.tgz", - "integrity": "sha512-6mPX0GNRg8NzjV70at8I8pD9YBnPHDpxJCoMuIqysdTjtQhd09Xk6GUhquNhp1kEJzzVk7OW5l2ch4XIJjtY3A==", - "optional": true - }, - "@next/swc-freebsd-x64": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.5.tgz", - "integrity": "sha512-nR4a/SNblG0w8hhYRflTZjk4yD99ld18w/FCftw99ziw8sgciBlOXRICJIiRIaMRU8UH7QLSgBOQVnfNcVNKMA==", - "optional": true - }, - "@next/swc-linux-arm-gnueabihf": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.5.tgz", - "integrity": "sha512-EzkltCVKg3gUzamoeKPhGeSgXTTLAhSzc7v/+g1Y+HQa7JKMrlzdRkrJf+H4LJXcz7lnxgNKHGRyZBSXnmJKJw==", - "optional": true - }, - "@next/swc-linux-arm64-gnu": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.5.tgz", - "integrity": "sha512-E7HMkdoxStmTUJU4KzBUU4vZ5DHT4Gd327tC3KFZS5lda0NRerJAOCfsRg+fBj22FvCb1UWsX6XI+weL6xhyeQ==", - "optional": true - }, - "@next/swc-linux-arm64-musl": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.5.tgz", - "integrity": "sha512-qlO0Fd3GQwJS6YpbF9NyL5NGHVZ43dKtZDC/jP4vdeMIYDtSu13HcY/nmA1NdW+RpMwDxSCpx4WKsCCEZGIX8Q==", - "optional": true - }, - "@next/swc-linux-x64-gnu": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.5.tgz", - "integrity": "sha512-GftSBFAay2nocGl+KNqFsj6EVSvomaM/bp86hzezbKsTwQmu76PjOCVcejI1gE+4k7f5zPDgCuorF6F04BV0HQ==", - "optional": true - }, - "@next/swc-linux-x64-musl": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.5.tgz", - "integrity": "sha512-UD+3lxU4yuAjd+uBkCDfBpAcbGAVfEcE8mX/efIxUGIImmzN0QzgTHYEpKFnY3Lxu02dIBcwQRT3Q5mfO4obng==", - "optional": true - }, - "@next/swc-win32-arm64-msvc": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.5.tgz", - "integrity": "sha512-uzsvkQY+K3EbL+97IUHPWZPwjsCmCkdH/O5Cf9wCnh0k0gaj7ob1mGKqr1vNNak+9U7HloGwuHcXnZpijWSP7w==", - "optional": true - }, - "@next/swc-win32-ia32-msvc": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.5.tgz", - "integrity": "sha512-v0NaC1w8mPf620GlJaHBdEm3dm4G4AEQMasDqjzQvo0yCRrvtvzMgCIe8MocBxFHzaF6868NybMqvumxP5YxEg==", - "optional": true - }, - "@next/swc-win32-x64-msvc": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.5.tgz", - "integrity": "sha512-IZHwvd649ccbWyLCfu92IXEpR250NpmBkaRelPV+WVm4jrd62FKRFCNdqdCXq6TrEg9wN8cK4YG8tm44uEZqLA==", - "optional": true } } } diff --git a/package.json b/package.json index 3415d741..3ebef177 100644 --- a/package.json +++ b/package.json @@ -4,15 +4,20 @@ "description": "tezosLink project", "_moduleAliases": { "@Api": "./dist/api", + "@Front": "./dist/front/*", + "@Assets": "./dist/front/Assets/*", + "@Components": "./dist/front/Components/*", + "@Themes": "./dist/front/Themes/*", + "@Stores": "./dist/front/Stores/*", + "@FrontServices": "./dist/front/services/*", "@Pages": "./dist/pages", - "@Common": "./dist/common", "@Services": "./dist/common/services", "@Entries": "./dist/common/entries", + "@Common": "./dist/common", "@Config": "./dist/common/config", "@Entities": "./dist/common/entities", "@System": "./dist/common/system", - "@ControllerPattern": "./dist/common/system/controller-pattern", - "@Front": "./dist/front/*" + "@ControllerPattern": "./dist/common/system/controller-pattern" }, "scripts": { "build": "next build && tsc", diff --git a/prettier.config.js b/prettier.config.js index 1b9123b7..2b1f577c 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -1,16 +1,17 @@ module.exports = { - overrides: [ - { - files: "src/**/*.ts", - options: { - tabWidth: 4, - useTabs: true, - singleQuote: false, - trailingComma: "all", - printWidth: 240, - endOfLine: "crlf", - semi: true, - }, - }, - ], + overrides: [ + { + files: ["src/**/*.ts", "src/**/*.tsx", "src/**/*.scss", "./*.js"], + options: { + tabWidth: 4, + useTabs: true, + singleQuote: false, + trailingComma: "all", + printWidth: 240, + semi: true, + bracketSameLine: true, + }, + }, + ], }; + diff --git a/src/front/Services/EventEmitter.ts b/src/front/Services/EventEmitter.ts new file mode 100644 index 00000000..8b21e690 --- /dev/null +++ b/src/front/Services/EventEmitter.ts @@ -0,0 +1,9 @@ +import Events from "events"; + +export default class EventEmitter extends Events { + constructor() { + super(); + + this.setMaxListeners(0); + } +} diff --git a/src/front/Stores/BaseStore.ts b/src/front/Stores/BaseStore.ts new file mode 100644 index 00000000..45d84403 --- /dev/null +++ b/src/front/Stores/BaseStore.ts @@ -0,0 +1,16 @@ +import EventEmitter from "@Front/Services/EventEmitter"; + + +export default abstract class BaseStore { + protected readonly event = new EventEmitter(); + + // eslint-disable-next-line @typescript-eslint/no-empty-function + protected constructor() {} + + public onChange(callback: (params: T) => void) { + this.event.on("change", callback); + return () => { + this.event.off("change", callback); + }; + } +} diff --git a/src/front/Stores/Toasts.tsx b/src/front/Stores/Toasts.tsx new file mode 100644 index 00000000..4da63178 --- /dev/null +++ b/src/front/Stores/Toasts.tsx @@ -0,0 +1,106 @@ +import EventEmitter from "@Front/Services/EventEmitter"; +// import I18n from "Components/Elements/I18n"; + +export enum EToastPriority { + HIGH = "high", + LOW = "low", +} + +export interface IToast { + id?: number; + title: string | React.ReactNode; + icon?: React.ReactNode; + text?: string | React.ReactNode; + button?: React.ReactNode; + time?: number; + closable?: boolean; + priority?: EToastPriority; +} + +export default class Toasts { + private static ctx: Toasts; + private readonly event = new EventEmitter(); + private toastList: IToast[] = []; + private uid: number = 0; + + private defaultTime: IToast["time"] = 4000; + private defaultClosable: IToast["closable"] = true; + private defaultPriority: IToast["priority"] = EToastPriority.LOW; + + private constructor() { + Toasts.ctx = this; + } + + public static getInstance() { + if (!Toasts.ctx) new this(); + return Toasts.ctx; + } + + public get toasts() { + return this.toastList; + } + + /** + * @returns removelistener callback + */ + public onChange(callback: (toastList: IToast[]) => void) { + this.event.on("change", callback); + return () => this.event.off("change", callback); + } + + public open(toast: IToast): () => void { + const index = this.toastList.indexOf(toast); + if (index !== -1) return () => this.close(toast); + + toast.id = toast.id ?? this.uid++; + toast.time = toast.time ?? this.defaultTime; + toast.closable = toast.closable ?? this.defaultClosable; + toast.priority = toast.priority ?? this.defaultPriority; + + const highToasts = this.toastList.filter((toast) => { + return toast.priority === EToastPriority.HIGH; + }); + + const lowToasts = this.toastList.filter((toast) => { + return toast.priority === EToastPriority.LOW; + }); + + if (toast.priority === EToastPriority.HIGH) { + highToasts.unshift(toast); + } else { + lowToasts.unshift(toast); + } + + this.toastList.splice(0); + this.toastList.unshift(...lowToasts); + this.toastList.unshift(...highToasts); + + this.event.emit("change", this.toastList); + + return () => this.close(toast); + } + + public close(toast: IToast) { + const index = this.toastList.indexOf(toast); + if (index === -1) return; + this.toastList.splice(index, 1); + this.event.emit("change", this.toastList); + } + + /** + * An utility static method you can use to quickly display an error toast + * with a custom error message. + * + * @param message_key a key to a l18n message. + */ + public static errorToast(message_key: string) { + Toasts.getInstance().open({ + text: "Toast text", + title: "Toast title", + // text: , + // title: , + closable: true, + priority: EToastPriority.HIGH, + }); + } +} diff --git a/src/front/components/DesignSystem/Toasts/ToastsContainer/ToastElement/classes.module.scss b/src/front/components/DesignSystem/Toasts/ToastsContainer/ToastElement/classes.module.scss new file mode 100644 index 00000000..ba90f6b4 --- /dev/null +++ b/src/front/components/DesignSystem/Toasts/ToastsContainer/ToastElement/classes.module.scss @@ -0,0 +1,105 @@ +@import "@Themes/constants.scss"; + +// @keyframes loadbar-animation { +// from { +// transform: scaleX(1); +// } +// to { +// transform: scaleX(0); +// } +// } + +@keyframes slide-left { + from { + opacity: 0; + transform: translateX(120%); + } + to { + opacity: 1; + transform: translate(0%); + } +} + +@keyframes slide-right { + from { + opacity: 1; + transform: translateX(0); + } + to { + opacity: 0; + transform: translate(120%); + } +} + +.root { + pointer-events: all; + position: relative; + padding: 24px; + background: $orange-soft; + box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.11); + border-radius: 5px; + + animation-name: slide-left; + animation-duration: 400ms; + animation-timing-function: $custom-easing; + animation-fill-mode: forwards; + + &[data-will-close="true"] { + animation-duration: 200ms; + animation-name: slide-right; + animation-timing-function: $custom-easing; + animation-fill-mode: forwards; + } + + .loadbar { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 2px; + background: var(--color-neutral-500); + border-radius: 5px; + transform-origin: right; + transform: scaleX(0); + animation: loadbar-animation var(--data-duration) linear; + } + + .header { + font-family: var(--font-primary); + font-style: normal; + font-weight: 600; + font-size: 16px; + line-height: 24px; + color: var(--color-neutral-900); + display: flex; + align-items: center; + justify-content: space-between; + + .cross { + cursor: pointer; + } + } + + .text-icon_row { + display: flex; + flex-direction: row; + align-items: center; + p { + padding-left: 14px; + width: 150%; + } + } + + .text-container { + font-family: var(--font-primary); + font-style: normal; + font-weight: 400; + font-size: 14px; + line-height: 20px; + color: var(--color-neutral-500); + } + + a { + text-decoration: none; + } +} diff --git a/src/front/components/DesignSystem/Toasts/ToastsContainer/ToastElement/index.tsx b/src/front/components/DesignSystem/Toasts/ToastsContainer/ToastElement/index.tsx new file mode 100644 index 00000000..56b6b13a --- /dev/null +++ b/src/front/components/DesignSystem/Toasts/ToastsContainer/ToastElement/index.tsx @@ -0,0 +1,102 @@ +import React from "react"; + +// Components + +// Stores + +// Styles +import classes from "./classes.module.scss"; +import Toasts, { IToast } from "@Front/Stores/Toasts"; +import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography"; + +type IProps = { + toast: IToast; +}; + +type IState = { + willClose: boolean; +}; + +export default class ToastElement extends React.Component { + private closeTimeout = 0; + constructor(props: IProps) { + super(props); + + this.state = { + willClose: false, + }; + + this.onClose = this.onClose.bind(this); + } + + public override render(): JSX.Element { + const toast = this.props.toast; + const style = { + "--data-duration": `${toast.time}ms`, + } as React.CSSProperties; + return ( +
+ {toast.time !== 0 &&
} +
+
+ {toast.icon && toast.icon} +
+ {this.getToastTitle(toast.title)} + {this.getToastText(toast.text)} +
+
+ {/* {toast.closable && } */} +
+ {toast.button} +
+ ); + } + + public override componentDidMount() { + if (this.props.toast.time === 0) return; + + this.closeTimeout = window.setTimeout(() => { + this.close(); + }, this.props.toast.time); + } + + private getToastTitle(title: string | React.ReactNode) { + if (typeof title === "string") { + return ( + + {title} + + ); + } + return title; + } + + private getToastText(text: React.ReactNode) { + if (typeof text === "string") { + return ( +
+ + {text} + +
+ ); + } + return text; + } + + private onClose(e: React.MouseEvent) { + e.preventDefault(); + e.stopPropagation(); + this.close(); + } + + private close() { + window.clearTimeout(this.closeTimeout); + this.setState({ + willClose: true, + }); + setTimeout(() => { + Toasts.getInstance().close(this.props.toast); + }, 200); + } +} diff --git a/src/front/components/DesignSystem/Toasts/ToastsContainer/classes.module.scss b/src/front/components/DesignSystem/Toasts/ToastsContainer/classes.module.scss new file mode 100644 index 00000000..4898d84b --- /dev/null +++ b/src/front/components/DesignSystem/Toasts/ToastsContainer/classes.module.scss @@ -0,0 +1,31 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + flex-direction: column; + position: fixed; + z-index: 10; + right: 0; + top: 0; + padding: 0px; + width: 0px; + max-height: calc(100vh - 80px); + overflow-y: auto; + overflow-x: hidden; + + &.open { + width: 341px; + top: 70px; + padding: 16px; + } + + & > *:not(:first-child) { + margin-top: 16px; + } + + @media (max-width: 444px) { + width: unset; + left: 0; + padding: 8px; + } +} diff --git a/src/front/components/DesignSystem/Toasts/ToastsContainer/index.tsx b/src/front/components/DesignSystem/Toasts/ToastsContainer/index.tsx new file mode 100644 index 00000000..23663ce4 --- /dev/null +++ b/src/front/components/DesignSystem/Toasts/ToastsContainer/index.tsx @@ -0,0 +1,46 @@ +import React from "react"; +import classes from "./classes.module.scss"; +import ToastElement from "./ToastElement"; +import classNames from "classnames"; +import Toasts, { IToast } from "@Front/Stores/Toasts"; + +type IProps = {}; +type IState = { + toastList: IToast[]; +}; +export default class ToastsContainer extends React.Component { + private removeOnChange = () => { }; + + public constructor(props: IProps) { + super(props); + this.state = { + toastList: Toasts.getInstance().toasts, + }; + + this.updateToasts = this.updateToasts.bind(this); + } + + public override render(): JSX.Element { + return ( +
0 && classes["open"])}> + <> + {this.state.toastList.map((toast) => { + return ; + })} + +
+ ); + } + + public override componentDidMount() { + this.removeOnChange = Toasts.getInstance().onChange(this.updateToasts); + } + + public override componentWillUnmount() { + this.removeOnChange(); + } + + private updateToasts(toastList: IToast[]) { + this.setState({ toastList }); + } +} diff --git a/src/front/components/DesignSystem/Toasts/ToastsHandler/index.tsx b/src/front/components/DesignSystem/Toasts/ToastsHandler/index.tsx new file mode 100644 index 00000000..32837fb4 --- /dev/null +++ b/src/front/components/DesignSystem/Toasts/ToastsHandler/index.tsx @@ -0,0 +1,13 @@ +import React from "react"; +import ToastsContainer from "../ToastsContainer"; + +type IProps = {}; +type IState = {}; + +export default class ToastHandler extends React.Component { + public override render(): JSX.Element { + return ( + + ); + } +} diff --git a/src/front/components/DesignSystem/Typography/index.tsx b/src/front/components/DesignSystem/Typography/index.tsx index e9275c5c..0de70eca 100644 --- a/src/front/components/DesignSystem/Typography/index.tsx +++ b/src/front/components/DesignSystem/Typography/index.tsx @@ -31,7 +31,7 @@ export enum ITypo { export enum ITypoColor { RE_HOVER = "re-hover", - GREY = "grey" + GREY = "grey", } export default class Typography extends React.Component { diff --git a/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx b/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx index 6da3ed1d..3d3bf3c8 100644 --- a/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx +++ b/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx @@ -3,6 +3,7 @@ import React, { ReactNode } from "react"; // import Header from "@Components/Materials/Header"; import classes from "./classes.module.scss"; +import ToastHandler from "@Front/Components/DesignSystem/Toasts/ToastsHandler"; type IProps = { title: string; @@ -24,6 +25,7 @@ export default class DefaultTemplate extends React.Component { <> {/*
*/}
+
{this.props.children}
diff --git a/src/front/components/Layouts/DesignSystem/index.tsx b/src/front/components/Layouts/DesignSystem/index.tsx index ec6a147a..625dee48 100644 --- a/src/front/components/Layouts/DesignSystem/index.tsx +++ b/src/front/components/Layouts/DesignSystem/index.tsx @@ -1,8 +1,9 @@ -import BasePage from "@Components/Layouts/Base"; -import DefaultTemplate from "@Components/LayoutTemplates/DefaultTemplate"; +import BasePage from "@Front/Components/Layouts/Base"; +import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate"; import classes from "./classes.module.scss"; -import Typography, { ITypo } from "@Front/components/DesignSystem/Typography"; -import Button, { EButtonVariant } from "@Front/components/DesignSystem/Button"; +import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; +import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; +import Toasts, { IToast } from "@Front/Stores/Toasts"; export default class DesignSystem extends BasePage { public override render(): JSX.Element { @@ -36,8 +37,22 @@ export default class DesignSystem extends BasePage {
+ +
+
+ Toaster component +
+ +
); } + + + + private spawnToast() { + const toast: IToast = { title: "Un collaborateur veut rejoindre votre office", text: "12:00 - 1 fev 2023" } + Toasts.getInstance().open(toast) + } } diff --git a/src/front/components/Layouts/Home/index.tsx b/src/front/components/Layouts/Home/index.tsx index 1671ba9d..132f6e9d 100644 --- a/src/front/components/Layouts/Home/index.tsx +++ b/src/front/components/Layouts/Home/index.tsx @@ -1,7 +1,7 @@ -import BasePage from "@Components/Layouts/Base"; -import DefaultTemplate from "@Components/LayoutTemplates/DefaultTemplate"; +import BasePage from "@Front/Components/Layouts/Base"; +import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate"; import classes from "./classes.module.scss"; -import Typography, { ITypo } from "@Front/components/DesignSystem/Typography"; +import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; export default class Home extends BasePage { public override render(): JSX.Element { diff --git a/src/front/components/Layouts/PageNotFound/index.tsx b/src/front/components/Layouts/PageNotFound/index.tsx index 6a5964d1..df4475a9 100644 --- a/src/front/components/Layouts/PageNotFound/index.tsx +++ b/src/front/components/Layouts/PageNotFound/index.tsx @@ -1,5 +1,5 @@ -import BasePage from "@Components/Layouts/Base"; -import DefaultTemplate from "@Components/LayoutTemplates/DefaultTemplate" +import BasePage from "@Front/Components/Layouts/Base"; +import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate" import UnpluggedIcon from "@Assets/icons/unplugged.svg" import Image from "next/image"; import Link from "next/link"; diff --git a/src/front/components/Materials/Header/index.tsx b/src/front/components/Materials/Header/index.tsx index 59de779c..703721a2 100644 --- a/src/front/components/Materials/Header/index.tsx +++ b/src/front/components/Materials/Header/index.tsx @@ -4,7 +4,7 @@ import Image from "next/image"; import TezosLinkLogo from "@Assets/link_logo.svg"; import Logo from "@Assets/logo.svg"; import classes from "./classes.module.scss"; -import Burger from "@Components/Elements/Burger"; +import Burger from "@Front/Components/Elements/Burger"; type IProps = {}; type IState = { diff --git a/src/front/themes/constants.scss b/src/front/themes/constants.scss index c157e017..9c6ba5f7 100644 --- a/src/front/themes/constants.scss +++ b/src/front/themes/constants.scss @@ -6,10 +6,11 @@ $screen-xs: 424px; $custom-easing: cubic-bezier(0.645, 0.045, 0.355, 1); -// Colors +// Generic colors $black: #000000; $white: #ffffff; +// Flash colors $green-flash: #12bf4d; $blue-flash: #005176; $turquoise-flash: #3fa79e; @@ -21,8 +22,10 @@ $re-hover: #cc4c31; $pink-flash: #bd4b91; $pink-hover: #e34ba9; +// Soft colors $green-soft: #baf2cd; $blue-soft: #a7c6d4; +$orange-soft: #FFDC99; $turquoise-soft: #c3eae6; $purple-soft: #c5b2d4; $orange-soft: #ffdc99; @@ -31,4 +34,4 @@ $pink-soft: #f8b9df; $grey: #939393; $grey-medium: #e7e7e7; -$grey-soft: #f9f9f9; +$grey-soft: #f9f9f9; \ No newline at end of file diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 68613c5c..2952cdfa 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,4 +1,4 @@ -import PageNotFound from "@Components/Layouts/PageNotFound" +import PageNotFound from "@Front/Components/Layouts/PageNotFound" export default function Route() { return diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 1a0ebff8..8ad48959 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -2,7 +2,7 @@ import "@Front/index.scss"; import type { NextPage } from "next"; import type { AppType, AppProps } from "next/app"; import type { ReactElement, ReactNode } from "react"; -import { DefaultLayout } from "@Components/LayoutTemplates/DefaultLayout"; +import { DefaultLayout } from "@Front/Components/LayoutTemplates/DefaultLayout"; export type NextPageWithLayout< TProps = Record, diff --git a/src/pages/design-system.tsx b/src/pages/design-system.tsx index cbca066b..a9da129d 100644 --- a/src/pages/design-system.tsx +++ b/src/pages/design-system.tsx @@ -1,4 +1,4 @@ -import DesignSystem from "@Front/components/Layouts/DesignSystem"; +import DesignSystem from "@Front/Components/Layouts/DesignSystem"; export default function Route() { return ; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index b2450ef6..8ccb4e35 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,4 @@ -import Home from "@Components/Layouts/Home"; +import Home from "@Front/Components/Layouts/Home"; export default function Route() { return ; diff --git a/tsconfig.json b/tsconfig.json index 344c5c07..934060f5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,7 @@ /* Strict Type-Checking Options */ "allowUnreachableCode": false, "allowUnusedLabels": false, - "exactOptionalPropertyTypes": true, + "exactOptionalPropertyTypes": false, "noImplicitOverride": true, "strict": true, "noImplicitAny": true, @@ -40,9 +40,11 @@ "paths": { "@Api/*": ["src/api/*"], "@Front/*": ["src/front/*"], - "@Assets/*": ["src/front/assets/*"], - "@Components/*": ["src/front/components/*"], - "@Themes/*": ["src/front/themes/*"], + "@Assets/*": ["src/front/Assets/*"], + "@Components/*": ["src/front/Components/*"], + "@Themes/*": ["src/front/Themes/*"], + "@Stores/*": ["src/front/Stores/*"], + "@FrontServices/*": ["src/front/services/*"], "@Page/*": ["src/pages/*"], "@Services/*": ["src/common/services/*"], "@Entries/*": ["src/entries/*"],