From 21e3f7c0902e98de7f80f9a7183d933a9e3c4b7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Oct 2021 13:47:23 +0000 Subject: [PATCH 01/39] build(deps): bump ansi-regex from 5.0.0 to 5.0.1 Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a8e80c1..bef5a16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1590,9 +1590,9 @@ ansi-colors@^4.1.1: integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^3.2.1: version "3.2.1" From 33cbeeea7ea3ad5b5be36a43b613d2ac977c1ad6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Oct 2021 13:47:30 +0000 Subject: [PATCH 02/39] build(deps): bump next from 11.0.1 to 11.1.1 Bumps [next](https://github.com/vercel/next.js) from 11.0.1 to 11.1.1. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v11.0.1...v11.1.1) --- updated-dependencies: - dependency-name: next dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 212 +++++++++++++++++++++++++-------------------------- 2 files changed, 104 insertions(+), 110 deletions(-) diff --git a/package.json b/package.json index 02d3e62..e0ffaae 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@emotion/styled": "^11", "firebase": "^8.9.1", "framer-motion": "^4", - "next": "11.0.1", + "next": "11.1.1", "react": "17.0.2", "react-datepicker": "^4.2.1", "react-dom": "17.0.2", diff --git a/yarn.lock b/yarn.lock index a8e80c1..f786ce8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -181,7 +181,7 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.3.tgz#3416d9bea748052cfcb63dbcc27368105b1ed862" integrity sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA== -"@babel/plugin-syntax-jsx@^7.12.13": +"@babel/plugin-syntax-jsx@7.14.5", "@babel/plugin-syntax-jsx@^7.12.13": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz#000e2e25d8673cce49300517a3eda44c263e4201" integrity sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw== @@ -196,17 +196,10 @@ core-js-pure "^3.16.0" regenerator-runtime "^0.13.4" -"@babel/runtime@7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" - integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.13.10", "@babel/runtime@^7.7.2": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" - integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg== +"@babel/runtime@7.15.3", "@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.13.10", "@babel/runtime@^7.7.2": + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b" + integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA== dependencies: regenerator-runtime "^0.13.4" @@ -234,16 +227,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" - integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - -"@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.15.0": +"@babel/types@7.15.0", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.15.0": version "7.15.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== @@ -1213,25 +1197,30 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== -"@next/env@11.0.1": - version "11.0.1" - resolved "https://registry.yarnpkg.com/@next/env/-/env-11.0.1.tgz#6dc96ac76f1663ab747340e907e8933f190cc8fd" - integrity sha512-yZfKh2U6R9tEYyNUrs2V3SBvCMufkJ07xMH5uWy8wqcl5gAXoEw6A/1LDqwX3j7pUutF9d1ZxpdGDA3Uag+aQQ== +"@napi-rs/triples@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@napi-rs/triples/-/triples-1.0.3.tgz#76d6d0c3f4d16013c61e45dfca5ff1e6c31ae53c" + integrity sha512-jDJTpta+P4p1NZTFVLHJ/TLFVYVcOqv6l8xwOeBKNPMgY/zDYH/YH7SJbvrr/h1RcS9GzbPcLKGzpuK9cV56UA== + +"@next/env@11.1.1": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@next/env/-/env-11.1.1.tgz#d403282accbe8795aa2341f0e02c2e8bfc92bfb0" + integrity sha512-UEAzlfKofotLmj9LIgNixAfXpRck9rt/1CU9Q4ZtNDueGBJQP3HUzPHlrLChltWY2TA5MOzDQGL82H0a3+i5Ag== "@next/eslint-plugin-next@11.0.1": version "11.0.1" resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-11.0.1.tgz#5dd3264a40fadcf28eba00d914d69103422bb7e6" integrity sha512-UzdX3y6XSrj9YuASUb/p4sRvfjP2klj2YgIOfMwrWoLTTPJQMh00hREB9Ftr7m7RIxjVSAaaLXIRLdxvq948GA== -"@next/polyfill-module@11.0.1": - version "11.0.1" - resolved "https://registry.yarnpkg.com/@next/polyfill-module/-/polyfill-module-11.0.1.tgz#ca2a110c1c44672cbcff6c2b983f0c0549d87291" - integrity sha512-Cjs7rrKCg4CF4Jhri8PCKlBXhszTfOQNl9AjzdNy4K5jXFyxyoSzuX2rK4IuoyE+yGp5A3XJCBEmOQ4xbUp9Mg== +"@next/polyfill-module@11.1.1": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@next/polyfill-module/-/polyfill-module-11.1.1.tgz#89d5a70685a52a0fad79f05a1f97a6b15cc727aa" + integrity sha512-9FyVSnz00WGdlLsgc2w1xL1Lm/Q25y6FYIyA+1WlJvT6LA2lbR78GKiHgedzUvrAatVGAcg/Og+d0d7B4tsJOg== -"@next/react-dev-overlay@11.0.1": - version "11.0.1" - resolved "https://registry.yarnpkg.com/@next/react-dev-overlay/-/react-dev-overlay-11.0.1.tgz#3c481e83347255abd466dcf7e59ac8a79a0d7fd6" - integrity sha512-lvUjMVpLsgzADs9Q8wtC5LNqvfdN+M0BDMSrqr04EDWAyyX0vURHC9hkvLbyEYWyh+WW32pwjKBXdkMnJhoqMg== +"@next/react-dev-overlay@11.1.1": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@next/react-dev-overlay/-/react-dev-overlay-11.1.1.tgz#3cd99202a85412bada8ba9c8e3f4cf7c19294b24" + integrity sha512-CXc/A0DbSk5VXYu4+zr0fHm52Zh/LhPlLyVPEctJOZL64ccxkls5xGoXvgolJCku9L0pLjJzvdfAmhNLOp5dyw== dependencies: "@babel/code-frame" "7.12.11" anser "1.4.9" @@ -1245,10 +1234,37 @@ stacktrace-parser "0.1.10" strip-ansi "6.0.0" -"@next/react-refresh-utils@11.0.1": - version "11.0.1" - resolved "https://registry.yarnpkg.com/@next/react-refresh-utils/-/react-refresh-utils-11.0.1.tgz#a7509f22b6f70c13101a26573afd295295f1c020" - integrity sha512-K347DM6Z7gBSE+TfUaTTceWvbj0B6iNAsFZXbFZOlfg3uyz2sbKpzPYYFocCc27yjLaS8OfR8DEdS2mZXi8Saw== +"@next/react-refresh-utils@11.1.1": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@next/react-refresh-utils/-/react-refresh-utils-11.1.1.tgz#8d1a5432a53c9f987503d5ab07d3241230afb33f" + integrity sha512-j186y+lWc8BHAuysAWvlOqO9Bp7E3BLK/d/Ju3W2sP5BCH5ZLyLG/p308zSy/O0MGTag0B038ZA1dCy/msouRQ== + +"@next/swc-darwin-arm64@11.1.1": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-11.1.1.tgz#ea9a76bcff00945df29a81bc43b3b22dd0a6cb53" + integrity sha512-KyB0aLpfQ+B2dsyGYpkM0ZwK3PV0t4C4b9yjgQc1VoTVnIjzXdDPnNOuVvmD849ZNOHfj3x8e2rlbxkj0lPm3A== + +"@next/swc-darwin-x64@11.1.1": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-11.1.1.tgz#95838e9116897ae734d02fdbbfa601b6f52adaf3" + integrity sha512-B3ZXgrGx0bQplbrk2oggPjKPPsmyg8Fl0PJLMTVQ+erQ8g1m5QzyS9P6tB3SiIZa180JgENuguTHlVK5qEj4UA== + +"@next/swc-linux-x64-gnu@11.1.1": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.1.tgz#42c4973213a880977ebdfad01474217d7d71e8c2" + integrity sha512-qvZL7gSKF+E+GZ3L1XiTnE3cOh9rk0wkqimT/q+wwcZA4E720Lu4lrT79I3HPuj6i/JPgGvmNskcnYrDeaoFaw== + +"@next/swc-win32-x64-msvc@11.1.1": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.1.tgz#1ffcbd01a0155fa8558f7aefffea1066e9bebe74" + integrity sha512-jhnCiA1De1L+kA0gmHG1AJijHoxOcrETWziDWy8fcqSrM1NlC4aJ5Mnu6k0QMcM9MnmXTA4TQZOEv3kF7vhJUQ== + +"@node-rs/helper@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@node-rs/helper/-/helper-1.2.1.tgz#e079b05f21ff4329d82c4e1f71c0290e4ecdc70c" + integrity sha512-R5wEmm8nbuQU0YGGmYVjEc0OHtYsuXdpRG+Ut/3wZ9XAvQWyThN08bTh2cBJgoZxHQUPtvRfeQuxcAgLuiBISg== + dependencies: + "@napi-rs/triples" "^1.0.3" "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -1751,11 +1767,6 @@ babel-plugin-module-resolver@^4.1.0: reselect "^4.0.0" resolve "^1.13.1" -babel-plugin-syntax-jsx@6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1934,12 +1945,7 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -caniuse-lite@^1.0.30001202, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228: - version "1.0.30001249" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001249.tgz#90a330057f8ff75bfe97a94d047d5e14fabb2ee8" - integrity sha512-vcX4U8lwVXPdqzPWi6cAJ3FnQaqXbBqy/GZseKNQzRj37J7qZdGcBtxq/QLFNLLlfsoXLUdHw8Iwenri86Tagw== - -caniuse-lite@^1.0.30001251: +caniuse-lite@^1.0.30001202, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228, caniuse-lite@^1.0.30001251: version "1.0.30001251" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz#6853a606ec50893115db660f82c094d18f096d85" integrity sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A== @@ -2181,19 +2187,19 @@ css.escape@1.5.1: resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s= -cssnano-preset-simple@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-2.0.0.tgz#b55e72cb970713f425560a0e141b0335249e2f96" - integrity sha512-HkufSLkaBJbKBFx/7aj5HmCK9Ni/JedRQm0mT2qBzMG/dEuJOLnMt2lK6K1rwOOyV4j9aSY+knbW9WoS7BYpzg== +cssnano-preset-simple@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-3.0.0.tgz#e95d0012699ca2c741306e9a3b8eeb495a348dbe" + integrity sha512-vxQPeoMRqUT3c/9f0vWeVa2nKQIHFpogtoBvFdW4GQ3IvEJ6uauCP6p3Y5zQDLFcI7/+40FTgX12o7XUL0Ko+w== dependencies: caniuse-lite "^1.0.30001202" -cssnano-simple@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-2.0.0.tgz#930d9dcd8ba105c5a62ce719cb00854da58b5c05" - integrity sha512-0G3TXaFxlh/szPEG/o3VcmCwl0N3E60XNb9YZZijew5eIs6fLjJuOPxQd9yEBaX2p/YfJtt49i4vYi38iH6/6w== +cssnano-simple@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-3.0.0.tgz#a4b8ccdef4c7084af97e19bc5b93b4ecf211e90f" + integrity sha512-oU3ueli5Dtwgh0DyeohcIEE00QVfbPR3HzyXdAl89SfnQG3y0/qcpfLVW+jPIh3/rgMZGwuW96rejZGaYE9eUg== dependencies: - cssnano-preset-simple "^2.0.0" + cssnano-preset-simple "^3.0.0" csstype@^3.0.2, csstype@^3.0.6: version "3.0.8" @@ -3473,11 +3479,6 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash@^4.17.13: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" @@ -3576,10 +3577,10 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoid@^3.1.22: - version "3.1.23" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" - integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== +nanoid@^3.1.23: + version "3.1.30" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" + integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== native-url@0.3.4: version "0.3.4" @@ -3593,17 +3594,18 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -next@11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/next/-/next-11.0.1.tgz#b8e3914d153aaf7143cb98c09bcd3c8230eeb17a" - integrity sha512-yR7be7asNbvpVNpi6xxEg28wZ7Gqmj1nOt0sABH9qORmF3+pms2KZ7Cng33oK5nqPIzEEFJD0pp2PCe3/ueMIg== +next@11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/next/-/next-11.1.1.tgz#ca15c6d6b4b4bf8c3e859f7fc4f9657ce59bcb63" + integrity sha512-vfLJDkwAHsZUho5R1K4w49nfYhftUMWNmeNSjCtulOvnRBuEFb7ROyRZOQk7f29rMz02eLQrPZ9yiAmPsexL2g== dependencies: - "@babel/runtime" "7.12.5" + "@babel/runtime" "7.15.3" "@hapi/accept" "5.0.2" - "@next/env" "11.0.1" - "@next/polyfill-module" "11.0.1" - "@next/react-dev-overlay" "11.0.1" - "@next/react-refresh-utils" "11.0.1" + "@next/env" "11.1.1" + "@next/polyfill-module" "11.1.1" + "@next/react-dev-overlay" "11.1.1" + "@next/react-refresh-utils" "11.1.1" + "@node-rs/helper" "1.2.1" assert "2.0.0" ast-types "0.13.2" browserify-zlib "0.2.0" @@ -3614,7 +3616,7 @@ next@11.0.1: chokidar "3.5.1" constants-browserify "1.0.0" crypto-browserify "3.12.0" - cssnano-simple "2.0.0" + cssnano-simple "3.0.0" domain-browser "4.19.0" encoding "0.1.13" etag "1.8.1" @@ -3631,9 +3633,8 @@ next@11.0.1: p-limit "3.1.0" path-browserify "1.0.1" pnp-webpack-plugin "1.6.4" - postcss "8.2.13" + postcss "8.2.15" process "0.11.10" - prop-types "15.7.2" querystring-es3 "0.2.1" raw-body "2.4.1" react-is "17.0.2" @@ -3641,13 +3642,18 @@ next@11.0.1: stream-browserify "3.0.0" stream-http "3.1.1" string_decoder "1.3.0" - styled-jsx "3.3.2" + styled-jsx "4.0.0" timers-browserify "2.0.12" tty-browserify "0.0.1" use-subscription "1.5.1" - util "0.12.3" + util "0.12.4" vm-browserify "1.1.2" watchpack "2.1.1" + optionalDependencies: + "@next/swc-darwin-arm64" "11.1.1" + "@next/swc-darwin-x64" "11.1.1" + "@next/swc-linux-x64-gnu" "11.1.1" + "@next/swc-win32-x64-msvc" "11.1.1" node-fetch@2.6.1: version "2.6.1" @@ -4011,13 +4017,13 @@ popmotion@9.3.6: style-value-types "4.1.4" tslib "^2.1.0" -postcss@8.2.13: - version "8.2.13" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.13.tgz#dbe043e26e3c068e45113b1ed6375d2d37e2129f" - integrity sha512-FCE5xLH+hjbzRdpbRb1IMCvPv9yZx2QnDarBEYSN0N0HYk+TcXsEhwdFcFb+SRWOKzKGErhIEbBK2ogyLdTtfQ== +postcss@8.2.15: + version "8.2.15" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.15.tgz#9e66ccf07292817d226fc315cbbf9bc148fbca65" + integrity sha512-2zO3b26eJD/8rb106Qu2o7Qgg52ND5HPjcyQiK2B98O388h43A448LCslC0dI2P97wCAQRJsFvwTRcXxTKds+Q== dependencies: colorette "^1.2.2" - nanoid "^3.1.22" + nanoid "^3.1.23" source-map "^0.6.1" prelude-ls@^1.2.1: @@ -4057,7 +4063,7 @@ promise-polyfill@8.1.3: resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.1.3.tgz#8c99b3cf53f3a91c68226ffde7bde81d7f904116" integrity sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g== -prop-types@15.7.2, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -4695,13 +4701,13 @@ style-value-types@4.1.4: hey-listen "^1.0.8" tslib "^2.1.0" -styled-jsx@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-3.3.2.tgz#2474601a26670a6049fb4d3f94bd91695b3ce018" - integrity sha512-daAkGd5mqhbBhLd6jYAjYBa9LpxYCzsgo/f6qzPdFxVB8yoGbhxvzQgkC0pfmCVvW3JuAEBn0UzFLBfkHVZG1g== +styled-jsx@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-4.0.0.tgz#f7b90e7889d0a4f4635f8d1ae9ac32f3acaedc57" + integrity sha512-2USeoWMoJ/Lx5s2y1PxuvLy/cz2Yrr8cTySV3ILHU1Vmaw1bnV7suKdblLPjnyhMD+qzN7B1SWyh4UZTARn/WA== dependencies: - "@babel/types" "7.8.3" - babel-plugin-syntax-jsx "6.18.0" + "@babel/plugin-syntax-jsx" "7.14.5" + "@babel/types" "7.15.0" convert-source-map "1.7.0" loader-utils "1.2.3" source-map "0.7.3" @@ -4938,10 +4944,10 @@ util@0.10.3: dependencies: inherits "2.0.1" -util@0.12.3: - version "0.12.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.3.tgz#971bb0292d2cc0c892dab7c6a5d37c2bec707888" - integrity sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog== +util@0.12.4, util@^0.12.0: + version "0.12.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" + integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== dependencies: inherits "^2.0.3" is-arguments "^1.0.4" @@ -4957,18 +4963,6 @@ util@^0.11.0: dependencies: inherits "2.0.3" -util@^0.12.0: - version "0.12.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" - integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" From 56531e2e92c17a0bb168a0f891ac7d829076f190 Mon Sep 17 00:00:00 2001 From: Victor Lucas <11355873+victorlucss@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:41:36 -0300 Subject: [PATCH 03/39] feat: Migrating to Next 12 (#8) --- modules/Category/.gitkeep | 0 next-env.d.ts | 3 + package.json | 4 +- yarn.lock | 418 +++++++++++++------------------------- 4 files changed, 149 insertions(+), 276 deletions(-) delete mode 100644 modules/Category/.gitkeep diff --git a/modules/Category/.gitkeep b/modules/Category/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/next-env.d.ts b/next-env.d.ts index c6643fd..9bc3dd4 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,3 +1,6 @@ /// /// /// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/package.json b/package.json index e0ffaae..085d1c4 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ "@emotion/styled": "^11", "firebase": "^8.9.1", "framer-motion": "^4", - "next": "11.1.1", - "react": "17.0.2", + "next": "^12.0.0", + "react": "^17.0.2", "react-datepicker": "^4.2.1", "react-dom": "17.0.2", "react-hook-form": "^7.12.2" diff --git a/yarn.lock b/yarn.lock index 4821bfc..88d68b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -195,11 +195,17 @@ dependencies: core-js-pure "^3.16.0" regenerator-runtime "^0.13.4" +"@babel/runtime@7.15.4", "@babel/runtime@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" + integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== + dependencies: + regenerator-runtime "^0.13.4" -"@babel/runtime@7.15.3", "@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.13.10", "@babel/runtime@^7.7.2": - version "7.15.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b" - integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.13.10", "@babel/runtime@^7.7.2": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" + integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg== dependencies: regenerator-runtime "^0.13.4" @@ -1202,25 +1208,26 @@ resolved "https://registry.yarnpkg.com/@napi-rs/triples/-/triples-1.0.3.tgz#76d6d0c3f4d16013c61e45dfca5ff1e6c31ae53c" integrity sha512-jDJTpta+P4p1NZTFVLHJ/TLFVYVcOqv6l8xwOeBKNPMgY/zDYH/YH7SJbvrr/h1RcS9GzbPcLKGzpuK9cV56UA== -"@next/env@11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@next/env/-/env-11.1.1.tgz#d403282accbe8795aa2341f0e02c2e8bfc92bfb0" - integrity sha512-UEAzlfKofotLmj9LIgNixAfXpRck9rt/1CU9Q4ZtNDueGBJQP3HUzPHlrLChltWY2TA5MOzDQGL82H0a3+i5Ag== +"@next/env@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/env/-/env-12.0.0.tgz#1ce019c9e470d7ad05cf0523ee9f606a2e460b65" + integrity sha512-ztXvXG0dEHbWsOZZ2x443fVJK2QtVOhCU6QfmeJjnbmeYhiHhJ4sWOF2QFt0EgNTcyt6prLBVUFGQheW6Jc6lA== "@next/eslint-plugin-next@11.0.1": version "11.0.1" resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-11.0.1.tgz#5dd3264a40fadcf28eba00d914d69103422bb7e6" integrity sha512-UzdX3y6XSrj9YuASUb/p4sRvfjP2klj2YgIOfMwrWoLTTPJQMh00hREB9Ftr7m7RIxjVSAaaLXIRLdxvq948GA== -"@next/polyfill-module@11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@next/polyfill-module/-/polyfill-module-11.1.1.tgz#89d5a70685a52a0fad79f05a1f97a6b15cc727aa" - integrity sha512-9FyVSnz00WGdlLsgc2w1xL1Lm/Q25y6FYIyA+1WlJvT6LA2lbR78GKiHgedzUvrAatVGAcg/Og+d0d7B4tsJOg== +"@next/polyfill-module@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/polyfill-module/-/polyfill-module-12.0.0.tgz#9516a57b72150bb250f76b8f94667dadf2973988" + integrity sha512-eajaHprq5AaCdhWLlLW53mJWykWSgThAJ2IBUvm2Jx13ruole3t6rMOVPR2MvTacaq8ayj3zRtLM5j9j4Ejqyw== + +"@next/react-dev-overlay@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/react-dev-overlay/-/react-dev-overlay-12.0.0.tgz#ddad018afa1ebc9fa79d3a3ef09103e1901a0983" + integrity sha512-sGDNFQFV6H+KAi6yQRIv4LtZ8Mg8zu1CwyVimwgYboai4eVIOg4rigZADV2xp4YEtwkgvQEijDh6J7rLCKPDXA== -"@next/react-dev-overlay@11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@next/react-dev-overlay/-/react-dev-overlay-11.1.1.tgz#3cd99202a85412bada8ba9c8e3f4cf7c19294b24" - integrity sha512-CXc/A0DbSk5VXYu4+zr0fHm52Zh/LhPlLyVPEctJOZL64ccxkls5xGoXvgolJCku9L0pLjJzvdfAmhNLOp5dyw== dependencies: "@babel/code-frame" "7.12.11" anser "1.4.9" @@ -1232,32 +1239,67 @@ shell-quote "1.7.2" source-map "0.8.0-beta.0" stacktrace-parser "0.1.10" - strip-ansi "6.0.0" - -"@next/react-refresh-utils@11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@next/react-refresh-utils/-/react-refresh-utils-11.1.1.tgz#8d1a5432a53c9f987503d5ab07d3241230afb33f" - integrity sha512-j186y+lWc8BHAuysAWvlOqO9Bp7E3BLK/d/Ju3W2sP5BCH5ZLyLG/p308zSy/O0MGTag0B038ZA1dCy/msouRQ== - -"@next/swc-darwin-arm64@11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-11.1.1.tgz#ea9a76bcff00945df29a81bc43b3b22dd0a6cb53" - integrity sha512-KyB0aLpfQ+B2dsyGYpkM0ZwK3PV0t4C4b9yjgQc1VoTVnIjzXdDPnNOuVvmD849ZNOHfj3x8e2rlbxkj0lPm3A== - -"@next/swc-darwin-x64@11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-11.1.1.tgz#95838e9116897ae734d02fdbbfa601b6f52adaf3" - integrity sha512-B3ZXgrGx0bQplbrk2oggPjKPPsmyg8Fl0PJLMTVQ+erQ8g1m5QzyS9P6tB3SiIZa180JgENuguTHlVK5qEj4UA== - -"@next/swc-linux-x64-gnu@11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.1.tgz#42c4973213a880977ebdfad01474217d7d71e8c2" - integrity sha512-qvZL7gSKF+E+GZ3L1XiTnE3cOh9rk0wkqimT/q+wwcZA4E720Lu4lrT79I3HPuj6i/JPgGvmNskcnYrDeaoFaw== - -"@next/swc-win32-x64-msvc@11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.1.tgz#1ffcbd01a0155fa8558f7aefffea1066e9bebe74" - integrity sha512-jhnCiA1De1L+kA0gmHG1AJijHoxOcrETWziDWy8fcqSrM1NlC4aJ5Mnu6k0QMcM9MnmXTA4TQZOEv3kF7vhJUQ== + strip-ansi "6.0.1" + +"@next/react-refresh-utils@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/react-refresh-utils/-/react-refresh-utils-12.0.0.tgz#515826c7c0ca01fc39ef7e7f6f8990c4ff388494" + integrity sha512-S5EjnsNus4vX4hU0Ky/NIGXAWO2aPxS78ZQO2qK4yvEpNJ554B/xDoErb6D1HSpMiwBxSXE36FLsjvaxMvUs3g== + +"@next/swc-android-arm64@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.0.0.tgz#4ccb356f70cabc6399e215c9bb9129835ae0b408" + integrity sha512-m0CSgD+aUZ49fctjJ7IRbkPtEYkFk+AtpJ73sfjbxzOXwAEfB2LM33rIQNp/G7D1WLqWITF00keNaeGAADD0aw== + +"@next/swc-darwin-arm64@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.0.0.tgz#770abf91bc4e201d096e9283af2795ee7c027bc5" + integrity sha512-y+p+rTVx1sfQqBURZkheVTyz7ugkIMcFxQkd+yNU4IMCT6nOH9SdL1jr+E+neqY1D1vvsOj/UwkPxyOHH2p8Lw== + +"@next/swc-darwin-x64@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.0.0.tgz#ebe5878c5b568ae0a4f4adac7ce937d380f332e9" + integrity sha512-A4gsNmMg+TN89djBJMKbYlKIWrTwKw+dvyvaE8rx+CDUzh4hdro3mhqWtaNTqCWhE28WnoGhXLdANeDWsoXg1Q== + +"@next/swc-linux-arm-gnueabihf@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.0.0.tgz#18b82c7e64f37803f5104544840ab3ee89af1ade" + integrity sha512-DntdAybXbEOzP7wiv/Ppa9BTaGkb/Fp3SVxrZv694OjtGbmY0Q8+YGsShh0FQmhMKBwcJ0GMLI+anmsWj9ZUcA== + +"@next/swc-linux-arm64-gnu@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.0.0.tgz#8fd3db89d206be3f9a66ca004a159998a2eeb1a4" + integrity sha512-3D18X1dpziBnk9UEg7b/hIyQA6Qt18UDKY3dmKqKcGcFMwtMqBsunVLDoNmB5SHVDVBGvA4zOtq28Xovb/3MOA== + +"@next/swc-linux-arm64-musl@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.0.0.tgz#0b895996ea87a9cd18de836a78f824c66b598301" + integrity sha512-el+Xin2vl2JnWw809Eg+otWxvIcw+waBuOj4B36+d8yircexhNvSDjAnZkhXCWA6I05IANUx83Q0Up/NrnZ5yQ== + +"@next/swc-linux-x64-gnu@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.0.0.tgz#13bb694f1dabd25ca6722a2a574039c50c0589f0" + integrity sha512-jMOBEc7wbsJfq6UZinrEFky3kK4LCjFPL2caHqfXpodTv/oVA/DMkiXhpYRkdfLc9vNZbw/a4Ut7gQjgYPVPtg== + +"@next/swc-linux-x64-musl@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.0.0.tgz#f6718cecd37bd6e77b7edf19fbfb0f27a1d17411" + integrity sha512-0pizk3CZasxbaSyn7FzXb9cfrgIjmyq0dA3+MqvFZJNTLjDw8/yk0w3HdAOPFor3Tgoqhu5nsX/X5mnE6tObng== + +"@next/swc-win32-arm64-msvc@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.0.0.tgz#456d357cab970d7fa1b6d4ca6dee323e8f4b3883" + integrity sha512-0+NT/FY2qfwgScqRhNabV6vVCfx+4PmRS4675/iMKdGLdGzat69FGjUqxW6rPS+bJGc8qvpa6oztsvsVODJHSQ== + +"@next/swc-win32-ia32-msvc@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.0.0.tgz#8a82da7f95c6c45f1487e991ab8af8bd45b75c84" + integrity sha512-sbjvdZGKiSJQrOSJRooEPIWwSfyatBiuRC7Q6R2jiR2KW1jg98nbnXRwiI8tj7OSl28h0yswmtGFjz5t5O1EbQ== + +"@next/swc-win32-x64-msvc@12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.0.0.tgz#c19e6cfdb1cebe088ea663d6405a6ed76fc4e79d" + integrity sha512-NMZRwS59X4+yQT53jROZMcboiPVd6zCGlEN3kuPewelTDVwKAXxzhpLuxCO46e0ssol8UZiOTdgB4NPVbsLK2A== "@node-rs/helper@1.2.1": version "1.2.1" @@ -1610,6 +1652,11 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -1709,24 +1756,11 @@ assert@2.0.0: object-is "^1.0.1" util "^0.12.0" -assert@^1.1.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" - integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== - dependencies: - object-assign "^4.1.1" - util "0.10.3" - ast-types-flow@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0= -ast-types@0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.2.tgz#df39b677a911a83f3a049644fb74fdded23cea48" - integrity sha512-uWMHxJxtfj/1oZClOxDEV1sQ1HCDkA4MG8Gr69KKeBjEVH0R84WlejZ0y2DcwyBlpAEMltmVYkVgqfLFb2oyiA== - astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -1871,7 +1905,7 @@ browserify-sign@^4.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -browserify-zlib@0.2.0, browserify-zlib@^0.2.0: +browserify-zlib@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== @@ -1913,15 +1947,6 @@ buffer@5.6.0: base64-js "^1.0.2" ieee754 "^1.1.4" -buffer@^4.3.0: - version "4.9.2" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" - integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -2061,12 +2086,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -console-browserify@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - -constants-browserify@1.0.0, constants-browserify@^1.0.0: +constants-browserify@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= @@ -2102,11 +2122,6 @@ core-js@3.6.5: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" @@ -2158,7 +2173,7 @@ cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@3.12.0, crypto-browserify@^3.11.0: +crypto-browserify@3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== @@ -2312,11 +2327,6 @@ domain-browser@4.19.0: resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.19.0.tgz#1093e17c0a17dbd521182fe90d49ac1370054af1" integrity sha512-fRA+BaAWOR/yr/t7T9E9GJztHPeFjj8U35ajyAjCDtAAnTn1Rc1f6W6VGPJrO1tkQv9zWu+JRof7z6oQtiYVFQ== -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - electron-to-chromium@^1.3.723: version "1.3.801" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.801.tgz#f41c588e408ad1a4f794f91f38aa94a89c492f51" @@ -2677,7 +2687,7 @@ etag@1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= -events@^3.0.0: +events@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -3061,7 +3071,7 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== -https-browserify@1.0.0, https-browserify@^1.0.0: +https-browserify@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= @@ -3128,21 +3138,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - internal-slot@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" @@ -3293,11 +3293,6 @@ is-typed-array@^1.1.3, is-typed-array@^1.1.6: foreach "^2.0.5" has-tostringtag "^1.0.0" -isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -3594,20 +3589,19 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -next@11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/next/-/next-11.1.1.tgz#ca15c6d6b4b4bf8c3e859f7fc4f9657ce59bcb63" - integrity sha512-vfLJDkwAHsZUho5R1K4w49nfYhftUMWNmeNSjCtulOvnRBuEFb7ROyRZOQk7f29rMz02eLQrPZ9yiAmPsexL2g== +next@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/next/-/next-12.0.0.tgz#f9df3f1788c7e0526c2cde861dbb391b499af758" + integrity sha512-FCV4ODfm+7g8TWi9FjwjH+z5Rt1UHIVnFFO7GfCg+LLYC2LF89gCjjXEIeK8loaiDEkxafPqjyCWWfUU7xJ8DA== dependencies: - "@babel/runtime" "7.15.3" + "@babel/runtime" "7.15.4" "@hapi/accept" "5.0.2" - "@next/env" "11.1.1" - "@next/polyfill-module" "11.1.1" - "@next/react-dev-overlay" "11.1.1" - "@next/react-refresh-utils" "11.1.1" + "@next/env" "12.0.0" + "@next/polyfill-module" "12.0.0" + "@next/react-dev-overlay" "12.0.0" + "@next/react-refresh-utils" "12.0.0" "@node-rs/helper" "1.2.1" assert "2.0.0" - ast-types "0.13.2" browserify-zlib "0.2.0" browserslist "4.16.6" buffer "5.6.0" @@ -3620,29 +3614,28 @@ next@11.1.1: domain-browser "4.19.0" encoding "0.1.13" etag "1.8.1" + events "3.3.0" find-cache-dir "3.3.1" get-orientation "1.1.2" https-browserify "1.0.0" image-size "1.0.0" jest-worker "27.0.0-next.5" - native-url "0.3.4" node-fetch "2.6.1" node-html-parser "1.4.9" - node-libs-browser "^2.2.1" os-browserify "0.3.0" p-limit "3.1.0" path-browserify "1.0.1" - pnp-webpack-plugin "1.6.4" postcss "8.2.15" process "0.11.10" querystring-es3 "0.2.1" raw-body "2.4.1" react-is "17.0.2" react-refresh "0.8.3" + regenerator-runtime "0.13.4" stream-browserify "3.0.0" stream-http "3.1.1" string_decoder "1.3.0" - styled-jsx "4.0.0" + styled-jsx "5.0.0-beta.3" timers-browserify "2.0.12" tty-browserify "0.0.1" use-subscription "1.5.1" @@ -3650,10 +3643,17 @@ next@11.1.1: vm-browserify "1.1.2" watchpack "2.1.1" optionalDependencies: - "@next/swc-darwin-arm64" "11.1.1" - "@next/swc-darwin-x64" "11.1.1" - "@next/swc-linux-x64-gnu" "11.1.1" - "@next/swc-win32-x64-msvc" "11.1.1" + "@next/swc-android-arm64" "12.0.0" + "@next/swc-darwin-arm64" "12.0.0" + "@next/swc-darwin-x64" "12.0.0" + "@next/swc-linux-arm-gnueabihf" "12.0.0" + "@next/swc-linux-arm64-gnu" "12.0.0" + "@next/swc-linux-arm64-musl" "12.0.0" + "@next/swc-linux-x64-gnu" "12.0.0" + "@next/swc-linux-x64-musl" "12.0.0" + "@next/swc-win32-arm64-msvc" "12.0.0" + "@next/swc-win32-ia32-msvc" "12.0.0" + "@next/swc-win32-x64-msvc" "12.0.0" node-fetch@2.6.1: version "2.6.1" @@ -3667,35 +3667,6 @@ node-html-parser@1.4.9: dependencies: he "1.2.0" -node-libs-browser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" - integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.1" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "^1.0.1" - node-releases@^1.1.71: version "1.1.74" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.74.tgz#e5866488080ebaa70a93b91144ccde06f3c3463e" @@ -3801,7 +3772,7 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -os-browserify@0.3.0, os-browserify@^0.3.0: +os-browserify@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= @@ -3899,11 +3870,6 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -path-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" - integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - path-browserify@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" @@ -4000,13 +3966,6 @@ platform@1.3.6: resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== -pnp-webpack-plugin@1.6.4: - version "1.6.4" - resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149" - integrity sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg== - dependencies: - ts-pnp "^1.1.6" - popmotion@9.3.6: version "9.3.6" resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-9.3.6.tgz#b5236fa28f242aff3871b9e23721f093133248d1" @@ -4043,12 +4002,7 @@ prettier@^2.3.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@0.11.10, process@^0.11.10: +process@0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= @@ -4103,36 +4057,16 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" safe-buffer "^5.1.2" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^1.2.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -querystring-es3@0.2.1, querystring-es3@^0.2.0: +querystring-es3@0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -querystring@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" - integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -4189,7 +4123,7 @@ react-datepicker@^4.2.1: react-onclickoutside "^6.10.0" react-popper "^2.2.5" -react-dom@17.0.2: +react-dom@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== @@ -4276,7 +4210,7 @@ react-style-singleton@^2.1.0: invariant "^2.2.4" tslib "^1.0.0" -react@17.0.2: +react@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== @@ -4301,19 +4235,6 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -readable-stream@^2.0.2, readable-stream@^2.3.3, readable-stream@^2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" @@ -4330,6 +4251,11 @@ readdirp@~3.5.0: dependencies: picomatch "^2.2.1" +regenerator-runtime@0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz#e96bf612a3362d12bb69f7e8f74ffeab25c7ac91" + integrity sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g== + regenerator-runtime@^0.13.4: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" @@ -4416,7 +4342,7 @@ safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -4582,14 +4508,6 @@ stream-browserify@3.0.0: inherits "~2.0.4" readable-stream "^3.5.0" -stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - stream-http@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.1.1.tgz#0370a8017cf8d050b9a8554afe608f043eaff564" @@ -4600,17 +4518,6 @@ stream-http@3.1.1: readable-stream "^3.6.0" xtend "^4.0.2" -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - stream-parser@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/stream-parser/-/stream-parser-0.3.1.tgz#1618548694420021a1182ff0af1911c129761773" @@ -4662,21 +4569,21 @@ string.prototype.trimstart@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" -string_decoder@1.3.0, string_decoder@^1.0.0, string_decoder@^1.1.1: +string_decoder@1.3.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== +strip-ansi@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - safe-buffer "~5.1.0" + ansi-regex "^5.0.1" -strip-ansi@6.0.0, strip-ansi@^6.0.0: +strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== @@ -4701,10 +4608,10 @@ style-value-types@4.1.4: hey-listen "^1.0.8" tslib "^2.1.0" -styled-jsx@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-4.0.0.tgz#f7b90e7889d0a4f4635f8d1ae9ac32f3acaedc57" - integrity sha512-2USeoWMoJ/Lx5s2y1PxuvLy/cz2Yrr8cTySV3ILHU1Vmaw1bnV7suKdblLPjnyhMD+qzN7B1SWyh4UZTARn/WA== +styled-jsx@5.0.0-beta.3: + version "5.0.0-beta.3" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.0-beta.3.tgz#400d16179b5dff10d5954ab8be27a9a1b7780dd2" + integrity sha512-HtDDGSFPvmjHIqWf9n8Oo54tAoY/DTplvlyOH2+YOtD80Sp31Ap8ffSmxhgk5EkUoJ7xepdXMGT650mSffWuRA== dependencies: "@babel/plugin-syntax-jsx" "7.14.5" "@babel/types" "7.15.0" @@ -4768,7 +4675,7 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -timers-browserify@2.0.12, timers-browserify@^2.0.4: +timers-browserify@2.0.12: version "2.0.12" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== @@ -4785,11 +4692,6 @@ tinycolor2@1.4.2: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -4819,11 +4721,6 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -ts-pnp@^1.1.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" - integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== - tsconfig-paths@^3.9.0: version "3.10.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz#79ae67a68c15289fdf5c51cb74f397522d795ed7" @@ -4850,11 +4747,6 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= - tty-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" @@ -4904,14 +4796,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - use-callback-ref@^1.2.1, use-callback-ref@^1.2.3: version "1.2.5" resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.2.5.tgz#6115ed242cfbaed5915499c0a9842ca2912f38a5" @@ -4932,18 +4816,11 @@ use-subscription@1.5.1: dependencies: object-assign "^4.1.1" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - dependencies: - inherits "2.0.1" - util@0.12.4, util@^0.12.0: version "0.12.4" resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" @@ -4956,13 +4833,6 @@ util@0.12.4, util@^0.12.0: safe-buffer "^5.1.2" which-typed-array "^1.1.2" -util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - dependencies: - inherits "2.0.3" - v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -4976,7 +4846,7 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -vm-browserify@1.1.2, vm-browserify@^1.0.1: +vm-browserify@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== @@ -5083,7 +4953,7 @@ xmlhttprequest@1.8.0: resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= -xtend@^4.0.0, xtend@^4.0.2: +xtend@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== From 1ba2ab884f5338c433d5a73526a071d3c80ddee0 Mon Sep 17 00:00:00 2001 From: Victor Lucas <11355873+victorlucss@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:41:54 -0300 Subject: [PATCH 04/39] Feature/BaseModule (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Modal component * feat: Bubble types * feat: added yup * feat: Bubble component to render fields * feat: 🤘🏽 BaseForm component * feat: 🤘🏽 BaseList component * feat: BaseField and SelectOption types * feat: 🤘🏽 renderFields method --- components/Modal/index.tsx | 18 +++ components/index.ts | 1 + .../BaseModule/components/Bubble/index.tsx | 62 ++++++++++ modules/BaseModule/constants/Bubble.ts | 6 + .../BaseModule/container/BaseForm/index.tsx | 82 +++++++++++++ .../BaseModule/container/BaseList/index.tsx | 115 ++++++++++++++++++ modules/BaseModule/interfaces/BaseField.ts | 11 ++ modules/BaseModule/interfaces/SelectOption.ts | 4 + modules/BaseModule/shared/renderFields.tsx | 20 +++ package.json | 4 +- yarn.lock | 63 +++++++++- 11 files changed, 380 insertions(+), 6 deletions(-) create mode 100644 components/Modal/index.tsx create mode 100644 modules/BaseModule/components/Bubble/index.tsx create mode 100644 modules/BaseModule/constants/Bubble.ts create mode 100644 modules/BaseModule/container/BaseForm/index.tsx create mode 100644 modules/BaseModule/container/BaseList/index.tsx create mode 100644 modules/BaseModule/interfaces/BaseField.ts create mode 100644 modules/BaseModule/interfaces/SelectOption.ts create mode 100644 modules/BaseModule/shared/renderFields.tsx diff --git a/components/Modal/index.tsx b/components/Modal/index.tsx new file mode 100644 index 0000000..36ee630 --- /dev/null +++ b/components/Modal/index.tsx @@ -0,0 +1,18 @@ +import { Modal as ModalChakra, ModalOverlay, ModalContent, ModalBody } from '@chakra-ui/react'; + +interface ModalInterface { + onClose: () => void; + isOpen: boolean; + children: React.ReactElement; +} + +export const Modal = ({ onClose, isOpen, children }: ModalInterface) => { + return ( + + + + {children} + + + ); +}; diff --git a/components/index.ts b/components/index.ts index 0653a6d..9a1f7f4 100644 --- a/components/index.ts +++ b/components/index.ts @@ -2,3 +2,4 @@ export * from './MoneyInput'; export * from './Input'; export * from './Select'; export * from './DatePicker'; +export * from './Modal'; diff --git a/modules/BaseModule/components/Bubble/index.tsx b/modules/BaseModule/components/Bubble/index.tsx new file mode 100644 index 0000000..14968c2 --- /dev/null +++ b/modules/BaseModule/components/Bubble/index.tsx @@ -0,0 +1,62 @@ +import React from 'react'; +import { FieldErrors, FieldValues, UseFormRegister } from 'react-hook-form'; + +import { Input, Select } from '@Components'; +import SelectOption from '@Modules/BaseModule/interfaces/SelectOption'; + +import { BubbleEnum, BUBBLE_TYPES } from '../../constants/Bubble'; + +interface BubbleInterface { + type: BubbleEnum; + name: string; + label: string; + register: UseFormRegister; + errors: FieldErrors; + required?: boolean; + props?: object; + options?: SelectOption[]; + value?: (string | number | readonly string[]) & string; +} + +const Bubble = ({ + type, + name, + label, + register, + errors, + required = false, + options = [], + value, + props = {}, +}: BubbleInterface) => { + switch (type) { + case BUBBLE_TYPES.INPUT: + return ( + + ); + + case BUBBLE_TYPES.SELECT: + return ( + { error={errors.email?.message} marginBottom="10px" /> + + + + + + + + - - -
- - - - - - - - -
+ + Not registered yet? + + + + + diff --git a/pages/_app.tsx b/pages/_app.tsx index e973145..5aedd1d 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -9,7 +9,7 @@ import './styles.css'; function MyApp({ Component, pageProps }: AppProps) { return ( - + diff --git a/pages/login.tsx b/pages/login.tsx index 7be72d8..3c36da6 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -8,7 +8,7 @@ export default function Home() { const router = useRouter(); return ( - + ); diff --git a/yarn.lock b/yarn.lock index 52c2118..c271d22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -195,6 +195,7 @@ dependencies: core-js-pure "^3.16.0" regenerator-runtime "^0.13.4" + "@babel/runtime@7.15.4", "@babel/runtime@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" @@ -209,13 +210,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.15.4": - version "7.15.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" - integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" @@ -1239,7 +1233,6 @@ version "12.0.0" resolved "https://registry.yarnpkg.com/@next/react-dev-overlay/-/react-dev-overlay-12.0.0.tgz#ddad018afa1ebc9fa79d3a3ef09103e1901a0983" integrity sha512-sGDNFQFV6H+KAi6yQRIv4LtZ8Mg8zu1CwyVimwgYboai4eVIOg4rigZADV2xp4YEtwkgvQEijDh6J7rLCKPDXA== - dependencies: "@babel/code-frame" "7.12.11" anser "1.4.9" @@ -1664,12 +1657,7 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-regex@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^5.0.1: +ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -3495,10 +3483,12 @@ lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash@^4.17.13, lodash@^4.17.21: + +lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" @@ -3602,17 +3592,10 @@ nanoclone@^0.2.1: resolved "https://registry.yarnpkg.com/nanoclone/-/nanoclone-0.2.1.tgz#dd4090f8f1a110d26bb32c49ed2f5b9235209ed4" integrity sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA== -nanoid@^3.1.22: - version "3.1.23" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" - integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== - -native-url@0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/native-url/-/native-url-0.3.4.tgz#29c943172aed86c63cee62c8c04db7f5756661f8" - integrity sha512-6iM8R99ze45ivyH8vybJ7X0yekIcPf5GgLV5K0ENCbmRcaRIDoj37BC8iLEmaaBfqqb8enuZ5p0uhY+lVAbAcA== - dependencies: - querystring "^0.2.0" +nanoid@^3.1.23: + version "3.1.30" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" + integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== natural-compare@^1.4.0: version "1.4.0" @@ -4158,7 +4141,7 @@ react-datepicker@^4.2.1: react-onclickoutside "^6.10.0" react-popper "^2.2.5" -react-dom@^17.0.2: +react-dom@17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== From f83b432be51e01475b85696da3e39b3edc22cf24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20G=C3=AAnesis=20da=20Silva?= Date: Thu, 23 Dec 2021 13:52:20 -0300 Subject: [PATCH 07/39] feat: facelift register page --- modules/Authentication/container/FormSignUp/index.tsx | 8 ++++---- pages/signup.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/Authentication/container/FormSignUp/index.tsx b/modules/Authentication/container/FormSignUp/index.tsx index 8e47736..081fe1b 100644 --- a/modules/Authentication/container/FormSignUp/index.tsx +++ b/modules/Authentication/container/FormSignUp/index.tsx @@ -35,7 +35,7 @@ const FormSignUp = () => { }; return ( - +
{ marginBottom="10px" /> -
- -
+
diff --git a/pages/signup.tsx b/pages/signup.tsx index ed9e21a..3bbf749 100644 --- a/pages/signup.tsx +++ b/pages/signup.tsx @@ -7,7 +7,7 @@ export default function Home() { const router = useRouter(); return ( - + ); From 1306ac3ff3e37ce0462873b91c5a00f74259652d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20G=C3=AAnesis=20da=20Silva?= Date: Thu, 23 Dec 2021 13:54:56 -0300 Subject: [PATCH 08/39] feat: facelift forgot password page --- .../container/FormForgotPassword/index.tsx | 10 +++++----- pages/forgot.tsx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/Authentication/container/FormForgotPassword/index.tsx b/modules/Authentication/container/FormForgotPassword/index.tsx index 28dcdeb..16cfa7e 100644 --- a/modules/Authentication/container/FormForgotPassword/index.tsx +++ b/modules/Authentication/container/FormForgotPassword/index.tsx @@ -36,7 +36,7 @@ const FormForgotPassword = () => { }; return ( - +
{ marginBottom="10px" /> -
- - -
+
diff --git a/pages/forgot.tsx b/pages/forgot.tsx index 43a21ba..08e2e5a 100644 --- a/pages/forgot.tsx +++ b/pages/forgot.tsx @@ -7,7 +7,7 @@ export default function Home() { const router = useRouter(); return ( - + ); From b86bb4b5e7edb41027515d3a002d960166542fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20G=C3=AAnesis=20da=20Silva?= Date: Thu, 23 Dec 2021 15:32:40 -0300 Subject: [PATCH 09/39] fix: empty space linting --- pages/signup.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/signup.tsx b/pages/signup.tsx index 3bbf749..074b2ab 100644 --- a/pages/signup.tsx +++ b/pages/signup.tsx @@ -7,7 +7,7 @@ export default function Home() { const router = useRouter(); return ( - + ); From 35aedd663fd9e0f41d8490847cb1ae70fb38b942 Mon Sep 17 00:00:00 2001 From: Victor Lucas Date: Fri, 17 Nov 2023 22:14:19 -0500 Subject: [PATCH 10/39] feat: a LOT of new stuff --- .DS_Store | Bin 6148 -> 12292 bytes .vscode/settings.json | 3 + components/Box/index.tsx | 21 +++ components/DatePicker/index.tsx | 5 +- components/LateralMenu/index.tsx | 156 ++++++++++++++++++ components/MoneyInput/index.tsx | 5 +- components/RadioCard/radio-card.component.tsx | 33 ++++ components/index.ts | 3 + configs/Firebase.ts | 3 + configs/theme.tsx | 8 - hoc/withLateralMenu.tsx | 11 ++ .../container/FormLogin/index.tsx | 73 +++----- .../Authentication/context/UserContext.tsx | 7 - .../services/AuthenticationService.ts | 6 +- modules/Bill/constants/Types.ts | 2 + modules/Bill/container/FormBill/index.tsx | 63 +------ modules/Bill/container/ListBills/index.tsx | 15 +- modules/Bill/interfaces/Bill.interface.ts | 4 +- package.json | 1 + pages/_app.tsx | 5 + pages/bill/[billId].tsx | 7 +- pages/bill/index.tsx | 5 +- pages/index.tsx | 22 +-- pages/logout.tsx | 21 +++ public/favicon.ico | Bin 25931 -> 719 bytes public/logo.png | Bin 0 -> 1218 bytes public/vercel.svg | 4 - yarn.lock | 5 + 28 files changed, 331 insertions(+), 157 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 components/Box/index.tsx create mode 100644 components/LateralMenu/index.tsx create mode 100644 components/RadioCard/radio-card.component.tsx create mode 100644 hoc/withLateralMenu.tsx create mode 100644 pages/logout.tsx create mode 100644 public/logo.png delete mode 100644 public/vercel.svg diff --git a/.DS_Store b/.DS_Store index 9f24cd0e68f13a98a3a6a19d9ca8f92e31ebcccb..7b548ba6ffef463a1c53aacad40a894ba4edf7f3 100644 GIT binary patch literal 12292 zcmeHNeQX>@6@Tyial2=aRT7Nm}BMb3>`yq;c%nNn7Xcc4Ke6 zw|l+aJLdyai;oD}O0+^P2vwC36vRKJpsFeopdg?^sA{34AqA=bz#lDtA|yUkC~s!= z%+B5&QIP`3$d-pqTyd9(9ocL4y$%KA=#J^)ZCvRrGYp_o6jQBLpG@{;v^W&xaI6mXG-Ps>u1HgA(S#vwr5n z^FU>C*?C*a&qw@xRpgwNcsMKNf))KM1`2j+Pcd@JNBn$MYdOOxH`NFJr8!xurF(#FaMXfvH7jdCJRr zWp^xFI>Bm39mmR5%h}wFX)MocUE_}JWlh^CaRyU2h~)lbrmZ{6V@}!DUCuitIuun= z=e5n}&+km9_Y9&Z9yP^q&RL5z_0i zuu|5-&Z)dpC2q1*5|WUzHDVZW7M)3u{-M-XFOIq?m8uJoDFOZ8@Jz*zIES6#tzXz|^M50y>t ztk$b2Vve5V4XXBS<$j%nyvNbmh&t~{_9V9{$_ds!UNR^Z&56Ebzp7=Gqb{i|h8Rrj zP&HRQx<1zGxT38mIjSfR zvS}x?u6L+t*j0ft$vYM8r^<16Fh)XyJC{9(^?3VS9(YK#gcGD)h<5%%(_$LsyUWgr_OnO3C zZpD8>#1`vqmhQ|%;^6;uv%J~Pw#WL;Yr8gV>FpcbwP*iS2eSs`ErYu?3`OH zU+1vBiG7slo+gtv&NSLiTAXb?PE48qI zHZJ2?veb{0tzN*-;^*)Y`~p6SPvIBwOZXN1I({Q$gCCV`5MK)0V8O{`{8NfKet$jn zsh^D2(&$&EDJ}*Nh7=7U+j?cHWLu8CK<#XQsBi=(U=%WN59LEp0G++-{^z@De4D6- zrFYdX7*K)=doNBUS3Zi+C3*!yG$HM*7vK32)2O44L!zsdZfmYx&wNPEw z0Iv^e&_dr9JmRpz_``l0H_+QadWoX0>;Vc{a*no2NN33kY?9a_dGoLolK9UdiJ87p zh!BVnh!BVnh!FTsA+VbUZl+UdflfzHI@?>GX5Zb{`a&n;mHtn2k1NnGor^X7(y7>X zlIhbz^V;NpoRMelSo!&Oxi>WT>089y0sev`&0dEhIDf}y4zu~=G=IhSD0DC+?E&`G zQUvALa{anDE#Y;B#tF*Om?|ib|IReQeVYRP3Bf!ZgChAmvY$Y{C%{m^H>=AdYjV?8 z;;Bm))Q4ymeOw#RN(fKfEY_edt*qPQG&Ery^xMK(k;f@%6{42)X?m}AJXw>~UoKTw zMw&IaG61VTd-;>xhC{Q-(x+&$HR(NJt@4^MZ?mrSKD8`;Y^HX+ko57tbpM#Gb5$;X zoRIVlsATE6_t^xC%;yYA{YXe^pGuY%e@#?=PXj5}dL{d)O6T|1k*b6H?!onG;LY>@ ze}Xn2r+b$}Z&u26Z!ZkF;NLwK^zCX zK6Z{Yqzxf@dO%?HFX)4|1XraGqP*|b6p2Ez6zRrA_bf^mNb3f+g=`lDacbdwj3e}n zLb{|3P=FC)Pj8wx0>alO_DT*g4GMbANS)ej!p@e^qr<{L| xr<}c&Wu5GN<$=m0tU&py$f-o(zy2eD^eHep|7E{{-7li^U!2M^G9R?_{~svy|0@6h delta 207 zcmZokXfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~3gIoUvmMH0vd3o?SKe1<%RR3I*4 zDBgH+IWwcc8{hiIa6ETZ$V^ zW|q*Iyj{X-bD<;~<6?FW4nby+;Xre_frKl_-i;T(Gf(E%(bWM718rnzfY2Z&h|dI~ SK>)}AxfbLBhRyLjbC>~6? { + return ( + + {title && ( + + {title} + + )} + + {children} + + ); +}; diff --git a/components/DatePicker/index.tsx b/components/DatePicker/index.tsx index aa8e024..839c2e8 100644 --- a/components/DatePicker/index.tsx +++ b/components/DatePicker/index.tsx @@ -1,6 +1,6 @@ import React, { HTMLAttributes } from 'react'; -import { FormControl, FormLabel, FormErrorMessage, useColorMode } from '@chakra-ui/react'; import ReactDatePicker from 'react-datepicker'; +import { FormControl, FormLabel, FormErrorMessage, useColorMode } from '@chakra-ui/react'; interface Props { isClearable?: boolean; @@ -28,14 +28,13 @@ export const DatePicker = ({ return ( {label && {label}} -
+
{error && {error}} diff --git a/components/LateralMenu/index.tsx b/components/LateralMenu/index.tsx new file mode 100644 index 0000000..d28d332 --- /dev/null +++ b/components/LateralMenu/index.tsx @@ -0,0 +1,156 @@ +import React, { ReactNode, ReactText } from 'react'; +import { + IconButton, + Box, + CloseButton, + Flex, + Icon, + useColorModeValue, + Button, + Link, + Drawer, + DrawerContent, + Text, + useDisclosure, + BoxProps, + FlexProps, +} from '@chakra-ui/react'; +import { FiHome, FiPower, FiTrendingUp, FiMenu } from 'react-icons/fi'; +import { IconType } from 'react-icons'; +import Image from 'next/image'; + +import { auth } from '@Configs/Firebase'; + +interface LinkItemProps { + name: string; + icon: IconType; + link: string; +} +const LinkItems: Array = [ + { name: 'Home', icon: FiHome, link: '/' }, + { name: 'Create bill', icon: FiTrendingUp, link: '/bill' }, + { + name: 'Logout', + icon: FiPower, + link: '/logout', + }, +]; + +export const LateralMenu = ({ children }: { children: ReactNode }) => { + const { isOpen, onOpen, onClose } = useDisclosure(); + return ( + + onClose} display={{ base: 'none', md: 'block' }} /> + + + + + + {/* mobilenav */} + + + {children} + + + ); +}; + +interface SidebarProps extends BoxProps { + onClose: () => void; +} + +const SidebarContent = ({ onClose, ...rest }: SidebarProps) => { + return ( + + + + + + {LinkItems.map(({ name, icon, link }) => ( + + {name} + + ))} + + ); +}; + +interface NavItemProps extends FlexProps { + icon: IconType; + children: ReactText; + link: string; +} +const NavItem = ({ icon, link, children, ...rest }: NavItemProps) => { + return ( + + + {icon && ( + + )} + {children} + + + ); +}; + +interface MobileProps extends FlexProps { + onOpen: () => void; +} +const MobileNav = ({ onOpen, ...rest }: MobileProps) => { + return ( + + } /> + + + + + + + + ); +}; diff --git a/components/MoneyInput/index.tsx b/components/MoneyInput/index.tsx index cf40d71..9b3a736 100644 --- a/components/MoneyInput/index.tsx +++ b/components/MoneyInput/index.tsx @@ -2,7 +2,6 @@ import { FormControl, FormLabel, FormErrorMessage, - NumberInputProps, NumberInput, NumberInputField, NumberInputStepper, @@ -24,8 +23,8 @@ export const MoneyInput = forwardRef( {label && {label}} - }> - + + } /> diff --git a/components/RadioCard/radio-card.component.tsx b/components/RadioCard/radio-card.component.tsx new file mode 100644 index 0000000..685652a --- /dev/null +++ b/components/RadioCard/radio-card.component.tsx @@ -0,0 +1,33 @@ +import { Box, useRadio } from '@chakra-ui/react'; + +export const RadioCard = props => { + const { getInputProps, getCheckboxProps } = useRadio(props); + + const input = getInputProps(); + const checkbox = getCheckboxProps(); + + return ( + + + + {props.children} + + + ); +}; diff --git a/components/index.ts b/components/index.ts index 9a1f7f4..971e167 100644 --- a/components/index.ts +++ b/components/index.ts @@ -3,3 +3,6 @@ export * from './Input'; export * from './Select'; export * from './DatePicker'; export * from './Modal'; +export * from './LateralMenu'; +export * from './Box'; +export * from './RadioCard/radio-card.component'; diff --git a/configs/Firebase.ts b/configs/Firebase.ts index 9829e38..8c5d3a9 100644 --- a/configs/Firebase.ts +++ b/configs/Firebase.ts @@ -16,6 +16,9 @@ if (!firebase.apps.length) { } else { firebase.app(); } + export default firebase; export const firestore = firebase.firestore(); export const auth = firebase.auth(); + +export const googleProvider = new firebase.auth.GoogleAuthProvider(); diff --git a/configs/theme.tsx b/configs/theme.tsx index 1b98928..3a4bc4a 100644 --- a/configs/theme.tsx +++ b/configs/theme.tsx @@ -7,14 +7,6 @@ const config: ThemeConfig = { const theme = extendTheme({ config, - colors: { red: { 500: '#FF1033', 700: '#93002A' }, gray: { 100: '#f8f9fa' } }, - styles: { - global: { - 'html, body': { - background: 'gray.100', - }, - }, - }, }); export default theme; diff --git a/hoc/withLateralMenu.tsx b/hoc/withLateralMenu.tsx new file mode 100644 index 0000000..7bdc016 --- /dev/null +++ b/hoc/withLateralMenu.tsx @@ -0,0 +1,11 @@ +import { LateralMenu } from '@Components/LateralMenu'; + +const withLateralMenu = Children => { + return props => ( + + + + ); +}; + +export default withLateralMenu; diff --git a/modules/Authentication/container/FormLogin/index.tsx b/modules/Authentication/container/FormLogin/index.tsx index 1dc80ee..f35bdc3 100644 --- a/modules/Authentication/container/FormLogin/index.tsx +++ b/modules/Authentication/container/FormLogin/index.tsx @@ -1,9 +1,10 @@ import { useForm } from 'react-hook-form'; -import { Button } from '@chakra-ui/button'; +import { Button, IconButton } from '@chakra-ui/button'; import { Flex, Box, useToast, Text } from '@chakra-ui/react'; import { useRouter } from 'next/router'; import Link from 'next/link'; import { useEffect } from 'react'; +import { FcGoogle } from 'react-icons/fc'; import AuthenticationService from '@Authentication/services/AuthenticationService'; import User from '@Authentication/interfaces/User.interface'; @@ -24,7 +25,7 @@ const FormLogin = () => { if (userId) { Router.replace('/'); } - }, [userId]); + }, [Router, userId]); const onSubmit = async values => { try { @@ -41,51 +42,31 @@ const FormLogin = () => { } }; - return ( - -
- - - - - - - - - - + const onLoginWithGoogle = async values => { + try { + const res = await AuthenticationService.signInWithGoogle(); + console.log(res); + const { uid } = res.user; + if (uid) { + setUserId(uid); + Router.replace('/'); + } + } catch (err) { + toast({ + description: err.message, + status: 'error', + }); + } + }; - - - - Not registered yet? - - - - - - -
+ return ( + + ); }; diff --git a/modules/Authentication/context/UserContext.tsx b/modules/Authentication/context/UserContext.tsx index 77f2142..df6a3a6 100644 --- a/modules/Authentication/context/UserContext.tsx +++ b/modules/Authentication/context/UserContext.tsx @@ -15,11 +15,6 @@ interface UserProviderProps { children: React.ReactNode; } -const formatAuthUser = user => ({ - uid: user.uid, - email: user.email, -}); - export const UserProvider = ({ children }: UserProviderProps) => { const [userId, setUserId] = useState(null); const [user, setUser] = useState(null); @@ -31,9 +26,7 @@ export const UserProvider = ({ children }: UserProviderProps) => { return; } - // var formattedUser = formatAuthUser(authState); setUserId(authState.uid); - // setUser(formatAuthUser); }; useEffect(() => { diff --git a/modules/Authentication/services/AuthenticationService.ts b/modules/Authentication/services/AuthenticationService.ts index 9de8d30..e325074 100644 --- a/modules/Authentication/services/AuthenticationService.ts +++ b/modules/Authentication/services/AuthenticationService.ts @@ -1,4 +1,4 @@ -import { auth } from '@Configs/Firebase'; +import { auth, googleProvider } from '@Configs/Firebase'; import User from '../interfaces/User.interface'; @@ -26,4 +26,8 @@ export default class AuthenticationService { static forgotPassword(email: string): Promise { return auth.sendPasswordResetEmail(email).then(_ => true); } + + static signInWithGoogle() { + return auth.signInWithPopup(googleProvider); + } } diff --git a/modules/Bill/constants/Types.ts b/modules/Bill/constants/Types.ts index 88b4641..b6abd8a 100644 --- a/modules/Bill/constants/Types.ts +++ b/modules/Bill/constants/Types.ts @@ -1,6 +1,8 @@ export const BillTypes = { EXPENSE: 'EXPENSE', INCOME: 'INCOME', + REPEATED_INCOME: 'REPEATED_INCOME', + REPEATED_EXPENSE: 'REPEATED_EXPENSE', }; export const BillStatus = { diff --git a/modules/Bill/container/FormBill/index.tsx b/modules/Bill/container/FormBill/index.tsx index 86416b1..ef511d7 100644 --- a/modules/Bill/container/FormBill/index.tsx +++ b/modules/Bill/container/FormBill/index.tsx @@ -2,29 +2,14 @@ import { useMemo, useEffect, useState } from 'react'; import { useRouter } from 'next/router'; import { useForm, Controller } from 'react-hook-form'; import { Button } from '@chakra-ui/button'; -import { useToast, Flex, Spacer, Box } from '@chakra-ui/react'; +import { useToast, Flex } from '@chakra-ui/react'; import { billsCollection } from '@Modules/Bill/constants/FirestoreCollections'; import { Bill } from '@Modules/Bill/interfaces/Bill.interface'; import { BillTypes, BillStatus } from '@Modules/Bill/constants/Types'; -import { Input, MoneyInput, Select, DatePicker } from '@Components'; +import { Input, MoneyInput, Select, DatePicker, Box } from '@Components'; import { useUser } from '@Modules/Authentication/context/UserContext'; -const MONTHS_DICT = { - 0: 'Janeiro', - 1: 'Fevereiro', - 2: 'Março', - 3: 'Abril', - 4: 'Maio', - 5: 'Junho', - 6: 'Julho', - 7: 'Agosto', - 8: 'Setembro', - 9: 'Outubro', - 10: 'Novembro', - 11: 'Dezembro', -}; - interface FormBillProps { billId?: string; } @@ -50,14 +35,13 @@ const FormBill = ({ billId }: FormBillProps) => { const dueDate = new Date(values.dueDate); dueDate.setHours(3, 0, 0, 0); + console.log(values); const bill: Bill = { name: values.name, description: values.description ?? '', value: Number(values.value), dueDate: dueDate.getTime(), - year: +values.year, status: billId ? foundBill?.status : BillStatus.PENDING, - month: +values.month, type: values.type, createdAt: new Date().getTime(), userId, @@ -99,13 +83,13 @@ const FormBill = ({ billId }: FormBillProps) => { }, [billId, toast]); useEffect(() => { + console.log(foundBill); setValue('name', foundBill?.name); + setValue('description', foundBill?.description); setValue('dueDate', foundBill?.dueDate); - setValue('year', foundBill?.year); - setValue('month', foundBill?.month); setValue('type', foundBill?.type); - setValue('value', foundBill?.value); - }, [foundBill]); + setValue('value', String(foundBill?.value)); + }, [foundBill, setValue]); const years = useMemo(() => { const finalYears = []; @@ -121,19 +105,6 @@ const FormBill = ({ billId }: FormBillProps) => { return finalYears; }, []); - const months = useMemo(() => { - const finalMonths = []; - - for (let monthCount = 0; monthCount <= 11; monthCount++) { - finalMonths.push({ - label: `${MONTHS_DICT[monthCount]}`, - value: monthCount, - }); - } - - return finalMonths; - }, []); - const types = [ { label: 'Expense', @@ -146,7 +117,7 @@ const FormBill = ({ billId }: FormBillProps) => { ]; return ( - +
{ )} /> - - { { render={({ field }) => ( field.onChange(date)} selected={field.value} style={{ marginBottom: '10px' }} @@ -152,7 +159,7 @@ const FormBill = ({ billId }: FormBillProps) => { { setValue('year', +select.target.value)} + error={errors.year?.message} + mb={2} + /> + + + + { label="Descrição" {...register('description')} error={errors.description?.message} - marginBottom="10px" + mb={5} /> ( { selected={field.value} defaultValue={new Date().getTime()} style={{ marginBottom: '10px' }} + error={errors.dueDate?.message} /> )} /> @@ -187,37 +252,70 @@ export const FormBillContainer = ({ billId }: FormBillProps) => { + + + + Recorrência + + + + + + Contas reccorentes serão criadas com a frequência que você determinar. + + + + + + + - - - - - - -
-
- ); -}; - -export default FormForgotPassword; diff --git a/modules/Authentication/container/FormSignUp/index.tsx b/modules/Authentication/container/FormSignUp/index.tsx deleted file mode 100644 index 081fe1b..0000000 --- a/modules/Authentication/container/FormSignUp/index.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { useForm } from 'react-hook-form'; -import { Button } from '@chakra-ui/button'; -import { useToast, Flex, Box } from '@chakra-ui/react'; -import { useRouter } from 'next/router'; - -import { Input } from '@Components'; -import { auth } from '@Configs/Firebase'; -import { useUser } from '@Modules/Authentication/context/UserContext'; - -const FormSignUp = () => { - const { - handleSubmit, - register, - formState: { errors, isSubmitting }, - } = useForm(); - const Router = useRouter(); - const toast = useToast(); - const { setUserId } = useUser(); - - const onSubmit = async values => { - try { - const { user } = await auth.createUserWithEmailAndPassword(values.email, values.password); - - localStorage.setItem('USER_UID', user.uid); - setUserId(user.uid); - Router.replace('/'); - - toast({ - description: 'User successful created!', - status: 'success', - }); - } catch (error) { - console.error(error); - } - }; - - return ( - -
- - - - - - - - - -
-
- ); -}; - -export default FormSignUp; diff --git a/pages/forgot.tsx b/pages/forgot.tsx deleted file mode 100644 index 08e2e5a..0000000 --- a/pages/forgot.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { useRouter } from 'next/router'; -import { Box } from '@chakra-ui/react'; - -import FormForgotPassword from '@Authentication/container/FormForgotPassword'; - -export default function Home() { - const router = useRouter(); - - return ( - - - - ); -} diff --git a/pages/signup.tsx b/pages/signup.tsx deleted file mode 100644 index 074b2ab..0000000 --- a/pages/signup.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { useRouter } from 'next/router'; -import { Box } from '@chakra-ui/react'; - -import FormSignUp from '@Modules/Authentication/container/FormSignUp'; - -export default function Home() { - const router = useRouter(); - - return ( - - - - ); -} From 30642639798be47e1fab97626939c656fe72bfe7 Mon Sep 17 00:00:00 2001 From: Victor Lucas Date: Mon, 20 Nov 2023 08:17:47 -0500 Subject: [PATCH 35/39] fix: remove unused module --- pages/logout.tsx | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 pages/logout.tsx diff --git a/pages/logout.tsx b/pages/logout.tsx deleted file mode 100644 index 845d32e..0000000 --- a/pages/logout.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { useEffect } from 'react'; -import { useRouter } from 'next/router'; -import { Box } from '@chakra-ui/react'; - -import FormSignUp from '@Modules/Authentication/container/FormSignUp'; -import { auth } from '@Configs/Firebase'; - -export default function Home() { - const router = useRouter(); - - useEffect(() => { - auth.signOut(); - router.push('/'); - }, [router]); - - return ( - - Loading... - - ); -} From 9bcf0eb441071d5cba4aa0bdf55625055864690b Mon Sep 17 00:00:00 2001 From: Victor Lucas <11355873+victorlucss@users.noreply.github.com> Date: Mon, 20 Nov 2023 08:19:43 -0500 Subject: [PATCH 36/39] Sync up (#14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): bump ansi-regex from 5.0.0 to 5.0.1 Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] * build(deps): bump next from 11.0.1 to 11.1.1 Bumps [next](https://github.com/vercel/next.js) from 11.0.1 to 11.1.1. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v11.0.1...v11.1.1) --- updated-dependencies: - dependency-name: next dependency-type: direct:production ... Signed-off-by: dependabot[bot] * feat: Migrating to Next 12 (#8) * Feature/BaseModule (#7) * feat: Modal component * feat: Bubble types * feat: added yup * feat: Bubble component to render fields * feat: 🤘🏽 BaseForm component * feat: 🤘🏽 BaseList component * feat: BaseField and SelectOption types * feat: 🤘🏽 renderFields method * fix: start next with esm false (#9) * feat: sign in page with facelift * feat: facelift register page * feat: facelift forgot password page * fix: empty space linting * feat: a LOT of new stuff * fix: specify node version * fix: node version * fix: datepicker, stats, and more * fix: some translations and pipeline * fix: build with openssl-legacy-provider * fix: translations * feat: new stats, billitem with exprs * feat: use popover to improve visibility * feat: new way of handling status and categories * feat: copy bill * feat: go to form bill already with value * fix: layout issues * fix: missing cancel action * feat: datePicker max and min dates and hasError * feat: new money input * feat: defaultRequiredMessage * feat: billsRecurrenceCollection * feat: recurrence feature * fix: remove every year recurrence * fix: show category only for expense * feat: allow deleting recurrence * fix: remove consoles and old code * feat: datepicker mobile nad save user when first login * fix: remove unused modules * fix: remove unused module --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcos Gênesis da Silva Co-authored-by: Marcos Gênesis <49327985+marcosgenesis@users.noreply.github.com> --- .DS_Store | Bin 6148 -> 12292 bytes .gitignore | 2 +- .vscode/settings.json | 3 + components/Box/index.tsx | 31 + .../{index.tsx => date-picker.component.tsx} | 17 +- components/If/if.component.tsx | 6 + components/LateralMenu/index.tsx | 164 ++++ components/Modal/index.tsx | 18 + components/MoneyInput/index.tsx | 21 +- components/RadioCard/radio-card.component.tsx | 34 + components/index.ts | 7 +- configs/Firebase.ts | 3 + configs/theme.tsx | 4 +- hoc/withLateralMenu.tsx | 11 + .../container/FormForgotPassword/index.tsx | 65 -- .../FormLogin/form-login.container.tsx | 53 ++ .../container/FormLogin/index.tsx | 90 -- .../container/FormSignUp/index.tsx | 70 -- .../Authentication/context/UserContext.tsx | 7 - .../services/AuthenticationService.ts | 29 - .../services/authentication.service.ts | 28 + .../BaseModule/components/Bubble/index.tsx | 62 ++ modules/BaseModule/constants/Bubble.ts | 6 + .../BaseModule/container/BaseForm/index.tsx | 82 ++ .../BaseModule/container/BaseList/index.tsx | 115 +++ modules/BaseModule/hooks/useIsMobile.tsx | 14 + modules/BaseModule/interfaces/BaseField.ts | 11 + modules/BaseModule/interfaces/SelectOption.ts | 4 + modules/BaseModule/shared/renderFields.tsx | 20 + modules/Bill/components/BillFilters/index.tsx | 22 +- .../BillItem/bill-item.component.tsx | 300 +++++++ modules/Bill/components/BillItem/index.tsx | 161 ---- .../CopyBill/copy-bill.component.tsx | 148 +++ .../DeleteBill/delete-bill.component.tsx | 105 +++ modules/Bill/components/StateMonth/index.tsx | 56 -- .../StatsMonth/stats-month.component.tsx | 57 ++ modules/Bill/constants/BillConsts.ts | 22 + .../Bill/constants/FirestoreCollections.ts | 2 + modules/Bill/constants/Types.ts | 2 + .../FormBill/form-bill.container.tsx | 329 +++++++ modules/Bill/container/FormBill/index.tsx | 226 ----- modules/Bill/container/ListBills/index.tsx | 62 -- .../ListBills/list-bills.container.tsx | 109 +++ modules/Bill/interfaces/Bill.interface.ts | 5 +- modules/Category/.gitkeep | 0 next-env.d.ts | 3 + next.config.js | 3 + package.json | 14 +- pages/_app.tsx | 9 +- pages/bill/[billId].tsx | 11 +- pages/bill/index.tsx | 9 +- pages/forgot.tsx | 14 - pages/index.tsx | 24 +- pages/login.tsx | 7 +- pages/signup.tsx | 14 - pages/styles.css | 194 ---- pages/styles.scss | 214 +++++ public/favicon.ico | Bin 25931 -> 719 bytes public/logo.png | Bin 0 -> 1218 bytes public/vercel.svg | 4 - tsconfig.json | 4 +- yarn.lock | 840 ++++++++++-------- 62 files changed, 2489 insertions(+), 1458 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 components/Box/index.tsx rename components/DatePicker/{index.tsx => date-picker.component.tsx} (74%) create mode 100644 components/If/if.component.tsx create mode 100644 components/LateralMenu/index.tsx create mode 100644 components/Modal/index.tsx create mode 100644 components/RadioCard/radio-card.component.tsx create mode 100644 hoc/withLateralMenu.tsx delete mode 100644 modules/Authentication/container/FormForgotPassword/index.tsx create mode 100644 modules/Authentication/container/FormLogin/form-login.container.tsx delete mode 100644 modules/Authentication/container/FormLogin/index.tsx delete mode 100644 modules/Authentication/container/FormSignUp/index.tsx delete mode 100644 modules/Authentication/services/AuthenticationService.ts create mode 100644 modules/Authentication/services/authentication.service.ts create mode 100644 modules/BaseModule/components/Bubble/index.tsx create mode 100644 modules/BaseModule/constants/Bubble.ts create mode 100644 modules/BaseModule/container/BaseForm/index.tsx create mode 100644 modules/BaseModule/container/BaseList/index.tsx create mode 100644 modules/BaseModule/hooks/useIsMobile.tsx create mode 100644 modules/BaseModule/interfaces/BaseField.ts create mode 100644 modules/BaseModule/interfaces/SelectOption.ts create mode 100644 modules/BaseModule/shared/renderFields.tsx create mode 100644 modules/Bill/components/BillItem/bill-item.component.tsx delete mode 100644 modules/Bill/components/BillItem/index.tsx create mode 100644 modules/Bill/components/CopyBill/copy-bill.component.tsx create mode 100644 modules/Bill/components/DeleteBill/delete-bill.component.tsx delete mode 100644 modules/Bill/components/StateMonth/index.tsx create mode 100644 modules/Bill/components/StatsMonth/stats-month.component.tsx create mode 100644 modules/Bill/constants/BillConsts.ts create mode 100644 modules/Bill/container/FormBill/form-bill.container.tsx delete mode 100644 modules/Bill/container/FormBill/index.tsx delete mode 100644 modules/Bill/container/ListBills/index.tsx create mode 100644 modules/Bill/container/ListBills/list-bills.container.tsx delete mode 100644 modules/Category/.gitkeep delete mode 100644 pages/forgot.tsx delete mode 100644 pages/signup.tsx delete mode 100644 pages/styles.css create mode 100644 pages/styles.scss create mode 100644 public/logo.png delete mode 100644 public/vercel.svg diff --git a/.DS_Store b/.DS_Store index 9f24cd0e68f13a98a3a6a19d9ca8f92e31ebcccb..7b548ba6ffef463a1c53aacad40a894ba4edf7f3 100644 GIT binary patch literal 12292 zcmeHNeQX>@6@Tyial2=aRT7Nm}BMb3>`yq;c%nNn7Xcc4Ke6 zw|l+aJLdyai;oD}O0+^P2vwC36vRKJpsFeopdg?^sA{34AqA=bz#lDtA|yUkC~s!= z%+B5&QIP`3$d-pqTyd9(9ocL4y$%KA=#J^)ZCvRrGYp_o6jQBLpG@{;v^W&xaI6mXG-Ps>u1HgA(S#vwr5n z^FU>C*?C*a&qw@xRpgwNcsMKNf))KM1`2j+Pcd@JNBn$MYdOOxH`NFJr8!xurF(#FaMXfvH7jdCJRr zWp^xFI>Bm39mmR5%h}wFX)MocUE_}JWlh^CaRyU2h~)lbrmZ{6V@}!DUCuitIuun= z=e5n}&+km9_Y9&Z9yP^q&RL5z_0i zuu|5-&Z)dpC2q1*5|WUzHDVZW7M)3u{-M-XFOIq?m8uJoDFOZ8@Jz*zIES6#tzXz|^M50y>t ztk$b2Vve5V4XXBS<$j%nyvNbmh&t~{_9V9{$_ds!UNR^Z&56Ebzp7=Gqb{i|h8Rrj zP&HRQx<1zGxT38mIjSfR zvS}x?u6L+t*j0ft$vYM8r^<16Fh)XyJC{9(^?3VS9(YK#gcGD)h<5%%(_$LsyUWgr_OnO3C zZpD8>#1`vqmhQ|%;^6;uv%J~Pw#WL;Yr8gV>FpcbwP*iS2eSs`ErYu?3`OH zU+1vBiG7slo+gtv&NSLiTAXb?PE48qI zHZJ2?veb{0tzN*-;^*)Y`~p6SPvIBwOZXN1I({Q$gCCV`5MK)0V8O{`{8NfKet$jn zsh^D2(&$&EDJ}*Nh7=7U+j?cHWLu8CK<#XQsBi=(U=%WN59LEp0G++-{^z@De4D6- zrFYdX7*K)=doNBUS3Zi+C3*!yG$HM*7vK32)2O44L!zsdZfmYx&wNPEw z0Iv^e&_dr9JmRpz_``l0H_+QadWoX0>;Vc{a*no2NN33kY?9a_dGoLolK9UdiJ87p zh!BVnh!BVnh!FTsA+VbUZl+UdflfzHI@?>GX5Zb{`a&n;mHtn2k1NnGor^X7(y7>X zlIhbz^V;NpoRMelSo!&Oxi>WT>089y0sev`&0dEhIDf}y4zu~=G=IhSD0DC+?E&`G zQUvALa{anDE#Y;B#tF*Om?|ib|IReQeVYRP3Bf!ZgChAmvY$Y{C%{m^H>=AdYjV?8 z;;Bm))Q4ymeOw#RN(fKfEY_edt*qPQG&Ery^xMK(k;f@%6{42)X?m}AJXw>~UoKTw zMw&IaG61VTd-;>xhC{Q-(x+&$HR(NJt@4^MZ?mrSKD8`;Y^HX+ko57tbpM#Gb5$;X zoRIVlsATE6_t^xC%;yYA{YXe^pGuY%e@#?=PXj5}dL{d)O6T|1k*b6H?!onG;LY>@ ze}Xn2r+b$}Z&u26Z!ZkF;NLwK^zCX zK6Z{Yqzxf@dO%?HFX)4|1XraGqP*|b6p2Ez6zRrA_bf^mNb3f+g=`lDacbdwj3e}n zLb{|3P=FC)Pj8wx0>alO_DT*g4GMbANS)ej!p@e^qr<{L| xr<}c&Wu5GN<$=m0tU&py$f-o(zy2eD^eHep|7E{{-7li^U!2M^G9R?_{~svy|0@6h delta 207 zcmZokXfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~3gIoUvmMH0vd3o?SKe1<%RR3I*4 zDBgH+IWwcc8{hiIa6ETZ$V^ zW|q*Iyj{X-bD<;~<6?FW4nby+;Xre_frKl_-i;T(Gf(E%(bWM718rnzfY2Z&h|dI~ SK>)}AxfbLBhRyLjbC>~6? { + return ( + + {(title || description) && ( + + {title && ( + + {title} + + )} + {description && ( + + {description} + + )} + + )} + + {children} + + ); +}; diff --git a/components/DatePicker/index.tsx b/components/DatePicker/date-picker.component.tsx similarity index 74% rename from components/DatePicker/index.tsx rename to components/DatePicker/date-picker.component.tsx index aa8e024..a823e99 100644 --- a/components/DatePicker/index.tsx +++ b/components/DatePicker/date-picker.component.tsx @@ -1,6 +1,8 @@ import React, { HTMLAttributes } from 'react'; -import { FormControl, FormLabel, FormErrorMessage, useColorMode } from '@chakra-ui/react'; import ReactDatePicker from 'react-datepicker'; +import { FormControl, FormLabel, FormErrorMessage, useColorMode } from '@chakra-ui/react'; + +import { useIsMobile } from '@Modules/BaseModule/hooks/useIsMobile'; interface Props { isClearable?: boolean; @@ -11,6 +13,8 @@ interface Props { label?: string; error?: string; value?: string; + maxDate?: Date; + minDate?: Date; } export const DatePicker = ({ @@ -22,20 +26,27 @@ export const DatePicker = ({ label, error, value, + maxDate, + minDate, ...rest }: Props & HTMLAttributes) => { const isLight = useColorMode().colorMode === 'light'; + const isMobile = useIsMobile(); + return ( {label && {label}} -
+
{error && {error}} diff --git a/components/If/if.component.tsx b/components/If/if.component.tsx new file mode 100644 index 0000000..1e461c8 --- /dev/null +++ b/components/If/if.component.tsx @@ -0,0 +1,6 @@ +import { ReactElement, ReactNode } from 'react'; + +export const If = ({ condition, children }: { condition: boolean; children: ReactElement }) => { + if (condition) return children; + return null; +}; diff --git a/components/LateralMenu/index.tsx b/components/LateralMenu/index.tsx new file mode 100644 index 0000000..cda7833 --- /dev/null +++ b/components/LateralMenu/index.tsx @@ -0,0 +1,164 @@ +import React, { ReactNode, ReactText } from 'react'; +import { + IconButton, + Box, + CloseButton, + Flex, + Icon, + useColorModeValue, + Button, + Link, + Drawer, + DrawerContent, + Text, + useDisclosure, + BoxProps, + FlexProps, + Badge, +} from '@chakra-ui/react'; +import { FiHome, FiPower, FiTrendingUp, FiTrendingDown, FiMenu } from 'react-icons/fi'; +import { IconType } from 'react-icons'; +import Image from 'next/image'; + +interface LinkItemProps { + name: string; + icon: IconType; + link: string; +} +const LinkItems: Array = [ + { name: 'Início', icon: FiHome, link: '/' }, + { name: 'Criar receita', icon: FiTrendingUp, link: '/bill?type=INCOME' }, + { name: 'Criar despesa', icon: FiTrendingDown, link: '/bill?type=EXPENSE' }, + { + name: 'Sair', + icon: FiPower, + link: '/logout', + }, +]; + +export const LateralMenu = ({ children }: { children: ReactNode }) => { + const { isOpen, onOpen, onClose } = useDisclosure(); + return ( + + onClose} display={{ base: 'none', md: 'block' }} /> + + + + + + {/* mobilenav */} + + + {children} + + + ); +}; + +interface SidebarProps extends BoxProps { + onClose: () => void; +} + +const SidebarContent = ({ onClose, ...rest }: SidebarProps) => { + return ( + + + + + + Beta + + + + + {LinkItems.map(({ name, icon, link }) => ( + + {name} + + ))} + + ); +}; + +interface NavItemProps extends FlexProps { + icon: IconType; + children: ReactText; + link: string; +} +const NavItem = ({ icon, link, children, ...rest }: NavItemProps) => { + return ( + + + {icon && ( + + )} + {children} + + + ); +}; + +interface MobileProps extends FlexProps { + onOpen: () => void; +} +const MobileNav = ({ onOpen, ...rest }: MobileProps) => { + return ( + + } /> + + + + + + Beta + + + + + ); +}; diff --git a/components/Modal/index.tsx b/components/Modal/index.tsx new file mode 100644 index 0000000..36ee630 --- /dev/null +++ b/components/Modal/index.tsx @@ -0,0 +1,18 @@ +import { Modal as ModalChakra, ModalOverlay, ModalContent, ModalBody } from '@chakra-ui/react'; + +interface ModalInterface { + onClose: () => void; + isOpen: boolean; + children: React.ReactElement; +} + +export const Modal = ({ onClose, isOpen, children }: ModalInterface) => { + return ( + + + + {children} + + + ); +}; diff --git a/components/MoneyInput/index.tsx b/components/MoneyInput/index.tsx index cf40d71..106183b 100644 --- a/components/MoneyInput/index.tsx +++ b/components/MoneyInput/index.tsx @@ -2,13 +2,11 @@ import { FormControl, FormLabel, FormErrorMessage, - NumberInputProps, NumberInput, NumberInputField, - NumberInputStepper, - NumberIncrementStepper, - NumberDecrementStepper, FormControlProps, + InputLeftAddon, + InputGroup, } from '@chakra-ui/react'; import { forwardRef, LegacyRef } from 'react'; @@ -19,18 +17,17 @@ type MoneyInputProps = FormControlProps & { }; export const MoneyInput = forwardRef( - ({ name, label, error, ...rest }: MoneyInputProps, ref) => { + ({ name, label, error, isRequired, ...rest }: MoneyInputProps, ref) => { return ( {label && {label}} - }> - - - - - - + + R$ + + } borderLeftRadius={0} /> + + {error && {error}} ); diff --git a/components/RadioCard/radio-card.component.tsx b/components/RadioCard/radio-card.component.tsx new file mode 100644 index 0000000..7c9f6c4 --- /dev/null +++ b/components/RadioCard/radio-card.component.tsx @@ -0,0 +1,34 @@ +import { Box, useRadio } from '@chakra-ui/react'; + +export const RadioCard = props => { + const { getInputProps, getCheckboxProps } = useRadio(props); + + const input = getInputProps(); + const checkbox = getCheckboxProps(); + + return ( + + + + {props.children} + + + ); +}; diff --git a/components/index.ts b/components/index.ts index 0653a6d..16b44ae 100644 --- a/components/index.ts +++ b/components/index.ts @@ -1,4 +1,9 @@ export * from './MoneyInput'; export * from './Input'; export * from './Select'; -export * from './DatePicker'; +export * from './DatePicker/date-picker.component'; +export * from './Modal'; +export * from './LateralMenu'; +export * from './Box'; +export * from './RadioCard/radio-card.component'; +export * from './If/if.component'; diff --git a/configs/Firebase.ts b/configs/Firebase.ts index 9829e38..8c5d3a9 100644 --- a/configs/Firebase.ts +++ b/configs/Firebase.ts @@ -16,6 +16,9 @@ if (!firebase.apps.length) { } else { firebase.app(); } + export default firebase; export const firestore = firebase.firestore(); export const auth = firebase.auth(); + +export const googleProvider = new firebase.auth.GoogleAuthProvider(); diff --git a/configs/theme.tsx b/configs/theme.tsx index 4a365e4..3a4bc4a 100644 --- a/configs/theme.tsx +++ b/configs/theme.tsx @@ -5,6 +5,8 @@ const config: ThemeConfig = { useSystemColorMode: false, }; -const theme = extendTheme({ config }); +const theme = extendTheme({ + config, +}); export default theme; diff --git a/hoc/withLateralMenu.tsx b/hoc/withLateralMenu.tsx new file mode 100644 index 0000000..7bdc016 --- /dev/null +++ b/hoc/withLateralMenu.tsx @@ -0,0 +1,11 @@ +import { LateralMenu } from '@Components/LateralMenu'; + +const withLateralMenu = Children => { + return props => ( + + + + ); +}; + +export default withLateralMenu; diff --git a/modules/Authentication/container/FormForgotPassword/index.tsx b/modules/Authentication/container/FormForgotPassword/index.tsx deleted file mode 100644 index 28dcdeb..0000000 --- a/modules/Authentication/container/FormForgotPassword/index.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { useForm } from 'react-hook-form'; -import { Button } from '@chakra-ui/button'; -import { Flex, Box, useToast } from '@chakra-ui/react'; -import { useRouter } from 'next/router'; - -import AuthenticationService from '@Authentication/services/AuthenticationService'; -import { Input } from '@Components'; - -const FormForgotPassword = () => { - const toast = useToast(); - - const { - handleSubmit, - register, - formState: { errors, isSubmitting }, - } = useForm(); - const Router = useRouter(); - - const onSubmit = async values => { - try { - const haveSentMail = await AuthenticationService.forgotPassword(values?.email); - if (haveSentMail) { - toast({ - description: 'An e-mail with password recovery link has been sent!', - status: 'success', - }); - - Router.replace('/'); - } - } catch (err) { - toast({ - description: err.message, - status: 'error', - }); - } - }; - - return ( - -
- - - -
- - -
-
-
-
- ); -}; - -export default FormForgotPassword; diff --git a/modules/Authentication/container/FormLogin/form-login.container.tsx b/modules/Authentication/container/FormLogin/form-login.container.tsx new file mode 100644 index 0000000..daee7e1 --- /dev/null +++ b/modules/Authentication/container/FormLogin/form-login.container.tsx @@ -0,0 +1,53 @@ +import { Button } from '@chakra-ui/button'; +import { Flex, Box, useToast, Text, Spacer, Image, AbsoluteCenter } from '@chakra-ui/react'; +import { useRouter } from 'next/router'; +import { useEffect } from 'react'; +import { FcGoogle } from 'react-icons/fc'; + +import { signInWithGoogle } from '@Authentication/services/authentication.service'; +import { useUser } from '@Modules/Authentication/context/UserContext'; + +export const FormLoginContainer = () => { + const toast = useToast(); + const router = useRouter(); + const { userId, setUserId } = useUser(); + + useEffect(() => { + if (userId) { + router.push('/'); + } + }, [router, userId]); + + const onLoginWithGoogle = async () => { + try { + const uid = await signInWithGoogle(); + + if (uid) { + setUserId(uid); + router.push('/'); + } + } catch (err) { + toast({ + description: err.message, + status: 'error', + }); + } + }; + + return ( + + + + + Desbrave o caminho para a estabilidade financeira e saia do vermelho. + + + + + ); +}; diff --git a/modules/Authentication/container/FormLogin/index.tsx b/modules/Authentication/container/FormLogin/index.tsx deleted file mode 100644 index ce5ed91..0000000 --- a/modules/Authentication/container/FormLogin/index.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import { useForm } from 'react-hook-form'; -import { Button } from '@chakra-ui/button'; -import { Flex, Box, useToast } from '@chakra-ui/react'; -import { useRouter } from 'next/router'; -import Link from 'next/link'; -import { useEffect } from 'react'; - -import AuthenticationService from '@Authentication/services/AuthenticationService'; -import User from '@Authentication/interfaces/User.interface'; -import { useUser } from '@Modules/Authentication/context/UserContext'; -import { Input } from '@Components'; - -const FormLogin = () => { - const toast = useToast(); - const { - handleSubmit, - register, - formState: { errors, isSubmitting }, - } = useForm(); - const Router = useRouter(); - const { userId, setUserId } = useUser(); - - useEffect(() => { - if (userId) { - Router.replace('/'); - } - }, [userId]); - - const onSubmit = async values => { - try { - const { uid } = (await AuthenticationService.signIn(values?.email, values?.password)) as User; - if (uid) { - setUserId(uid); - Router.replace('/'); - } - } catch (err) { - toast({ - description: err.message, - status: 'error', - }); - } - }; - - return ( - -
- - - - - -
- - - - - - - - -
-
-
-
- ); -}; - -export default FormLogin; diff --git a/modules/Authentication/container/FormSignUp/index.tsx b/modules/Authentication/container/FormSignUp/index.tsx deleted file mode 100644 index 8e47736..0000000 --- a/modules/Authentication/container/FormSignUp/index.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { useForm } from 'react-hook-form'; -import { Button } from '@chakra-ui/button'; -import { useToast, Flex, Box } from '@chakra-ui/react'; -import { useRouter } from 'next/router'; - -import { Input } from '@Components'; -import { auth } from '@Configs/Firebase'; -import { useUser } from '@Modules/Authentication/context/UserContext'; - -const FormSignUp = () => { - const { - handleSubmit, - register, - formState: { errors, isSubmitting }, - } = useForm(); - const Router = useRouter(); - const toast = useToast(); - const { setUserId } = useUser(); - - const onSubmit = async values => { - try { - const { user } = await auth.createUserWithEmailAndPassword(values.email, values.password); - - localStorage.setItem('USER_UID', user.uid); - setUserId(user.uid); - Router.replace('/'); - - toast({ - description: 'User successful created!', - status: 'success', - }); - } catch (error) { - console.error(error); - } - }; - - return ( - -
- - - - - -
- -
-
-
-
- ); -}; - -export default FormSignUp; diff --git a/modules/Authentication/context/UserContext.tsx b/modules/Authentication/context/UserContext.tsx index 77f2142..df6a3a6 100644 --- a/modules/Authentication/context/UserContext.tsx +++ b/modules/Authentication/context/UserContext.tsx @@ -15,11 +15,6 @@ interface UserProviderProps { children: React.ReactNode; } -const formatAuthUser = user => ({ - uid: user.uid, - email: user.email, -}); - export const UserProvider = ({ children }: UserProviderProps) => { const [userId, setUserId] = useState(null); const [user, setUser] = useState(null); @@ -31,9 +26,7 @@ export const UserProvider = ({ children }: UserProviderProps) => { return; } - // var formattedUser = formatAuthUser(authState); setUserId(authState.uid); - // setUser(formatAuthUser); }; useEffect(() => { diff --git a/modules/Authentication/services/AuthenticationService.ts b/modules/Authentication/services/AuthenticationService.ts deleted file mode 100644 index 9de8d30..0000000 --- a/modules/Authentication/services/AuthenticationService.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { auth } from '@Configs/Firebase'; - -import User from '../interfaces/User.interface'; - -export default class AuthenticationService { - constructor() {} - - static signIn(email: string, password: string): Promise { - return auth.signInWithEmailAndPassword(email, password).then( - ({ user }) => - ({ - uid: user.uid, - } as User) - ); - } - - static signUp(email: string, password: string): Promise { - return auth.createUserWithEmailAndPassword(email, password).then( - ({ user }) => - ({ - uid: user.uid, - } as User) - ); - } - - static forgotPassword(email: string): Promise { - return auth.sendPasswordResetEmail(email).then(_ => true); - } -} diff --git a/modules/Authentication/services/authentication.service.ts b/modules/Authentication/services/authentication.service.ts new file mode 100644 index 0000000..5452137 --- /dev/null +++ b/modules/Authentication/services/authentication.service.ts @@ -0,0 +1,28 @@ +import { auth, firestore, googleProvider } from '@Configs/Firebase'; + +interface IGoogleProviderProfile { + email?: string; + family_name?: string; + given_name?: string; + granted_scopes?: string; + id?: string; + locale?: string; + name?: string; + picture?: string; +} + +export const signInWithGoogle = () => { + return auth.signInWithPopup(googleProvider).then(({ additionalUserInfo, user }) => { + if (additionalUserInfo.isNewUser) { + const profile = additionalUserInfo.profile as IGoogleProviderProfile; + + firestore.collection('user').add({ + email: profile?.email, + name: `${profile?.given_name} ${profile?.family_name}`, + locale: profile?.locale, + image: profile?.picture, + }); + } + return user.uid; + }); +}; diff --git a/modules/BaseModule/components/Bubble/index.tsx b/modules/BaseModule/components/Bubble/index.tsx new file mode 100644 index 0000000..14968c2 --- /dev/null +++ b/modules/BaseModule/components/Bubble/index.tsx @@ -0,0 +1,62 @@ +import React from 'react'; +import { FieldErrors, FieldValues, UseFormRegister } from 'react-hook-form'; + +import { Input, Select } from '@Components'; +import SelectOption from '@Modules/BaseModule/interfaces/SelectOption'; + +import { BubbleEnum, BUBBLE_TYPES } from '../../constants/Bubble'; + +interface BubbleInterface { + type: BubbleEnum; + name: string; + label: string; + register: UseFormRegister; + errors: FieldErrors; + required?: boolean; + props?: object; + options?: SelectOption[]; + value?: (string | number | readonly string[]) & string; +} + +const Bubble = ({ + type, + name, + label, + register, + errors, + required = false, + options = [], + value, + props = {}, +}: BubbleInterface) => { + switch (type) { + case BUBBLE_TYPES.INPUT: + return ( + + ); + + case BUBBLE_TYPES.SELECT: + return ( + { setValue('year', +select.target.value)} + error={errors.year?.message} + mb={2} + /> + + + + + + ( + field.onChange(date)} + selected={field.value} + defaultValue={new Date().getTime()} + style={{ marginBottom: '10px' }} + error={errors.dueDate?.message} + /> + )} + /> + + + + + + + + Recorrência + + + + + + Contas reccorentes serão criadas com a frequência que você determinar. + + + + + - - - - ( - field.onChange(date)} - selected={field.value} - style={{ marginBottom: '10px' }} - /> - )} - /> - - - - { isRequired /> - - diff --git a/pages/_app.tsx b/pages/_app.tsx index 246a96c..cfd1e78 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -14,7 +14,7 @@ function MyApp({ Component, pageProps }: AppProps) { - ToNoVermelho + NoVermelho From c6207ee17da937d0cb8d2d9a9fdcd70307c1108c Mon Sep 17 00:00:00 2001 From: Victor Lucas Date: Mon, 20 Nov 2023 13:55:55 -0500 Subject: [PATCH 38/39] fix: categories --- components/Box/index.tsx | 2 +- components/LateralMenu/index.tsx | 2 + components/Modal/index.tsx | 19 ++- .../services/authentication.service.ts | 19 +-- .../BaseModule/components/Bubble/index.tsx | 16 ++- modules/BaseModule/constants/Bubble.ts | 3 +- .../BaseModule/container/BaseForm/index.tsx | 2 +- .../BaseModule/container/BaseList/index.tsx | 101 ++++++++++++++-- modules/BaseModule/shared/renderFields.tsx | 1 + .../FormBill/form-bill.container.tsx | 60 +++------- .../components/form-category.component.tsx | 113 ++++++++++++++++++ .../container/form-category.container.tsx | 12 ++ .../container/list-categories.container.tsx | 66 ++++++++++ .../helpers/createDefaultCategories.ts | 64 ++++++++++ .../Category/hooks/useCategoriesSelect.tsx | 24 ++++ pages/category/create.tsx | 15 +++ pages/category/index.tsx | 10 ++ pages/styles.scss | 21 ++++ 18 files changed, 481 insertions(+), 69 deletions(-) create mode 100644 modules/Category/components/form-category.component.tsx create mode 100644 modules/Category/container/form-category.container.tsx create mode 100644 modules/Category/container/list-categories.container.tsx create mode 100644 modules/Category/helpers/createDefaultCategories.ts create mode 100644 modules/Category/hooks/useCategoriesSelect.tsx create mode 100644 pages/category/create.tsx create mode 100644 pages/category/index.tsx diff --git a/components/Box/index.tsx b/components/Box/index.tsx index bf905a2..622e382 100644 --- a/components/Box/index.tsx +++ b/components/Box/index.tsx @@ -9,7 +9,7 @@ type BoxProps = { export const Box = ({ title, description, children, ...rest }: BoxProps) => { return ( - + {(title || description) && ( {title && ( diff --git a/components/LateralMenu/index.tsx b/components/LateralMenu/index.tsx index cda7833..1bbc53e 100644 --- a/components/LateralMenu/index.tsx +++ b/components/LateralMenu/index.tsx @@ -19,6 +19,7 @@ import { import { FiHome, FiPower, FiTrendingUp, FiTrendingDown, FiMenu } from 'react-icons/fi'; import { IconType } from 'react-icons'; import Image from 'next/image'; +import { BiSolidCategoryAlt } from 'react-icons/bi'; interface LinkItemProps { name: string; @@ -29,6 +30,7 @@ const LinkItems: Array = [ { name: 'Início', icon: FiHome, link: '/' }, { name: 'Criar receita', icon: FiTrendingUp, link: '/bill?type=INCOME' }, { name: 'Criar despesa', icon: FiTrendingDown, link: '/bill?type=EXPENSE' }, + { name: 'Categorias', icon: BiSolidCategoryAlt, link: '/category' }, { name: 'Sair', icon: FiPower, diff --git a/components/Modal/index.tsx b/components/Modal/index.tsx index 36ee630..eb07131 100644 --- a/components/Modal/index.tsx +++ b/components/Modal/index.tsx @@ -1,17 +1,30 @@ -import { Modal as ModalChakra, ModalOverlay, ModalContent, ModalBody } from '@chakra-ui/react'; +import { + Modal as ModalChakra, + ModalOverlay, + ModalContent, + ModalBody, + ModalCloseButton, + ModalHeader, + ModalFooter, +} from '@chakra-ui/react'; interface ModalInterface { onClose: () => void; isOpen: boolean; + title?: string; + footer?: React.ReactElement; children: React.ReactElement; } -export const Modal = ({ onClose, isOpen, children }: ModalInterface) => { +export const Modal = ({ title, footer, onClose, isOpen, children }: ModalInterface) => { return ( - + + + {title && {title}} {children} + {footer && {footer}} ); diff --git a/modules/Authentication/services/authentication.service.ts b/modules/Authentication/services/authentication.service.ts index 5452137..5f96907 100644 --- a/modules/Authentication/services/authentication.service.ts +++ b/modules/Authentication/services/authentication.service.ts @@ -1,4 +1,5 @@ import { auth, firestore, googleProvider } from '@Configs/Firebase'; +import { createDefaultCategories } from '@Modules/Category/helpers/createDefaultCategories'; interface IGoogleProviderProfile { email?: string; @@ -12,16 +13,20 @@ interface IGoogleProviderProfile { } export const signInWithGoogle = () => { - return auth.signInWithPopup(googleProvider).then(({ additionalUserInfo, user }) => { + return auth.signInWithPopup(googleProvider).then(async ({ additionalUserInfo, user }) => { if (additionalUserInfo.isNewUser) { const profile = additionalUserInfo.profile as IGoogleProviderProfile; - firestore.collection('user').add({ - email: profile?.email, - name: `${profile?.given_name} ${profile?.family_name}`, - locale: profile?.locale, - image: profile?.picture, - }); + await firestore + .collection('user') + .doc(user.uid) + .set({ + email: profile?.email, + name: `${profile?.given_name} ${profile?.family_name}`, + locale: profile?.locale, + image: profile?.picture, + }) + .then(() => createDefaultCategories(user.uid)); } return user.uid; }); diff --git a/modules/BaseModule/components/Bubble/index.tsx b/modules/BaseModule/components/Bubble/index.tsx index 14968c2..d9e57b1 100644 --- a/modules/BaseModule/components/Bubble/index.tsx +++ b/modules/BaseModule/components/Bubble/index.tsx @@ -30,7 +30,7 @@ const Bubble = ({ props = {}, }: BubbleInterface) => { switch (type) { - case BUBBLE_TYPES.INPUT: + case BUBBLE_TYPES.INPUT_TEXT: return ( ); + case BUBBLE_TYPES.INPUT_COLOR: + return ( + + ); + case BUBBLE_TYPES.SELECT: return (