✨ Nouvelle page d'accueil - charte urssaf (#1851)
* 🎨 Ajoute un champs de recherche d'entreprise dans la page d'accueil Aucune intéractivité ajoutée pour l'instant 🔥 Déplace la recherche dans un nouveau composant 🎨 Ajoute une animation lors de la saisie de texte 🎨✨ Branche la recherche d'entreprise via l'api existante 🎨 Améliorations diverses ✨ ajoute la possibilité d'utiliser entrée lorsqu'il n'y a qu'un seul résultat Remplace les résultats sous forme de lien par des boutons 🐛 Fix le prérendu 💚 Fix TS & répare le composant 'Appear' Améliore le style sur mobile Ajoute une section simulateurs sur la landing Enlève l'animation lorsqu'on revient à la page d'accueil depuis une autre page Branche la selection d'entreprise avec la page 'gérer' Branche la selection d'entreprise avec la page 'gérer' Ajoute un raccourci vers l'entreprise selectionnée depuis la page d'accueil 👽 ajoute les traductions manquantes * Adapte la nouvelle page à la charte URSSAF * Répare la selection des resultats Simplifie le contenu de la landing * Met à jour les tests cypress avec le flow de recherche * Répare les erreurs de type * Réduit la taille du champ de recherche sur la landing * Met en avant la recherche entreprise * Améliore le test cypress de la recherche * Utilise une couleur moins forte pour le fond de la recherche * Remet en couleur claire par la landing * Utilise data-testid pour identifier les éléments de la recherche * Enlève un composant non utilisé Co-authored-by: Johan Girod <johan.girod@beta.gouv.fr> Co-authored-by: Alexandre Valsamou-Stanislawski <alexandre.valsamoustanislawski@beta.gouv.fr>pull/1867/head
parent
30b535f29d
commit
984b5de38b
|
@ -1,11 +1,16 @@
|
|||
# A remplir avec vos credentials
|
||||
ALGOLIA_APP_ID=
|
||||
ALGOLIA_ADMIN_KEY=
|
||||
ALGOLIA_SEARCH_KEY=
|
||||
ALGOLIA_INDEX_PREFIX=monentreprise-{env}-
|
||||
|
||||
# utiliser votre propre token
|
||||
GITHUB_API_SECRET=
|
||||
|
||||
# Voir https://github.com/betagouv/compta-mon-entreprise/issues/3
|
||||
DEEPL_API_SECRET=
|
||||
INSEE_SIRENE_API_SECRET=
|
||||
MATOMO_TOKEN=
|
||||
ATINTERNET_API_ACCESS_KEY=
|
||||
ATINTERNET_API_SECRET_KEY=
|
||||
DEEPL_API_SECRET=
|
||||
ZAMMAD_API_SECRET_KEY=
|
||||
GITHUB_API_SECRET=
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
describe('Landing test', function () {
|
||||
const fr = Cypress.env('language') === 'fr'
|
||||
it('should not crash', function () {
|
||||
cy.visit('/')
|
||||
})
|
||||
it('should display logo', function () {
|
||||
cy.visit('/')
|
||||
cy.get('[data-test-id="logo img"]').should('be.visible')
|
||||
})
|
||||
it('should display actionnable items', function () {
|
||||
cy.visit('/')
|
||||
cy.contains(fr ? 'Créer une entreprise' : 'Create a company')
|
||||
cy.contains(fr ? 'Gérer mon activité' : 'Manage my business')
|
||||
})
|
||||
})
|
|
@ -0,0 +1,38 @@
|
|||
const searchInputPath = '[data-testid=company-search-input]'
|
||||
const searchResultsPath = '[data-testid=company-search-results]'
|
||||
const currentCompanyPath = '[data-testid=currently-selected-company]'
|
||||
|
||||
describe('Landing page', function () {
|
||||
it('should not crash', function () {
|
||||
cy.visit('/')
|
||||
})
|
||||
|
||||
it('should display logo', function () {
|
||||
cy.visit('/')
|
||||
cy.get('[data-test-id="logo img"]').should('be.visible')
|
||||
})
|
||||
|
||||
it('should provide the company search flow', function () {
|
||||
cy.visit('/')
|
||||
|
||||
cy.get(currentCompanyPath).should('not.exist')
|
||||
|
||||
cy.get(searchInputPath).should('have.attr', 'placeholder')
|
||||
cy.get(searchInputPath).invoke('attr', 'type').should('equal', 'search')
|
||||
cy.get(searchInputPath).focus().type('noima')
|
||||
|
||||
cy.wait(100)
|
||||
|
||||
cy.get(searchResultsPath).children().should('have.length', 6)
|
||||
cy.get(searchResultsPath).children().first().click()
|
||||
|
||||
cy.url().should('include', '/g%C3%A9rer')
|
||||
|
||||
cy.go('back')
|
||||
|
||||
cy.get(currentCompanyPath).should('exist')
|
||||
cy.get(currentCompanyPath).click()
|
||||
|
||||
cy.url().should('include', '/g%C3%A9rer')
|
||||
})
|
||||
})
|
|
@ -12,10 +12,7 @@
|
|||
"engines": {
|
||||
"node": ">=12.16.1"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1% in FR",
|
||||
"not ie < 11"
|
||||
],
|
||||
"browserslist": ["> 1% in FR", "not ie < 11"],
|
||||
"scripts": {
|
||||
"prepare": "node scripts/prepare.js",
|
||||
"build": "yarn run build:prod && yarn run build:legacy",
|
||||
|
@ -85,13 +82,16 @@
|
|||
"react-router-dom": "^5.1.1",
|
||||
"react-router-hash-link": "^1.2.2",
|
||||
"react-signature-pad-wrapper": "^1.2.11",
|
||||
"react-spring": "=8.0.27",
|
||||
"react-spring": "^9.3.1",
|
||||
"react-syntax-highlighter": "^10.1.1",
|
||||
"react-use-measure": "^2.0.4",
|
||||
"react-useportal": "^1.0.13",
|
||||
"recharts": "^1.8.5",
|
||||
"reduce-reducers": "^1.0.4",
|
||||
"redux": "^4.0.4",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
"reselect": "^4.0.0",
|
||||
"styled-components": "^5.1.0",
|
||||
"styled-components": "^5.3.1",
|
||||
"swr": "^0.1.16",
|
||||
"whatwg-fetch": "^3.0.0",
|
||||
"yaml": "^1.9.2"
|
||||
|
|
|
@ -32,11 +32,30 @@ module.exports = {
|
|||
html: ['HTMLLexer'],
|
||||
|
||||
mjs: ['JavascriptLexer'],
|
||||
js: ['JavascriptLexer'], // if you're writing jsx inside .js files, change this to JsxLexer
|
||||
ts: ['JavascriptLexer'],
|
||||
jsx: ['JsxLexer'],
|
||||
tsx: ['JsxLexer'],
|
||||
|
||||
js: [
|
||||
{
|
||||
lexer: 'JavascriptLexer',
|
||||
functions: ['t'], // Array of functions to match
|
||||
},
|
||||
],
|
||||
ts: [
|
||||
{
|
||||
lexer: 'JavascriptLexer',
|
||||
functions: ['t'], // Array of functions to match
|
||||
},
|
||||
],
|
||||
tsx: [
|
||||
{
|
||||
lexer: 'JsxLexer',
|
||||
functions: ['t'], // Array of functions to match
|
||||
},
|
||||
],
|
||||
jsx: [
|
||||
{
|
||||
lexer: 'JsxLexer',
|
||||
functions: ['t'], // Array of functions to match
|
||||
},
|
||||
],
|
||||
default: ['JavascriptLexer'],
|
||||
},
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ async function searchFullText(
|
|||
text: string
|
||||
): Promise<Array<Etablissement> | null> {
|
||||
const response = await fetch(
|
||||
`https://entreprise.data.gouv.fr/api/sirene/v1/full_text/${text}?per_page=5`
|
||||
`https://entreprise.data.gouv.fr/api/sirene/v1/full_text/${text}?per_page=15`
|
||||
)
|
||||
if (!response.ok) {
|
||||
return null
|
||||
|
@ -63,8 +63,6 @@ async function searchFullText(
|
|||
denomination: l1_normalisee,
|
||||
siren,
|
||||
}))
|
||||
if (!etablissements.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
return etablissements
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import { H3 } from 'DesignSystem/typography/heading'
|
|||
import { SmallBody } from 'DesignSystem/typography/paragraphs'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import styled from 'styled-components'
|
||||
import { Etablissement, fetchCompanyDetails } from '../api/sirene'
|
||||
|
||||
type Company = {
|
||||
|
@ -35,16 +36,20 @@ export default function CompanyDetails({ siren, denomination }: Etablissement) {
|
|||
|
||||
if (company === null) {
|
||||
return (
|
||||
<p className="ui__ notice">
|
||||
<SmallBody>
|
||||
{siren}
|
||||
<Trans>est un SIREN non diffusable</Trans>
|
||||
</p>
|
||||
</SmallBody>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<H3>
|
||||
<CompanyContainer>
|
||||
<H3
|
||||
css={`
|
||||
margin-top: 0;
|
||||
`}
|
||||
>
|
||||
{denomination || company ? (
|
||||
<>
|
||||
{denomination ||
|
||||
|
@ -82,6 +87,10 @@ export default function CompanyDetails({ siren, denomination }: Etablissement) {
|
|||
<Skeleton width={100} />
|
||||
)}
|
||||
</SmallBody>
|
||||
</>
|
||||
</CompanyContainer>
|
||||
)
|
||||
}
|
||||
|
||||
const CompanyContainer = styled.div`
|
||||
text-align: left;
|
||||
`
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
import { Grid } from '@mui/material'
|
||||
import { useSearchFieldState } from '@react-stately/searchfield'
|
||||
import { Card } from 'DesignSystem/card'
|
||||
import { SearchField } from 'DesignSystem/field'
|
||||
import { Body, Intro } from 'DesignSystem/typography/paragraphs'
|
||||
import { ReactNode, useEffect, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import styled from 'styled-components'
|
||||
import { Etablissement, searchDenominationOrSiren } from '../api/sirene'
|
||||
import CompanyDetails from './CompanyDetails'
|
||||
import { FromTop } from './ui/animate'
|
||||
import { useDebounce } from './utils'
|
||||
|
||||
export function CompanySearchField(props: {
|
||||
label?: ReactNode
|
||||
onValue?: () => void
|
||||
onClear?: () => void
|
||||
onSubmit?: (établissement: Etablissement) => void
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const searchFieldProps = {
|
||||
...props,
|
||||
label: t('CompanySearchField.label', "Nom de l'entreprise, SIREN ou SIRET"),
|
||||
description: t(
|
||||
'CompanySearchField.description',
|
||||
'Le numéro Siret est un numéro de 14 chiffres unique pour chaque entreprise. Ex : 40123778000127'
|
||||
),
|
||||
onSubmit(value: string) {
|
||||
searchDenominationOrSiren(value).then((result) => {
|
||||
if (!result || result.length !== 1) {
|
||||
return
|
||||
}
|
||||
props.onSubmit?.(result[0])
|
||||
})
|
||||
},
|
||||
placeholder: t(
|
||||
'CompanySearchField.placeholder',
|
||||
'Café de la gare ou 40123778000127'
|
||||
),
|
||||
}
|
||||
|
||||
const state = useSearchFieldState(searchFieldProps)
|
||||
|
||||
const { onValue = () => {}, onClear = () => {} } = props
|
||||
useEffect(
|
||||
() => (!state.value ? onClear() : onValue()),
|
||||
[state.value, onValue, onClear]
|
||||
)
|
||||
|
||||
const [searchPending, results] = useSearchCompany(state.value)
|
||||
|
||||
return (
|
||||
<Grid container>
|
||||
<Grid item xs={12} lg={7}>
|
||||
<SearchField
|
||||
data-testid="company-search-input"
|
||||
state={state}
|
||||
isSearchStalled={searchPending}
|
||||
onClear={onClear}
|
||||
{...searchFieldProps}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
{state.value && !searchPending && (
|
||||
<Results results={results} onSubmit={props.onSubmit ?? (() => {})} />
|
||||
)}
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
function useSearchCompany(value: string): [boolean, Array<Etablissement>] {
|
||||
const [result, setResult] = useState<Array<Etablissement>>([])
|
||||
const [searchPending, setSearchPending] = useState(!!value)
|
||||
useEffect(() => {
|
||||
setSearchPending(!!value)
|
||||
if (!value) {
|
||||
setResult([])
|
||||
}
|
||||
}, [value, setResult, setSearchPending])
|
||||
|
||||
const debouncedValue = useDebounce(value, 300)
|
||||
useEffect(() => {
|
||||
if (!debouncedValue) {
|
||||
return
|
||||
}
|
||||
searchDenominationOrSiren(debouncedValue).then((établissements) => {
|
||||
setResult(établissements || [])
|
||||
setSearchPending(false)
|
||||
})
|
||||
}, [debouncedValue, setResult, setSearchPending])
|
||||
|
||||
return [searchPending && result.length <= 0, result.slice(0, 6)]
|
||||
}
|
||||
|
||||
function Results({
|
||||
results,
|
||||
onSubmit,
|
||||
}: {
|
||||
results: Array<Etablissement>
|
||||
onSubmit: (établissement: Etablissement) => void
|
||||
}) {
|
||||
return !results.length ? (
|
||||
<FromTop>
|
||||
<MessageContainer>
|
||||
<Intro>Aucune entreprise correspondante trouvée</Intro>
|
||||
<Body>
|
||||
Vous pouvez réessayer avec votre SIREN ou votre SIRET pour un meilleur
|
||||
résultat
|
||||
</Body>
|
||||
</MessageContainer>
|
||||
</FromTop>
|
||||
) : (
|
||||
<FromTop>
|
||||
<Grid container spacing={2} data-testid="company-search-results">
|
||||
{results.map((etablissement) => (
|
||||
<Grid key={etablissement.siren} item xs={12} lg={6}>
|
||||
<Card onPress={() => onSubmit(etablissement)} compact>
|
||||
<CompanyDetails {...etablissement} />
|
||||
</Card>
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
</FromTop>
|
||||
)
|
||||
}
|
||||
|
||||
const MessageContainer = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: ${({ theme }) => theme.colors.bases.primary[100]};
|
||||
margin-top: 0.4rem;
|
||||
padding: 0.6rem 1rem 0;
|
||||
border-radius: 0.3rem;
|
||||
|
||||
${Intro}, ${Body} {
|
||||
margin-top: 0;
|
||||
}
|
||||
`
|
|
@ -30,7 +30,7 @@ export default function PageHeader({
|
|||
lg={picture ? 8 : 12}
|
||||
css={`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: column !important;
|
||||
align-items: flex-start;
|
||||
`}
|
||||
>
|
||||
|
|
|
@ -3,14 +3,7 @@ import { updateSituation } from 'Actions/actions'
|
|||
import { SmallBody } from 'DesignSystem/typography/paragraphs'
|
||||
import { DottedName } from 'modele-social'
|
||||
import { formatValue, UNSAFE_isNotApplicable } from 'publicodes'
|
||||
import React, {
|
||||
createContext,
|
||||
useCallback,
|
||||
useContext,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react'
|
||||
import React, { useCallback, useState } from 'react'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import {
|
||||
firstStepCompletedSelector,
|
||||
|
@ -23,6 +16,7 @@ import RuleLink from './RuleLink'
|
|||
import { Appear } from './ui/animate'
|
||||
import AnimatedTargetValue from './ui/AnimatedTargetValue'
|
||||
import { useEngine } from './utils/EngineContext'
|
||||
import { useInitialRender, WatchInitialRender } from './utils/useInitialRender'
|
||||
|
||||
type SimulationGoalsProps = {
|
||||
className?: string
|
||||
|
@ -37,22 +31,16 @@ type SimulationGoalsProps = {
|
|||
toggles?: React.ReactNode
|
||||
}
|
||||
|
||||
const InitialRenderContext = createContext(true)
|
||||
|
||||
export function SimulationGoals({
|
||||
publique,
|
||||
legend,
|
||||
toggles,
|
||||
children,
|
||||
}: SimulationGoalsProps) {
|
||||
const [initialRender, setInitialRender] = useState(true)
|
||||
useEffect(() => {
|
||||
setInitialRender(false)
|
||||
}, [])
|
||||
const isFirstStepCompleted = useSelector(firstStepCompletedSelector)
|
||||
|
||||
return (
|
||||
<InitialRenderContext.Provider value={initialRender}>
|
||||
<WatchInitialRender>
|
||||
{toggles && <ToggleSection>{toggles}</ToggleSection>}
|
||||
<StyledSimulationGoals
|
||||
isFirstStepCompleted={isFirstStepCompleted}
|
||||
|
@ -67,7 +55,7 @@ export function SimulationGoals({
|
|||
{children}
|
||||
</ThemeProvider>
|
||||
</StyledSimulationGoals>
|
||||
</InitialRenderContext.Provider>
|
||||
</WatchInitialRender>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -97,15 +85,6 @@ const StyledSimulationGoals = styled.div<
|
|||
}};
|
||||
`
|
||||
|
||||
function useInitialRender() {
|
||||
const initialRender = useContext(InitialRenderContext)
|
||||
// We use meme to prevent renders after the first one. That's why we disable
|
||||
// the rule on the next line
|
||||
// eslint-disable-next-line
|
||||
const unChangedInitialRender = useMemo(() => initialRender, [])
|
||||
return unChangedInitialRender
|
||||
}
|
||||
|
||||
type SimulationGoalProps = {
|
||||
dottedName: DottedName
|
||||
label?: React.ReactNode
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { DisableAnimationContext } from 'Components/utils/DisableAnimationContext'
|
||||
import React, { Children, useContext, useEffect, useState } from 'react'
|
||||
import React, { useContext } from 'react'
|
||||
import {
|
||||
animated,
|
||||
config as configPresets,
|
||||
interpolate,
|
||||
Spring,
|
||||
SpringConfig,
|
||||
Trail,
|
||||
} from 'react-spring/renderprops'
|
||||
useSpring,
|
||||
useTrail,
|
||||
} from 'react-spring'
|
||||
import useMeasure from 'react-use-measure'
|
||||
import styled from 'styled-components'
|
||||
|
||||
type Props = {
|
||||
|
@ -18,107 +18,93 @@ type Props = {
|
|||
delay?: number
|
||||
}
|
||||
|
||||
// Todo : better animate with fromRight on desktop
|
||||
const AnimatedDiv = styled(animated.div)``
|
||||
|
||||
export function FromBottom({
|
||||
children,
|
||||
config = configPresets.stiff,
|
||||
style: inheritedStyle = {},
|
||||
delay = 0,
|
||||
}: Props) {
|
||||
const trail = useTrail(React.Children.count(children), {
|
||||
delay,
|
||||
config,
|
||||
from: { opacity: 0, y: 10 },
|
||||
to: { opacity: 1, y: 0 },
|
||||
})
|
||||
if (useContext(DisableAnimationContext)) {
|
||||
return <>{children}</>
|
||||
}
|
||||
const childrenArray = React.Children.toArray(children)
|
||||
return (
|
||||
<ContainerDiv>
|
||||
<Trail
|
||||
keys={React.Children.map(children, (_, i) => i) ?? []}
|
||||
native={true}
|
||||
delay={delay}
|
||||
config={config}
|
||||
from={{ opacity: 0, y: 10 }}
|
||||
to={{ opacity: 1, y: 0 }}
|
||||
items={children}
|
||||
>
|
||||
{(item) =>
|
||||
({ y, ...style }) =>
|
||||
(
|
||||
<animated.div
|
||||
style={{
|
||||
transform: interpolate([y], (y) =>
|
||||
y !== 0 ? `translate3d(0, ${y}px,0)` : 'none'
|
||||
),
|
||||
...style,
|
||||
...inheritedStyle,
|
||||
}}
|
||||
>
|
||||
{item}
|
||||
</animated.div>
|
||||
)}
|
||||
</Trail>
|
||||
</ContainerDiv>
|
||||
<>
|
||||
{trail.map((style, i) => (
|
||||
<AnimatedDiv
|
||||
// @ts-expect-error: bug when using babel-plugin-styled-components and react-spring
|
||||
key={i}
|
||||
style={{
|
||||
...inheritedStyle,
|
||||
...style,
|
||||
position: 'relative',
|
||||
}}
|
||||
>
|
||||
{childrenArray[i]}
|
||||
</AnimatedDiv>
|
||||
))}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export function FromTop({
|
||||
children,
|
||||
config = configPresets.stiff,
|
||||
style: inheritedStyle = {},
|
||||
delay = 0,
|
||||
}: Props) {
|
||||
const trail = useTrail(React.Children.count(children), {
|
||||
delay,
|
||||
config,
|
||||
from: { opacity: 0, y: -20 },
|
||||
to: { opacity: 1, y: 0 },
|
||||
})
|
||||
if (useContext(DisableAnimationContext)) {
|
||||
return <>{children}</>
|
||||
}
|
||||
const childrenArray = React.Children.toArray(children)
|
||||
return (
|
||||
<ContainerDiv>
|
||||
<Trail
|
||||
keys={React.Children.map(children, (_, i) => i) ?? []}
|
||||
native={true}
|
||||
delay={delay}
|
||||
config={config}
|
||||
from={{ opacity: 0, y: -20 }}
|
||||
to={{ opacity: 1, y: 0 }}
|
||||
items={children}
|
||||
>
|
||||
{(item, i) =>
|
||||
({ y, ...style }) =>
|
||||
(
|
||||
<animated.div
|
||||
style={{
|
||||
transform: interpolate([y], (y) =>
|
||||
y !== 0 ? `translate3d(0, ${y}px,0)` : 'none'
|
||||
),
|
||||
zIndex: Children.count(children) - i, // Hack for popover and stuffs
|
||||
position: 'relative',
|
||||
...style,
|
||||
...inheritedStyle,
|
||||
}}
|
||||
>
|
||||
{item}
|
||||
</animated.div>
|
||||
)}
|
||||
</Trail>
|
||||
</ContainerDiv>
|
||||
<>
|
||||
{trail.map((style, i) => (
|
||||
<AnimatedDiv
|
||||
key={i}
|
||||
style={{
|
||||
...inheritedStyle,
|
||||
...style,
|
||||
position: 'relative',
|
||||
}}
|
||||
>
|
||||
{childrenArray[i]}
|
||||
</AnimatedDiv>
|
||||
))}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export const FadeIn = ({
|
||||
children,
|
||||
config = configPresets.default,
|
||||
delay = 0,
|
||||
}: Props) =>
|
||||
useContext(DisableAnimationContext) ? (
|
||||
<>{children}</>
|
||||
) : (
|
||||
<Spring
|
||||
native={true}
|
||||
delay={delay}
|
||||
config={config}
|
||||
from={{ opacity: 0 }}
|
||||
to={{
|
||||
opacity: 1,
|
||||
}}
|
||||
>
|
||||
{(style) => <animated.div style={style}>{children}</animated.div>}
|
||||
</Spring>
|
||||
)
|
||||
}: Props) => {
|
||||
const style = useSpring({
|
||||
delay,
|
||||
config,
|
||||
from: { opacity: 0 },
|
||||
to: { opacity: 1 },
|
||||
})
|
||||
if (useContext(DisableAnimationContext)) {
|
||||
return <>{children}</>
|
||||
}
|
||||
return <animated.div style={style}>{children}</animated.div>
|
||||
}
|
||||
|
||||
export function Appear({
|
||||
children,
|
||||
|
@ -128,34 +114,31 @@ export function Appear({
|
|||
delay = 0,
|
||||
style,
|
||||
}: Props & { unless?: boolean }) {
|
||||
const [show, setShow] = useState(unless)
|
||||
useEffect(() => {
|
||||
window.setTimeout(() => setShow(true), 0)
|
||||
}, [])
|
||||
if (useContext(DisableAnimationContext)) {
|
||||
const [ref, { height }] = useMeasure()
|
||||
const animatedStyle = useSpring({
|
||||
delay,
|
||||
config,
|
||||
from: { opacity: 0, height: 0 },
|
||||
reset: false,
|
||||
to: { opacity: 1, height },
|
||||
})
|
||||
|
||||
if (useContext(DisableAnimationContext) || unless) {
|
||||
return <>{children}</>
|
||||
}
|
||||
|
||||
return (
|
||||
<Spring
|
||||
delay={delay}
|
||||
native
|
||||
config={config}
|
||||
to={{
|
||||
opacity: show ? 1 : 0,
|
||||
height: show ? 'auto' : '0px',
|
||||
<animated.div
|
||||
style={{
|
||||
...style,
|
||||
...animatedStyle,
|
||||
overflow: 'hidden',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
className={className}
|
||||
>
|
||||
{(animStyle) => (
|
||||
<animated.div style={{ ...style, ...animStyle }} className={className}>
|
||||
{children}
|
||||
</animated.div>
|
||||
)}
|
||||
</Spring>
|
||||
<div ref={ref}>{children}</div>
|
||||
</animated.div>
|
||||
)
|
||||
}
|
||||
|
||||
const ContainerDiv = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
`
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
import {
|
||||
createContext,
|
||||
ReactNode,
|
||||
useContext,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react'
|
||||
|
||||
const InitialRenderContext = createContext<boolean | null>(null)
|
||||
|
||||
export function WatchInitialRender(props: { children: ReactNode }) {
|
||||
const [initialRender, setInitialRender] = useState(true)
|
||||
useEffect(() => {
|
||||
setInitialRender(false)
|
||||
}, [])
|
||||
return (
|
||||
<InitialRenderContext.Provider value={initialRender}>
|
||||
{props.children}
|
||||
</InitialRenderContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
export function useInitialRender(): boolean {
|
||||
const initialRenderFromContext = useContext(InitialRenderContext)
|
||||
const unChangedInitialRender = useMemo(() => initialRenderFromContext, [])
|
||||
|
||||
const [initialRender, setInitialRender] = useState(true)
|
||||
useEffect(() => {
|
||||
setInitialRender(false)
|
||||
}, [])
|
||||
|
||||
if (unChangedInitialRender !== null) {
|
||||
return unChangedInitialRender
|
||||
}
|
||||
|
||||
return initialRender
|
||||
}
|
|
@ -12,7 +12,7 @@ import React, { ReactHTML, useRef } from 'react'
|
|||
import styled from 'styled-components'
|
||||
|
||||
export type GenericCardProps = {
|
||||
title: React.ReactNode
|
||||
title?: React.ReactNode
|
||||
children?: React.ReactNode
|
||||
icon?: React.ReactNode
|
||||
} & GenericButtonOrLinkProps
|
||||
|
@ -20,6 +20,7 @@ export type GenericCardProps = {
|
|||
type CardProps = GenericCardProps & {
|
||||
ctaLabel?: React.ReactNode
|
||||
children: React.ReactNode
|
||||
compact?: boolean
|
||||
}
|
||||
|
||||
export function Card({
|
||||
|
@ -27,6 +28,7 @@ export function Card({
|
|||
icon,
|
||||
children,
|
||||
ctaLabel,
|
||||
compact = false,
|
||||
...ariaButtonProps
|
||||
}: CardProps) {
|
||||
const ref = useRef<HTMLAnchorElement | HTMLButtonElement>(null)
|
||||
|
@ -36,13 +38,14 @@ export function Card({
|
|||
const buttonOrLinkProps = useButtonOrLink(ariaButtonProps, ref)
|
||||
|
||||
return (
|
||||
<CardContainer {...buttonOrLinkProps}>
|
||||
<CardContainer compact={compact} {...buttonOrLinkProps} tabIndex={0}>
|
||||
{icon && <IconContainer>{icon}</IconContainer>}
|
||||
<StyledHeader {...titleProps} />
|
||||
{title && <StyledHeader {...titleProps} />}
|
||||
<div
|
||||
css={`
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
`}
|
||||
>
|
||||
<Body>{children}</Body>
|
||||
|
@ -92,7 +95,7 @@ const IconContainer = styled.div`
|
|||
margin-top: ${({ theme }) => theme.spacings.md};
|
||||
`
|
||||
|
||||
export const CardContainer = styled.div`
|
||||
export const CardContainer = styled.div<{ compact?: boolean }>`
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -106,9 +109,11 @@ export const CardContainer = styled.div`
|
|||
&:hover {
|
||||
box-shadow: ${({ theme }) => theme.elevations[3]};
|
||||
}
|
||||
&:focus,
|
||||
&:focus-visible {
|
||||
${FocusStyle}
|
||||
}
|
||||
padding: ${({ theme }) => theme.spacings.lg};
|
||||
padding: ${({ theme, compact = false }) =>
|
||||
compact ? theme.spacings.sm : theme.spacings.lg};
|
||||
transition: box-shadow 0.15s;
|
||||
`
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import { useButton } from '@react-aria/button'
|
||||
import { useSearchField } from '@react-aria/searchfield'
|
||||
import { useSearchFieldState } from '@react-stately/searchfield'
|
||||
import {
|
||||
SearchFieldState,
|
||||
useSearchFieldState,
|
||||
} from '@react-stately/searchfield'
|
||||
import { AriaSearchFieldProps } from '@react-types/searchfield'
|
||||
import { Loader } from 'DesignSystem/icons/Loader'
|
||||
import { SearchIcon } from 'DesignSystem/icons/SearchIcon'
|
||||
|
@ -28,10 +31,21 @@ const SearchInputContainer = styled(StyledInputContainer)`
|
|||
padding-left: 0.5rem;
|
||||
`
|
||||
|
||||
const IconContainer = styled.div<{ hasLabel?: boolean }>`
|
||||
padding: calc(
|
||||
${({ hasLabel = false }) => (hasLabel ? '1rem' : '0rem')} + 0.5rem
|
||||
)
|
||||
0 0.5rem;
|
||||
`
|
||||
|
||||
export default function SearchField(
|
||||
props: AriaSearchFieldProps & { isSearchStalled: boolean }
|
||||
props: AriaSearchFieldProps & {
|
||||
state?: SearchFieldState
|
||||
isSearchStalled?: boolean
|
||||
}
|
||||
) {
|
||||
const state = useSearchFieldState(props)
|
||||
const innerState = useSearchFieldState(props)
|
||||
const state = props.state || innerState
|
||||
const ref = useRef<HTMLInputElement>(null)
|
||||
const buttonRef = useRef(null)
|
||||
const {
|
||||
|
@ -49,7 +63,9 @@ export default function SearchField(
|
|||
hasError={!!props.errorMessage || props.validationState === 'invalid'}
|
||||
hasLabel={!!props.label}
|
||||
>
|
||||
{props.isSearchStalled ? <Loader /> : <SearchIcon />}
|
||||
<IconContainer hasLabel={!!props.label}>
|
||||
{props.isSearchStalled ? <Loader /> : <SearchIcon />}
|
||||
</IconContainer>
|
||||
<SearchInput
|
||||
{...(props as InputHTMLAttributes<HTMLInputElement>)}
|
||||
{...inputProps}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,6 +16,12 @@ Autres outils: Autres outils
|
|||
Cette commune n'existe pas: Cette commune n'existe pas
|
||||
Chercher dans la documentation: Chercher dans la documentation
|
||||
Commencer: Commencer
|
||||
CompanySearchField:
|
||||
ariaClearLabel: Effacer la recherche
|
||||
description: "Le numéro Siret est un numéro de 14 chiffres unique pour chaque
|
||||
entreprise. Ex : 40123778000127"
|
||||
label: Nom de l'entreprise, SIREN ou SIRET
|
||||
placeholder: Café de la gare ou 40123778000127
|
||||
Continuer: Continuer
|
||||
Cotisations sociales: Cotisations sociales
|
||||
Crée le: Crée le
|
||||
|
@ -45,7 +51,6 @@ Liste des statuts juridiques: Liste des statuts juridiques
|
|||
Mes réponses: Mes réponses
|
||||
Modifier: Modifier
|
||||
Montant de l'impôt sur les sociétés: Montant de l'impôt sur les sociétés
|
||||
"Nom de l'entreprise ou SIREN ": "Nom de l'entreprise ou SIREN "
|
||||
Non: Non
|
||||
Oui: Oui
|
||||
Outils pour les développeurs: Outils pour les développeurs
|
||||
|
@ -68,6 +73,7 @@ Prévisualisation: Prévisualisation
|
|||
Que cherchez-vous ?: Que cherchez-vous ?
|
||||
Quelques intégrations: Quelques intégrations
|
||||
Rechercher: Rechercher
|
||||
Rechercher une entreprise: Rechercher une entreprise
|
||||
Ressources utiles: Ressources utiles
|
||||
Retour: Retour
|
||||
Retour à la création: Retour à la création
|
||||
|
@ -129,6 +135,7 @@ après:
|
|||
et maladies professionnelles à payer.</6><7>En cas de code APE erroné,
|
||||
vous pouvez <2>demander une modification</2> à l'INSEE.</7>
|
||||
titre: Le code APE
|
||||
entreprise: entreprise
|
||||
intro: "Une fois votre {{statutChoisi}} créée, vous recevez les informations
|
||||
suivantes :"
|
||||
kbis:
|
||||
|
@ -318,6 +325,7 @@ embauche:
|
|||
titre: S'inscrire à un bureau de médecine du travail
|
||||
page:
|
||||
description: Toutes les démarches nécessaires à l'embauche de votre premier salarié.
|
||||
titre: Les formalités pour embaucher
|
||||
pension:
|
||||
description: Trouver mon institution de prévoyance
|
||||
titre: Prendre contact avec l'institution de prévoyance complémentaire
|
||||
|
@ -613,6 +621,7 @@ landing:
|
|||
à vis de l’administration afin que vous puissiez vous concentrer sur ce qui
|
||||
compte : votre activité.</3>"
|
||||
choice:
|
||||
continue: Continuer avec l'entreprise
|
||||
create:
|
||||
body: Un accompagnement au choix du statut juridique et la liste complète des
|
||||
démarches de création
|
||||
|
@ -623,10 +632,15 @@ landing:
|
|||
title: Gérer mon activité
|
||||
simulators:
|
||||
body: La liste exhaustive de tous les simulateurs disponibles sur le site.
|
||||
title: Accéder aux simulateurs
|
||||
title: Découvrir tous les simulateurs et assistants
|
||||
outils: <0>Les outils à votre disposition</0><1>Nous mettons à votre disposition
|
||||
des assistants et simulateurs pour vous aider à la gestion de votre
|
||||
entreprise, anticiper les prélèvements et planifier votre trésorerie en
|
||||
conséquence.</1>
|
||||
outils_cta: <0></0> Découvrir tous les simulateurs et assistants
|
||||
subtitle: Les ressources nécessaires pour développer votre activité, du statut
|
||||
juridique à l'embauche.
|
||||
title: L'assistant officiel de l'entrepreneur
|
||||
title: L'assistant officiel des entrepreneurs
|
||||
legalNotice:
|
||||
contact:
|
||||
content: <0>contact@mon-entreprise.beta.gouv.fr</0>
|
||||
|
@ -653,6 +667,7 @@ nextSteps:
|
|||
cta: Voir la documentation
|
||||
title: Intégrer le module web
|
||||
noresults: Aucun résultat ne correspond à cette recherche
|
||||
ou: ou
|
||||
page:
|
||||
documentation:
|
||||
title: Documentation
|
||||
|
@ -1370,6 +1385,8 @@ simulation-end:
|
|||
text: Vous pouvez maintenant concrétiser votre projet d'embauche.
|
||||
text: Vous avez maintenant accès à l'estimation la plus précise possible.
|
||||
title: Vous avez complété cette simulation
|
||||
site:
|
||||
titleTemplate: "%s - Mon-entreprise"
|
||||
statut du dirigeant:
|
||||
description: <0>Ce choix est important car il détermine le régime de sécurité
|
||||
sociale et la couverture sociale du dirigeant. Le montant et les modalités
|
||||
|
|
|
@ -35,7 +35,8 @@ export default function AfterRegistration() {
|
|||
{{
|
||||
statutChoisi: isAutoentrepreneur
|
||||
? t('auto-entreprise')
|
||||
: statutChoisi || t(['après.entreprise', 'entreprise']),
|
||||
: statutChoisi ||
|
||||
t('après.entreprise', { defaultValue: 'entreprise' }),
|
||||
}}{' '}
|
||||
créée, vous recevez les informations suivantes :
|
||||
</Trans>
|
||||
|
|
|
@ -28,7 +28,9 @@ function Embaucher({ onChecklistInitialization, onItemCheck }: EmbaucherProps) {
|
|||
<TrackPage name="embaucher" />
|
||||
<Helmet>
|
||||
<title>
|
||||
{t(['embauche.tâches.page.titre', 'Les formalités pour embaucher'])}
|
||||
{t('embauche.tâches.page.titre', {
|
||||
defaultValue: 'Les formalités pour embaucher',
|
||||
})}
|
||||
</title>
|
||||
<meta
|
||||
name="description"
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
import CompanyDetails from 'Components/CompanyDetails'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import { Card } from 'DesignSystem/card'
|
||||
import { H3 } from 'DesignSystem/typography/heading'
|
||||
import { useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Company } from 'reducers/inFranceAppReducer'
|
||||
|
||||
type ContinueWithCompanyProps = {
|
||||
company: Company
|
||||
}
|
||||
|
||||
export const ContinueWithCompany = ({ company }: ContinueWithCompanyProps) => {
|
||||
const sitePaths = useContext(SitePathsContext)
|
||||
|
||||
return (
|
||||
<>
|
||||
<H3 as="h2">
|
||||
<Trans i18nKey="landing.choice.continue">
|
||||
Continuer avec l'entreprise
|
||||
</Trans>
|
||||
</H3>
|
||||
<Card
|
||||
compact
|
||||
to={sitePaths.gérer.index}
|
||||
data-testid="currently-selected-company"
|
||||
>
|
||||
<CompanyDetails {...company} />
|
||||
</Card>
|
||||
</>
|
||||
)
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
.landing-title {
|
||||
margin-bottom: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.landing-title__img {
|
||||
align-self: flex-end;
|
||||
margin-top: 2rem;
|
||||
max-width: 19.5rem;
|
||||
margin-left: 1.5rem;
|
||||
margin-bottom: -3.5rem;
|
||||
}
|
||||
@media (min-width: 500px) {
|
||||
.landing-title__logo {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.landing-title__img {
|
||||
margin: 0;
|
||||
margin-bottom: -3.5rem;
|
||||
}
|
||||
.landing-header__brand-logo {
|
||||
height: 4rem;
|
||||
}
|
||||
.landing-header__institutional-logo {
|
||||
height: 3.5rem;
|
||||
}
|
||||
.landing-header {
|
||||
justify-content: space-around;
|
||||
}
|
||||
.landing-header *:nth-child(3) {
|
||||
order: -1;
|
||||
}
|
||||
.landing-header *:nth-child(2) {
|
||||
display: none;
|
||||
}
|
||||
.landing-header__brand-logo {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
.landing-title {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
.landing-title__logo {
|
||||
display: none;
|
||||
}
|
||||
.landing-title__img {
|
||||
display: none;
|
||||
}
|
||||
}
|
|
@ -2,37 +2,40 @@ import { Grid } from '@mui/material'
|
|||
import Footer from 'Components/layout/Footer/Footer'
|
||||
import Header from 'Components/layout/Header'
|
||||
import PageHeader from 'Components/PageHeader'
|
||||
import Emoji from 'Components/utils/Emoji'
|
||||
import Meta from 'Components/utils/Meta'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import { Card } from 'DesignSystem/card/Card'
|
||||
import { Button } from 'DesignSystem/buttons'
|
||||
import { Container, Spacing } from 'DesignSystem/layout'
|
||||
import { H2 } from 'DesignSystem/typography/heading'
|
||||
import { Link } from 'DesignSystem/typography/link'
|
||||
import { Body, Intro } from 'DesignSystem/typography/paragraphs'
|
||||
import logoShare from 'Images/logo-share.png'
|
||||
import { useContext } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { RootState } from 'Reducers/rootReducer'
|
||||
import { TrackPage } from '../../ATInternetTracking'
|
||||
import { SimulateurCard } from '../Simulateurs/Home'
|
||||
import useSimulatorsData from '../Simulateurs/metadata'
|
||||
import { ContinueWithCompany } from './ContinueWithCompany'
|
||||
import illustrationSvg from './illustration.svg'
|
||||
import illustration2Svg from './illustration2.svg'
|
||||
import './Landing.css'
|
||||
import SearchOrCreate from './SearchOrCreate'
|
||||
|
||||
export default function Landing() {
|
||||
const { t } = useTranslation()
|
||||
const simulators = useSimulatorsData()
|
||||
const sitePaths = useContext(SitePathsContext)
|
||||
const statutChoisi = useSelector(
|
||||
(state: RootState) => state.inFranceApp.companyStatusChoice
|
||||
const company = useSelector(
|
||||
(state: RootState) => state.inFranceApp.existingCompany
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
<TrackPage chapter1="informations" name="accueil" />
|
||||
<Meta
|
||||
page="landing"
|
||||
title="Mon-entreprise"
|
||||
description="L'assistant officiel de l'entrepreneur"
|
||||
description="L'assistant officiel des entrepreneurs"
|
||||
ogImage={logoShare}
|
||||
/>
|
||||
<Header />
|
||||
|
@ -40,7 +43,7 @@ export default function Landing() {
|
|||
<PageHeader
|
||||
titre={
|
||||
<Trans i18nKey="landing.title">
|
||||
L'assistant officiel de l'entrepreneur
|
||||
L'assistant officiel des entrepreneurs
|
||||
</Trans>
|
||||
}
|
||||
picture={illustrationSvg}
|
||||
|
@ -53,54 +56,50 @@ export default function Landing() {
|
|||
</Intro>
|
||||
</PageHeader>
|
||||
</Container>
|
||||
<Container backgroundColor={(theme) => theme.colors.bases.primary[500]}>
|
||||
<Container backgroundColor={(theme) => theme.colors.bases.primary[100]}>
|
||||
{company && <ContinueWithCompany company={company} />}
|
||||
<SearchOrCreate />
|
||||
<Spacing xl />
|
||||
<Grid container spacing={4} alignItems="stretch">
|
||||
<Grid item lg={4} sm={6}>
|
||||
<Card
|
||||
icon={<Emoji emoji="💡" />}
|
||||
title={t('landing.choice.create.title', 'Créer une entreprise')}
|
||||
ctaLabel={statutChoisi ? t('Continuer') : t('Commencer')}
|
||||
to={
|
||||
statutChoisi
|
||||
? sitePaths.créer[statutChoisi]
|
||||
: sitePaths.créer.index
|
||||
}
|
||||
>
|
||||
<Trans i18nKey="landing.choice.create.body">
|
||||
Un accompagnement au choix du statut juridique et la liste
|
||||
complète des démarches de création
|
||||
</Trans>
|
||||
</Card>
|
||||
</Grid>
|
||||
<Grid item lg={4} sm={6}>
|
||||
<Card
|
||||
icon={<Emoji emoji="💶" />}
|
||||
title={t('landing.choice.manage.title', 'Gérer mon activité')}
|
||||
ctaLabel={t('Commencer')}
|
||||
to={sitePaths.gérer.index}
|
||||
>
|
||||
<Trans i18nKey="landing.choice.manage.body">
|
||||
Des outils personnalisés pour anticiper le montant des
|
||||
cotisations sociales à payer et mieux gérer votre trésorerie.
|
||||
</Trans>
|
||||
</Card>
|
||||
</Grid>
|
||||
<Grid item lg={4} sm={6}>
|
||||
<Card
|
||||
icon={<Emoji emoji="🧮" />}
|
||||
title={t(
|
||||
'landing.choice.simulators.title',
|
||||
'Accéder aux simulateurs'
|
||||
)}
|
||||
ctaLabel={t('Découvrir')}
|
||||
</Container>
|
||||
<Container>
|
||||
<Trans i18nKey="landing.outils">
|
||||
<H2>Les outils à votre disposition</H2>
|
||||
<Body>
|
||||
Nous mettons à votre disposition des assistants et simulateurs pour
|
||||
vous aider à la gestion de votre entreprise, anticiper les
|
||||
prélèvements et planifier votre trésorerie en conséquence.
|
||||
</Body>
|
||||
</Trans>
|
||||
|
||||
<Grid
|
||||
container
|
||||
spacing={4}
|
||||
alignItems="stretch"
|
||||
justifyContent="center"
|
||||
>
|
||||
<SimulateurCard {...simulators.salarié} />
|
||||
<SimulateurCard {...simulators['auto-entrepreneur']} />
|
||||
<SimulateurCard {...simulators['profession-libérale']} />
|
||||
|
||||
<Grid
|
||||
item
|
||||
xs={12}
|
||||
css={`
|
||||
display: flex;
|
||||
`}
|
||||
>
|
||||
<Button
|
||||
size="XL"
|
||||
to={sitePaths.simulateurs.index}
|
||||
css={`
|
||||
white-space: no-wrap;
|
||||
margin: auto;
|
||||
`}
|
||||
>
|
||||
<Trans i18nKey="landing.choice.simulators.body">
|
||||
La liste exhaustive de tous les simulateurs disponibles sur le
|
||||
site.
|
||||
<Trans i18nKey="landing.choice.simulators.title">
|
||||
Découvrir tous les simulateurs et assistants
|
||||
</Trans>
|
||||
</Card>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Spacing xl />
|
||||
|
@ -126,6 +125,7 @@ export default function Landing() {
|
|||
<Grid item md={10}>
|
||||
<Trans i18nKey="landing.aboutUs">
|
||||
<H2>Qui sommes-nous ?</H2>
|
||||
|
||||
<Body>
|
||||
Nous sommes une petite{' '}
|
||||
<Link href="https://beta.gouv.fr/startups/mon-entreprise.html#equipe">
|
||||
|
@ -140,6 +140,7 @@ export default function Landing() {
|
|||
</Link>
|
||||
.
|
||||
</Body>
|
||||
|
||||
<Body>
|
||||
Nous avons développé ce site pour accompagner les créateurs
|
||||
d’entreprise dans le développement de leur activité.
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
import { Grid } from '@mui/material'
|
||||
import { useSetEntreprise } from 'Actions/companyStatusActions'
|
||||
import { Etablissement } from 'api/sirene'
|
||||
import { CompanySearchField } from 'Components/CompanySearchField'
|
||||
import Emoji from 'Components/utils/Emoji'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import { Button } from 'DesignSystem/buttons'
|
||||
import { H3 } from 'DesignSystem/typography/heading'
|
||||
import { GenericButtonOrLinkProps } from 'DesignSystem/typography/link'
|
||||
import { useCallback, useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { useHistory } from 'react-router-dom'
|
||||
import { RootState } from 'Reducers/rootReducer'
|
||||
import styled from 'styled-components'
|
||||
|
||||
export default function SearchOrCreate() {
|
||||
const sitePaths = useContext(SitePathsContext)
|
||||
const statutChoisi = useSelector(
|
||||
(state: RootState) => state.inFranceApp.companyStatusChoice
|
||||
)
|
||||
const handleCompanySubmit = useHandleCompanySubmit()
|
||||
|
||||
return (
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<H3 as="h2">
|
||||
<Trans>Rechercher une entreprise</Trans>{' '}
|
||||
<span>
|
||||
ou{' '}
|
||||
<CreateCompanyButton
|
||||
size="XS"
|
||||
light
|
||||
to={
|
||||
statutChoisi
|
||||
? sitePaths.créer[statutChoisi]
|
||||
: sitePaths.créer.index
|
||||
}
|
||||
>
|
||||
<Trans i18nKey="landing.choice.create.title">
|
||||
Créer une entreprise
|
||||
</Trans>{' '}
|
||||
<Emoji emoji="💡" />
|
||||
</CreateCompanyButton>
|
||||
</span>
|
||||
</H3>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<CompanySearchField onSubmit={handleCompanySubmit} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
|
||||
const CreateCompanyButton = styled(Button)<GenericButtonOrLinkProps>`
|
||||
margin-left: 0.25rem;
|
||||
white-space: nowrap;
|
||||
margin-top: 0.5rem;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
`
|
||||
|
||||
function useHandleCompanySubmit() {
|
||||
const history = useHistory()
|
||||
const sitePaths = useContext(SitePathsContext)
|
||||
const setEntreprise = useSetEntreprise()
|
||||
const handleCompanySubmit = useCallback(
|
||||
(établissement: Etablissement) => {
|
||||
setEntreprise(établissement.siren)
|
||||
history.push(sitePaths.gérer.index)
|
||||
},
|
||||
[history, setEntreprise, sitePaths]
|
||||
)
|
||||
return handleCompanySubmit
|
||||
}
|
286
yarn.lock
286
yarn.lock
|
@ -164,6 +164,13 @@
|
|||
jsesc "^2.5.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/helper-annotate-as-pure@^7.0.0":
|
||||
version "7.10.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3"
|
||||
integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==
|
||||
dependencies:
|
||||
"@babel/types" "^7.10.4"
|
||||
|
||||
"@babel/helper-annotate-as-pure@^7.15.4", "@babel/helper-annotate-as-pure@^7.16.0":
|
||||
version "7.16.0"
|
||||
resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz"
|
||||
|
@ -1079,7 +1086,7 @@
|
|||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.16.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
|
||||
version "7.16.0"
|
||||
resolved "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz"
|
||||
integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==
|
||||
|
@ -1207,7 +1214,7 @@
|
|||
|
||||
"@formatjs/intl-localematcher@0.2.21":
|
||||
version "0.2.21"
|
||||
resolved "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.21.tgz"
|
||||
resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.2.21.tgz#39ef33d701fe8084f3d693cd3ff7cbe03cdd3a49"
|
||||
integrity sha512-JTJeLiNwexN4Gy0cMxoUPvJbKhXdnSuo5jPrDafEZpnDWlJ5VDYta8zUVVozO/pwzEmFVHEUpgiEDj+39L4oMg==
|
||||
dependencies:
|
||||
tslib "^2.1.0"
|
||||
|
@ -1945,6 +1952,91 @@
|
|||
dependencies:
|
||||
"@types/yoga-layout" "^1.9.3"
|
||||
|
||||
"@react-spring/animated@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/animated/-/animated-9.3.1.tgz#ffc4706121e8406efeaeacb407b42b5022943b46"
|
||||
integrity sha512-23YaERZ++BwZ8F8PxPFqrpOwp/JZun1Pj6aHZtPAU42j5LycBRasT9XMw7Eyr7zNFhT+rl3R3wFfd4WX6Ax+UA==
|
||||
dependencies:
|
||||
"@react-spring/shared" "~9.3.0"
|
||||
"@react-spring/types" "~9.3.0"
|
||||
|
||||
"@react-spring/core@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/core/-/core-9.3.1.tgz#b98e1dca1eb4871dec75fdab350327e8a5222865"
|
||||
integrity sha512-8rmfmEHLHGtF1CUiXRn64YJqsXNxv2cGX8oNnBnsuoE33c48Zc34t2VIMB4R9q5zwIUCvDBGfiEenA8ZAPxqOQ==
|
||||
dependencies:
|
||||
"@react-spring/animated" "~9.3.0"
|
||||
"@react-spring/shared" "~9.3.0"
|
||||
"@react-spring/types" "~9.3.0"
|
||||
|
||||
"@react-spring/konva@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/konva/-/konva-9.3.1.tgz#7a915c1c912a81dc27d1a1bc31eb47c0a2a0c643"
|
||||
integrity sha512-woG2DeDcUlz5hB8g9pA/tyUWU6dMrAzyUsNiBWVCyI9UqKA7CUKjz+ODOUi+hS++3Kz7kZSr3u0zzHHfxvoTPQ==
|
||||
dependencies:
|
||||
"@react-spring/animated" "~9.3.0"
|
||||
"@react-spring/core" "~9.3.0"
|
||||
"@react-spring/shared" "~9.3.0"
|
||||
"@react-spring/types" "~9.3.0"
|
||||
|
||||
"@react-spring/native@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/native/-/native-9.3.1.tgz#e1ac9d04d833b8d97e2d63630c4204f71915a29a"
|
||||
integrity sha512-NAC1wHIUvy1umCVQRxcS+31Dmr9NszBY06sHy3jR8/HVuKNtaDUARVF3AYL/HfbIy4m6yR3tcIkM2NQ0SO+rZA==
|
||||
dependencies:
|
||||
"@react-spring/animated" "~9.3.0"
|
||||
"@react-spring/core" "~9.3.0"
|
||||
"@react-spring/shared" "~9.3.0"
|
||||
"@react-spring/types" "~9.3.0"
|
||||
|
||||
"@react-spring/rafz@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/rafz/-/rafz-9.3.1.tgz#8dd6a598ffea487252b75d05d199e4aca5ea9d5e"
|
||||
integrity sha512-fEBMCarGVl+/2kdO+g6Zig4F+3ymwmcGN8S71gb1c7Cbbxb87kviPz8EhshfIHoiLeJPGlqwcuGbxNmZbBamvA==
|
||||
|
||||
"@react-spring/shared@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/shared/-/shared-9.3.1.tgz#e7f22a4b8f5fea4491fa6a24c108db5abd19ddba"
|
||||
integrity sha512-jhPpxzURGo6Nty90ex1lkxmZae7w/VAbnGmb/nXcYoZwSoNR+W2aAd00iXsh2ZGz6MgoJOsc495JeG3uC7Am8A==
|
||||
dependencies:
|
||||
"@react-spring/rafz" "~9.3.0"
|
||||
"@react-spring/types" "~9.3.0"
|
||||
|
||||
"@react-spring/three@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/three/-/three-9.3.1.tgz#91a50851639c5a88fed8f76b4e25ff388d2b24e7"
|
||||
integrity sha512-40iRIX2DrY+a81hIliOog6TMg/ZAtHGeZr95r0vKAsl+iX1g9Hs8XCS4wTeQIUgydZpbpShk/JL6mkcstEfBdw==
|
||||
dependencies:
|
||||
"@react-spring/animated" "~9.3.0"
|
||||
"@react-spring/core" "~9.3.0"
|
||||
"@react-spring/shared" "~9.3.0"
|
||||
"@react-spring/types" "~9.3.0"
|
||||
|
||||
"@react-spring/types@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/types/-/types-9.3.1.tgz#20f392ecad15a1ea6c0865ffe86ca5016c05a278"
|
||||
integrity sha512-W/YMJMX35XgGGzX0gKORBTwnvQ+1loDOFN3XlZkW5fgpEY+7VkRUpPyqPWXQr3n6lHrsLmHIGdpznqZi54ACTQ==
|
||||
|
||||
"@react-spring/web@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/web/-/web-9.3.1.tgz#5b377ba7ad52e746c2b59e2738c021de3f219d0b"
|
||||
integrity sha512-sisZIgFGva/Z+xKWPSfXpukF0AP3kR9ALTxlHL87fVotMUCJX5vtH/YlVcywToEFwTHKt3MpI5Wy2M+vgVEeaw==
|
||||
dependencies:
|
||||
"@react-spring/animated" "~9.3.0"
|
||||
"@react-spring/core" "~9.3.0"
|
||||
"@react-spring/shared" "~9.3.0"
|
||||
"@react-spring/types" "~9.3.0"
|
||||
|
||||
"@react-spring/zdog@~9.3.0":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-spring/zdog/-/zdog-9.3.1.tgz#70fccd80c35248217de6252c4c2ffca16b4cff2f"
|
||||
integrity sha512-QflA/fII9zWe9CSOA8QGSLMjUwyrtD1TX6YVzUSn/nlr2f7PlZPijdpdu9Cvdirgss472cUS7cRIUfll0TepqA==
|
||||
dependencies:
|
||||
"@react-spring/animated" "~9.3.0"
|
||||
"@react-spring/core" "~9.3.0"
|
||||
"@react-spring/shared" "~9.3.0"
|
||||
"@react-spring/types" "~9.3.0"
|
||||
|
||||
"@react-stately/checkbox@^3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.npmjs.org/@react-stately/checkbox/-/checkbox-3.0.3.tgz"
|
||||
|
@ -3827,12 +3919,12 @@ babel-plugin-polyfill-regenerator@^0.3.0:
|
|||
"@babel/helper-define-polyfill-provider" "^0.3.0"
|
||||
|
||||
"babel-plugin-styled-components@>= 1.12.0":
|
||||
version "2.0.2"
|
||||
resolved "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.2.tgz"
|
||||
integrity sha512-7eG5NE8rChnNTDxa6LQfynwgHTVOYYaHJbUYSlOhk8QBXIQiMBKq4gyfHBBKPrxUcVBXVJL61ihduCpCQbuNbw==
|
||||
version "1.13.2"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.13.2.tgz#ebe0e6deff51d7f93fceda1819e9b96aeb88278d"
|
||||
integrity sha512-Vb1R3d4g+MUfPQPVDMCGjm3cDocJEUTR7Xq7QS95JWWeksN1wdFRYpD2kulDgI3Huuaf1CZd+NK4KQmqUFh5dA==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.16.0"
|
||||
"@babel/helper-module-imports" "^7.16.0"
|
||||
"@babel/helper-annotate-as-pure" "^7.0.0"
|
||||
"@babel/helper-module-imports" "^7.0.0"
|
||||
babel-plugin-syntax-jsx "^6.18.0"
|
||||
lodash "^4.17.11"
|
||||
|
||||
|
@ -4733,6 +4825,15 @@ cli-truncate@^2.1.0:
|
|||
slice-ansi "^3.0.0"
|
||||
string-width "^4.2.0"
|
||||
|
||||
clipboard@^2.0.0:
|
||||
version "2.0.8"
|
||||
resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.8.tgz#ffc6c103dd2967a83005f3f61976aa4655a4cdba"
|
||||
integrity sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==
|
||||
dependencies:
|
||||
good-listener "^1.2.2"
|
||||
select "^1.1.2"
|
||||
tiny-emitter "^2.0.0"
|
||||
|
||||
clipboardy@1.2.3:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz"
|
||||
|
@ -4913,6 +5014,11 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
|
|||
dependencies:
|
||||
delayed-stream "~1.0.0"
|
||||
|
||||
comma-separated-tokens@^1.0.0:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea"
|
||||
integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==
|
||||
|
||||
commander@2.15.1:
|
||||
version "2.15.1"
|
||||
resolved "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz"
|
||||
|
@ -5549,6 +5655,11 @@ de-indent@^1.0.2:
|
|||
resolved "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz"
|
||||
integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=
|
||||
|
||||
debounce@^1.2.0:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5"
|
||||
integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==
|
||||
|
||||
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
|
||||
version "2.6.9"
|
||||
resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz"
|
||||
|
@ -5682,6 +5793,11 @@ delayed-stream@~1.0.0:
|
|||
resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
|
||||
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
|
||||
|
||||
delegate@^3.1.2:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166"
|
||||
integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==
|
||||
|
||||
delegates@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz"
|
||||
|
@ -6731,6 +6847,13 @@ fastq@^1.6.0:
|
|||
dependencies:
|
||||
reusify "^1.0.4"
|
||||
|
||||
fault@^1.0.2:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13"
|
||||
integrity sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==
|
||||
dependencies:
|
||||
format "^0.2.0"
|
||||
|
||||
fb-watchman@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz"
|
||||
|
@ -6951,6 +7074,11 @@ form-data@~2.3.2:
|
|||
combined-stream "^1.0.6"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
format@^0.2.0:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b"
|
||||
integrity sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs=
|
||||
|
||||
forwarded@0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz"
|
||||
|
@ -7363,6 +7491,13 @@ globby@^7.1.1:
|
|||
pify "^3.0.0"
|
||||
slash "^1.0.0"
|
||||
|
||||
good-listener@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50"
|
||||
integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=
|
||||
dependencies:
|
||||
delegate "^3.1.2"
|
||||
|
||||
graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4:
|
||||
version "4.2.8"
|
||||
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz"
|
||||
|
@ -7513,6 +7648,21 @@ hash.js@^1.0.0, hash.js@^1.0.3:
|
|||
inherits "^2.0.3"
|
||||
minimalistic-assert "^1.0.1"
|
||||
|
||||
hast-util-parse-selector@^2.0.0:
|
||||
version "2.2.5"
|
||||
resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a"
|
||||
integrity sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==
|
||||
|
||||
hastscript@^5.0.0:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.1.2.tgz#bde2c2e56d04c62dd24e8c5df288d050a355fb8a"
|
||||
integrity sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ==
|
||||
dependencies:
|
||||
comma-separated-tokens "^1.0.0"
|
||||
hast-util-parse-selector "^2.0.0"
|
||||
property-information "^5.0.0"
|
||||
space-separated-tokens "^1.0.0"
|
||||
|
||||
he@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.npmjs.org/he/-/he-1.1.1.tgz"
|
||||
|
@ -7538,6 +7688,11 @@ heimdalljs@^0.2.6:
|
|||
dependencies:
|
||||
rsvp "~3.2.1"
|
||||
|
||||
highlight.js@~9.13.0:
|
||||
version "9.13.1"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e"
|
||||
integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A==
|
||||
|
||||
history@^4.9.0:
|
||||
version "4.10.1"
|
||||
resolved "https://registry.npmjs.org/history/-/history-4.10.1.tgz"
|
||||
|
@ -9467,6 +9622,14 @@ lower-case@^1.1.1:
|
|||
resolved "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz"
|
||||
integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw=
|
||||
|
||||
lowlight@~1.11.0:
|
||||
version "1.11.0"
|
||||
resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.11.0.tgz#1304d83005126d4e8b1dc0f07981e9b689ec2efc"
|
||||
integrity sha512-xrGGN6XLL7MbTMdPD6NfWPwY43SNkjf/d0mecSx/CW36fUZTjRHEq0/Cdug3TWKtRXLWi7iMl1eP0olYxj/a4A==
|
||||
dependencies:
|
||||
fault "^1.0.2"
|
||||
highlight.js "~9.13.0"
|
||||
|
||||
lru-cache@^4.0.1, lru-cache@^4.1.1:
|
||||
version "4.1.5"
|
||||
resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz"
|
||||
|
@ -10521,7 +10684,7 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.5:
|
|||
pbkdf2 "^3.0.3"
|
||||
safe-buffer "^5.1.1"
|
||||
|
||||
parse-entities@^1.1.0:
|
||||
parse-entities@^1.1.0, parse-entities@^1.1.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz"
|
||||
integrity sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==
|
||||
|
@ -10620,7 +10783,7 @@ path-parse@^1.0.6:
|
|||
|
||||
path-posix@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/path-posix/-/path-posix-1.0.0.tgz"
|
||||
resolved "https://registry.yarnpkg.com/path-posix/-/path-posix-1.0.0.tgz#06b26113f56beab042545a23bfa88003ccac260f"
|
||||
integrity sha1-BrJhE/Vr6rBCVFojv6iAA8ysJg8=
|
||||
|
||||
path-to-regexp@0.1.7:
|
||||
|
@ -11150,6 +11313,18 @@ prettycli@^1.4.3:
|
|||
dependencies:
|
||||
chalk "2.1.0"
|
||||
|
||||
prismjs@^1.8.4:
|
||||
version "1.25.0"
|
||||
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.25.0.tgz#6f822df1bdad965734b310b315a23315cf999756"
|
||||
integrity sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg==
|
||||
|
||||
prismjs@~1.17.0:
|
||||
version "1.17.1"
|
||||
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.17.1.tgz#e669fcbd4cdd873c35102881c33b14d0d68519be"
|
||||
integrity sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==
|
||||
optionalDependencies:
|
||||
clipboard "^2.0.0"
|
||||
|
||||
private@~0.1.5:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.npmjs.org/private/-/private-0.1.8.tgz"
|
||||
|
@ -11202,7 +11377,7 @@ prop-types-exact@^1.2.0:
|
|||
object.assign "^4.1.0"
|
||||
reflect.ownkeys "^0.2.0"
|
||||
|
||||
prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
|
||||
prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
|
||||
version "15.7.2"
|
||||
resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz"
|
||||
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
|
||||
|
@ -11211,6 +11386,13 @@ prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1,
|
|||
object-assign "^4.1.1"
|
||||
react-is "^16.8.1"
|
||||
|
||||
property-information@^5.0.0:
|
||||
version "5.6.0"
|
||||
resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.6.0.tgz#61675545fb23002f245c6540ec46077d4da3ed69"
|
||||
integrity sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==
|
||||
dependencies:
|
||||
xtend "^4.0.0"
|
||||
|
||||
proxy-addr@~2.0.5:
|
||||
version "2.0.7"
|
||||
resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz"
|
||||
|
@ -11700,13 +11882,28 @@ react-smooth@^1.0.5:
|
|||
raf "^3.4.0"
|
||||
react-transition-group "^2.5.0"
|
||||
|
||||
react-spring@=8.0.27:
|
||||
version "8.0.27"
|
||||
resolved "https://registry.npmjs.org/react-spring/-/react-spring-8.0.27.tgz"
|
||||
integrity sha512-nDpWBe3ZVezukNRandTeLSPcwwTMjNVu1IDq9qA/AMiUqHuRN4BeSWvKr3eIxxg1vtiYiOLy4FqdfCP5IoP77g==
|
||||
react-spring@^9.3.1:
|
||||
version "9.3.2"
|
||||
resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-9.3.2.tgz#1456ef1ab1a3997c6c39693a9fd18cfd46c92930"
|
||||
integrity sha512-LMFgjvTJVg2ltthzgJcZ7siOdRig7L8wJZIHrc7p6ss4AaJ446xHzm9L2ZQha1ZC9QVY8/e6XfLhMTFAG6dtjw==
|
||||
dependencies:
|
||||
"@react-spring/core" "~9.3.0"
|
||||
"@react-spring/konva" "~9.3.0"
|
||||
"@react-spring/native" "~9.3.0"
|
||||
"@react-spring/three" "~9.3.0"
|
||||
"@react-spring/web" "~9.3.0"
|
||||
"@react-spring/zdog" "~9.3.0"
|
||||
|
||||
react-syntax-highlighter@^10.1.1:
|
||||
version "10.3.5"
|
||||
resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-10.3.5.tgz#3b3e2d1eba92fb7988c3b50d22d2c74ae0263fdd"
|
||||
integrity sha512-KR4YE7Q91bHEhvIxuvs/J3tJWfxTyBAAMS4fcMOR9h0C6SoCZIr1OUkVamHOqHMDEck4tdS9gp0D/vlAyPLftA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.3.1"
|
||||
prop-types "^15.5.8"
|
||||
highlight.js "~9.13.0"
|
||||
lowlight "~1.11.0"
|
||||
prismjs "^1.8.4"
|
||||
refractor "^2.4.1"
|
||||
|
||||
react-test-renderer@^16.0.0-0:
|
||||
version "16.14.0"
|
||||
|
@ -11748,6 +11945,20 @@ react-transition-group@^4.4.2:
|
|||
loose-envify "^1.4.0"
|
||||
prop-types "^15.6.2"
|
||||
|
||||
react-use-measure@^2.0.4:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/react-use-measure/-/react-use-measure-2.0.4.tgz#cb675b36eaeaf3681b94d5f5e08b2a1e081fedc9"
|
||||
integrity sha512-7K2HIGaPMl3Q9ZQiEVjen3tRXl4UDda8LiTPy/QxP8dP2rl5gPBhf7mMH6MVjjRNv3loU7sNzey/ycPNnHVTxQ==
|
||||
dependencies:
|
||||
debounce "^1.2.0"
|
||||
|
||||
react-useportal@^1.0.13:
|
||||
version "1.0.13"
|
||||
resolved "https://registry.yarnpkg.com/react-useportal/-/react-useportal-1.0.13.tgz#abfc29f8128756cd7382bff7c81a4f446b792199"
|
||||
integrity sha512-83KpNTXUIHnRVTLeMberIblCtssvRSKCPnG/xT9NW60gDYfU13pQBNQKCVUF8MBK+7LnCQ/ZrOuXl8Mp+iXdXA==
|
||||
dependencies:
|
||||
use-ssr "^1.0.19"
|
||||
|
||||
react@^17.0.0:
|
||||
version "17.0.1"
|
||||
resolved "https://registry.npmjs.org/react/-/react-17.0.1.tgz"
|
||||
|
@ -11868,6 +12079,15 @@ reflect.ownkeys@^0.2.0:
|
|||
resolved "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz"
|
||||
integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=
|
||||
|
||||
refractor@^2.4.1:
|
||||
version "2.10.1"
|
||||
resolved "https://registry.yarnpkg.com/refractor/-/refractor-2.10.1.tgz#166c32f114ed16fd96190ad21d5193d3afc7d34e"
|
||||
integrity sha512-Xh9o7hQiQlDbxo5/XkOX6H+x/q8rmlmZKr97Ie1Q8ZM32IRRd3B/UxuA/yXDW79DBSXGWxm2yRTbcTVmAciJRw==
|
||||
dependencies:
|
||||
hastscript "^5.0.0"
|
||||
parse-entities "^1.1.2"
|
||||
prismjs "~1.17.0"
|
||||
|
||||
regenerate-unicode-properties@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz"
|
||||
|
@ -12415,6 +12635,11 @@ schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1:
|
|||
ajv "^6.12.5"
|
||||
ajv-keywords "^3.5.2"
|
||||
|
||||
select@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
|
||||
integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=
|
||||
|
||||
semver@7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz"
|
||||
|
@ -12759,6 +12984,11 @@ sourcemap-codec@^1.4.4:
|
|||
resolved "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz"
|
||||
integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
|
||||
|
||||
space-separated-tokens@^1.0.0:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899"
|
||||
integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==
|
||||
|
||||
spawn-command@^0.0.2-1:
|
||||
version "0.0.2-1"
|
||||
resolved "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz"
|
||||
|
@ -13076,6 +13306,22 @@ styled-components@^5.1.0:
|
|||
shallowequal "^1.1.0"
|
||||
supports-color "^5.5.0"
|
||||
|
||||
styled-components@^5.3.1:
|
||||
version "5.3.1"
|
||||
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.3.1.tgz#8a86dcd31bff7049c2ed408bae36fa23f03f071a"
|
||||
integrity sha512-JThv2JRzyH0NOIURrk9iskdxMSAAtCfj/b2Sf1WJaCUsloQkblepy1jaCLX/bYE+mhYo3unmwVSI9I5d9ncSiQ==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.0.0"
|
||||
"@babel/traverse" "^7.4.5"
|
||||
"@emotion/is-prop-valid" "^0.8.8"
|
||||
"@emotion/stylis" "^0.8.4"
|
||||
"@emotion/unitless" "^0.7.4"
|
||||
babel-plugin-styled-components ">= 1.12.0"
|
||||
css-to-react-native "^3.0.0"
|
||||
hoist-non-react-statics "^3.0.0"
|
||||
shallowequal "^1.1.0"
|
||||
supports-color "^5.5.0"
|
||||
|
||||
supports-color@5.4.0:
|
||||
version "5.4.0"
|
||||
resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz"
|
||||
|
@ -13380,6 +13626,11 @@ timers-browserify@^2.0.4:
|
|||
dependencies:
|
||||
setimmediate "^1.0.4"
|
||||
|
||||
tiny-emitter@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423"
|
||||
integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==
|
||||
|
||||
tiny-inflate@^1.0.0, tiny-inflate@^1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz"
|
||||
|
@ -13904,6 +14155,11 @@ url@^0.11.0:
|
|||
punycode "1.3.2"
|
||||
querystring "0.2.0"
|
||||
|
||||
use-ssr@^1.0.19:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/use-ssr/-/use-ssr-1.0.24.tgz#213a3df58f5ab9268e6fe1a57ad0a9de91e514d1"
|
||||
integrity sha512-0MFps7ezL57/3o0yl4CvrHLlp9z20n1rQZV/lSRz7if+TUoM6POU1XdOvEjIgjgKeIhTEye1U0khrIYWCTWw4g==
|
||||
|
||||
use@^3.1.0:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.npmjs.org/use/-/use-3.1.1.tgz"
|
||||
|
|
Loading…
Reference in New Issue