From 0697fe0609bbf09f268b5d0ab52c11db01c59bd6 Mon Sep 17 00:00:00 2001 From: Phat <39623143+lukachi@users.noreply.github.com> Date: Fri, 22 Mar 2024 16:56:56 +0200 Subject: [PATCH] Add creating text proposal form. Add markdown viewer for proposal description (#9) * add creating text proposal, add markdown viewer for proposal description * set stable rarimo client package, strict proposal desc length, add preview modal * add max length for proposal title --- package.json | 4 +- .../Forms/SubmitTextProposalForm.tsx | 172 ++++++++++++ src/components/MarkdownViewer.tsx | 34 +++ src/components/Proposal/ProposalDetails.tsx | 6 +- src/components/Proposal/Proposals.tsx | 16 +- src/components/Proposal/ProposalsSubmit.tsx | 66 +++++ src/helpers/event-bus.ts | 1 + src/locales/en.ts | 13 + yarn.lock | 255 +++++++++++------- 9 files changed, 464 insertions(+), 103 deletions(-) create mode 100644 src/components/Forms/SubmitTextProposalForm.tsx create mode 100644 src/components/MarkdownViewer.tsx create mode 100644 src/components/Proposal/ProposalsSubmit.tsx diff --git a/package.json b/package.json index 834100a..ce5cc22 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,14 @@ "@hookform/resolvers": "^3.3.1", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.3", - "@rarimo/client": "^2.2.0", + "@rarimo/client": "^2.3.0", "graphql": "^16.7.1", "graphql-tag": "^2.12.6", "lodash-es": "^4.17.21", "loglevel": "^1.8.1", + "markdown-to-jsx": "^7.4.4", "mitt": "^3.0.1", + "mui-markdown": "^1.1.13", "negotiator": "^0.6.3", "next": "^13.5.5", "next-international": "^0.9.3", diff --git a/src/components/Forms/SubmitTextProposalForm.tsx b/src/components/Forms/SubmitTextProposalForm.tsx new file mode 100644 index 0000000..51d0bd6 --- /dev/null +++ b/src/components/Forms/SubmitTextProposalForm.tsx @@ -0,0 +1,172 @@ +import { + Button, + FormControl, + FormHelperText, + TextareaAutosize as BaseTextareaAutosize, + TextField, + Typography, +} from '@mui/material' +import { styled } from '@mui/system' +import { useMemo, useState } from 'react' +import { Controller } from 'react-hook-form' + +import { getClient } from '@/client' +import { Dialog } from '@/components/Dialog' +import FormWrapper from '@/components/Forms/FormWrapper' +import MarkdownViewer from '@/components/MarkdownViewer' +import { ErrorHandler } from '@/helpers' +import { useForm, useWeb3 } from '@/hooks' +import { useI18n } from '@/locales/client' +import { FormProps } from '@/types' + +enum FieldNames { + Title = 'title', + Description = 'description', +} + +const PROPOSAL_MAX_TITLE_LENGTH = 140 +const PROPOSAL_MAX_DESC_LENGTH = 10_000 + +export default function SubmitTextProposalForm({ id, onSubmit, setIsDialogDisabled }: FormProps) { + const t = useI18n() + const { address } = useWeb3() + + const [isPreviewDialogOpen, setIsPreviewDialogOpen] = useState(false) + + const DEFAULT_VALUES = { + [FieldNames.Title]: '', + [FieldNames.Description]: '', + } + + const { + formState, + handleSubmit, + control, + isFormDisabled, + formErrors, + disableForm, + enableForm, + getErrorMessage, + } = useForm(DEFAULT_VALUES, yup => + yup.object({ + [FieldNames.Title]: yup.string().max(PROPOSAL_MAX_TITLE_LENGTH).required(), + [FieldNames.Description]: yup.string().max(PROPOSAL_MAX_DESC_LENGTH).required(), + }), + ) + + const client = useMemo(() => getClient(), []) + + const getMinAmount = async (): Promise => { + const { deposit_params } = await client.query.getGovParams('deposit') + + return ( + deposit_params?.min_deposit?.find(i => i?.denom === client.config.currency.minDenom) + ?.amount ?? '0' + ) + } + + const submit = async (formData: typeof DEFAULT_VALUES) => { + disableForm() + setIsDialogDisabled(true) + try { + const client = getClient() + + const amount = await getMinAmount() + + await client.tx.submitTextProposal( + address, + [ + { + denom: client.config.currency.minDenom, + amount, + }, + ], + formData[FieldNames.Title], + formData[FieldNames.Description], + ) + + onSubmit({ + message: t('submit-text-proposal-form.submitted-msg'), + }) + } catch (e) { + ErrorHandler.process(e) + } + enableForm() + setIsDialogDisabled(false) + } + + return ( + + + {t('submit-text-proposal-form.helper-text')} + + + ( + + + + {Boolean(formErrors[FieldNames.Title]) && ( + {getErrorMessage(formErrors[FieldNames.Title])} + )} + + )} + /> + + ( + + + + {Boolean(formErrors[FieldNames.Description]) && ( + + {getErrorMessage(formErrors[FieldNames.Description])} + + )} + + )} + /> + + {formState[FieldNames.Description] && ( + + )} + + } + onClose={() => setIsPreviewDialogOpen(false)} + isOpened={isPreviewDialogOpen} + title={t('submit-text-proposal-form.desc-preview-title')} + > + {formState[FieldNames.Description]} + + + ) +} + +const TextareaAutosize = styled(BaseTextareaAutosize)( + ({ theme }) => ` + box-sizing: border-box; + background: none; + padding: ${theme.spacing(2)} ${theme.spacing(1.75)}; + + &:focus { + outline: none; + } +`, +) diff --git a/src/components/MarkdownViewer.tsx b/src/components/MarkdownViewer.tsx new file mode 100644 index 0000000..53eb925 --- /dev/null +++ b/src/components/MarkdownViewer.tsx @@ -0,0 +1,34 @@ +import { Stack, Typography } from '@mui/material' +import { getOverrides, MuiMarkdown } from 'mui-markdown' + +export default function MarkdownViewer({ children }: { children: string }) { + return ( + + {children} + + ) +} diff --git a/src/components/Proposal/ProposalDetails.tsx b/src/components/Proposal/ProposalDetails.tsx index 6151096..8624f39 100644 --- a/src/components/Proposal/ProposalDetails.tsx +++ b/src/components/Proposal/ProposalDetails.tsx @@ -7,6 +7,7 @@ import { useMemo } from 'react' import { AvatarName } from '@/components/Avatar' import { ContentBox, ContentWrapper } from '@/components/Content' +import MarkdownViewer from '@/components/MarkdownViewer' import OverviewTable from '@/components/OverviewTable' import ProposalDetailsContentRow from '@/components/Proposal/ProposalDetailsContentRow' import ProposalDetailsTallyResult from '@/components/Proposal/ProposalDetailsTallyResult' @@ -77,7 +78,10 @@ export default function ProposalDetails({ }, { head: t('proposal-details.description-lbl'), - body: withSkeleton(metadata?.description, TABLE_TYPE_BOX_SKELETON_SX), + body: withSkeleton( + {metadata?.description ?? ''}, + TABLE_TYPE_BOX_SKELETON_SX, + ), }, { head: t('proposal-details.status-lbl'), diff --git a/src/components/Proposal/Proposals.tsx b/src/components/Proposal/Proposals.tsx index 4691d3d..3e75c43 100644 --- a/src/components/Proposal/Proposals.tsx +++ b/src/components/Proposal/Proposals.tsx @@ -1,12 +1,15 @@ 'use client' import { TableCell } from '@mui/material' +import { useEffect } from 'react' import { getProposalCount, getProposalList } from '@/callers' import { ContentBox, ContentSection, ContentWrapper } from '@/components/Content' import ProposalsRow from '@/components/Proposal/ProposalsRow' +import ProposalsSubmit from '@/components/Proposal/ProposalsSubmit' import TableWithPagination from '@/components/TableWithPagination' import { ProposalBaseFragment } from '@/graphql' +import { Bus } from '@/helpers' import { useLoading, useTablePagination } from '@/hooks' import { useI18n } from '@/locales/client' import { TableColumn } from '@/types' @@ -28,16 +31,27 @@ export default function Proposals() { data: proposalCount, isLoading: isLoadingProposalCount, isLoadingError: isLoadingProposalCountError, + reload: reloadProposalCount, } = useLoading(0, getProposalCount) const { data: proposalList, isLoading, isLoadingError, + reload: reloadProposalsList, } = useLoading([], () => getProposalList(limit, offset), { loadArgs: [limit, offset], }) + useEffect(() => { + Bus.on(Bus.eventList.reloadVotes, () => { + reloadProposalCount() + reloadProposalsList() + }) + + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + const columns: readonly TableColumn[] = [ { id: ProposalsColumnIds.Id, @@ -83,7 +97,7 @@ export default function Proposals() { ) return ( - + }> () + + const { closeDialog, openDialog, setIsDisabled, onSubmit, isDisabled, isDialogOpened } = + useContentSectionAction(async () => { + await sleep(2000) + Bus.emit(Bus.eventList.reloadProposals) + }) + + const actions = useMemo( + () => { + return [ + { + label: t('proposals.submit-proposal-action'), + handler: () => { + setSubmitType(ProposalTypes.Text) + openDialog() + }, + isDisabled: false, + }, + ] + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [t], + ) + + return ( + + + + + {submitType === ProposalTypes.Text && ( + + )} + + + ) +} diff --git a/src/helpers/event-bus.ts b/src/helpers/event-bus.ts index 5dfd9c0..7b1bb0f 100644 --- a/src/helpers/event-bus.ts +++ b/src/helpers/event-bus.ts @@ -10,6 +10,7 @@ export const BUS_EVENT_TYPES = { info: 'info', redirectToHome: 'redirectToHome', reloadVotes: 'reloadVotes', + reloadProposals: 'reloadProposals', } export type EventBusEventName = (typeof BUS_EVENT_TYPES)[keyof typeof BUS_EVENT_TYPES] diff --git a/src/locales/en.ts b/src/locales/en.ts index e1b8abe..86d66d1 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -303,6 +303,19 @@ export default { "no-data-subtitle": "It will appear for a while", "error-title": "There was an error while loading proposals", "error-subtitle": "Please try again later", + "submit-proposal-action": "Create Proposal", + }, + "proposals-submit": { + "dialog-action-btn": "Submit", + "dialog-heading": "Create Text Proposal", + }, + "submit-text-proposal-form": { + "submitted-msg": "Text proposal successfully created.", + "helper-text": "Please fill out the form below to create a new text proposal.", + "title-lbl": "Title", + "description-lbl": "Description", + "desc-preview-btn": "Preview", + "desc-preview-title": "Description preview", }, "proposal-deposits": { "title-lbl": "Deposits", diff --git a/yarn.lock b/yarn.lock index 6a7e0ab..07e2f26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,8 +23,8 @@ __metadata: linkType: hard "@apollo/client@npm:^3.7.17": - version: 3.9.7 - resolution: "@apollo/client@npm:3.9.7" + version: 3.9.8 + resolution: "@apollo/client@npm:3.9.8" dependencies: "@graphql-typed-document-node/core": ^3.1.1 "@wry/caches": ^1.0.0 @@ -55,7 +55,7 @@ __metadata: optional: true subscriptions-transport-ws: optional: true - checksum: dcf5cfa9f4f95237b770e279e6e1b2433d1101fe4c11496a29807daf7df12ae511b812e56d4d4a47b04d9fb08aa3716b2ac64b9208a5af024db962e1bdc211a2 + checksum: 9532fbbdeb6a5a1b6c92e7253017e7c15b1b24aac0c192a7801e5fd40caf2a73e1e9086668acdb0b700b044375d75e1e0aabd4b0aaff92168945bd0b57cf0953 languageName: node linkType: hard @@ -97,13 +97,13 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/code-frame@npm:7.24.1" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.1, @babel/code-frame@npm:^7.24.2": + version: 7.24.2 + resolution: "@babel/code-frame@npm:7.24.2" dependencies: - "@babel/highlight": ^7.24.1 + "@babel/highlight": ^7.24.2 picocolors: ^1.0.0 - checksum: e43fc08c51ade6849c2f3bc19241aab1ffc7f8c47026b903a942b21d331ac124abc6bfa17a9e688f6ac8163b3bb5604bbf4657666340a2f43b4f49dfdcc67272 + checksum: 70e867340cfe09ca5488b2f36372c45cabf43c79a5b6426e6df5ef0611ff5dfa75a57dda841895693de6008f32c21a7c97027a8c7bcabd63a7d17416cbead6f8 languageName: node linkType: hard @@ -115,11 +115,11 @@ __metadata: linkType: hard "@babel/core@npm:^7.14.0, @babel/core@npm:^7.22.9": - version: 7.24.1 - resolution: "@babel/core@npm:7.24.1" + version: 7.24.3 + resolution: "@babel/core@npm:7.24.3" dependencies: "@ampproject/remapping": ^2.2.0 - "@babel/code-frame": ^7.24.1 + "@babel/code-frame": ^7.24.2 "@babel/generator": ^7.24.1 "@babel/helper-compilation-targets": ^7.23.6 "@babel/helper-module-transforms": ^7.23.3 @@ -133,7 +133,7 @@ __metadata: gensync: ^1.0.0-beta.2 json5: ^2.2.3 semver: ^6.3.1 - checksum: 6e77c9e5b774bfc36fed88a0529a8e5bc62bfc95d44dbdf380244fab866ea564889a60fffc4c16b576f7acd110ef3d1d645ab837d3ae0ca24c9653ddd7b7d1e3 + checksum: 1a33460794f4122cf255b656f4d6586913f41078a1afdf1bcf0365ddbd99c1ddb68f904062f9079445ab26b507c36bc297055192bc26e5c8e6e3def42195f9ab languageName: node linkType: hard @@ -226,11 +226,11 @@ __metadata: linkType: hard "@babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15": - version: 7.24.1 - resolution: "@babel/helper-module-imports@npm:7.24.1" + version: 7.24.3 + resolution: "@babel/helper-module-imports@npm:7.24.3" dependencies: "@babel/types": ^7.24.0 - checksum: b43387b32f7de93475fade85335a68da564bf0038921eda6c5ce8abec6dce501eedd5e5efe806a41f32c7c91ad7b7c1bdd615513e7d9bf02c5bf40d12e24c7e5 + checksum: c23492189ba97a1ec7d37012336a5661174e8b88194836b6bbf90d13c3b72c1db4626263c654454986f924c6da8be7ba7f9447876d709cd00bd6ffde6ec00796 languageName: node linkType: hard @@ -337,15 +337,15 @@ __metadata: languageName: node linkType: hard -"@babel/highlight@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/highlight@npm:7.24.1" +"@babel/highlight@npm:^7.24.2": + version: 7.24.2 + resolution: "@babel/highlight@npm:7.24.2" dependencies: "@babel/helper-validator-identifier": ^7.22.20 chalk: ^2.4.2 js-tokens: ^4.0.0 picocolors: ^1.0.0 - checksum: 1960f451218dcda3e2f6d976eb318dcc565b40a41c2cfc23f073c2b7cdfe2c3e7659ec5f6f9a9f8616d6e2f35cacdcd736d020e086d9df6acc70e27496868a4a + checksum: 5f17b131cc3ebf3ab285a62cf98a404aef1bd71a6be045e748f8d5bf66d6a6e1aefd62f5972c84369472e8d9f22a614c58a89cd331eb60b7ba965b31b1bbeaf5 languageName: node linkType: hard @@ -1718,8 +1718,8 @@ __metadata: linkType: hard "@graphql-tools/executor@npm:^1.2.1": - version: 1.2.2 - resolution: "@graphql-tools/executor@npm:1.2.2" + version: 1.2.3 + resolution: "@graphql-tools/executor@npm:1.2.3" dependencies: "@graphql-tools/utils": ^10.1.1 "@graphql-typed-document-node/core": 3.2.0 @@ -1728,7 +1728,7 @@ __metadata: value-or-promise: ^1.0.12 peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 6c7d568147471a6919d45071dd9c0551401e86ed21b22b74786d9f28b1cc11333c444dcdb388f48e4c3d007e40f11d0befa43c57b230af09263e5014737dfc12 + checksum: c4568e987fd7becda76357144bb91c5aeeec1cbc2861a4d724934b4f35f8faaebbf519c29b8ac608237d0558f3194e3358e4505e3cfaaf4b201ad3488b71db02 languageName: node linkType: hard @@ -2557,27 +2557,27 @@ __metadata: languageName: node linkType: hard -"@rarimo/client@npm:^2.2.0": - version: 2.2.0 - resolution: "@rarimo/client@npm:2.2.0" +"@rarimo/client@npm:^2.3.0": + version: 2.3.0 + resolution: "@rarimo/client@npm:2.3.0" dependencies: "@cosmjs/launchpad": ^0.27.1 "@cosmjs/proto-signing": ^0.32.2 "@cosmjs/stargate": ^0.32.2 "@distributedlab/fetcher": ^1.0.0-rc.13 "@distributedlab/reactivity": ^1.0.0-rc.13 - "@rarimo/shared": ^2.2.0 - checksum: 4a3317fce774f5d0b29ae151b3e009b7954decd6d216b82e4b86b4373c33296425876a6b6d2154fe4235fab12e05c29e77b888c073352384a3d4d3a0f6ebd1f6 + "@rarimo/shared": ^2.3.0 + checksum: e515304024ba5608edba288d68747d3ea540090f3f69b583470ca0b62f101900aa78229baf168bf0f273aeb10b2c1d44d507995f7eb900cb30acfe994353bbf7 languageName: node linkType: hard -"@rarimo/shared@npm:^2.2.0": - version: 2.2.0 - resolution: "@rarimo/shared@npm:2.2.0" +"@rarimo/shared@npm:^2.3.0": + version: 2.3.0 + resolution: "@rarimo/shared@npm:2.3.0" dependencies: "@distributedlab/jac": ^1.0.0-rc.13 "@distributedlab/tools": ^1.0.0-rc.13 - checksum: 73f7a2ad9e9df511cead30e044d95dbaeb7e9312f2ebdba3f4d9b96abdd58f637d7e1ebb79376e1017e1a750c8426af1548573b64376c9858dfc193373bbf73f + checksum: 6eb853839801823a9be1ec0128a903048358436cced6f23e89a6a9d4947981ba09e707e462c4f188ab286f0248b0fbdf218ff3c3a361ee48e5bb7ad9f437f039 languageName: node linkType: hard @@ -2589,9 +2589,9 @@ __metadata: linkType: hard "@rushstack/eslint-patch@npm:^1.1.3": - version: 1.7.2 - resolution: "@rushstack/eslint-patch@npm:1.7.2" - checksum: 9c773e712cef97d4e9defbd80eb25430e727137acda45d5236c620da7b93d93ae00901f7e10e893f5a8445312f2a7ff74c241024109c066bffb423f5e3ed0b1c + version: 1.8.0 + resolution: "@rushstack/eslint-patch@npm:1.8.0" + checksum: 25ba5f5dc8828f9a5499045b28d33c642e3db7cd32b3e5f4fbfa5cc6695c28b3967981d662cf37df4e945ba7f874df9bd559c9b2770a1e7d3b5b36afb45246c3 languageName: node linkType: hard @@ -2701,6 +2701,13 @@ __metadata: languageName: node linkType: hard +"@types/prismjs@npm:^1.26.0": + version: 1.26.3 + resolution: "@types/prismjs@npm:1.26.3" + checksum: c627fa9d9f4277ce413bb8347944152cddfc892702e34ff4b099dc1cf3f00c09514d36349c23529b903b0e57f3b2e0dc91ee66e98af07fbbe1e3fe8346b23370 + languageName: node + linkType: hard + "@types/prop-types@npm:*, @types/prop-types@npm:^15.7.11": version: 15.7.11 resolution: "@types/prop-types@npm:15.7.11" @@ -2877,15 +2884,15 @@ __metadata: linkType: hard "@whatwg-node/node-fetch@npm:^0.5.7": - version: 0.5.8 - resolution: "@whatwg-node/node-fetch@npm:0.5.8" + version: 0.5.10 + resolution: "@whatwg-node/node-fetch@npm:0.5.10" dependencies: "@kamilkisiela/fast-url-parser": ^1.1.4 "@whatwg-node/events": ^0.1.0 busboy: ^1.6.0 fast-querystring: ^1.1.1 tslib: ^2.3.1 - checksum: f5ab0490c430b16d91de7022d54bdbfd7e5ac237086f7f40ae56801e027b31eed420604699b803fa88971cbc8805f07663ebd27a66c020d61f4b36188df30ab0 + checksum: 6474b7ca9019a497d7f3188a11ef60e687b5353aaad0aff37e0ec2a351a57e854034c317effce3e8b9e46a108c9174cacbd907870b7050e8d40d84375a0c853f languageName: node linkType: hard @@ -3175,15 +3182,16 @@ __metadata: linkType: hard "array-includes@npm:^3.1.6, array-includes@npm:^3.1.7": - version: 3.1.7 - resolution: "array-includes@npm:3.1.7" + version: 3.1.8 + resolution: "array-includes@npm:3.1.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - get-intrinsic: ^1.2.1 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + es-object-atoms: ^1.0.0 + get-intrinsic: ^1.2.4 is-string: ^1.0.7 - checksum: 06f9e4598fac12a919f7c59a3f04f010ea07f0b7f0585465ed12ef528a60e45f374e79d1bddbb34cdd4338357d00023ddbd0ac18b0be36964f5e726e8965d7fc + checksum: eb39ba5530f64e4d8acab39297c11c1c5be2a4ea188ab2b34aba5fb7224d918f77717a9d57a3e2900caaa8440e59431bdaf5c974d5212ef65d97f132e38e2d91 languageName: node linkType: hard @@ -3218,28 +3226,30 @@ __metadata: linkType: hard "array.prototype.findlast@npm:^1.2.4": - version: 1.2.4 - resolution: "array.prototype.findlast@npm:1.2.4" + version: 1.2.5 + resolution: "array.prototype.findlast@npm:1.2.5" dependencies: - call-bind: ^1.0.5 + call-bind: ^1.0.7 define-properties: ^1.2.1 - es-abstract: ^1.22.3 + es-abstract: ^1.23.2 es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 es-shim-unscopables: ^1.0.2 - checksum: b4c76571adf6c3cffbbbb8acd7ac39d94af6b120dd388dcf44637c22d77ba3ae13dd43d1be25d90956848fae5a01191fbdebe48ce4c0aa0989d7ee269a94a5a4 + checksum: 83ce4ad95bae07f136d316f5a7c3a5b911ac3296c3476abe60225bc4a17938bf37541972fcc37dd5adbc99cbb9c928c70bbbfc1c1ce549d41a415144030bb446 languageName: node linkType: hard "array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.4 - resolution: "array.prototype.findlastindex@npm:1.2.4" + version: 1.2.5 + resolution: "array.prototype.findlastindex@npm:1.2.5" dependencies: - call-bind: ^1.0.5 + call-bind: ^1.0.7 define-properties: ^1.2.1 - es-abstract: ^1.22.3 + es-abstract: ^1.23.2 es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 es-shim-unscopables: ^1.0.2 - checksum: cc8dce27a06dddf6d9c40a15d4c573f96ac5ca3583f89f8d8cd7d7ffdb96a71d819890a5bdb211f221bda8fafa0d97d1d8cbb5460a5cbec1fff57ae80b8abc31 + checksum: 2c81cff2a75deb95bf1ed89b6f5f2bfbfb882211e3b7cc59c3d6b87df774cd9d6b36949a8ae39ac476e092c1d4a4905f5ee11a86a456abb10f35f8211ae4e710 languageName: node linkType: hard @@ -3759,16 +3769,16 @@ __metadata: linkType: hard "caniuse-db@npm:^1.0.30000187, caniuse-db@npm:^1.0.30000634, caniuse-db@npm:^1.0.30000639": - version: 1.0.30001599 - resolution: "caniuse-db@npm:1.0.30001599" - checksum: 642d5f0ef8da6782d3c7c442a59dc77160f201cf673ad645913bd617eb3ed6f1dd88ae70be93c5df170baa609cde52081ad7667d092b4926bedc250b29205cbf + version: 1.0.30001600 + resolution: "caniuse-db@npm:1.0.30001600" + checksum: 1372d30392c2dfc59433ddb1e65c241eb3516b6d307f826667b9116627aea51c1149a1f832e114faf5abc29624b32715d881bd8515d32a8681e1d8b0b200b2c6 languageName: node linkType: hard "caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001587": - version: 1.0.30001599 - resolution: "caniuse-lite@npm:1.0.30001599" - checksum: d7e619e2e723547b7311ba0ca5134d9cd55df548e93dbedcf8a6e4ec74c7db91969c4272fb1ab2fd94cddeac6a8176ebf05853eb06689d5e76bb97d979a214b0 + version: 1.0.30001600 + resolution: "caniuse-lite@npm:1.0.30001600" + checksum: 1aae03be0e9f96163e88b9305531ef8db0e01f224aff545c61a32ce0b0ca323e22531bf680bacac3e34f98e23f71ac31a21b328fa0fcbbecea65a2c2638c70c4 languageName: node linkType: hard @@ -4017,7 +4027,7 @@ __metadata: languageName: node linkType: hard -"clsx@npm:^2.1.0": +"clsx@npm:^2.0.0, clsx@npm:^2.1.0": version: 2.1.0 resolution: "clsx@npm:2.1.0" checksum: 43fefc29b6b49c9476fbce4f8b1cc75c27b67747738e598e6651dd40d63692135dc60b18fa1c5b78a2a9ba8ae6fd2055a068924b94e20b42039bd53b78b98e1d @@ -4612,9 +4622,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.2.7, electron-to-chromium@npm:^1.4.668": - version: 1.4.710 - resolution: "electron-to-chromium@npm:1.4.710" - checksum: 1f68232a054abcde73a3e5a22d12ab2cca70c04761a36923e8848a56d429ac97e3205b51688a61a5c2c90401b2b0a4e9ef8dc95698e95382aa1ae62e698cedcd + version: 1.4.715 + resolution: "electron-to-chromium@npm:1.4.715" + checksum: b3ccbd571ecaa3b74b2c098b705416e15e36f9338f75fea062ba48397ac379972f915c29437286914d05ea9d3454b0fa74e9606becd6c221879c6fc139a09284 languageName: node linkType: hard @@ -6311,7 +6321,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.5, internal-slot@npm:^1.0.7": +"internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -7504,6 +7514,15 @@ __metadata: languageName: node linkType: hard +"markdown-to-jsx@npm:^7.4.4": + version: 7.4.4 + resolution: "markdown-to-jsx@npm:7.4.4" + peerDependencies: + react: ">= 0.14.0" + checksum: a901e68a4cf258095133b659a52b35dc7b8025706d74cb363831c664cf0c948d06098b6327dd956f0f429e31d8c7f2a272a39d16c9b370072d1012557f2ade41 + languageName: node + linkType: hard + "math-random@npm:^1.0.1": version: 1.0.4 resolution: "math-random@npm:1.0.4" @@ -7834,6 +7853,25 @@ __metadata: languageName: node linkType: hard +"mui-markdown@npm:^1.1.13": + version: 1.1.13 + resolution: "mui-markdown@npm:1.1.13" + dependencies: + prism-react-renderer: ^2.0.3 + peerDependencies: + "@emotion/react": ^11.10.8 + "@emotion/styled": ^11.10.8 + "@mui/material": ^5.12.2 + markdown-to-jsx: ^7.3.0 + react: ">= 17.0.2" + react-dom: ">= 17.0.2" + dependenciesMeta: + prism-react-renderer: + optional: true + checksum: 7fe695d5878c547f155cef1829f7c50d3804cf1b3cb2de0de3cc27ac7306841efd687db632da41506c4c9839fa09c3a502655695158158cb8357cb6030fffa77 + languageName: node + linkType: hard + "multimatch@npm:^2.0.0": version: 2.1.0 resolution: "multimatch@npm:2.1.0" @@ -8717,13 +8755,13 @@ __metadata: linkType: hard "postcss@npm:^8.4.28": - version: 8.4.36 - resolution: "postcss@npm:8.4.36" + version: 8.4.38 + resolution: "postcss@npm:8.4.38" dependencies: nanoid: ^3.3.7 picocolors: ^1.0.0 - source-map-js: ^1.1.0 - checksum: 1bb0f2bdfccd5a3ea0ed39700c09098f15501d38110208bfba2df5e3925e4ff7e9a4eaf8abb87bc692ae4d122d9aa0ec13bf4f4d8fd1ad8d8ceaa1f345e50ed1 + source-map-js: ^1.2.0 + checksum: 649f9e60a763ca4b5a7bbec446a069edf07f057f6d780a5a0070576b841538d1ecf7dd888f2fbfd1f76200e26c969e405aeeae66332e6927dbdc8bdcb90b9451 languageName: node linkType: hard @@ -8759,6 +8797,18 @@ __metadata: languageName: node linkType: hard +"prism-react-renderer@npm:^2.0.3": + version: 2.3.1 + resolution: "prism-react-renderer@npm:2.3.1" + dependencies: + "@types/prismjs": ^1.26.0 + clsx: ^2.0.0 + peerDependencies: + react: ">=16.0.0" + checksum: b12a7d502c1e764d94f7d3c84aee9cd6fccc676bb7e21dee94d37eb2e7e62e097a343999e1979887cb83a57cbdea48d2046aa74d07bce05caa25f4c296df30b6 + languageName: node + linkType: hard + "proc-log@npm:^3.0.0": version: 3.0.0 resolution: "proc-log@npm:3.0.0" @@ -9176,7 +9226,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.2": +"regexp.prototype.flags@npm:^1.5.2": version: 1.5.2 resolution: "regexp.prototype.flags@npm:1.5.2" dependencies: @@ -9530,7 +9580,7 @@ __metadata: "@hookform/resolvers": ^3.3.1 "@mui/icons-material": ^5.14.3 "@mui/material": ^5.14.3 - "@rarimo/client": ^2.2.0 + "@rarimo/client": ^2.3.0 "@types/lodash-es": ^4 "@types/negotiator": ^0 "@types/node": 20.4.5 @@ -9547,7 +9597,9 @@ __metadata: graphql-tag: ^2.12.6 lodash-es: ^4.17.21 loglevel: ^1.8.1 + markdown-to-jsx: ^7.4.4 mitt: ^3.0.1 + mui-markdown: ^1.1.13 negotiator: ^0.6.3 next: ^13.5.5 next-international: ^0.9.3 @@ -9654,7 +9706,7 @@ __metadata: languageName: node linkType: hard -"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": +"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": version: 2.0.2 resolution: "set-function-name@npm:2.0.2" dependencies: @@ -9724,7 +9776,7 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.4": +"side-channel@npm:^1.0.4, side-channel@npm:^1.0.6": version: 1.0.6 resolution: "side-channel@npm:1.0.6" dependencies: @@ -9833,10 +9885,10 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.1, source-map-js@npm:^1.0.2, source-map-js@npm:^1.1.0": - version: 1.1.0 - resolution: "source-map-js@npm:1.1.0" - checksum: 6ef39381cdf5451c3db406e4b0fa95657be3c35db76fe6df3be430174b2e6af3c0b57d9728328dc62a211ae6209a0295d6a26442a55d5fccbf7cf1211fffa80e +"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.1, source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0": + version: 1.2.0 + resolution: "source-map-js@npm:1.2.0" + checksum: 791a43306d9223792e84293b00458bf102a8946e7188f3db0e4e22d8d530b5f80a4ce468eb5ec0bf585443ad55ebbd630bf379c98db0b1f317fd902500217f97 languageName: node linkType: hard @@ -10008,19 +10060,22 @@ __metadata: linkType: hard "string.prototype.matchall@npm:^4.0.10": - version: 4.0.10 - resolution: "string.prototype.matchall@npm:4.0.10" + version: 4.0.11 + resolution: "string.prototype.matchall@npm:4.0.11" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - get-intrinsic: ^1.2.1 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 + get-intrinsic: ^1.2.4 + gopd: ^1.0.1 has-symbols: ^1.0.3 - internal-slot: ^1.0.5 - regexp.prototype.flags: ^1.5.0 - set-function-name: ^2.0.0 - side-channel: ^1.0.4 - checksum: 3c78bdeff39360c8e435d7c4c6ea19f454aa7a63eda95fa6fadc3a5b984446a2f9f2c02d5c94171ce22268a573524263fbd0c8edbe3ce2e9890d7cc036cdc3ed + internal-slot: ^1.0.7 + regexp.prototype.flags: ^1.5.2 + set-function-name: ^2.0.2 + side-channel: ^1.0.6 + checksum: 6ac6566ed065c0c8489c91156078ca077db8ff64d683fda97ae652d00c52dfa5f39aaab0a710d8243031a857fd2c7c511e38b45524796764d25472d10d7075ae languageName: node linkType: hard @@ -10048,13 +10103,13 @@ __metadata: linkType: hard "string.prototype.trimstart@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimstart@npm:1.0.7" + version: 1.0.8 + resolution: "string.prototype.trimstart@npm:1.0.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: df1007a7f580a49d692375d996521dc14fd103acda7f3034b3c558a60b82beeed3a64fa91e494e164581793a8ab0ae2f59578a49896a7af6583c1f20472bce96 languageName: node linkType: hard @@ -10596,8 +10651,8 @@ __metadata: linkType: hard "tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.2.0 - resolution: "tar@npm:6.2.0" + version: 6.2.1 + resolution: "tar@npm:6.2.1" dependencies: chownr: ^2.0.0 fs-minipass: ^2.0.0 @@ -10605,7 +10660,7 @@ __metadata: minizlib: ^2.1.1 mkdirp: ^1.0.3 yallist: ^4.0.0 - checksum: db4d9fe74a2082c3a5016630092c54c8375ff3b280186938cfd104f2e089c4fd9bad58688ef6be9cf186a889671bf355c7cda38f09bbf60604b281715ca57f5c + checksum: f1322768c9741a25356c11373bce918483f40fa9a25c69c59410c8a1247632487edef5fe76c5f12ac51a6356d2f1829e96d2bc34098668a2fc34d76050ac2b6c languageName: node linkType: hard @@ -10838,8 +10893,8 @@ __metadata: linkType: hard "typed-array-length@npm:^1.0.5": - version: 1.0.5 - resolution: "typed-array-length@npm:1.0.5" + version: 1.0.6 + resolution: "typed-array-length@npm:1.0.6" dependencies: call-bind: ^1.0.7 for-each: ^0.3.3 @@ -10847,7 +10902,7 @@ __metadata: has-proto: ^1.0.3 is-typed-array: ^1.1.13 possible-typed-array-names: ^1.0.0 - checksum: 82f5b666155cff1b345a1f3ab018d3f7667990f525435e4c8448cc094ab0f8ea283bb7cbde4d7bc82ea0b9b1072523bf31e86620d72615951d7fa9ccb4f42dfa + checksum: f0315e5b8f0168c29d390ff410ad13e4d511c78e6006df4a104576844812ee447fcc32daab1f3a76c9ef4f64eff808e134528b5b2439de335586b392e9750e5c languageName: node linkType: hard