From f86d2c497cf77475fa398018677d1133c0e18591 Mon Sep 17 00:00:00 2001 From: dandamdandam Date: Mon, 5 Aug 2024 23:31:19 +0900 Subject: [PATCH 1/7] chore: add dependency - mui dateNtime picker --- package-lock.json | 941 +++++++++++++++++++++++- package.json | 3 + src/app/layout.tsx | 9 +- src/app/mypage/personalGoals/layout.tsx | 16 + src/app/mypage/personalGoals/page.tsx | 14 + 5 files changed, 952 insertions(+), 31 deletions(-) create mode 100644 src/app/mypage/personalGoals/layout.tsx create mode 100644 src/app/mypage/personalGoals/page.tsx diff --git a/package-lock.json b/package-lock.json index 8fef24f..c1f0655 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,9 @@ "name": "dailypet", "version": "0.1.0", "dependencies": { + "@emotion/styled": "^11.13.0", + "@mui/x-date-pickers": "^7.12.0", + "dayjs": "^1.11.12", "firebase": "^10.12.3", "next": "14.2.5", "react": "^18", @@ -32,6 +35,389 @@ "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==", "dev": true }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz", + "integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz", + "integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.2" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.3.tgz", + "integrity": "sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.3", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.2", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz", + "integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emotion/babel-plugin": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.12.0.tgz", + "integrity": "sha512-y2WQb+oP8Jqvvclh8Q55gLUyb7UFvgv7eJfsj7td5TToBrIUtPay2kMrZi4xjq9qw2vD0ZR5fSho0yqoFgX7Rw==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/serialize": "^1.2.0", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.13.1", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.13.1.tgz", + "integrity": "sha512-iqouYkuEblRcXmylXIwwOodiEK5Ifl7JcX7o6V4jI3iW4mLXX3dmt5xwBtIkJiQEXFAI+pC8X0i67yiPkH9Ucw==", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.0", + "@emotion/weak-memoize": "^0.4.0", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", + "license": "MIT" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.0.tgz", + "integrity": "sha512-SHetuSLvJDzuNbOdtPVbq6yMMMlLoW5Q94uDqJZqy50gcmAjxFkVqmzqSGEFq9gT2iMuIeKV1PXVWmvUhuZLlQ==", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", + "license": "MIT" + }, + "node_modules/@emotion/react": { + "version": "11.13.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.13.0.tgz", + "integrity": "sha512-WkL+bw1REC2VNV1goQyfxjx1GYJkcc23CRQkXX+vZNLINyfI7o+uUn/rTGPt/xJ3bJHd5GcljgnxHf4wRw5VWQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.12.0", + "@emotion/cache": "^11.13.0", + "@emotion/serialize": "^1.3.0", + "@emotion/use-insertion-effect-with-fallbacks": "^1.1.0", + "@emotion/utils": "^1.4.0", + "@emotion/weak-memoize": "^0.4.0", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.0.tgz", + "integrity": "sha512-jACuBa9SlYajnpIVXB+XOXnfJHyckDfe6fOpORIM6yhBDlqGuExvDdZYHDQGoDf3bZXGv7tNr+LpLjJqiEQ6EA==", + "license": "MIT", + "dependencies": { + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.9.0", + "@emotion/utils": "^1.4.0", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", + "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==", + "license": "MIT" + }, + "node_modules/@emotion/styled": { + "version": "11.13.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.13.0.tgz", + "integrity": "sha512-tkzkY7nQhW/zC4hztlwucpT8QEZ6eUzpXDRhww/Eej4tFfO0FxQYWRyg/c5CCXa4d/f174kqeXYjuQRnhzf6dA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.12.0", + "@emotion/is-prop-valid": "^1.3.0", + "@emotion/serialize": "^1.3.0", + "@emotion/use-insertion-effect-with-fallbacks": "^1.1.0", + "@emotion/utils": "^1.4.0" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.9.0.tgz", + "integrity": "sha512-TP6GgNZtmtFaFcsOgExdnfxLLpRDla4Q66tnenA9CktvVSdNKDvMVuUah4QvWPIpNjrWsGg3qeGo9a43QooGZQ==", + "license": "MIT" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.1.0.tgz", + "integrity": "sha512-+wBOcIV5snwGgI2ya3u99D7/FJquOIniQT1IKyDsBmEgwvpxMNeS65Oib7OnE2d2aY+3BU4OiH+0Wchf8yk3Hw==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.0.tgz", + "integrity": "sha512-spEnrA1b6hDR/C68lC2M7m6ALPUHZC0lIY7jAS/B/9DuuO1ZP04eov8SMv/6fwRd8pzmsn2AuJEznRREWlQrlQ==", + "license": "MIT" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", + "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", + "license": "MIT" + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -708,6 +1094,332 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "5.16.6", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.6.tgz", + "integrity": "sha512-kytg6LheUG42V8H/o/Ptz3olSO5kUXW9zF0ox18VnblX6bO2yif1FPItgc3ey1t5ansb1+gbe7SatntqusQupg==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/material": { + "version": "5.16.6", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.16.6.tgz", + "integrity": "sha512-0LUIKBOIjiFfzzFNxXZBRAyr9UQfmTAFzbt6ziOU2FDXhorNN2o3N9/32mNJbCA8zJo2FqFU6d3dtoqUDyIEfA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/core-downloads-tracker": "^5.16.6", + "@mui/system": "^5.16.6", + "@mui/types": "^7.2.15", + "@mui/utils": "^5.16.6", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^18.3.1", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT", + "peer": true + }, + "node_modules/@mui/private-theming": { + "version": "5.16.6", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.16.6.tgz", + "integrity": "sha512-rAk+Rh8Clg7Cd7shZhyt2HGTTE5wYKNSJ5sspf28Fqm/PZ69Er9o6KX25g03/FG2dfpg5GCwZh/xOojiTfm3hw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.16.6", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "5.16.6", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.16.6.tgz", + "integrity": "sha512-zaThmS67ZmtHSWToTiHslbI8jwrmITcN93LQaR2lKArbvS7Z3iLkwRoiikNWutx9MBs8Q6okKvbZq1RQYB3v7g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@emotion/cache": "^11.11.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "5.16.6", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.16.6.tgz", + "integrity": "sha512-5xgyJjBIMPw8HIaZpfbGAaFYPwImQn7Nyh+wwKWhvkoIeDosQ1ZMVrbTclefi7G8hNmqhip04duYwYpbBFnBgw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.16.6", + "@mui/styled-engine": "^5.16.6", + "@mui/types": "^7.2.15", + "@mui/utils": "^5.16.6", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.15", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.15.tgz", + "integrity": "sha512-nbo7yPhtKJkdf9kcVOF8JZHPZTmqXjJ/tI0bdWgHg5tp9AnIN4Y7f7wm9T+0SyGYJk76+GYZ8Q5XaTYAsUHN0Q==", + "license": "MIT", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.16.6", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.16.6.tgz", + "integrity": "sha512-tWiQqlhxAt3KENNiSRL+DIn9H5xNVK6Jjf70x3PnfQPz1MPBdh7yyIcAyVBT9xiw7hP3SomRhPR7hzBMBCjqEA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/types": "^7.2.15", + "@types/prop-types": "^15.7.12", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-is": "^18.3.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, + "node_modules/@mui/x-date-pickers": { + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-7.12.0.tgz", + "integrity": "sha512-WU5C7QNfSpJ9cP8vl2sY7q35NW+0TUMgEy+sl98fcPhLckq3cgV1wnVxoZnQZ3BxVQAtx+7ag/MpefU03vJcVw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.0", + "@mui/system": "^5.16.5", + "@mui/utils": "^5.16.5", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/material": "^5.15.14", + "date-fns": "^2.25.0 || ^3.2.0", + "date-fns-jalali": "^2.13.0-0 || ^3.2.0-0", + "dayjs": "^1.10.7", + "luxon": "^3.0.2", + "moment": "^2.29.4", + "moment-hijri": "^2.1.2", + "moment-jalaali": "^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "date-fns": { + "optional": true + }, + "date-fns-jalali": { + "optional": true + }, + "dayjs": { + "optional": true + }, + "luxon": { + "optional": true + }, + "moment": { + "optional": true + }, + "moment-hijri": { + "optional": true + }, + "moment-jalaali": { + "optional": true + } + } + }, "node_modules/@next/env": { "version": "14.2.5", "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.5.tgz", @@ -902,6 +1614,17 @@ "node": ">=14" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -990,6 +1713,12 @@ "undici-types": "~5.26.4" } }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", + "license": "MIT" + }, "node_modules/@types/postcss-modules-local-by-default": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.2.tgz", @@ -1011,14 +1740,12 @@ "node_modules/@types/prop-types": { "version": "15.7.12", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", - "dev": true + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" }, "node_modules/@types/react": { "version": "18.3.3", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", - "dev": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -1033,6 +1760,15 @@ "@types/react": "*" } }, + "node_modules/@types/react-transition-group": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", + "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@typescript-eslint/parser": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", @@ -1462,6 +2198,21 @@ "deep-equal": "^2.0.5" } }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1534,7 +2285,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -1660,6 +2410,15 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1682,6 +2441,12 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "license": "MIT" + }, "node_modules/copy-anything": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", @@ -1694,6 +2459,22 @@ "url": "https://github.com/sponsors/mesqueeb" } }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "license": "MIT", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1723,8 +2504,7 @@ "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -1783,11 +2563,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/dayjs": { + "version": "1.11.12", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.12.tgz", + "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==", + "license": "MIT" + }, "node_modules/debug": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -1896,6 +2681,16 @@ "node": ">=6.0.0" } }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/dotenv": { "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", @@ -1946,6 +2741,15 @@ "errno": "cli.js" } }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/es-abstract": { "version": "1.23.3", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", @@ -2136,7 +2940,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, "engines": { "node": ">=10" }, @@ -2645,6 +3448,12 @@ "node": ">=8" } }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "license": "MIT" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -2784,7 +3593,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3077,7 +3885,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -3085,6 +3892,16 @@ "node": ">= 0.4" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "react-is": "^16.7.0" + } + }, "node_modules/http-parser-js": { "version": "0.5.8", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", @@ -3151,7 +3968,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -3235,6 +4051,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "license": "MIT" + }, "node_modules/is-async-function": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", @@ -3305,7 +4127,6 @@ "version": "2.14.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", - "dev": true, "dependencies": { "hasown": "^2.0.2" }, @@ -3650,12 +4471,30 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "license": "MIT" + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -3770,6 +4609,12 @@ "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==", + "license": "MIT" + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -3910,8 +4755,7 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nanoid": { "version": "3.3.7", @@ -4014,7 +4858,6 @@ "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" } @@ -4223,7 +5066,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -4231,6 +5073,24 @@ "node": ">=6" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse-node-version": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", @@ -4270,8 +5130,7 @@ "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 + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-scurry": { "version": "1.11.1", @@ -4293,7 +5152,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, "engines": { "node": ">=8" } @@ -4465,7 +5323,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -4557,8 +5414,23 @@ "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } }, "node_modules/readdirp": { "version": "3.6.0", @@ -4592,6 +5464,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -4628,7 +5506,6 @@ "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -4645,7 +5522,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "engines": { "node": ">=4" } @@ -5200,6 +6076,12 @@ } } }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", + "license": "MIT" + }, "node_modules/stylus": { "version": "0.62.0", "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.62.0.tgz", @@ -5274,7 +6156,6 @@ "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" }, @@ -5297,6 +6178,15 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5810,7 +6700,6 @@ "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" } diff --git a/package.json b/package.json index 4a3dfc5..701fc53 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ "lint": "next lint" }, "dependencies": { + "@emotion/styled": "^11.13.0", + "@mui/x-date-pickers": "^7.12.0", + "dayjs": "^1.11.12", "firebase": "^10.12.3", "next": "14.2.5", "react": "^18", diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c431fca..044818a 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,15 +1,16 @@ import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "./globals.scss"; -import Head from 'next/head'; +import Head from "next/head"; import favicon from "./favicon.ico"; const inter = Inter({ subsets: ["latin"] }); import style from "./layout.module.scss"; + export const metadata: Metadata = { title: "dailypet", description: "My Daily Companion, Daily Pet", icons: { - icon: '/favicon.ico', + icon: "/favicon.ico", }, }; @@ -25,9 +26,7 @@ export default function RootLayout({ */}
-
- {children} -
+
{children}
diff --git a/src/app/mypage/personalGoals/layout.tsx b/src/app/mypage/personalGoals/layout.tsx new file mode 100644 index 0000000..06d3d89 --- /dev/null +++ b/src/app/mypage/personalGoals/layout.tsx @@ -0,0 +1,16 @@ +"use client"; + +import { LocalizationProvider } from "@mui/x-date-pickers"; +import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; + +export default function GoalsLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + {children} + + ); +} diff --git a/src/app/mypage/personalGoals/page.tsx b/src/app/mypage/personalGoals/page.tsx new file mode 100644 index 0000000..c46a6be --- /dev/null +++ b/src/app/mypage/personalGoals/page.tsx @@ -0,0 +1,14 @@ +import Link from "next/link"; + +export default function PersonalGoalsPage() { + return ( +
+

Personal Goal Page

+
+ 개인 목표를 설정해봅시다! 설정한 목표에 따라 점수가 계산되고 캐릭터의 + 상태가 달라져요~~~ 같은 설명 추가 +
+ 설정하기 +
+ ); +} From de7c03ef2930142e50850da0c388890c5d083936 Mon Sep 17 00:00:00 2001 From: dandamdandam Date: Tue, 6 Aug 2024 00:01:25 +0900 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=EC=88=98=EB=A9=B4=20=EB=AA=A9?= =?UTF-8?q?=ED=91=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mypage/personalGoals/diet/page.tsx | 7 +++ src/app/mypage/personalGoals/sleep/page.tsx | 49 +++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 src/app/mypage/personalGoals/diet/page.tsx create mode 100644 src/app/mypage/personalGoals/sleep/page.tsx diff --git a/src/app/mypage/personalGoals/diet/page.tsx b/src/app/mypage/personalGoals/diet/page.tsx new file mode 100644 index 0000000..c14ea44 --- /dev/null +++ b/src/app/mypage/personalGoals/diet/page.tsx @@ -0,0 +1,7 @@ +export default function DietGoalPage() { + return ( +
+

식단 목표 설정하기

+
+ ); +} diff --git a/src/app/mypage/personalGoals/sleep/page.tsx b/src/app/mypage/personalGoals/sleep/page.tsx new file mode 100644 index 0000000..3c439bc --- /dev/null +++ b/src/app/mypage/personalGoals/sleep/page.tsx @@ -0,0 +1,49 @@ +"use client"; + +import { MobileTimePicker } from "@mui/x-date-pickers"; +import dayjs from "dayjs"; +import { useRouter } from "next/navigation"; +import { FormEvent } from "react"; + +export default function SleepGoalPage() { + const router = useRouter(); + + /* 06:00 PM -> 1800 (number) */ + const timeFormat = (time: string) => { + const [timeToken, meridiem] = time.split(" "); + const [hour, minute] = timeToken.split(":"); + + return meridiem === "PM" + ? (Number(hour) + 12) * 100 + Number(minute) + : Number(hour) * 100 + Number(minute); + }; + const handleSubmit = (e: FormEvent) => { + e.preventDefault(); + + const formData = new FormData(e.currentTarget); + const sleepStart = timeFormat(String(formData.get("sleepStart"))); + const sleepEnd = timeFormat(String(formData.get("sleepEnd"))); + + //TODO: API 호출 + console.log(sleepStart, sleepEnd); + router.push("/mypage/personalGoals/diet"); + }; + return ( +
+

수면 목표 설정하기

+
handleSubmit(e)}> + + + + +
+ ); +} From 08bf974577863aa254b70aae206af3949a6fe580 Mon Sep 17 00:00:00 2001 From: dandamdandam Date: Tue, 6 Aug 2024 11:46:48 +0900 Subject: [PATCH 3/7] =?UTF-8?q?feat:=20=EC=8B=9D=EB=8B=A8=20=EB=AA=A9?= =?UTF-8?q?=ED=91=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mypage/{personalGoals => }/layout.tsx | 10 ++++ src/app/mypage/personalGoals/diet/DietEl.tsx | 21 +++++++++ src/app/mypage/personalGoals/diet/formName.ts | 5 ++ src/app/mypage/personalGoals/diet/page.tsx | 46 +++++++++++++++++++ src/app/mypage/personalGoals/sleep/page.tsx | 10 +--- src/app/mypage/personalGoals/workout/page.tsx | 7 +++ src/app/mypage/utils.ts | 9 ++++ 7 files changed, 99 insertions(+), 9 deletions(-) rename src/app/mypage/{personalGoals => }/layout.tsx (51%) create mode 100644 src/app/mypage/personalGoals/diet/DietEl.tsx create mode 100644 src/app/mypage/personalGoals/diet/formName.ts create mode 100644 src/app/mypage/personalGoals/workout/page.tsx create mode 100644 src/app/mypage/utils.ts diff --git a/src/app/mypage/personalGoals/layout.tsx b/src/app/mypage/layout.tsx similarity index 51% rename from src/app/mypage/personalGoals/layout.tsx rename to src/app/mypage/layout.tsx index 06d3d89..e2f5181 100644 --- a/src/app/mypage/personalGoals/layout.tsx +++ b/src/app/mypage/layout.tsx @@ -9,6 +9,16 @@ export default function GoalsLayout({ children: React.ReactNode; }>) { return ( + /* + TODO: + MUI 사용하려면 이걸로 컴포넌트 둘러야 합니다. + + 루트페이지 layout에 두르려고 했는데 + 메타데이터 형식때문에 use client가 안써져서 + 임시로 여기다 둘렀습니다. + + 다른 페이지에도 필요하면 그때 고쳐보아요 + */ {children} diff --git a/src/app/mypage/personalGoals/diet/DietEl.tsx b/src/app/mypage/personalGoals/diet/DietEl.tsx new file mode 100644 index 0000000..c7b3f9d --- /dev/null +++ b/src/app/mypage/personalGoals/diet/DietEl.tsx @@ -0,0 +1,21 @@ +import { MobileTimePicker } from "@mui/x-date-pickers"; +import dayjs from "dayjs"; +import { formName } from "./formName"; + +export default function DietEl({ index }: { index: number }) { + return ( +
+

{index}번 째 식단

+ + +
+ ); +} diff --git a/src/app/mypage/personalGoals/diet/formName.ts b/src/app/mypage/personalGoals/diet/formName.ts new file mode 100644 index 0000000..fe0a7fe --- /dev/null +++ b/src/app/mypage/personalGoals/diet/formName.ts @@ -0,0 +1,5 @@ +export const formName = { + calories: "calories", + label: (index: number) => `label_${index}`, + time: (index: number) => `time_${index}`, +}; \ No newline at end of file diff --git a/src/app/mypage/personalGoals/diet/page.tsx b/src/app/mypage/personalGoals/diet/page.tsx index c14ea44..3ac98b4 100644 --- a/src/app/mypage/personalGoals/diet/page.tsx +++ b/src/app/mypage/personalGoals/diet/page.tsx @@ -1,7 +1,53 @@ +"use client"; + +import { FormEvent, useState } from "react"; +import DietEl from "./DietEl"; +import { useRouter } from "next/navigation"; +import { formName } from "./formName"; +import { timeFormat } from "../../utils"; + export default function DietGoalPage() { + const [dietElList, setDietElList] = useState([]); + const router = useRouter(); + + const addDiet = () => { + setDietElList([ + ...dietElList, + , + ]); + }; + const handleSubmit = (e: FormEvent) => { + e.preventDefault(); + const formData = new FormData(e.currentTarget); + const calories = formData.get(formName.calories); + const dietList = dietElList.map((dietEl) => { + const label = formData.get(formName.label(dietEl.props.index)); + const time = timeFormat( + String(formData.get(formName.time(dietEl.props.index))) + ); + return { label, time }; + }); + + // TODO: API 호출 + console.log(calories, dietList); + router.push("/mypage/personalGoals/workout"); + }; + return (

식단 목표 설정하기

+
+ + {dietElList} + + +
); } diff --git a/src/app/mypage/personalGoals/sleep/page.tsx b/src/app/mypage/personalGoals/sleep/page.tsx index 3c439bc..19c8428 100644 --- a/src/app/mypage/personalGoals/sleep/page.tsx +++ b/src/app/mypage/personalGoals/sleep/page.tsx @@ -4,19 +4,11 @@ import { MobileTimePicker } from "@mui/x-date-pickers"; import dayjs from "dayjs"; import { useRouter } from "next/navigation"; import { FormEvent } from "react"; +import { timeFormat } from "../../utils"; export default function SleepGoalPage() { const router = useRouter(); - /* 06:00 PM -> 1800 (number) */ - const timeFormat = (time: string) => { - const [timeToken, meridiem] = time.split(" "); - const [hour, minute] = timeToken.split(":"); - - return meridiem === "PM" - ? (Number(hour) + 12) * 100 + Number(minute) - : Number(hour) * 100 + Number(minute); - }; const handleSubmit = (e: FormEvent) => { e.preventDefault(); diff --git a/src/app/mypage/personalGoals/workout/page.tsx b/src/app/mypage/personalGoals/workout/page.tsx new file mode 100644 index 0000000..3a2f88d --- /dev/null +++ b/src/app/mypage/personalGoals/workout/page.tsx @@ -0,0 +1,7 @@ +export default function WorkoutGoalPage() { + return ( +
+

운동 목표 설정하기

+
+ ); +} diff --git a/src/app/mypage/utils.ts b/src/app/mypage/utils.ts new file mode 100644 index 0000000..1e23790 --- /dev/null +++ b/src/app/mypage/utils.ts @@ -0,0 +1,9 @@ +/* 06:00 PM -> 1800 (number) */ +export const timeFormat = (time: string) => { +const [timeToken, meridiem] = time.split(" "); +const [hour, minute] = timeToken.split(":"); + +return meridiem === "PM" + ? (Number(hour) + 12) * 100 + Number(minute) + : Number(hour) * 100 + Number(minute); +}; \ No newline at end of file From 2e5d38cf46efa6c51dc886379fbceee8658426aa Mon Sep 17 00:00:00 2001 From: dandamdandam Date: Tue, 6 Aug 2024 19:24:59 +0900 Subject: [PATCH 4/7] =?UTF-8?q?feat:=20=EC=8B=9D=EB=8B=A8=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=ED=8E=98=EC=9D=B4=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mypage/page.tsx | 4 ++- .../personalGoals/workout/WorkoutEl.tsx | 30 ++++++++++++++++ .../mypage/personalGoals/workout/formName.ts | 5 +++ src/app/mypage/personalGoals/workout/page.tsx | 34 +++++++++++++++++++ 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 src/app/mypage/personalGoals/workout/WorkoutEl.tsx create mode 100644 src/app/mypage/personalGoals/workout/formName.ts diff --git a/src/app/mypage/page.tsx b/src/app/mypage/page.tsx index 6f8e884..6e79bac 100644 --- a/src/app/mypage/page.tsx +++ b/src/app/mypage/page.tsx @@ -1,9 +1,11 @@ +import Link from "next/link"; import styles from "./page.module.scss"; export default function MyPage() { return (
- MyPage + MyPage + 식단 목표 설정하기
); } diff --git a/src/app/mypage/personalGoals/workout/WorkoutEl.tsx b/src/app/mypage/personalGoals/workout/WorkoutEl.tsx new file mode 100644 index 0000000..ebfd0bf --- /dev/null +++ b/src/app/mypage/personalGoals/workout/WorkoutEl.tsx @@ -0,0 +1,30 @@ +import { MobileTimePicker } from "@mui/x-date-pickers"; +import { formName } from "./formName"; +import dayjs from "dayjs"; + +export default function WorkoutEl({ index }: { index: number }) { + return ( +
+

{index}번 째 운동

+ + + +
+ ); +} diff --git a/src/app/mypage/personalGoals/workout/formName.ts b/src/app/mypage/personalGoals/workout/formName.ts new file mode 100644 index 0000000..2cc6830 --- /dev/null +++ b/src/app/mypage/personalGoals/workout/formName.ts @@ -0,0 +1,5 @@ +export const formName = { + week: (index: number) => `week_${index}`, + start: (index: number) => `start_${index}`, + end: (index: number) => `end_${index}`, +} \ No newline at end of file diff --git a/src/app/mypage/personalGoals/workout/page.tsx b/src/app/mypage/personalGoals/workout/page.tsx index 3a2f88d..1dc06c7 100644 --- a/src/app/mypage/personalGoals/workout/page.tsx +++ b/src/app/mypage/personalGoals/workout/page.tsx @@ -1,7 +1,41 @@ +"use client"; + +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import WorkoutEl from "./WorkoutEl"; + export default function WorkoutGoalPage() { + const router = useRouter(); + const [workoutElList, setWorkoutElList] = useState([]); + + const addWorkout = () => + setWorkoutElList([ + ...workoutElList, + , + ]); + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + const formData = new FormData(e.currentTarget); + const workoutList = workoutElList.map((workoutEl) => { + const week = formData.get(`week_${workoutEl.props.index}`); + const start = formData.get(`start_${workoutEl.props.index}`); + const end = formData.get(`end_${workoutEl.props.index}`); + return { week, start, end }; + }); + + console.log(workoutList); + router.push("/mypage"); + }; return (

운동 목표 설정하기

+
handleSubmit(e)}> + {workoutElList} + + +
); } From 980a9e88d952d1fbe4932254897fd720525cb35e Mon Sep 17 00:00:00 2001 From: dandamdandam Date: Tue, 6 Aug 2024 20:08:05 +0900 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20session=20strage=EB=A5=BC=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=9C=20=EC=9E=84=EC=8B=9C=EC=A0=80?= =?UTF-8?q?=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_common/_util/storage.ts | 44 +++++++++++++++++++ src/app/mypage/personalGoals/diet/formName.ts | 1 + src/app/mypage/personalGoals/diet/page.tsx | 11 +++-- src/app/mypage/personalGoals/sleep/page.tsx | 7 ++- src/app/mypage/personalGoals/workout/page.tsx | 17 +++++-- 5 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 src/app/_common/_util/storage.ts diff --git a/src/app/_common/_util/storage.ts b/src/app/_common/_util/storage.ts new file mode 100644 index 0000000..ad8e0ca --- /dev/null +++ b/src/app/_common/_util/storage.ts @@ -0,0 +1,44 @@ +const initStorage = (key: T, storage: Storage) => { + const storageKey = `${key}`; + + const get = (): StorageKey[T] => { + const value = storage.getItem(storageKey); + + return JSON.parse(value as string); + }; + const set = (value: StorageKey[T]) => { + if (value == undefined || value == null) { + return storage.removeItem(storageKey); + } + + const stringifiedValue = JSON.stringify(value); + + storage.setItem(storageKey, stringifiedValue); + }; + + return { get, set }; +}; + +export const personalGoalsStorage = initStorage("personalGoals", sessionStorage); + +export interface PersonalGoals{ + diet: { + calories: number; + dietTime: { + label: string; + time: number; + }[]; + } | null; + sleep: { + sleepEnd: number; + sleepStart: number; + } | null; + workout: { + week: number; + start: number; + end: number; + }[] | null; +} +interface StorageKey { + personalGoals: PersonalGoals; +} \ No newline at end of file diff --git a/src/app/mypage/personalGoals/diet/formName.ts b/src/app/mypage/personalGoals/diet/formName.ts index fe0a7fe..0954aae 100644 --- a/src/app/mypage/personalGoals/diet/formName.ts +++ b/src/app/mypage/personalGoals/diet/formName.ts @@ -1,5 +1,6 @@ export const formName = { calories: "calories", + dietTime: "dietTime", label: (index: number) => `label_${index}`, time: (index: number) => `time_${index}`, }; \ No newline at end of file diff --git a/src/app/mypage/personalGoals/diet/page.tsx b/src/app/mypage/personalGoals/diet/page.tsx index 3ac98b4..8a68b44 100644 --- a/src/app/mypage/personalGoals/diet/page.tsx +++ b/src/app/mypage/personalGoals/diet/page.tsx @@ -5,6 +5,7 @@ import DietEl from "./DietEl"; import { useRouter } from "next/navigation"; import { formName } from "./formName"; import { timeFormat } from "../../utils"; +import { personalGoalsStorage } from "@/app/_common/_util/storage"; export default function DietGoalPage() { const [dietElList, setDietElList] = useState([]); @@ -19,17 +20,19 @@ export default function DietGoalPage() { const handleSubmit = (e: FormEvent) => { e.preventDefault(); const formData = new FormData(e.currentTarget); - const calories = formData.get(formName.calories); + const calories = Number(formData.get(formName.calories)); const dietList = dietElList.map((dietEl) => { - const label = formData.get(formName.label(dietEl.props.index)); + const label = String(formData.get(formName.label(dietEl.props.index))); const time = timeFormat( String(formData.get(formName.time(dietEl.props.index))) ); return { label, time }; }); - // TODO: API 호출 - console.log(calories, dietList); + personalGoalsStorage.set({ + ...personalGoalsStorage.get(), + diet: { calories, dietTime: dietList }, + }); router.push("/mypage/personalGoals/workout"); }; diff --git a/src/app/mypage/personalGoals/sleep/page.tsx b/src/app/mypage/personalGoals/sleep/page.tsx index 19c8428..7b3b5d6 100644 --- a/src/app/mypage/personalGoals/sleep/page.tsx +++ b/src/app/mypage/personalGoals/sleep/page.tsx @@ -5,6 +5,7 @@ import dayjs from "dayjs"; import { useRouter } from "next/navigation"; import { FormEvent } from "react"; import { timeFormat } from "../../utils"; +import { personalGoalsStorage } from "@/app/_common/_util/storage"; export default function SleepGoalPage() { const router = useRouter(); @@ -16,8 +17,10 @@ export default function SleepGoalPage() { const sleepStart = timeFormat(String(formData.get("sleepStart"))); const sleepEnd = timeFormat(String(formData.get("sleepEnd"))); - //TODO: API 호출 - console.log(sleepStart, sleepEnd); + personalGoalsStorage.set({ + ...personalGoalsStorage.get(), + sleep: { sleepStart, sleepEnd }, + }); router.push("/mypage/personalGoals/diet"); }; return ( diff --git a/src/app/mypage/personalGoals/workout/page.tsx b/src/app/mypage/personalGoals/workout/page.tsx index 1dc06c7..bef6386 100644 --- a/src/app/mypage/personalGoals/workout/page.tsx +++ b/src/app/mypage/personalGoals/workout/page.tsx @@ -3,6 +3,8 @@ import { useRouter } from "next/navigation"; import { useState } from "react"; import WorkoutEl from "./WorkoutEl"; +import { personalGoalsStorage } from "@/app/_common/_util/storage"; +import { timeFormat } from "../../utils"; export default function WorkoutGoalPage() { const router = useRouter(); @@ -17,13 +19,20 @@ export default function WorkoutGoalPage() { e.preventDefault(); const formData = new FormData(e.currentTarget); const workoutList = workoutElList.map((workoutEl) => { - const week = formData.get(`week_${workoutEl.props.index}`); - const start = formData.get(`start_${workoutEl.props.index}`); - const end = formData.get(`end_${workoutEl.props.index}`); + const week = Number(formData.get(`week_${workoutEl.props.index}`)); + const start = timeFormat( + String(formData.get(`start_${workoutEl.props.index}`)) + ); + const end = timeFormat( + String(formData.get(`end_${workoutEl.props.index}`)) + ); return { week, start, end }; }); - console.log(workoutList); + personalGoalsStorage.set({ + ...personalGoalsStorage.get(), + workout: workoutList, + }); router.push("/mypage"); }; return ( From 9e209f9b3299b1142a91aae2ea1e5bea81f1f152 Mon Sep 17 00:00:00 2001 From: dandamdandam Date: Tue, 6 Aug 2024 20:35:40 +0900 Subject: [PATCH 6/7] =?UTF-8?q?feat:=20=EB=AA=A9=ED=91=9C=20firebase?= =?UTF-8?q?=EC=97=90=20=EC=A0=80=EC=9E=A5~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_common/_util/storage.ts | 16 +++++++------- src/app/mypage/personalGoals/workout/page.tsx | 3 +++ src/lib/firebase/api/personalGoalAPI.ts | 21 +++++++++++++++++++ 3 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 src/lib/firebase/api/personalGoalAPI.ts diff --git a/src/app/_common/_util/storage.ts b/src/app/_common/_util/storage.ts index ad8e0ca..4e20981 100644 --- a/src/app/_common/_util/storage.ts +++ b/src/app/_common/_util/storage.ts @@ -6,7 +6,7 @@ const initStorage = (key: T, storage: Storage) => { return JSON.parse(value as string); }; - const set = (value: StorageKey[T]) => { + const set = (value?: StorageKey[T]) => { if (value == undefined || value == null) { return storage.removeItem(storageKey); } @@ -22,23 +22,23 @@ const initStorage = (key: T, storage: Storage) => { export const personalGoalsStorage = initStorage("personalGoals", sessionStorage); export interface PersonalGoals{ - diet: { + diet?: { calories: number; dietTime: { label: string; time: number; }[]; - } | null; - sleep: { + }; + sleep?: { sleepEnd: number; sleepStart: number; - } | null; - workout: { + }; + workout?: { week: number; start: number; end: number; - }[] | null; + }[]; } interface StorageKey { - personalGoals: PersonalGoals; + personalGoals?: PersonalGoals; } \ No newline at end of file diff --git a/src/app/mypage/personalGoals/workout/page.tsx b/src/app/mypage/personalGoals/workout/page.tsx index bef6386..f7ed2b4 100644 --- a/src/app/mypage/personalGoals/workout/page.tsx +++ b/src/app/mypage/personalGoals/workout/page.tsx @@ -5,6 +5,7 @@ import { useState } from "react"; import WorkoutEl from "./WorkoutEl"; import { personalGoalsStorage } from "@/app/_common/_util/storage"; import { timeFormat } from "../../utils"; +import { postPersonalGoal } from "@/lib/firebase/api/personalGoalAPI"; export default function WorkoutGoalPage() { const router = useRouter(); @@ -33,6 +34,8 @@ export default function WorkoutGoalPage() { ...personalGoalsStorage.get(), workout: workoutList, }); + postPersonalGoal(personalGoalsStorage.get()!); + personalGoalsStorage.set(); router.push("/mypage"); }; return ( diff --git a/src/lib/firebase/api/personalGoalAPI.ts b/src/lib/firebase/api/personalGoalAPI.ts new file mode 100644 index 0000000..b1a4d4a --- /dev/null +++ b/src/lib/firebase/api/personalGoalAPI.ts @@ -0,0 +1,21 @@ +import { PersonalGoals } from "@/app/_common/_util/storage"; +import { onAuthStateChanged } from "firebase/auth"; +import { auth, db } from ".."; +import { doc, updateDoc } from "firebase/firestore"; + +export const postPersonalGoal = async (personalGoals: PersonalGoals) => { + if(!(personalGoals.workout || personalGoals.diet || personalGoals.sleep)){ + alert('목표를 입력해주세요.'); + } + + onAuthStateChanged(auth, async (user) => { + if (!user || !user.email) return; + const docRef = doc(db, 'users', user.uid); + updateDoc(docRef, {personalGoals}) + .then(() => alert('저장되었습니다.')) + .catch((error) => { + console.error('Error updating document: ', error); + alert('저장에 실패했습니다.'); + }); + }); +} \ No newline at end of file From ea2b3db52b94c6e0613e9f525e6eee53b105039b Mon Sep 17 00:00:00 2001 From: dandamdandam Date: Tue, 6 Aug 2024 20:54:28 +0900 Subject: [PATCH 7/7] =?UTF-8?q?feat:=20=EB=AA=A9=ED=91=9C=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=A4=EA=B8=B0=EC=9D=B4=EC=9D=B4=EC=9D=B4~!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_common/_util/storage.ts | 21 ++--------- src/app/mypage/page.tsx | 11 ++++++ src/app/mypage/personalGoals/workout/page.tsx | 4 +- src/lib/firebase/api/personalGoalAPI.ts | 37 +++++++++++++++++-- 4 files changed, 49 insertions(+), 24 deletions(-) diff --git a/src/app/_common/_util/storage.ts b/src/app/_common/_util/storage.ts index 4e20981..6383d9f 100644 --- a/src/app/_common/_util/storage.ts +++ b/src/app/_common/_util/storage.ts @@ -1,3 +1,5 @@ +import { PersonalGoals } from "@/lib/firebase/api/personalGoalAPI"; + const initStorage = (key: T, storage: Storage) => { const storageKey = `${key}`; @@ -21,24 +23,7 @@ const initStorage = (key: T, storage: Storage) => { export const personalGoalsStorage = initStorage("personalGoals", sessionStorage); -export interface PersonalGoals{ - diet?: { - calories: number; - dietTime: { - label: string; - time: number; - }[]; - }; - sleep?: { - sleepEnd: number; - sleepStart: number; - }; - workout?: { - week: number; - start: number; - end: number; - }[]; -} + interface StorageKey { personalGoals?: PersonalGoals; } \ No newline at end of file diff --git a/src/app/mypage/page.tsx b/src/app/mypage/page.tsx index 6e79bac..facba17 100644 --- a/src/app/mypage/page.tsx +++ b/src/app/mypage/page.tsx @@ -1,10 +1,21 @@ +"use client"; + import Link from "next/link"; import styles from "./page.module.scss"; +import { usePersonalGoals } from "@/lib/firebase/api/personalGoalAPI"; export default function MyPage() { + const { data, isLoading, isError } = usePersonalGoals(); + + if (isLoading) return
Loading...
; + if (isError) return
error!
; + if (!data) return
; + + console.log(data); return (
MyPage +
{data.diet?.calories}
식단 목표 설정하기
); diff --git a/src/app/mypage/personalGoals/workout/page.tsx b/src/app/mypage/personalGoals/workout/page.tsx index f7ed2b4..f3ba118 100644 --- a/src/app/mypage/personalGoals/workout/page.tsx +++ b/src/app/mypage/personalGoals/workout/page.tsx @@ -5,7 +5,7 @@ import { useState } from "react"; import WorkoutEl from "./WorkoutEl"; import { personalGoalsStorage } from "@/app/_common/_util/storage"; import { timeFormat } from "../../utils"; -import { postPersonalGoal } from "@/lib/firebase/api/personalGoalAPI"; +import { postPersonalGoals } from "@/lib/firebase/api/personalGoalAPI"; export default function WorkoutGoalPage() { const router = useRouter(); @@ -34,7 +34,7 @@ export default function WorkoutGoalPage() { ...personalGoalsStorage.get(), workout: workoutList, }); - postPersonalGoal(personalGoalsStorage.get()!); + postPersonalGoals(personalGoalsStorage.get()!); personalGoalsStorage.set(); router.push("/mypage"); }; diff --git a/src/lib/firebase/api/personalGoalAPI.ts b/src/lib/firebase/api/personalGoalAPI.ts index b1a4d4a..6bcd956 100644 --- a/src/lib/firebase/api/personalGoalAPI.ts +++ b/src/lib/firebase/api/personalGoalAPI.ts @@ -1,9 +1,28 @@ -import { PersonalGoals } from "@/app/_common/_util/storage"; import { onAuthStateChanged } from "firebase/auth"; import { auth, db } from ".."; -import { doc, updateDoc } from "firebase/firestore"; +import { doc, DocumentData, updateDoc } from "firebase/firestore"; +import { useDoc } from "../utils"; -export const postPersonalGoal = async (personalGoals: PersonalGoals) => { +export interface PersonalGoals{ + diet?: { + calories: number; + dietTime: { + label: string; + time: number; + }[]; + }; + sleep?: { + sleepEnd: number; + sleepStart: number; + }; + workout?: { + week: number; + start: number; + end: number; + }[]; +} + +export const postPersonalGoals = async (personalGoals: PersonalGoals) => { if(!(personalGoals.workout || personalGoals.diet || personalGoals.sleep)){ alert('목표를 입력해주세요.'); } @@ -18,4 +37,14 @@ export const postPersonalGoal = async (personalGoals: PersonalGoals) => { alert('저장에 실패했습니다.'); }); }); -} \ No newline at end of file +} +export const usePersonalGoals = () => useDoc( + { workout: [], diet: {calories: 0, dietTime: []}, sleep: {sleepEnd: 0, sleepStart: 0} }, + (user) => { + if (!user || !user.email) return null; + return doc(db, 'users', user.uid); + }, + (doc: DocumentData) => { + return doc.data().personalGoals; + } +);