⬆ MAJ React vers v17
Pas de changement de fonctionnalités Plus besoin d'importer React pour utiliser JSXpull/1189/head
parent
5f28ea5597
commit
27db026892
44
.eslintrc.js
44
.eslintrc.js
|
@ -16,8 +16,8 @@ module.exports = {
|
|||
},
|
||||
plugins: [
|
||||
"react",
|
||||
"react-hooks",
|
||||
"mocha"
|
||||
"react-hooks",
|
||||
"mocha"
|
||||
],
|
||||
rules: {
|
||||
"quotes": [
|
||||
|
@ -39,9 +39,11 @@ module.exports = {
|
|||
"react/no-unescaped-entities": 0,
|
||||
"react/display-name": 1,
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
"mocha/no-skipped-tests": "warn",
|
||||
"mocha/no-exclusive-tests": "error"
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
"react/jsx-uses-react": "off",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"mocha/no-skipped-tests": "warn",
|
||||
"mocha/no-exclusive-tests": "error"
|
||||
},
|
||||
settings: {
|
||||
"react": {
|
||||
|
@ -71,21 +73,21 @@ module.exports = {
|
|||
"@typescript-eslint/explicit-function-return-type": 0,
|
||||
'@typescript-eslint/prefer-string-starts-ends-with': 1,
|
||||
'@typescript-eslint/no-unnecessary-type-assertion': 1, // has false positives (Object.values result) v 2.29.0
|
||||
'@typescript-eslint/no-inferrable-types': 1, // causes problems with unknown values v 2.29.0 typescript v 3.8.3
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
// TODO - enable these new recommended rules, a first step would be to switch from "off" to "warn"
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-floating-promises': 'off',
|
||||
'@typescript-eslint/no-extra-semi': 'off',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||
'@typescript-eslint/no-unsafe-call': 'off',
|
||||
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||
'@typescript-eslint/no-unsafe-return': 'off',
|
||||
'@typescript-eslint/restrict-plus-operands': 'off',
|
||||
'@typescript-eslint/restrict-template-expressions': 'off',
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
'@typescript-eslint/prefer-regexp-exec': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-inferrable-types': 1, // causes problems with unknown values v 2.29.0 typescript v 3.8.3
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
// TODO - enable these new recommended rules, a first step would be to switch from "off" to "warn"
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-floating-promises': 'off',
|
||||
'@typescript-eslint/no-extra-semi': 'off',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||
'@typescript-eslint/no-unsafe-call': 'off',
|
||||
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||
'@typescript-eslint/no-unsafe-return': 'off',
|
||||
'@typescript-eslint/restrict-plus-operands': 'off',
|
||||
'@typescript-eslint/restrict-template-expressions': 'off',
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
'@typescript-eslint/prefer-regexp-exec': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
extends: [
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
|
@ -93,7 +95,7 @@ module.exports = {
|
|||
]
|
||||
},
|
||||
{
|
||||
files: ["**/*.test.js"],
|
||||
files: ["**/*.test.js"],
|
||||
env: {
|
||||
mocha: true
|
||||
}
|
||||
|
|
|
@ -8,7 +8,12 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"@babel/preset-react",
|
||||
[
|
||||
"@babel/preset-react",
|
||||
{
|
||||
"runtime": "automatic"
|
||||
}
|
||||
],
|
||||
"@babel/preset-typescript"
|
||||
],
|
||||
"plugins": [
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
"nearley": "^2.19.0",
|
||||
"publicodes": "^1.0.0-beta.4",
|
||||
"ramda": "^0.27.0",
|
||||
"react": "^16.13.1",
|
||||
"react": "^17.0.0",
|
||||
"react-color": "^2.14.0",
|
||||
"react-dom": "npm:@hot-loader/react-dom",
|
||||
"react-easy-emoji": "^1.2.0",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useMemo, useState } from 'react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import Skeleton from 'Components/ui/Skeleton'
|
||||
import { Etablissement, fetchCompanyDetails } from '../api/sirene'
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { expect } from 'chai'
|
||||
import { mount, shallow } from 'enzyme'
|
||||
import React from 'react'
|
||||
import { match, spy, useFakeTimers } from 'sinon'
|
||||
import CurrencyInput from './CurrencyInput'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { EngineContext } from 'Components/utils/EngineContext'
|
||||
import { max } from 'ramda'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { DottedName } from 'Rules'
|
||||
import { targetUnitSelector } from 'Selectors/simulationSelectors'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
// Envie de donner un coup de pouce ? Répondez à notre sondage sur le simulateur.
|
||||
export default function LinkToForm() {
|
||||
const hostname = new URL(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { setEntreprise } from 'Actions/existingCompanyActions'
|
||||
import CompanyDetails from 'Components/CompanyDetails'
|
||||
import React, { useCallback, useMemo, useState } from 'react'
|
||||
import { useCallback, useMemo, useState } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { Etablissement, searchDenominationOrSiren } from '../api/sirene'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Overlay from 'Components/Overlay'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
|
||||
export const LegalNoticeContent = () => (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { usePersistingState } from 'Components/utils/persistState'
|
||||
import { TrackerContext } from 'Components/utils/withTracker'
|
||||
import React, { useContext, useRef, useState } from 'react'
|
||||
import { useContext, useRef, useState } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import * as animate from 'Components/ui/animate'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { hideNotification } from 'Actions/actions'
|
||||
import animate from 'Components/ui/animate'
|
||||
import { useInversionFail, EngineContext } from 'Components/utils/EngineContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
|
|
@ -2,7 +2,7 @@ import Value from 'Components/EngineValue'
|
|||
import RuleLink from 'Components/RuleLink'
|
||||
import { EngineContext, useEvaluation } from 'Components/utils/EngineContext'
|
||||
import { formatValue, ParsedRule, ParsedRules } from 'publicodes'
|
||||
import React, { Fragment, useContext } from 'react'
|
||||
import { Fragment, useContext } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { DottedName } from 'Rules'
|
||||
import './PaySlip.css'
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import Value, { Condition, ValueProps } from 'Components/EngineValue'
|
||||
import RuleLink from 'Components/RuleLink'
|
||||
import { EngineContext } from 'Components/utils/EngineContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { DottedName } from 'Rules'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { formatValue } from 'publicodes'
|
||||
import React, { useCallback, useState } from 'react'
|
||||
import { useCallback, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { debounce as debounceFn } from '../utils'
|
||||
import './PercentageField.css'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { updateUnit } from 'Actions/actions'
|
||||
import React from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { targetUnitSelector } from 'Selectors/simulationSelectors'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { loadPreviousSimulation } from 'Actions/actions'
|
||||
import React from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { RootState } from 'Reducers/rootReducer'
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { goToQuestion } from 'Actions/actions'
|
||||
import { contains, filter, pipe, reject, toPairs } from 'ramda'
|
||||
import React from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { RootState } from 'Reducers/rootReducer'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import image from 'Images/map-directions.png'
|
||||
import React from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import SearchBar from 'Components/SearchBar'
|
||||
import React from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import './RulesList.css'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans } from 'react-i18next'
|
||||
import Overlay from './Overlay'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import Warning from 'Components/ui/WarningBlock'
|
||||
import React from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { SitePaths } from './utils/SitePathsContext'
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { PrismLight } from 'react-syntax-highlighter'
|
||||
import js from 'react-syntax-highlighter/dist/esm/languages/prism/javascript'
|
||||
import jsx from 'react-syntax-highlighter/dist/esm/languages/prism/jsx'
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import { EvaluatedRule, formatValue } from 'publicodes'
|
||||
import { isNil } from 'ramda'
|
||||
import React, { useCallback, useContext } from 'react'
|
||||
import { Fragment, useCallback, useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
@ -42,7 +42,7 @@ export default function TargetSelection({ showPeriodSwitch = true }) {
|
|||
nom?: string
|
||||
objectifs: Array<DottedName>
|
||||
}>).map(({ icône, objectifs: targets, nom }, index: number) => (
|
||||
<React.Fragment key={nom || '0'}>
|
||||
<Fragment key={nom || '0'}>
|
||||
<div style={{ display: 'flex', alignItems: 'end' }}>
|
||||
<div style={{ flex: 1 }}>
|
||||
{nom && (
|
||||
|
@ -72,7 +72,7 @@ export default function TargetSelection({ showPeriodSwitch = true }) {
|
|||
))}
|
||||
</ul>
|
||||
</section>
|
||||
</React.Fragment>
|
||||
</Fragment>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
|
||||
let createQueryParams = params =>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { explainVariable } from 'Actions/actions'
|
||||
import Overlay from 'Components/Overlay'
|
||||
import { Markdown } from 'Components/utils/markdown'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { RootState } from 'Reducers/rootReducer'
|
||||
import './Aide.css'
|
||||
|
|
|
@ -3,7 +3,6 @@ import Overlay from 'Components/Overlay'
|
|||
import { useEvaluation } from 'Components/utils/EngineContext'
|
||||
import { useNextQuestions } from 'Components/utils/useNextQuestion'
|
||||
import { formatValue } from 'publicodes'
|
||||
import React from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { RuleInputProps } from 'Components/conversation/RuleInput'
|
||||
import { Rule } from 'publicodes'
|
||||
import React, { useCallback, useMemo } from 'react'
|
||||
import { useCallback, useMemo } from 'react'
|
||||
import styled from 'styled-components'
|
||||
import InputSuggestions from './InputSuggestions'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { formatValue } from 'publicodes'
|
||||
import React, { useCallback, useState } from 'react'
|
||||
import { useCallback, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import NumberFormat from 'react-number-format'
|
||||
import { currencyFormat, debounce } from '../../utils'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { serializeValue } from 'publicodes'
|
||||
import { toPairs } from 'ramda'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Unit } from 'publicodes'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useCallback } from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import { debounce } from '../../utils'
|
||||
|
||||
export default function ParagrapheInput({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import classnames from 'classnames'
|
||||
import { Markdown } from 'Components/utils/markdown'
|
||||
import { is } from 'ramda'
|
||||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Explicable } from './Explicable'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import Answers from './AnswerList'
|
||||
import './conversation.css'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ThemeColorsContext } from 'Components/utils/colors'
|
||||
import React, { useCallback, useContext } from 'react'
|
||||
import { useCallback, useContext } from 'react'
|
||||
import { debounce } from '../../utils'
|
||||
|
||||
export default function TextInput({
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
const STATES = [
|
||||
'Allemagne',
|
||||
'Autriche',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import Worker from 'worker-loader!./SelectTauxRisque.worker.js'
|
||||
const worker = new Worker()
|
||||
|
|
|
@ -8,7 +8,7 @@ import assuranceMaladieSrc from 'Images/assurance-maladie.svg'
|
|||
import * as logosSrc from 'Images/logos-cnavpl'
|
||||
import urssafSrc from 'Images/urssaf.svg'
|
||||
import { max } from 'ramda'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { DottedName } from 'Rules'
|
||||
|
|
|
@ -3,7 +3,7 @@ import PaySlip from 'Components/PaySlip'
|
|||
import StackedBarChart from 'Components/StackedBarChart'
|
||||
import { ThemeColorsContext } from 'Components/utils/colors'
|
||||
import { useEvaluation, useInversionFail } from 'Components/utils/EngineContext'
|
||||
import React, { useContext, useRef } from 'react'
|
||||
import { useContext, useRef } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { keyframes } from 'styled-components'
|
||||
|
||||
type SkeletonProps = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ThemeColorsContext } from 'Components/utils/colors'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
|
||||
export const icons = {
|
||||
facebook: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { usePersistingState } from 'Components/utils/persistState'
|
||||
import React, { ReactNode } from 'react'
|
||||
import { ReactNode } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans } from 'react-i18next'
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { useLocation } from 'react-router'
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import 'iframe-resizer'
|
||||
import Engine from 'publicodes'
|
||||
import React, { useContext, useMemo } from 'react'
|
||||
import { useContext, useMemo } from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import 'core-js/stable'
|
||||
import { hot } from 'react-hot-loader/root'
|
||||
import { translateRules } from 'publicodes'
|
||||
import React from 'react'
|
||||
import { render } from 'react-dom'
|
||||
import 'regenerator-runtime/runtime'
|
||||
import rules from 'Rules'
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { hot } from 'react-hot-loader/root'
|
||||
import 'core-js/stable'
|
||||
import 'react-hot-loader'
|
||||
import React from 'react'
|
||||
import { render } from 'react-dom'
|
||||
import 'regenerator-runtime/runtime'
|
||||
import rules from 'Rules'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import ContactImage from 'Images/contact.png'
|
||||
import React from 'react'
|
||||
const Contact = () => (
|
||||
<div className="centeredMessage">
|
||||
<p>
|
||||
|
|
|
@ -3,7 +3,7 @@ import LegalNotice from 'Components/LegalNotice'
|
|||
import NewsletterRegister from 'Components/NewsletterRegister'
|
||||
import SocialIcon from 'Components/ui/SocialIcon'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans } from 'react-i18next'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Overlay from 'Components/Overlay'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
export default function Privacy({ label }: { label?: string }) {
|
||||
|
|
|
@ -3,7 +3,7 @@ import logoEnSvg from 'Images/logo-mycompany.svg'
|
|||
import logoSvg from 'Images/logo.svg'
|
||||
import marianneSvg from 'Images/marianne.svg'
|
||||
import urssafSvg from 'Images/urssaf.svg'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Link } from 'react-router-dom'
|
||||
import NewsBanner from './NewsBanner'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useLocalStorage, writeStorage } from '@rehooks/local-storage'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Markdown } from 'Components/utils/markdown'
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { formatValue } from 'publicodes'
|
||||
import { sum, uniq } from 'ramda'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import styled from 'styled-components'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
import { goToCompanyStatusChoice } from 'Actions/companyStatusActions'
|
||||
import Scroll from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import SchemeComparaison from 'Components/SchemeComparaison'
|
||||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import SchemeComparaison from 'Components/SchemeComparaison'
|
||||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { directorIsInAMinority } from 'Actions/companyStatusActions'
|
||||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch } from 'react-redux'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { companyHasMultipleAssociates } from 'Actions/companyStatusActions'
|
||||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch } from 'react-redux'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import { filter } from 'ramda'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import { isNil } from 'ramda'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { isSoleProprietorship } from 'Actions/companyStatusActions'
|
||||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch } from 'react-redux'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { resetCompanyStatusChoice } from 'Actions/companyStatusActions'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import { toPairs } from 'ramda'
|
||||
import React, { useContext, useEffect } from 'react'
|
||||
import { useContext, useEffect } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { NavLink, Route, Switch, useLocation } from 'react-router-dom'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { LegalStatus } from 'Selectors/companyStatusSelectors'
|
||||
type Props = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Route, Switch } from 'react-router-dom'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { LANDING_LEGAL_STATUS_LIST } from '../../sitePaths'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { ChromePicker, ChromePickerProps } from 'react-color'
|
||||
|
||||
type ColorPickerProps = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Suspense, useMemo } from 'react'
|
||||
import { lazy, useState, useRef, useEffect, Suspense, useMemo } from 'react'
|
||||
import useSimulatorsData from '../Simulateurs/metadata'
|
||||
const LazyColorPicker = React.lazy(() => import('./ColorPicker'))
|
||||
const LazyColorPicker = lazy(() => import('./ColorPicker'))
|
||||
|
||||
export default function IntegrationTest() {
|
||||
const simulators = useSimulatorsData()
|
||||
|
@ -11,13 +11,11 @@ export default function IntegrationTest() {
|
|||
.filter(Boolean),
|
||||
[simulators]
|
||||
)
|
||||
const [currentModule, setCurrentModule] = React.useState(
|
||||
integrableModuleNames[0]
|
||||
)
|
||||
const [color, setColor] = React.useState('#005aa1')
|
||||
const [version, setVersion] = React.useState(0)
|
||||
const domNode = React.useRef<HTMLDivElement>(null)
|
||||
React.useEffect(() => {
|
||||
const [currentModule, setCurrentModule] = useState(integrableModuleNames[0])
|
||||
const [color, setColor] = useState('#005aa1')
|
||||
const [version, setVersion] = useState(0)
|
||||
const domNode = useRef<HTMLDivElement>(null)
|
||||
useEffect(() => {
|
||||
const script = document.createElement('script')
|
||||
script.id = 'script-monentreprise'
|
||||
script.src = window.location.origin + '/simulateur-iframe-integration.js'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from 'react'
|
||||
|
||||
export default function Personas() {
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { generateSiteMap, SitePathsType } from '../../sitePaths'
|
||||
|
||||
export default function SiteMap() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import { EngineContext } from 'Components/utils/EngineContext'
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import { Documentation, getDocumentationSiteMap } from 'publicodes'
|
||||
import React, { useCallback, useContext, useMemo } from 'react'
|
||||
import { useCallback, useContext, useMemo } from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { Redirect, useLocation } from 'react-router-dom'
|
||||
|
|
|
@ -8,7 +8,7 @@ import { ScrollToTop } from 'Components/utils/Scroll'
|
|||
import useDisplayOnIntersecting from 'Components/utils/useDisplayOnIntersecting'
|
||||
import RuleInput from 'Components/conversation/RuleInput'
|
||||
import { ParsedRule } from 'publicodes'
|
||||
import React, { useCallback, useEffect, useState, useContext } from 'react'
|
||||
import { Fragment, useCallback, useEffect, useState, useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { RootState } from 'Reducers/rootReducer'
|
||||
|
@ -432,7 +432,7 @@ function Results() {
|
|||
<>
|
||||
<Animate.fromTop>
|
||||
{results.map(r => (
|
||||
<React.Fragment key={r.title}>
|
||||
<Fragment key={r.title}>
|
||||
<h4>
|
||||
{r.title} <small>{r.summary}</small>
|
||||
</h4>
|
||||
|
@ -449,7 +449,7 @@ function Results() {
|
|||
)}
|
||||
</RuleLink>
|
||||
</p>
|
||||
</React.Fragment>
|
||||
</Fragment>
|
||||
))}
|
||||
</Animate.fromTop>
|
||||
</>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { RootState } from 'Reducers/rootReducer'
|
||||
|
|
|
@ -3,7 +3,7 @@ import Overlay from 'Components/Overlay'
|
|||
import Checkbox from 'Components/ui/Checkbox'
|
||||
import { ThemeColorsContext } from 'Components/utils/colors'
|
||||
import { TrackerContext } from 'Components/utils/withTracker'
|
||||
import React, { Suspense, useContext, useRef, useState } from 'react'
|
||||
import { lazy, Suspense, useContext, useRef, useState } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import SignaturePad from 'react-signature-pad-wrapper'
|
||||
import PDFDocument from './PDFDocument'
|
||||
|
@ -186,7 +186,7 @@ export default function EndBlock({ fields, isMissingValues }) {
|
|||
)
|
||||
}
|
||||
|
||||
const LazyBlobProvider = React.lazy<typeof BlobProvider>(
|
||||
const LazyBlobProvider = lazy<typeof BlobProvider>(
|
||||
() =>
|
||||
new Promise(resolve =>
|
||||
setTimeout(() => resolve({ default: BlobProvider }), 300)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { StyleSheet, Text, View } from '@react-pdf/renderer'
|
||||
import { formatValue } from 'publicodes'
|
||||
import React from 'react'
|
||||
|
||||
export default function FieldsPDF({ fields }) {
|
||||
return fields.map(field => (
|
||||
|
|
|
@ -9,7 +9,6 @@ import {
|
|||
Link
|
||||
} from '@react-pdf/renderer'
|
||||
import urssafPng from 'Images/destinataires/URSSAF.png'
|
||||
import React from 'react'
|
||||
import FieldsPDF, { styles as fieldStyles } from './FieldsPDF'
|
||||
import montserratUrl from './Montserrat-SemiBold.ttf'
|
||||
import robotoUrl from './Roboto-Regular.ttf'
|
||||
|
|
|
@ -5,12 +5,12 @@ import Emoji from 'Components/utils/Emoji'
|
|||
import { Markdown } from 'Components/utils/markdown'
|
||||
import { usePersistingState } from 'Components/utils/persistState'
|
||||
import Engine from 'publicodes'
|
||||
import React, { Suspense, useCallback, useState } from 'react'
|
||||
import { lazy, createElement, Suspense, useCallback, useState } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { hash } from '../../../../../utils'
|
||||
import formulaire from './formulaire-détachement.yaml'
|
||||
|
||||
const LazyEndBlock = React.lazy(() => import('./EndBlock'))
|
||||
const LazyEndBlock = lazy(() => import('./EndBlock'))
|
||||
|
||||
export default function FormulaireMobilitéIndépendant() {
|
||||
const engine = new Engine(formulaire)
|
||||
|
@ -128,7 +128,7 @@ function FormulairePublicodes({ engine }) {
|
|||
<Animate.fromTop key={field.dottedName}>
|
||||
{field.type === 'groupe' ? (
|
||||
<>
|
||||
{React.createElement(
|
||||
{createElement(
|
||||
`h${Math.min(field.dottedName.split(' . ').length + 1, 6)}`,
|
||||
{},
|
||||
field.title
|
||||
|
|
|
@ -2,7 +2,6 @@ import {
|
|||
checkHiringItem,
|
||||
initializeHiringChecklist
|
||||
} from 'Actions/hiringChecklistAction'
|
||||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { connect, useSelector } from 'react-redux'
|
||||
|
|
|
@ -8,7 +8,7 @@ import FindCompany from 'Components/FindCompany'
|
|||
import Overlay from 'Components/Overlay'
|
||||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext, useEffect, useRef, useState } from 'react'
|
||||
import { useContext, useEffect, useRef, useState } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import * as Animate from 'Components/ui/animate'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export default function Video() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Route, Switch } from 'react-router-dom'
|
||||
import { NavLink, useLocation } from 'react-router-dom'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react'
|
||||
import Privacy from '../../layout/Footer/Privacy'
|
||||
|
||||
export default function IframeFooter() {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { IsEmbeddedContext } from 'Components/utils/embeddedContext'
|
||||
import React from 'react'
|
||||
import { Route, Switch } from 'react-router-dom'
|
||||
import { inIframe } from '../../../../utils'
|
||||
import useSimulatorsData from '../Simulateurs/metadata'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import logoSvg from 'Images/logo.svg'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
|
|
@ -2,7 +2,7 @@ import MoreInfosOnUs from 'Components/MoreInfosOnUs'
|
|||
import { MarkdownWithAnchorLinks } from 'Components/utils/markdown'
|
||||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext, useEffect } from 'react'
|
||||
import { useContext, useEffect } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Redirect, useHistory, useRouteMatch } from 'react-router-dom'
|
||||
import { Link, NavLink } from 'react-router-dom'
|
||||
|
|
|
@ -6,7 +6,7 @@ import SimulateurWarning from 'Components/SimulateurWarning'
|
|||
import 'Components/TargetSelection.css'
|
||||
import Animate from 'Components/ui/animate'
|
||||
import { EngineContext, useEvaluation } from 'Components/utils/EngineContext'
|
||||
import React, { createContext, useContext, useEffect, useState } from 'react'
|
||||
import { createContext, useContext, useEffect, useState } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { DottedName } from 'Rules'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import SimulateurWarning from 'Components/SimulateurWarning'
|
||||
import Simulation from 'Components/Simulation'
|
||||
import IndépendantExplanation from 'Components/simulationExplanation/IndépendantExplanation'
|
||||
import React from 'react'
|
||||
export default function IndépendantSimulation() {
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import SchemeComparaison from 'Components/SchemeComparaison'
|
||||
import React from 'react'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
export default function SchemeComparaisonPage() {
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Markdown } from 'Components/utils/markdown'
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import Value from 'Components/EngineValue'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { Redirect } from 'react-router-dom'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { CheckItem, Checklist } from 'Components/ui/Checklist'
|
||||
import { changeCritèreExonération } from './actions'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import classnames from 'classnames'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { activitéVue } from './actions'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getInitialState, persistState } from 'Components/utils/persistState'
|
||||
import React, { createContext, useCallback, useReducer } from 'react'
|
||||
import { createContext, useCallback, useReducer } from 'react'
|
||||
|
||||
const StoreContext = createContext()
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { Link, Redirect } from 'react-router-dom'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Route, Switch } from 'react-router-dom'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Suspense } from 'react'
|
||||
const Stats = React.lazy(() => import('./Stats'))
|
||||
import { lazy, Suspense } from 'react'
|
||||
const Stats = lazy(() => import('./Stats'))
|
||||
|
||||
export default function LazyStats() {
|
||||
return (
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import React from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans } from 'react-i18next'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ScrollToTop } from 'Components/utils/Scroll'
|
||||
import { SitePathsContext } from 'Components/utils/SitePathsContext'
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Route, Switch, useLocation } from 'react-router-dom'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue