From 118093e65edf94a97895ae742eeb900dc62e9159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Mon, 21 Oct 2024 17:56:12 +0200 Subject: [PATCH] feat: set proper package exports --- backend/package-lock.json | 29 ++ backend/src/main.ts | 3 +- backend/yarn.lock | 377 +++++++++++------- {.storybook => frontend/.storybook}/main.ts | 0 .../.storybook}/preview.ts | 0 frontend/src/VotingPillar.tsx | 19 +- frontend/src/components/atoms/Tab.tsx | 21 + frontend/src/components/atoms/index.ts | 1 + frontend/src/components/index.ts | 1 + .../molecules/GovernanceActionCardMyVote.tsx | 59 +++ .../src/components/molecules/TabPanel.tsx | 36 ++ frontend/src/components/molecules/index.ts | 2 + .../organisms/GovernanceActionVotedOnCard.tsx | 152 +++++++ frontend/src/components/organisms/index.ts | 1 + .../components/pages/GovernanceActions.tsx | 320 ++++----------- .../templates/GovernanceActionsVotedOn.tsx | 117 ++++++ frontend/src/components/templates/index.ts | 1 + frontend/src/consts/queryKeys.ts | 1 + frontend/src/context/pillarContext.tsx | 67 +++- frontend/src/hooks/index.ts | 9 +- frontend/src/hooks/queries/index.ts | 5 + .../src/hooks/queries/useGetDRepVotesQuery.ts | 64 +++ .../{ => queries}/useGetProposalQuery.ts | 6 +- .../useGetProposalsInfiniteQuery.ts | 8 +- .../{ => queries}/useGetProposalsQuery.ts | 8 +- .../useGetVoteContextTextFromFile.ts | 4 +- frontend/src/index.tsx | 22 + .../src/services/requests/getDRepVotes.ts | 39 ++ frontend/src/services/requests/getProposal.ts | 1 + .../src/services/requests/getProposals.ts | 6 +- frontend/src/services/requests/index.ts | 5 +- .../src}/stories/Button.stories.ts | 0 {src => frontend/src}/stories/Button.tsx | 0 {src => frontend/src}/stories/Configure.mdx | 0 .../src}/stories/Header.stories.ts | 0 {src => frontend/src}/stories/Header.tsx | 0 {src => frontend/src}/stories/Page.stories.ts | 0 {src => frontend/src}/stories/Page.tsx | 0 .../src}/stories/assets/accessibility.png | Bin .../src}/stories/assets/accessibility.svg | 0 .../src}/stories/assets/addon-library.png | Bin .../src}/stories/assets/assets.png | Bin .../src}/stories/assets/avif-test-image.avif | Bin .../src}/stories/assets/context.png | Bin .../src}/stories/assets/discord.svg | 0 {src => frontend/src}/stories/assets/docs.png | Bin .../src}/stories/assets/figma-plugin.png | Bin .../src}/stories/assets/github.svg | 0 .../src}/stories/assets/share.png | Bin .../src}/stories/assets/styling.png | Bin .../src}/stories/assets/testing.png | Bin .../src}/stories/assets/theming.png | Bin .../src}/stories/assets/tutorials.svg | 0 .../src}/stories/assets/youtube.svg | 0 {src => frontend/src}/stories/button.css | 0 {src => frontend/src}/stories/header.css | 0 {src => frontend/src}/stories/page.css | 0 57 files changed, 955 insertions(+), 429 deletions(-) rename {.storybook => frontend/.storybook}/main.ts (100%) rename {.storybook => frontend/.storybook}/preview.ts (100%) create mode 100644 frontend/src/components/atoms/Tab.tsx create mode 100644 frontend/src/components/index.ts create mode 100644 frontend/src/components/molecules/GovernanceActionCardMyVote.tsx create mode 100644 frontend/src/components/molecules/TabPanel.tsx create mode 100644 frontend/src/components/organisms/GovernanceActionVotedOnCard.tsx create mode 100644 frontend/src/components/templates/GovernanceActionsVotedOn.tsx create mode 100644 frontend/src/hooks/queries/index.ts create mode 100644 frontend/src/hooks/queries/useGetDRepVotesQuery.ts rename frontend/src/hooks/{ => queries}/useGetProposalQuery.ts (79%) rename frontend/src/hooks/{ => queries}/useGetProposalsInfiniteQuery.ts (87%) rename frontend/src/hooks/{ => queries}/useGetProposalsQuery.ts (87%) rename frontend/src/hooks/{ => queries}/useGetVoteContextTextFromFile.ts (77%) create mode 100644 frontend/src/services/requests/getDRepVotes.ts rename {src => frontend/src}/stories/Button.stories.ts (100%) rename {src => frontend/src}/stories/Button.tsx (100%) rename {src => frontend/src}/stories/Configure.mdx (100%) rename {src => frontend/src}/stories/Header.stories.ts (100%) rename {src => frontend/src}/stories/Header.tsx (100%) rename {src => frontend/src}/stories/Page.stories.ts (100%) rename {src => frontend/src}/stories/Page.tsx (100%) rename {src => frontend/src}/stories/assets/accessibility.png (100%) rename {src => frontend/src}/stories/assets/accessibility.svg (100%) rename {src => frontend/src}/stories/assets/addon-library.png (100%) rename {src => frontend/src}/stories/assets/assets.png (100%) rename {src => frontend/src}/stories/assets/avif-test-image.avif (100%) rename {src => frontend/src}/stories/assets/context.png (100%) rename {src => frontend/src}/stories/assets/discord.svg (100%) rename {src => frontend/src}/stories/assets/docs.png (100%) rename {src => frontend/src}/stories/assets/figma-plugin.png (100%) rename {src => frontend/src}/stories/assets/github.svg (100%) rename {src => frontend/src}/stories/assets/share.png (100%) rename {src => frontend/src}/stories/assets/styling.png (100%) rename {src => frontend/src}/stories/assets/testing.png (100%) rename {src => frontend/src}/stories/assets/theming.png (100%) rename {src => frontend/src}/stories/assets/tutorials.svg (100%) rename {src => frontend/src}/stories/assets/youtube.svg (100%) rename {src => frontend/src}/stories/button.css (100%) rename {src => frontend/src}/stories/header.css (100%) rename {src => frontend/src}/stories/page.css (100%) diff --git a/backend/package-lock.json b/backend/package-lock.json index 4f32904..444c92b 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -15,6 +15,7 @@ "@nestjs/platform-express": "^10.0.0", "@nestjs/swagger": "^7.4.2", "@nestjs/typeorm": "^10.0.2", + "class-validator": "^0.14.1", "pg": "^8.13.0", "reflect-metadata": "^0.2.0", "rxjs": "^7.8.1", @@ -2213,6 +2214,11 @@ "@types/superagent": "^8.1.0" } }, + "node_modules/@types/validator": { + "version": "13.12.2", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.2.tgz", + "integrity": "sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA==" + }, "node_modules/@types/yargs": { "version": "17.0.33", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", @@ -3291,6 +3297,16 @@ "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", "dev": true }, + "node_modules/class-validator": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.1.tgz", + "integrity": "sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==", + "dependencies": { + "@types/validator": "^13.11.8", + "libphonenumber-js": "^1.10.53", + "validator": "^13.9.0" + } + }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -6201,6 +6217,11 @@ "node": ">= 0.8.0" } }, + "node_modules/libphonenumber-js": { + "version": "1.11.12", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.12.tgz", + "integrity": "sha512-QkJn9/D7zZ1ucvT++TQSvZuSA2xAWeUytU+DiEQwbPKLyrDpvbul2AFs1CGbRAPpSCCk47aRAb5DX5mmcayp4g==" + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -8783,6 +8804,14 @@ "node": ">=10.12.0" } }, + "node_modules/validator": { + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/backend/src/main.ts b/backend/src/main.ts index 5af0d88..45d6b42 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -9,12 +9,11 @@ async function bootstrap() { .setTitle('GovTool Voting Pillar API') .setDescription('API for the GovTool Voting Pillar') .setVersion('1.0') - .addTag('proposal') .build(); const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('api', app, document); - await app.listen(3001); + await app.listen(3002); } bootstrap(); diff --git a/backend/yarn.lock b/backend/yarn.lock index 593495d..aa7b882 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -58,7 +58,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.2.tgz" integrity sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ== -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": version "7.25.2" resolved "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz" integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== @@ -576,7 +576,7 @@ jest-haste-map "^29.7.0" slash "^3.0.0" -"@jest/transform@^29.7.0": +"@jest/transform@^29.0.0", "@jest/transform@^29.7.0": version "29.7.0" resolved "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz" integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== @@ -597,7 +597,7 @@ slash "^3.0.0" write-file-atomic "^4.0.2" -"@jest/types@^29.6.3": +"@jest/types@^29.0.0", "@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== @@ -641,14 +641,6 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" @@ -657,6 +649,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@ljharb/through@^2.3.12": version "2.3.13" resolved "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz" @@ -699,14 +699,14 @@ webpack "5.93.0" webpack-node-externals "3.0.0" -"@nestjs/common@^10.0.0": +"@nestjs/common@^10.0.0", "@nestjs/common@^8.0.0 || ^9.0.0 || ^10.0.0", "@nestjs/common@^9.0.0 || ^10.0.0": version "10.4.1" resolved "https://registry.npmjs.org/@nestjs/common/-/common-10.4.1.tgz" integrity sha512-4CkrDx0s4XuWqFjX8WvOFV7Y6RGJd0P2OBblkhZS7nwoctoSuW5pyEa8SWak6YHNGrHRpFb6ymm5Ai4LncwRVA== dependencies: - uid "2.0.2" iterare "1.2.1" tslib "2.6.3" + uid "2.0.2" "@nestjs/config@^3.2.3": version "3.2.3" @@ -717,17 +717,17 @@ dotenv-expand "10.0.0" lodash "4.17.21" -"@nestjs/core@^10.0.0": +"@nestjs/core@^10.0.0", "@nestjs/core@^8.0.0 || ^9.0.0 || ^10.0.0", "@nestjs/core@^9.0.0 || ^10.0.0": version "10.4.1" resolved "https://registry.npmjs.org/@nestjs/core/-/core-10.4.1.tgz" integrity sha512-9I1WdfOBCCHdUm+ClBJupOuZQS6UxzIWHIq6Vp1brAA5ZKl/Wq6BVwSsbnUJGBy3J3PM2XHmR0EQ4fwX3nR7lA== dependencies: - uid "2.0.2" "@nuxtjs/opencollective" "0.3.2" fast-safe-stringify "2.1.1" iterare "1.2.1" path-to-regexp "3.2.0" tslib "2.6.3" + uid "2.0.2" "@nestjs/mapped-types@2.0.5": version "2.0.5" @@ -790,7 +790,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -927,7 +927,7 @@ "@types/eslint" "*" "@types/estree" "*" -"@types/eslint@*": +"@types/eslint@*", "@types/eslint@>=8.0.0": version "9.6.0" resolved "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.0.tgz" integrity sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg== @@ -1073,7 +1073,7 @@ "@types/validator@^13.11.8": version "13.12.2" - resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.12.2.tgz#760329e756e18a4aab82fc502b51ebdfebbe49f5" + resolved "https://registry.npmjs.org/@types/validator/-/validator-13.12.2.tgz" integrity sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA== "@types/yargs-parser@*": @@ -1174,7 +1174,7 @@ resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": +"@webassemblyjs/ast@^1.12.1", "@webassemblyjs/ast@1.12.1": version "1.12.1" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz" integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== @@ -1275,7 +1275,7 @@ "@webassemblyjs/wasm-gen" "1.12.1" "@webassemblyjs/wasm-parser" "1.12.1" -"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": +"@webassemblyjs/wasm-parser@^1.12.1", "@webassemblyjs/wasm-parser@1.12.1": version "1.12.1" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz" integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== @@ -1330,7 +1330,7 @@ acorn-walk@^8.1.1: dependencies: acorn "^8.11.0" -acorn@^8.11.0, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8, acorn@^8.11.0, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: version "8.12.1" resolved "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== @@ -1347,17 +1347,17 @@ ajv-keywords@^3.5.2: resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@8.12.0, ajv@^8.0.0: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.12.5, ajv@^6.9.1: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1367,6 +1367,16 @@ ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.0, ajv@8.12.0: + version "8.12.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ansi-colors@4.1.3: version "4.1.3" resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" @@ -1483,7 +1493,7 @@ asynckit@^0.4.0: resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -babel-jest@^29.7.0: +babel-jest@^29.0.0, babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz" integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== @@ -1610,7 +1620,7 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -browserslist@^4.21.10, browserslist@^4.23.1: +browserslist@^4.21.10, browserslist@^4.23.1, "browserslist@>= 4.21.0": version "4.23.3" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz" integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== @@ -1698,14 +1708,6 @@ caniuse-lite@^1.0.30001646: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz" integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== -chalk@4.1.2, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" @@ -1715,6 +1717,14 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2, chalk@4.1.2: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chalk@^5.3.0: version "5.3.0" resolved "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz" @@ -1730,7 +1740,7 @@ chardet@^0.7.0: resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chokidar@3.6.0, chokidar@^3.5.3: +chokidar@^3.5.2, chokidar@^3.5.3, chokidar@3.6.0: version "3.6.0" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== @@ -1760,9 +1770,9 @@ cjs-module-lexer@^1.0.0: resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz" integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== -class-validator@^0.14.1: +class-validator@*, "class-validator@^0.13.0 || ^0.14.0", class-validator@^0.14.1: version "0.14.1" - resolved "https://registry.yarnpkg.com/class-validator/-/class-validator-0.14.1.tgz#ff2411ed8134e9d76acfeb14872884448be98110" + resolved "https://registry.npmjs.org/class-validator/-/class-validator-0.14.1.tgz" integrity sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ== dependencies: "@types/validator" "^13.11.8" @@ -1859,16 +1869,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" @@ -1876,16 +1886,16 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + comment-json@4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/comment-json/-/comment-json-4.2.3.tgz" @@ -2009,13 +2019,6 @@ dayjs@^1.11.9: resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz" integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.6" resolved "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz" @@ -2023,6 +2026,13 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" +debug@2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + dedent@^1.0.0: version "1.5.3" resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz" @@ -2111,7 +2121,7 @@ dotenv-expand@10.0.0: resolved "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz" integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A== -dotenv@16.4.5, dotenv@^16.0.3: +dotenv@^16.0.3, dotenv@16.4.5: version "16.4.5" resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== @@ -2215,7 +2225,7 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@^9.0.0: +eslint-config-prettier@*, eslint-config-prettier@^9.0.0: version "9.1.0" resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz" integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== @@ -2228,14 +2238,6 @@ eslint-plugin-prettier@^5.0.0: prettier-linter-helpers "^1.0.0" synckit "^0.9.1" -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - eslint-scope@^7.2.2: version "7.2.2" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" @@ -2244,12 +2246,20 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.42.0: +"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.42.0, eslint@^8.56.0, eslint@>=7.0.0, eslint@>=8.0.0: version "8.57.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== @@ -2444,7 +2454,7 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: +fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0, fast-json-stable-stringify@2.x: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -2454,7 +2464,7 @@ fast-levenshtein@^2.0.6: resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -fast-safe-stringify@2.1.1, fast-safe-stringify@^2.1.1: +fast-safe-stringify@^2.1.1, fast-safe-stringify@2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== @@ -2514,7 +2524,15 @@ finalhandler@1.2.0: statuses "2.0.1" unpipe "~1.0.0" -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -2617,11 +2635,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -2677,7 +2690,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@10.4.2, glob@^10.3.10: +glob@^10.3.10, glob@10.4.2: version "10.4.2" resolved "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz" integrity sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w== @@ -2689,7 +2702,19 @@ glob@10.4.2, glob@^10.3.10: package-json-from-dist "^1.0.0" path-scurry "^1.11.1" -glob@^7.1.3, glob@^7.1.4: +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.4: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -2812,7 +2837,7 @@ human-signals@^2.1.0: resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -iconv-lite@0.4.24, iconv-lite@^0.4.24: +iconv-lite@^0.4.24, iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -2858,7 +2883,7 @@ 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.3: +inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@2, inherits@2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3267,7 +3292,7 @@ jest-resolve-dependencies@^29.7.0: jest-regex-util "^29.6.3" jest-snapshot "^29.7.0" -jest-resolve@^29.7.0: +jest-resolve@*, jest-resolve@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== @@ -3420,7 +3445,7 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^29.5.0: +jest@^29.0.0, jest@^29.5.0: version "29.7.0" resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz" integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== @@ -3435,13 +3460,6 @@ js-tokens@^4.0.0: resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" @@ -3450,6 +3468,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0, js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" @@ -3530,9 +3555,9 @@ levn@^0.4.1: type-check "~0.4.0" libphonenumber-js@^1.10.53: - version "1.11.11" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.11.11.tgz#f4d521d7e2d1958916820e3725e609a2ea7575a8" - integrity sha512-mF3KaORjJQR6JBNcOkluDcJKhtoQT4VTLRMrX1v/wlBayL4M8ybwEDeryyPcrSEJmD0rVwHUbBarpZwN5NfPFQ== + version "1.11.12" + resolved "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.12.tgz" + integrity sha512-QkJn9/D7zZ1ucvT++TQSvZuSA2xAWeUytU+DiEQwbPKLyrDpvbul2AFs1CGbRAPpSCCk47aRAb5DX5mmcayp4g== lines-and-columns@^1.1.6: version "1.2.4" @@ -3568,7 +3593,7 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@4.17.21, lodash@^4.17.21: +lodash@^4.17.21, lodash@4.17.21: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -3607,7 +3632,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@1.x, make-error@^1.1.1: +make-error@^1.1.1, make-error@1.x: version "1.3.6" resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -3686,7 +3711,21 @@ mimic-fn@^2.1.0: resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^3.0.5: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -3875,7 +3914,7 @@ optionator@^0.9.3: type-check "^0.4.0" word-wrap "^1.2.5" -ora@5.4.1, ora@^5.4.1: +ora@^5.4.1, ora@5.4.1: version "5.4.1" resolved "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz" integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== @@ -4056,7 +4095,7 @@ pg-types@^2.1.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg@^8.13.0: +pg@^8.13.0, pg@^8.5.1, pg@>=8.0: version "8.13.0" resolved "https://registry.npmjs.org/pg/-/pg-8.13.0.tgz" integrity sha512-34wkUTh3SxTClfoHB3pQ7bIMvw9dpFU1audQQeZG837fmHfHpr14n/AELVDoOYVDW2h5RDWU78tFjkD+erSBsw== @@ -4081,16 +4120,31 @@ picocolors@^1.0.0, picocolors@^1.0.1: resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz" integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== -picomatch@4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.1.tgz" - integrity sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg== +picomatch@^2.0.4: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.2.3: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +picomatch@4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.1.tgz" + integrity sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg== + pirates@^4.0.4: version "4.0.6" resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz" @@ -4142,7 +4196,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.0.0: +prettier@^3.0.0, prettier@>=3.0.0: version "3.3.3" resolved "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz" integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== @@ -4187,7 +4241,7 @@ pure-rand@^6.0.0: resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz" integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== -qs@6.11.0, qs@^6.11.0: +qs@^6.11.0, qs@6.11.0: version "6.11.0" resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz" integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== @@ -4255,7 +4309,7 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -reflect-metadata@^0.2.0, reflect-metadata@^0.2.1: +"reflect-metadata@^0.1.12 || ^0.2.0", "reflect-metadata@^0.1.13 || ^0.2.0", reflect-metadata@^0.2.0, reflect-metadata@^0.2.1: version "0.2.2" resolved "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz" integrity sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q== @@ -4343,19 +4397,24 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@7.8.1, rxjs@^7.5.5, rxjs@^7.8.1: +rxjs@^7.1.0, rxjs@^7.2.0, rxjs@^7.5.5, rxjs@^7.8.1, rxjs@7.8.1: version "7.8.1" resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" -safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@~5.1.0: + version "5.1.2" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -4374,7 +4433,12 @@ schema-utils@^3.1.1, schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -semver@^6.3.0, semver@^6.3.1: +semver@^6.3.0: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^6.3.1: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -4467,7 +4531,17 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -4487,14 +4561,6 @@ slash@^3.0.0: resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-support@^0.5.21, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" @@ -4503,16 +4569,29 @@ source-map-support@^0.5.21, source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@0.7.4, source-map@^0.7.4: - version "0.7.4" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" -source-map@^0.6.0, source-map@^0.6.1: +source-map@^0.6.0: version "0.6.1" resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.4, source-map@0.7.4: + version "0.7.4" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + split2@^4.1.0: version "4.2.0" resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz" @@ -4540,6 +4619,13 @@ streamsearch@^1.1.0: resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +string_decoder@^1.1.1, string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + string-length@^4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" @@ -4575,13 +4661,6 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string_decoder@^1.1.1, string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - "strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -4819,7 +4898,7 @@ ts-loader@^9.4.3: semver "^7.3.4" source-map "^0.7.4" -ts-node@^10.9.1: +ts-node@^10.7.0, ts-node@^10.9.1, ts-node@>=9.0.0: version "10.9.2" resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== @@ -4847,7 +4926,7 @@ tsconfig-paths-webpack-plugin@4.1.0: enhanced-resolve "^5.7.0" tsconfig-paths "^4.1.2" -tsconfig-paths@4.2.0, tsconfig-paths@^4.1.2, tsconfig-paths@^4.2.0: +tsconfig-paths@^4.1.2, tsconfig-paths@^4.2.0, tsconfig-paths@4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz" integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== @@ -4856,7 +4935,7 @@ tsconfig-paths@4.2.0, tsconfig-paths@^4.1.2, tsconfig-paths@^4.2.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@2.6.3, tslib@^2.1.0, tslib@^2.5.0, tslib@^2.6.2: +tslib@^2.1.0, tslib@^2.5.0, tslib@^2.6.2, tslib@2.6.3: version "2.6.3" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== @@ -4896,7 +4975,7 @@ typedarray@^0.0.6: resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typeorm@^0.3.20: +typeorm@^0.3.0, typeorm@^0.3.20: version "0.3.20" resolved "https://registry.npmjs.org/typeorm/-/typeorm-0.3.20.tgz" integrity sha512-sJ0T08dV5eoZroaq9uPKBoNcGslHBR4E4y+EBHs//SiGbblGe7IeduP/IH4ddCcj0qp3PHwDwGnuvqEAnKlq/Q== @@ -4917,16 +4996,16 @@ typeorm@^0.3.20: uuid "^9.0.0" yargs "^17.6.2" +typescript@*, typescript@^5.1.3, typescript@>=2.7, typescript@>=4.2.0, "typescript@>=4.3 <6", typescript@>=4.8.2, typescript@>=4.9.5, typescript@>3.6.0: + version "5.5.4" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== + typescript@5.3.3: version "5.3.3" resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== -typescript@^5.1.3: - version "5.5.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== - uid@2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz" @@ -4944,7 +5023,7 @@ universalify@^2.0.0: resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@~1.0.0, unpipe@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -4974,7 +5053,7 @@ utils-merge@1.0.1: resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== -uuid@9.0.1, uuid@^9.0.0: +uuid@^9.0.0, uuid@9.0.1: version "9.0.1" resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== @@ -4995,7 +5074,7 @@ v8-to-istanbul@^9.0.1: validator@^13.9.0: version "13.12.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-13.12.0.tgz#7d78e76ba85504da3fee4fd1922b385914d4b35f" + resolved "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz" integrity sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg== vary@^1, vary@~1.1.2: @@ -5040,7 +5119,7 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.93.0: +webpack@^5.0.0, webpack@^5.1.0, webpack@^5.11.0, webpack@5.93.0: version "5.93.0" resolved "https://registry.npmjs.org/webpack/-/webpack-5.93.0.tgz" integrity sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA== @@ -5154,16 +5233,16 @@ yallist@^3.0.2: resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yargs-parser@21.1.1, yargs-parser@^21.0.1, yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - yargs-parser@^20.2.2: version "20.2.9" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@^21.0.1, yargs-parser@^21.1.1, yargs-parser@21.1.1: + version "21.1.1" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + yargs@^16.0.0: version "16.2.0" resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" diff --git a/.storybook/main.ts b/frontend/.storybook/main.ts similarity index 100% rename from .storybook/main.ts rename to frontend/.storybook/main.ts diff --git a/.storybook/preview.ts b/frontend/.storybook/preview.ts similarity index 100% rename from .storybook/preview.ts rename to frontend/.storybook/preview.ts diff --git a/frontend/src/VotingPillar.tsx b/frontend/src/VotingPillar.tsx index d2a9411..3e3f557 100644 --- a/frontend/src/VotingPillar.tsx +++ b/frontend/src/VotingPillar.tsx @@ -3,7 +3,11 @@ import { ThemeProvider } from '@mui/material/styles'; import { QueryClient, QueryClientProvider } from 'react-query'; import { voltaireTheme } from './theme'; -import { DataActionsBarProvider, PillarProvider } from './context'; +import { + DataActionsBarProvider, + PillarProvider, + PillarProviderProps, +} from './context'; import { GovernanceActionsPage, GovernanceActionDetails, @@ -11,18 +15,14 @@ import { } from './components/pages'; import { PATHS } from './consts'; -type VotingPillarProps = { - walletApi: WalletApi | null; - apiUrl: string; - validationApiUrl: string; -}; - const VotingPillar = ({ walletApi, apiUrl, validationApiUrl, -}: VotingPillarProps) => ( + ...props +}: PillarProviderProps) => ( ); +// That exports pages of the VotingPillar component +export * from './components'; + export default VotingPillar; diff --git a/frontend/src/components/atoms/Tab.tsx b/frontend/src/components/atoms/Tab.tsx new file mode 100644 index 0000000..54db230 --- /dev/null +++ b/frontend/src/components/atoms/Tab.tsx @@ -0,0 +1,21 @@ +import { Tab as BaseTab, styled } from '@mui/material'; + +type TabProps = { + label: string; +}; + +/** + * Represents a custom styled tab component. + */ +export const Tab = styled((props: TabProps) => ( + +))(() => ({ + textTransform: 'none', + fontWeight: 400, + fontSize: 16, + color: '#242232', + '&.Mui-selected': { + color: '#FF640A', + fontWeight: 500, + }, +})); diff --git a/frontend/src/components/atoms/index.ts b/frontend/src/components/atoms/index.ts index 12df71c..2e44393 100644 --- a/frontend/src/components/atoms/index.ts +++ b/frontend/src/components/atoms/index.ts @@ -8,6 +8,7 @@ export * from './Input'; export * from './Loader'; export * from './Radio'; export * from './Spacer'; +export * from './Tab'; export * from './TextArea'; export * from './Tooltip'; export * from './Typography'; diff --git a/frontend/src/components/index.ts b/frontend/src/components/index.ts new file mode 100644 index 0000000..23c7929 --- /dev/null +++ b/frontend/src/components/index.ts @@ -0,0 +1 @@ +export * from './pages'; diff --git a/frontend/src/components/molecules/GovernanceActionCardMyVote.tsx b/frontend/src/components/molecules/GovernanceActionCardMyVote.tsx new file mode 100644 index 0000000..f132740 --- /dev/null +++ b/frontend/src/components/molecules/GovernanceActionCardMyVote.tsx @@ -0,0 +1,59 @@ +import { Box } from '@mui/material'; + +import { Button, Typography } from '../atoms'; +import { VotePill } from '../molecules'; +import { openInNewTab } from '../../utils'; +import { Vote } from '../../models'; +import { usePillarContext } from '../../context'; + +type Props = { + voteTxHash: string; + vote: Vote; +}; + +export const GovernanceActionCardMyVote = ({ voteTxHash, vote }: Props) => { + const { cExplorerBaseUrl } = usePillarContext(); + + return ( + + + My Vote: + + + + + + + + + ); +}; diff --git a/frontend/src/components/molecules/TabPanel.tsx b/frontend/src/components/molecules/TabPanel.tsx new file mode 100644 index 0000000..e923568 --- /dev/null +++ b/frontend/src/components/molecules/TabPanel.tsx @@ -0,0 +1,36 @@ +import { Box } from '@mui/material'; + +type TabPanelProps = { + children?: React.ReactNode; + index: number; + value: number; +}; + +/** + * Renders a tab panel component. + * + * @param props - The component props. + * @param props.children - The content of the tab panel. + * @param props.value - The current value of the tab panel. + * @param props.index - The index of the tab panel. + * @returns The rendered tab panel component. + */ +export const TabPanel = (props: TabPanelProps) => { + const { children, value, index } = props; + + return ( + + ); +}; diff --git a/frontend/src/components/molecules/index.ts b/frontend/src/components/molecules/index.ts index e676ef7..f129b67 100644 --- a/frontend/src/components/molecules/index.ts +++ b/frontend/src/components/molecules/index.ts @@ -9,6 +9,7 @@ export * from './Field'; export * from './GovernanceActionCard'; export * from './GovernanceActionCardElement'; export * from './GovernanceActionCardHeader'; +export * from './GovernanceActionCardMyVote'; export * from './GovernanceActionCardStatePill'; export * from './GovernanceActionDetailsCardData'; export * from './GovernanceActionDetailsCardLinks'; @@ -20,5 +21,6 @@ export * from './OrderActionsChip'; export * from './SliderArrow'; export * from './SliderArrows'; export * from './Step'; +export * from './TabPanel'; export * from './VotePill'; export * from './VotesSubmitted'; diff --git a/frontend/src/components/organisms/GovernanceActionVotedOnCard.tsx b/frontend/src/components/organisms/GovernanceActionVotedOnCard.tsx new file mode 100644 index 0000000..8e1613e --- /dev/null +++ b/frontend/src/components/organisms/GovernanceActionVotedOnCard.tsx @@ -0,0 +1,152 @@ +import { useNavigate } from 'react-router-dom'; +import { Box } from '@mui/material'; + +import { Button } from '../atoms'; +import { PATHS } from '../../consts'; +import { useScreenDimension } from '../../hooks'; +import { + getFullGovActionId, + getProposalTypeLabel, + getProposalTypeNoEmptySpaces, +} from '../../utils'; +import { + GovernanceActionCardElement, + GovernanceActionCardHeader, + GovernanceActionCardMyVote, + GovernanceActionCardStatePill, + GovernanceActionsDatesBox, +} from '../molecules'; +import { VotedProposal } from '../../models'; + +type Props = { + votedProposal: VotedProposal; + inProgress?: boolean; +}; + +export const GovernanceActionVotedOnCard = ({ + votedProposal, + inProgress, +}: Props) => { + const navigate = useNavigate(); + const { proposal, vote } = votedProposal; + const { + abstract, + createdDate, + createdEpochNo, + expiryDate, + expiryEpochNo, + index, + metadataStatus, + metadataValid, + txHash, + type, + title, + } = proposal; + + const { isMobile, screenWidth } = useScreenDimension(); + + return ( + + + + + + + + + + + + + + + ); +}; diff --git a/frontend/src/components/organisms/index.ts b/frontend/src/components/organisms/index.ts index 16e815c..9120e7a 100644 --- a/frontend/src/components/organisms/index.ts +++ b/frontend/src/components/organisms/index.ts @@ -6,3 +6,4 @@ export * from './Share'; export * from './Slider'; export * from './VoteActionForm'; export * from './VoteContext'; +export * from './GovernanceActionVotedOnCard'; diff --git a/frontend/src/components/pages/GovernanceActions.tsx b/frontend/src/components/pages/GovernanceActions.tsx index 4dbac7e..70c99f8 100644 --- a/frontend/src/components/pages/GovernanceActions.tsx +++ b/frontend/src/components/pages/GovernanceActions.tsx @@ -1,246 +1,52 @@ -import { Box, Divider, CircularProgress } from '@mui/material'; +import { useEffect, useState } from 'react'; +import { useLocation } from 'react-router-dom'; +import { Box, Divider, CircularProgress, Tabs } from '@mui/material'; -import { useScreenDimension } from '../../hooks'; -import { Typography } from '../atoms'; -import { DataActionsBar } from '../molecules'; -import { GovernanceActionsToVote } from '../templates'; +import { useScreenDimension, useGetProposalsQuery } from '../../hooks'; +import { Typography, Tab } from '../atoms'; +import { DataActionsBar, TabPanel } from '../molecules'; +import { + GovernanceActionsToVote, + GovernanceActionsVotedOn, +} from '../templates'; import { GOVERNANCE_ACTIONS_FILTERS, GOVERNANCE_ACTIONS_SORTING, } from '../../consts'; import { useDataActionsBar } from '../../context/dataActionsBar'; +import { usePillarContext } from '../../context'; -// TODO: Mock: Replace with a real data -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const proposals: any = [ - { - title: 'Info Action', - actions: [ - { - id: 419, - txHash: - '6ac2988bded2fe82f8efd6bad7afb6151a124d7b21e0dd31f6cd0b66f733a687', - index: 0, - type: 'InfoAction', - details: {}, - expiryDate: '2024-10-10T07:46:23.275Z', - expiryEpochNo: 483, - createdDate: '2024-09-25T06:02:15.000Z', - createdEpochNo: 468, - url: 'https://docs.cardano.org/about-cardano/introduction/', - metadataHash: - '0000000000000000000000000000000000000000000000000000000000000000', - protocolParams: null, - title: null, - abstract: null, - motivation: null, - rationale: null, - dRepYesVotes: 0, - dRepNoVotes: 205253998167, - dRepAbstainVotes: 6652525776310, - poolYesVotes: 0, - poolNoVotes: 0, - poolAbstainVotes: 0, - ccYesVotes: 0, - ccNoVotes: 0, - ccAbstainVotes: 0, - prevGovActionIndex: null, - prevGovActionTxHash: null, - }, - { - id: 420, - txHash: - 'd32abad7d403c4c921877f93e437c40af3a7bb5eb88236e27a98f3cb1e022c3e', - index: 0, - type: 'InfoAction', - details: {}, - expiryDate: '2024-10-10T07:46:23.275Z', - expiryEpochNo: 483, - createdDate: '2024-09-25T06:10:47.000Z', - createdEpochNo: 468, - url: 'cardano.com', - metadataHash: - '0000000000000000000000000000000000000000000000000000000000000000', - protocolParams: null, - title: null, - abstract: null, - motivation: null, - rationale: null, - dRepYesVotes: 0, - dRepNoVotes: 205253998167, - dRepAbstainVotes: 8116673867964, - poolYesVotes: 0, - poolNoVotes: 0, - poolAbstainVotes: 0, - ccYesVotes: 0, - ccNoVotes: 0, - ccAbstainVotes: 0, - prevGovActionIndex: null, - prevGovActionTxHash: null, - }, - { - id: 421, - txHash: - '246c1a9ca2b50f8ee03a1a853b0ff94c3fa885810585d859fdec5ac61b03dabe', - index: 0, - type: 'InfoAction', - details: {}, - expiryDate: '2024-10-10T07:46:23.275Z', - expiryEpochNo: 483, - createdDate: '2024-09-25T06:15:36.000Z', - createdEpochNo: 468, - url: 'agents.cardanoapi.io', - metadataHash: - '1111111111111111111111111111111111111111111111111111111111111111', - protocolParams: null, - title: null, - abstract: null, - motivation: null, - rationale: null, - dRepYesVotes: 0, - dRepNoVotes: 205253998167, - dRepAbstainVotes: 6652525776310, - poolYesVotes: 0, - poolNoVotes: 0, - poolAbstainVotes: 0, - ccYesVotes: 0, - ccNoVotes: 0, - ccAbstainVotes: 0, - prevGovActionIndex: null, - prevGovActionTxHash: null, - }, - { - id: 422, - txHash: - '7434d11716f14737b6506d89a2e2c95eb48aab8a7971f5e74c86c767966a4f51', - index: 0, - type: 'InfoAction', - details: {}, - expiryDate: '2024-10-10T07:46:23.275Z', - expiryEpochNo: 483, - createdDate: '2024-09-25T06:17:04.000Z', - createdEpochNo: 468, - url: 'agents.cardanoapi.io', - metadataHash: - '1111111111111111111111111111111111111111111111111111111111111111', - protocolParams: null, - title: null, - abstract: null, - motivation: null, - rationale: null, - dRepYesVotes: 0, - dRepNoVotes: 1669402089821, - dRepAbstainVotes: 6652525776310, - poolYesVotes: 0, - poolNoVotes: 0, - poolAbstainVotes: 0, - ccYesVotes: 0, - ccNoVotes: 0, - ccAbstainVotes: 0, - prevGovActionIndex: null, - prevGovActionTxHash: null, - }, - { - id: 423, - txHash: - '7f1f9281dbb736131ac852eb6060b47e404d995f3af0208440ca989c80ca0ea3', - index: 0, - type: 'InfoAction', - details: {}, - expiryDate: '2024-10-10T07:46:23.275Z', - expiryEpochNo: 483, - createdDate: '2024-09-25T06:32:34.000Z', - createdEpochNo: 468, - url: 'helloworld.com', - metadataHash: - '0000000000000000000000000000000000000000000000000000000000000000', - protocolParams: null, - title: null, - abstract: null, - motivation: null, - rationale: null, - dRepYesVotes: 0, - dRepNoVotes: 205253998167, - dRepAbstainVotes: 8116673867964, - poolYesVotes: 0, - poolNoVotes: 0, - poolAbstainVotes: 0, - ccYesVotes: 0, - ccNoVotes: 0, - ccAbstainVotes: 0, - prevGovActionIndex: null, - prevGovActionTxHash: null, - }, - { - id: 424, - txHash: - '8b9317ae02acd6249109abf8216e73d87aff1b0116a3216b2cbab3081b9f2d21', - index: 0, - type: 'InfoAction', - details: {}, - expiryDate: '2024-10-10T07:46:23.275Z', - expiryEpochNo: 483, - createdDate: '2024-09-25T06:56:21.000Z', - createdEpochNo: 468, - url: 'https://metadata.cardanoapi.io/data/5b2d3da91a0481507561acd8886166ede0d700a7fea5e86e59ad83c0e6d9878c', - metadataHash: - '5b2d3da91a0481507561acd8886166ede0d700a7fea5e86e59ad83c0e6d9878c', - protocolParams: null, - title: null, - abstract: null, - motivation: null, - rationale: null, - dRepYesVotes: 0, - dRepNoVotes: 205253998167, - dRepAbstainVotes: 6652525776310, - poolYesVotes: 0, - poolNoVotes: 0, - poolAbstainVotes: 0, - ccYesVotes: 0, - ccNoVotes: 0, - ccAbstainVotes: 0, - prevGovActionIndex: null, - prevGovActionTxHash: null, - }, - { - id: 425, - txHash: - '552d6c7a8e830d37d88ea56a54635eadf4420e2c5a3128b4d7bf7862b85cdbc2', - index: 0, - type: 'InfoAction', - details: {}, - expiryDate: '2024-10-10T07:46:23.275Z', - expiryEpochNo: 483, - createdDate: '2024-09-25T07:00:10.000Z', - createdEpochNo: 468, - url: 'https://metadata.cardanoapi.io/data/5b2d3da91a0481507561acd8886166ede0d700a7fea5e86e59ad83c0e6d9878c', - metadataHash: - '5b2d3da91a0481507561acd8886166ede0d700a7fea5e86e59ad83c0e6d9878c', - protocolParams: null, - title: null, - abstract: null, - motivation: null, - rationale: null, - dRepYesVotes: 0, - dRepNoVotes: 205253998167, - dRepAbstainVotes: 6652525776310, - poolYesVotes: 0, - poolNoVotes: 0, - poolAbstainVotes: 0, - ccYesVotes: 0, - ccNoVotes: 0, - ccAbstainVotes: 0, - prevGovActionIndex: null, - prevGovActionTxHash: null, - }, - ], - }, -]; -const isProposalsLoading = false; +const defaultCategories = GOVERNANCE_ACTIONS_FILTERS.map( + (category) => category.key +); export const GovernanceActionsPage = () => { const { debouncedSearchText, ...dataActionsBarProps } = useDataActionsBar(); + const { chosenFilters, chosenSorting } = dataActionsBarProps; + const queryFilters = + chosenFilters.length > 0 ? chosenFilters : defaultCategories; const { isMobile, pagePadding } = useScreenDimension(); + const { isEnabled, voter } = usePillarContext(); + + const { proposals, isProposalsLoading } = useGetProposalsQuery({ + filters: queryFilters, + sorting: chosenSorting, + searchPhrase: debouncedSearchText, + }); + + const { state } = useLocation(); + const [content, setContent] = useState( + state && state.isVotedListOnLoad ? 1 : 0 + ); + + const handleChange = (_event: React.SyntheticEvent, newValue: number) => { + setContent(newValue); + }; + + useEffect(() => { + window.history.replaceState({}, document.title); + }, []); + return ( { > + ) : isEnabled && + (voter?.isRegisteredAsDRep || voter?.isRegisteredAsSoleVoter) ? ( + <> + + + + {' '} + + + + + + + + ) : ( <> diff --git a/frontend/src/components/templates/GovernanceActionsVotedOn.tsx b/frontend/src/components/templates/GovernanceActionsVotedOn.tsx new file mode 100644 index 0000000..5602cb6 --- /dev/null +++ b/frontend/src/components/templates/GovernanceActionsVotedOn.tsx @@ -0,0 +1,117 @@ +import { useCallback, useMemo } from 'react'; +import { Box, Typography, CircularProgress } from '@mui/material'; +import { generatePath, useNavigate } from 'react-router-dom'; + +import { useGetDRepVotesQuery, useScreenDimension } from '../../hooks'; +import { Slider, GovernanceActionVotedOnCard } from '../organisms'; +import { getFullGovActionId, getProposalTypeLabel } from '../../utils'; +import { usePillarContext } from '../../context'; +import { PATHS } from '../../consts'; + +type GovernanceActionsVotedOnProps = { + filters: string[]; + searchPhrase?: string; + sorting: string; +}; + +/** + * Renders a component that displays the Governance Actions that the user has voted on. + * + * @param filters - The filters to apply to the Governance Actions. + * @param searchPhrase - The search phrase to filter the Governance Actions. + * @param sorting - The sorting options for the Governance Actions. + * @returns The rendered component. + */ +export const GovernanceActionsVotedOn = ({ + filters, + searchPhrase, + sorting, +}: GovernanceActionsVotedOnProps) => { + const { data, areDRepVotesLoading } = useGetDRepVotesQuery( + filters, + sorting, + searchPhrase + ); + const { isMobile } = useScreenDimension(); + const { pendingTransaction } = usePillarContext(); + const navigate = useNavigate(); + + const onGovernanceActionSliderShowAllClick = useCallback( + (title: string) => () => { + navigate( + generatePath(PATHS.governanceActionsCategory, { + category: title, + }) + ); + }, + [navigate] + ); + + const filteredData = useMemo(() => { + if (data.length && searchPhrase) { + return data + .map((entry) => ({ + ...entry, + actions: entry.actions.filter((action) => + getFullGovActionId(action.proposal.txHash, action.proposal.index) + .toLowerCase() + .includes(searchPhrase.toLowerCase()) + ), + })) + .filter((entry) => entry.actions.length > 0); + } + return data; + }, [data, searchPhrase]); + + return areDRepVotesLoading ? ( + + + + ) : ( + <> + {!data.length ? ( + + You haven't voted on any Governance Actions yet. Check the + 'To vote on' section to vote on Governance Actions. + + ) : !filteredData?.length ? ( + + No results for the search. + + ) : ( + <> + {filteredData?.map((item) => ( +
+ ( +
+ +
+ ))} + /> + +
+ ))} + + )} + + ); +}; diff --git a/frontend/src/components/templates/index.ts b/frontend/src/components/templates/index.ts index ab6d14e..39124dc 100644 --- a/frontend/src/components/templates/index.ts +++ b/frontend/src/components/templates/index.ts @@ -1 +1,2 @@ export * from './GovernanceActionsToVote'; +export * from './GovernanceActionsVotedOn'; diff --git a/frontend/src/consts/queryKeys.ts b/frontend/src/consts/queryKeys.ts index e5458ff..39bf2e2 100644 --- a/frontend/src/consts/queryKeys.ts +++ b/frontend/src/consts/queryKeys.ts @@ -3,4 +3,5 @@ export const QUERY_KEYS = { useGetProposalsInfiniteKey: 'useGetProposalsInfiniteKey', useGetProposalsKey: 'useGetProposalsKey', useGetProposalKey: 'useGetProposalKey', + useGetDRepVotesKey: 'useGetDRepVotesKey', }; diff --git a/frontend/src/context/pillarContext.tsx b/frontend/src/context/pillarContext.tsx index f37f4b7..4f7866f 100644 --- a/frontend/src/context/pillarContext.tsx +++ b/frontend/src/context/pillarContext.tsx @@ -8,7 +8,13 @@ // const { epochParams } = useAppContext(); // const { addSuccessAlert } = useSnackbar(); -import { createContext, FC, useMemo, useContext } from 'react'; +import { + createContext, + FC, + useMemo, + useContext, + PropsWithChildren, +} from 'react'; type BuildSignSubmitConwayCertTxArgs = { certBuilder?: unknown; @@ -24,6 +30,7 @@ type WalletApi = { pendingTransaction: { vote?: { transactionHash: string; + resourceId?: string; }; }; buildSignSubmitConwayCertTx: ({ @@ -47,6 +54,7 @@ type WalletApi = { type PillarContextType = { apiUrl: string; validationApiUrl: string; + cExplorerBaseUrl: string; isEnabled: boolean; openFeedbackWindow: () => void; isVotingOnGovernanceActionEnabled: (proposalType: string) => boolean; @@ -61,37 +69,68 @@ type PillarContextType = { const PillarContext = createContext(undefined); -type PillarProps = { - children: React.ReactNode; +export type PillarProviderProps = { walletApi: WalletApi | null; apiUrl?: string; validationApiUrl?: string; + cExplorerBaseUrl?: string; + openFeedbackWindow: () => void; + isVotingOnGovernanceActionEnabled: (proposalType: string) => boolean; + epochParams: unknown; + addSuccessAlert: (message: string) => void; + validateMetadata: (url: string, hash: string) => void; + generateMetadata: () => void; + createJsonLD: (data: unknown) => void; + createHash: (json: unknown) => string; }; -export const PillarProvider: FC = ({ +export const PillarProvider: FC = ({ children, apiUrl, walletApi, validationApiUrl, + cExplorerBaseUrl, + openFeedbackWindow, + isVotingOnGovernanceActionEnabled, + epochParams, + addSuccessAlert, + validateMetadata, + generateMetadata, + createJsonLD, + createHash, }) => { const { voter } = useGetVoterInfo(); const contextValue = useMemo( () => ({ apiUrl: apiUrl || process.env.API_URL, validationApiUrl: validationApiUrl || process.env.VALIDATION_API_URL, - isEnabled: true, - openFeedbackWindow: () => {}, - isVotingOnGovernanceActionEnabled: (proposalType) => !!proposalType, - epochParams: null, - addSuccessAlert: () => {}, - validateMetadata: (url: string, hash: string) => {}, - generateMetadata: () => {}, - createJsonLD: (data: unknown) => {}, - createHash: (json: unknown) => '', + openFeedbackWindow, + isVotingOnGovernanceActionEnabled, + epochParams, + addSuccessAlert, + validateMetadata, + generateMetadata, + createJsonLD, + createHash, voter, ...(walletApi || {}), + cExplorerBaseUrl: cExplorerBaseUrl || process.env.C_EXPLORER_BASE_URL, }), - [apiUrl, voter, walletApi, validationApiUrl] + [ + apiUrl, + validationApiUrl, + openFeedbackWindow, + isVotingOnGovernanceActionEnabled, + epochParams, + addSuccessAlert, + validateMetadata, + generateMetadata, + createJsonLD, + createHash, + voter, + walletApi, + cExplorerBaseUrl, + ] ); return ( diff --git a/frontend/src/hooks/index.ts b/frontend/src/hooks/index.ts index c18d7e2..2322327 100644 --- a/frontend/src/hooks/index.ts +++ b/frontend/src/hooks/index.ts @@ -1,13 +1,10 @@ +export * from './queries'; export * from './useDebounce'; +export * from './useFetchNextPageDetector'; export * from './useOnClickOutside'; export * from './useSaveScrollPosition'; export * from './useScreenDimension'; export * from './useSlider'; -export * from './useFetchNextPageDetector'; -export * from './useVoteContextForm'; -export * from './useGetVoteContextTextFromFile'; export * from './useVoteActionForm'; +export * from './useVoteContextForm'; export * from './useWalletErrorModal'; -export * from './useGetProposalsInfiniteQuery'; -export * from './useGetProposalsQuery'; -export * from './useGetProposalQuery'; diff --git a/frontend/src/hooks/queries/index.ts b/frontend/src/hooks/queries/index.ts new file mode 100644 index 0000000..1d45130 --- /dev/null +++ b/frontend/src/hooks/queries/index.ts @@ -0,0 +1,5 @@ +export * from './useGetDRepVotesQuery'; +export * from './useGetProposalQuery'; +export * from './useGetProposalsInfiniteQuery'; +export * from './useGetProposalsQuery'; +export * from './useGetVoteContextTextFromFile'; diff --git a/frontend/src/hooks/queries/useGetDRepVotesQuery.ts b/frontend/src/hooks/queries/useGetDRepVotesQuery.ts new file mode 100644 index 0000000..b12c432 --- /dev/null +++ b/frontend/src/hooks/queries/useGetDRepVotesQuery.ts @@ -0,0 +1,64 @@ +import { useQuery } from 'react-query'; + +import { QUERY_KEYS } from '../../consts'; +import { getDRepVotes } from '../../services'; +import { VotedProposal } from '../../models'; +import { usePillarContext } from '../../context'; + +export const useGetDRepVotesQuery = ( + type?: string[], + sort?: string, + search?: string +) => { + const { dRepID, pendingTransaction, apiUrl, validationApiUrl } = + usePillarContext(); + + const { data, isLoading, refetch, isRefetching } = useQuery({ + queryKey: [ + QUERY_KEYS.useGetDRepVotesKey, + pendingTransaction.vote?.transactionHash, + type, + sort, + search, + ], + queryFn: () => + getDRepVotes(apiUrl, validationApiUrl, { + dRepID, + params: { + ...(search && { search }), + ...(sort && { sort }), + ...(type && { type }), + }, + }), + enabled: !!dRepID, + }); + + const groupedByType = data?.reduce((groups, item) => { + const itemType = item?.proposal.type; + + /* eslint-disable @typescript-eslint/ban-ts-comment */ + // @ts-expect-error + if (!groups[itemType]) { + // @ts-expect-error + groups[itemType] = { + title: itemType, + actions: [], + }; + } + // @ts-expect-error + groups[itemType].actions.push(item); + /* eslint-enable @typescript-eslint/ban-ts-comment */ + + return groups; + }, {}); + + return { + data: Object.values(groupedByType ?? []) as { + title: string; + actions: VotedProposal[]; + }[], + areDRepVotesLoading: isLoading, + refetch, + isRefetching, + }; +}; diff --git a/frontend/src/hooks/useGetProposalQuery.ts b/frontend/src/hooks/queries/useGetProposalQuery.ts similarity index 79% rename from frontend/src/hooks/useGetProposalQuery.ts rename to frontend/src/hooks/queries/useGetProposalQuery.ts index e373210..1f81760 100644 --- a/frontend/src/hooks/useGetProposalQuery.ts +++ b/frontend/src/hooks/queries/useGetProposalQuery.ts @@ -1,8 +1,8 @@ import { useQuery } from 'react-query'; -import { QUERY_KEYS } from '../consts'; -import { getProposal } from '../services'; -import { usePillarContext } from '../context'; +import { QUERY_KEYS } from '../../consts'; +import { getProposal } from '../../services'; +import { usePillarContext } from '../../context'; export const useGetProposalQuery = (proposalId: string, enabled?: boolean) => { const { dRepID, apiUrl, validationApiUrl } = usePillarContext(); diff --git a/frontend/src/hooks/useGetProposalsInfiniteQuery.ts b/frontend/src/hooks/queries/useGetProposalsInfiniteQuery.ts similarity index 87% rename from frontend/src/hooks/useGetProposalsInfiniteQuery.ts rename to frontend/src/hooks/queries/useGetProposalsInfiniteQuery.ts index 9270fa9..d0cb921 100644 --- a/frontend/src/hooks/useGetProposalsInfiniteQuery.ts +++ b/frontend/src/hooks/queries/useGetProposalsInfiniteQuery.ts @@ -1,9 +1,9 @@ import { useInfiniteQuery } from 'react-query'; -import { QUERY_KEYS } from '../consts'; -import { ProposalData } from '../models'; -import { getProposals, GetProposalsArguments } from '../services'; -import { usePillarContext } from '../context'; +import { QUERY_KEYS } from '../../consts'; +import { ProposalData } from '../../models'; +import { getProposals, GetProposalsArguments } from '../../services'; +import { usePillarContext } from '../../context'; export const useGetProposalsInfiniteQuery = ({ filters = [], diff --git a/frontend/src/hooks/useGetProposalsQuery.ts b/frontend/src/hooks/queries/useGetProposalsQuery.ts similarity index 87% rename from frontend/src/hooks/useGetProposalsQuery.ts rename to frontend/src/hooks/queries/useGetProposalsQuery.ts index fbf307d..38dfb41 100644 --- a/frontend/src/hooks/useGetProposalsQuery.ts +++ b/frontend/src/hooks/queries/useGetProposalsQuery.ts @@ -1,9 +1,9 @@ import { useQuery } from 'react-query'; -import { QUERY_KEYS } from '../consts'; -import { ProposalData } from '../models'; -import { getProposals, GetProposalsArguments } from '../services'; -import { usePillarContext } from '../context'; +import { QUERY_KEYS } from '../../consts'; +import { ProposalData } from '../../models'; +import { getProposals, GetProposalsArguments } from '../../services'; +import { usePillarContext } from '../../context'; export const useGetProposalsQuery = ({ filters = [], diff --git a/frontend/src/hooks/useGetVoteContextTextFromFile.ts b/frontend/src/hooks/queries/useGetVoteContextTextFromFile.ts similarity index 77% rename from frontend/src/hooks/useGetVoteContextTextFromFile.ts rename to frontend/src/hooks/queries/useGetVoteContextTextFromFile.ts index 43a4342..f11fe7e 100644 --- a/frontend/src/hooks/useGetVoteContextTextFromFile.ts +++ b/frontend/src/hooks/queries/useGetVoteContextTextFromFile.ts @@ -1,7 +1,7 @@ import { useQuery } from 'react-query'; -import { getVoteContextTextFromFile } from '../services'; -import { QUERY_KEYS } from '../consts'; +import { getVoteContextTextFromFile } from '../../services'; +import { QUERY_KEYS } from '../../consts'; export const useGetVoteContextTextFromFile = ( url: string | undefined, diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 7c74546..d5490c5 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -17,6 +17,28 @@ root.render( walletApi={null} apiUrl={process.env.API_URL || ''} validationApiUrl={process.env.VALIDATION_API_URL || ''} + openFeedbackWindow={() => { + throw new Error('Function not implemented.'); + }} + isVotingOnGovernanceActionEnabled={(proposalType: string) => { + throw new Error(`Function not implemented. ${proposalType}`); + }} + epochParams={undefined} + addSuccessAlert={(message: string) => { + throw new Error(`Function not implemented. ${message}`); + }} + validateMetadata={(url: string, hash: string) => { + throw new Error(`Function not implemented. ${url} ${hash}`); + }} + generateMetadata={() => { + throw new Error('Function not implemented.'); + }} + createJsonLD={(data: unknown) => { + throw new Error(`Function not implemented. ${data}`); + }} + createHash={(json: unknown) => { + throw new Error(`Function not implemented. ${json}`); + }} /> diff --git a/frontend/src/services/requests/getDRepVotes.ts b/frontend/src/services/requests/getDRepVotes.ts new file mode 100644 index 0000000..298c0b3 --- /dev/null +++ b/frontend/src/services/requests/getDRepVotes.ts @@ -0,0 +1,39 @@ +import axios from 'axios'; + +import { VotedProposal, VotedProposalDTO } from '../../models'; +import { mapDtoToProposal } from '../../utils'; + +type GetDRepVotesParams = { + type?: string[]; + sort?: string; + search?: string; +}; + +export const getDRepVotes = async ( + apiUrl: string, + validationApiUrl: string, + { + dRepID, + params, + }: { + dRepID: string; + params: GetDRepVotesParams; + } +): Promise => { + const { data } = await axios.get( + `${apiUrl}/drep/getVotes/${dRepID}`, + { params } + ); + + const validatedData = await Promise.all( + data.map(async (votedProposal) => ({ + ...votedProposal, + proposal: await mapDtoToProposal( + validationApiUrl, + votedProposal.proposal + ), + })) + ); + + return validatedData; +}; diff --git a/frontend/src/services/requests/getProposal.ts b/frontend/src/services/requests/getProposal.ts index 31eb9c5..75fddf9 100644 --- a/frontend/src/services/requests/getProposal.ts +++ b/frontend/src/services/requests/getProposal.ts @@ -1,4 +1,5 @@ import axios from 'axios'; + import { VotedProposal, VotedProposalDTO } from '../../models'; import { mapDtoToProposal } from '../../utils'; diff --git a/frontend/src/services/requests/getProposals.ts b/frontend/src/services/requests/getProposals.ts index b3ce278..ff6b51b 100644 --- a/frontend/src/services/requests/getProposals.ts +++ b/frontend/src/services/requests/getProposals.ts @@ -13,7 +13,7 @@ export type GetProposalsArguments = { }; export const getProposals = async ( - url: string, + apiUrl: string, validationApiUrl: string, { dRepID = '', @@ -25,11 +25,11 @@ export const getProposals = async ( sorting = '', }: GetProposalsArguments ): Promise> => { - if (!url) { + if (!apiUrl) { throw new Error('URL is undefined'); } const response = await axios.get>( - `${url}/proposal/list`, + `${apiUrl}/proposal/list`, { params: { page, diff --git a/frontend/src/services/requests/index.ts b/frontend/src/services/requests/index.ts index 98232bc..269ee9c 100644 --- a/frontend/src/services/requests/index.ts +++ b/frontend/src/services/requests/index.ts @@ -1,4 +1,5 @@ -export * from './getVoteContextTextFromFile'; +export * from './getDRepVotes'; +export * from './getProposal'; export * from './getProposals'; +export * from './getVoteContextTextFromFile'; export * from './postValidate'; -export * from './getProposal'; diff --git a/src/stories/Button.stories.ts b/frontend/src/stories/Button.stories.ts similarity index 100% rename from src/stories/Button.stories.ts rename to frontend/src/stories/Button.stories.ts diff --git a/src/stories/Button.tsx b/frontend/src/stories/Button.tsx similarity index 100% rename from src/stories/Button.tsx rename to frontend/src/stories/Button.tsx diff --git a/src/stories/Configure.mdx b/frontend/src/stories/Configure.mdx similarity index 100% rename from src/stories/Configure.mdx rename to frontend/src/stories/Configure.mdx diff --git a/src/stories/Header.stories.ts b/frontend/src/stories/Header.stories.ts similarity index 100% rename from src/stories/Header.stories.ts rename to frontend/src/stories/Header.stories.ts diff --git a/src/stories/Header.tsx b/frontend/src/stories/Header.tsx similarity index 100% rename from src/stories/Header.tsx rename to frontend/src/stories/Header.tsx diff --git a/src/stories/Page.stories.ts b/frontend/src/stories/Page.stories.ts similarity index 100% rename from src/stories/Page.stories.ts rename to frontend/src/stories/Page.stories.ts diff --git a/src/stories/Page.tsx b/frontend/src/stories/Page.tsx similarity index 100% rename from src/stories/Page.tsx rename to frontend/src/stories/Page.tsx diff --git a/src/stories/assets/accessibility.png b/frontend/src/stories/assets/accessibility.png similarity index 100% rename from src/stories/assets/accessibility.png rename to frontend/src/stories/assets/accessibility.png diff --git a/src/stories/assets/accessibility.svg b/frontend/src/stories/assets/accessibility.svg similarity index 100% rename from src/stories/assets/accessibility.svg rename to frontend/src/stories/assets/accessibility.svg diff --git a/src/stories/assets/addon-library.png b/frontend/src/stories/assets/addon-library.png similarity index 100% rename from src/stories/assets/addon-library.png rename to frontend/src/stories/assets/addon-library.png diff --git a/src/stories/assets/assets.png b/frontend/src/stories/assets/assets.png similarity index 100% rename from src/stories/assets/assets.png rename to frontend/src/stories/assets/assets.png diff --git a/src/stories/assets/avif-test-image.avif b/frontend/src/stories/assets/avif-test-image.avif similarity index 100% rename from src/stories/assets/avif-test-image.avif rename to frontend/src/stories/assets/avif-test-image.avif diff --git a/src/stories/assets/context.png b/frontend/src/stories/assets/context.png similarity index 100% rename from src/stories/assets/context.png rename to frontend/src/stories/assets/context.png diff --git a/src/stories/assets/discord.svg b/frontend/src/stories/assets/discord.svg similarity index 100% rename from src/stories/assets/discord.svg rename to frontend/src/stories/assets/discord.svg diff --git a/src/stories/assets/docs.png b/frontend/src/stories/assets/docs.png similarity index 100% rename from src/stories/assets/docs.png rename to frontend/src/stories/assets/docs.png diff --git a/src/stories/assets/figma-plugin.png b/frontend/src/stories/assets/figma-plugin.png similarity index 100% rename from src/stories/assets/figma-plugin.png rename to frontend/src/stories/assets/figma-plugin.png diff --git a/src/stories/assets/github.svg b/frontend/src/stories/assets/github.svg similarity index 100% rename from src/stories/assets/github.svg rename to frontend/src/stories/assets/github.svg diff --git a/src/stories/assets/share.png b/frontend/src/stories/assets/share.png similarity index 100% rename from src/stories/assets/share.png rename to frontend/src/stories/assets/share.png diff --git a/src/stories/assets/styling.png b/frontend/src/stories/assets/styling.png similarity index 100% rename from src/stories/assets/styling.png rename to frontend/src/stories/assets/styling.png diff --git a/src/stories/assets/testing.png b/frontend/src/stories/assets/testing.png similarity index 100% rename from src/stories/assets/testing.png rename to frontend/src/stories/assets/testing.png diff --git a/src/stories/assets/theming.png b/frontend/src/stories/assets/theming.png similarity index 100% rename from src/stories/assets/theming.png rename to frontend/src/stories/assets/theming.png diff --git a/src/stories/assets/tutorials.svg b/frontend/src/stories/assets/tutorials.svg similarity index 100% rename from src/stories/assets/tutorials.svg rename to frontend/src/stories/assets/tutorials.svg diff --git a/src/stories/assets/youtube.svg b/frontend/src/stories/assets/youtube.svg similarity index 100% rename from src/stories/assets/youtube.svg rename to frontend/src/stories/assets/youtube.svg diff --git a/src/stories/button.css b/frontend/src/stories/button.css similarity index 100% rename from src/stories/button.css rename to frontend/src/stories/button.css diff --git a/src/stories/header.css b/frontend/src/stories/header.css similarity index 100% rename from src/stories/header.css rename to frontend/src/stories/header.css diff --git a/src/stories/page.css b/frontend/src/stories/page.css similarity index 100% rename from src/stories/page.css rename to frontend/src/stories/page.css