diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 9f3964131..7fb8b2489 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -199,7 +199,7 @@ jobs: - mon-entreprise : ${{ needs.deploy-context.outputs.fr_url }} - mycompanyinfrance : ${{ needs.deploy-context.outputs.en_url }} - - storybook : ${{ needs.deploy-context.outputs.fr_url }}/dev/storybook/ or ${{ needs.deploy-context.outputs.en_url }}/dev/storybook/ + - storybook : ${{ needs.deploy-context.outputs.fr_url }}/dev/storybook/ ([version EN](${{ needs.deploy-context.outputs.en_url }}/dev/storybook/)) e2e-test-preview: env: diff --git a/site/netlify.toml b/site/netlify.toml index 25d03de10..90b19ed88 100644 --- a/site/netlify.toml +++ b/site/netlify.toml @@ -1,7 +1,7 @@ [[headers]] for = "/*" [headers.values] -Content-Security-Policy = "default-src 'self' mon-entreprise.fr; style-src 'self' 'unsafe-inline' mon-entreprise.zammad.com; connect-src 'self' *.sentry.io raw.githubusercontent.com *.xiti.com mon-entreprise.zammad.com api.recherche-entreprises.fabrique.social.gouv.fr geo.api.gouv.fr *.algolianet.com; form-action 'self' *.sibforms.com *.sentry.io mon-entreprise.zammad.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.xiti.com stonly.com code.jquery.com mon-entreprise.zammad.com polyfill.io; img-src 'self' data: *.xiti.com user-images.githubusercontent.com; frame-src 'self' https://www.youtube-nocookie.com https://codesandbox.io" +Content-Security-Policy = "default-src 'self' mon-entreprise.fr; style-src 'self' 'unsafe-inline' mon-entreprise.zammad.com; connect-src 'self' *.sentry.io raw.githubusercontent.com *.xiti.com mon-entreprise.zammad.com api.recherche-entreprises.fabrique.social.gouv.fr geo.api.gouv.fr *.algolianet.com; form-action 'self' *.sibforms.com *.sentry.io mon-entreprise.zammad.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.xiti.com stonly.com code.jquery.com mon-entreprise.zammad.com polyfill.io; img-src 'self' data: *.xiti.com user-images.githubusercontent.com; frame-src 'self' https://www.youtube-nocookie.com https://codesandbox.io https://place-des-entreprises.beta.gouv.fr https://reso-staging.osc-fr1.scalingo.io" ## Twemoji proxy for client privacy #1219 [[redirects]] diff --git a/site/package.json b/site/package.json index 099280026..9ff268893 100644 --- a/site/package.json +++ b/site/package.json @@ -54,12 +54,12 @@ "@internationalized/number": "^3.0.3", "@mui/material": "^5.0.4", "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest", - "@react-aria/button": "^3.3.4", + "@react-aria/button": "^3.4.1", "@react-aria/checkbox": "^3.2.3", - "@react-aria/dialog": "^3.1.4", + "@react-aria/dialog": "^3.1.6", "@react-aria/i18n": "^3.3.2", "@react-aria/numberfield": "^3.1.0", - "@react-aria/overlays": "^3.7.2", + "@react-aria/overlays": "^3.7.5", "@react-aria/progress": "^3.1.3", "@react-aria/radio": "^3.1.5", "@react-aria/searchfield": "^3.2.0", @@ -75,6 +75,7 @@ "@sentry/tracing": "^6.18.1", "algoliasearch": "^4.10.2", "fuse.js": "^6.4.6", + "iframe-resizer": "^4.3.2", "markdown-to-jsx": "^7.1.5", "modele-social": "^0.6.0", "publicodes": "^1.0.0-beta.32", @@ -111,7 +112,6 @@ "@storybook/addon-links": "^6.5.0-alpha.40", "@storybook/react": "^6.5.0-alpha.40", "@storybook/testing-library": "^0.0.9", - "@types/iframe-resizer": "^3.5.7", "@types/ramda": "^0.26.43", "@types/react": "^17.0.0", "@types/react-color": "^3.0.1", diff --git a/site/source/components/CompanyDetails.tsx b/site/source/components/CompanyDetails.tsx index 222c40f4e..24c90c15f 100644 --- a/site/source/components/CompanyDetails.tsx +++ b/site/source/components/CompanyDetails.tsx @@ -56,7 +56,7 @@ export default function CompanyDetails({ {' '} - + {dateCreationUniteLegale && (
Crée le{' '} diff --git a/site/source/components/Distribution.css b/site/source/components/Distribution.css index 12791fd2e..04e5b9fa9 100644 --- a/site/source/components/Distribution.css +++ b/site/source/components/Distribution.css @@ -32,10 +32,6 @@ flex: 1; } -.distribution-chart__counterparts { - width: 35em; -} - @media not print { @media (max-width: 600px) { .distribution-chart__legend { diff --git a/site/source/components/Feedback/index.tsx b/site/source/components/Feedback/index.tsx index 08739f7d1..bf06f382a 100644 --- a/site/source/components/Feedback/index.tsx +++ b/site/source/components/Feedback/index.tsx @@ -160,6 +160,7 @@ export default function PageFeedback({ customMessage }: PageFeedbackProps) { title="Votre avis nous interesse" isDismissable onClose={() => setState({ showThanks: true, showForm: false })} + small >
diff --git a/site/source/components/LegalNotice.tsx b/site/source/components/LegalNotice.tsx index 2ac4a4f2e..3def200a2 100644 --- a/site/source/components/LegalNotice.tsx +++ b/site/source/components/LegalNotice.tsx @@ -14,6 +14,7 @@ export default function LegalNotice() { )} title={t('legalNotice.title', 'Mentions légales')} + small >

Editeur diff --git a/site/source/components/PlaceDesEntreprises.tsx b/site/source/components/PlaceDesEntreprises.tsx new file mode 100644 index 000000000..a63258c27 --- /dev/null +++ b/site/source/components/PlaceDesEntreprises.tsx @@ -0,0 +1,126 @@ +import { lazy, ReactEventHandler, Suspense, useEffect, useRef } from 'react' +import styled from 'styled-components' +import Emoji from './utils/Emoji' +import { iframeResize } from 'iframe-resizer' +import { PopoverWithTrigger } from '@/design-system' +import { Button } from '@/design-system/buttons' +import { Loader } from '@/design-system/icons/Loader' +import { Body } from '@/design-system/typography/paragraphs' +import { Trans, useTranslation } from 'react-i18next' +import { isProduction } from '@/utils' + +const Iframe = styled.iframe` + width: 1px; + min-width: 100%; + height: 80vh; +` + +const IframeContainer = styled.div` + margin: 0 -3rem; +` + +export const PlacesDesEntreprisesIframe = ({ + src, + onLoad, +}: { + src: string + onLoad?: ReactEventHandler +}) => { + useEffect(() => { + iframeResize({}, '#pdeIframe') + }, []) + + return ( + +