Fix prettier import order update

pull/2722/head
Jérémy Rialland 2023-06-15 15:57:48 +02:00 committed by Jérémy Rialland
parent ccaaea2714
commit 06eb426316
92 changed files with 144 additions and 127 deletions

View File

@ -12,5 +12,5 @@
"^\\.(.*)"
],
"importOrderParserPlugins": ["typescript", "jsx", "importAssertions"],
"importOrderTypeScriptVersion": "^4.5.0"
"importOrderTypeScriptVersion": "5.0.0"
}

View File

@ -1,8 +1,9 @@
// eslint-disable-next-line n/no-deprecated-api
import Domains from 'domain'
import { RouterContext } from '@koa/router'
import * as Sentry from '@sentry/node'
import * as Tracing from '@sentry/tracing'
// eslint-disable-next-line n/no-deprecated-api
import Domains from 'domain'
import { Context, Next } from 'koa'
const release =

View File

@ -1,7 +1,8 @@
/* eslint-env node */
import fs from 'fs'
import yaml from 'js-yaml'
import path from 'path'
import yaml from 'js-yaml'
import Engine from 'publicodes'
const publicodesDir = './règles'

View File

@ -1,8 +1,9 @@
/* eslint-disable no-console */
import { exec } from 'child_process'
import dotenv from 'dotenv'
import { promisify } from 'util'
import dotenv from 'dotenv'
dotenv.config()
// Extrait la liste des liens référencés dans la base de code

View File

@ -1,8 +1,9 @@
import later from '@breejs/later'
import Bree, { BreeOptions } from 'bree'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import later from '@breejs/later'
import Bree, { BreeOptions } from 'bree'
import { NODE_ENV } from './config.js'
const __dirname = dirname(fileURLToPath(import.meta.url))

View File

@ -4,9 +4,9 @@ import Koa from 'koa'
import { koaBody } from 'koa-body'
import {
PORT,
clientId,
clientSecret,
PORT,
redirectUri,
serverUrl,
} from './config.js'

View File

@ -1,6 +1,7 @@
import { readFileSync, statSync, writeFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { argv } from 'node:process'
import Tinypool from 'tinypool'
import { absoluteSitePaths } from './source/sitePaths.js'

View File

@ -2,11 +2,11 @@ import { writeFileSync } from 'fs'
import { join } from 'path'
import { fileURLToPath } from 'url'
import rawApeTags from '../NomenclatureGuichet/ape_tags.json' assert { type: 'json' }
import { Data as RawApeData } from '../extract-NAF-data/convert-pdf.js'
import rawApeData from '../extract-NAF-data/output.json' assert { type: 'json' }
import { Out as NbEtablissementsData } from '../nombre-etablissements-par-code-ape/fetch-json.js'
import rawEtablissementsData from '../nombre-etablissements-par-code-ape/output.json' assert { type: 'json' }
import rawApeTags from '../NomenclatureGuichet/ape_tags.json' assert { type: 'json' }
import { customTags } from './custom-tags.js'
import { multipleCf } from './custom.js'

View File

@ -1,8 +1,9 @@
import parseCsv from 'csv-parser'
import fs from 'fs'
import { join } from 'path'
import { fileURLToPath } from 'url'
import parseCsv from 'csv-parser'
import output from '../nombre-etablissements-par-code-ape/output.json' assert { type: 'json' }
import { computeGuichet } from './compute-guichet.js'

View File

@ -1,8 +1,9 @@
import { readFileSync, writeFileSync } from 'fs'
import { join } from 'path'
import { PdfData, VerbosityLevel } from 'pdfdataextract'
import { fileURLToPath } from 'url'
import { PdfData, VerbosityLevel } from 'pdfdataextract'
const __dirname = fileURLToPath(new URL('.', import.meta.url))
const INPUT_PDF_PATH = join(

View File

@ -1,5 +1,6 @@
import { readFileSync } from 'fs'
import { join } from 'path'
import { Project } from 'ts-morph'
import yaml from 'yaml'

View File

@ -1,8 +1,9 @@
// We publish our job offers on https://beta.gouv.fr/recrutement/. To augment
// their reach, we also publish a banner on our website automatically by using
// the beta.gouv.fr API.
import dotenv from 'dotenv'
import { promisify } from 'util'
import dotenv from 'dotenv'
import { parseString } from 'xml2js'
import { createDataDir, writeInDataDir } from './utils.js'

View File

@ -1,4 +1,5 @@
import { writeFileSync } from 'fs'
import prettier from 'prettier'
import yaml from 'yaml'

View File

@ -1,13 +1,14 @@
import { readFileSync, writeFileSync } from 'fs'
import yaml from 'yaml'
import {
UiOriginalTranslationPath,
UiTranslationPath,
assocPath,
fetchTranslation,
filterUnusedTranslations,
getUiMissingTranslations,
UiOriginalTranslationPath,
UiTranslationPath,
} from './utils.js'
const sleep = (timeout) =>

View File

@ -1,5 +1,6 @@
import dotenv from 'dotenv'
import { readFileSync } from 'fs'
import dotenv from 'dotenv'
import yaml from 'yaml'
import rules from '../../../modele-social/dist/index.js'

View File

@ -1,9 +1,10 @@
import { getPackageDeps } from '@rushstack/package-deps-hash'
import { exec as originalExec } from 'child_process'
import { existsSync, lstatSync, readFileSync, writeFileSync } from 'fs'
import { relative, resolve } from 'path'
import { promisify } from 'util'
import { getPackageDeps } from '@rushstack/package-deps-hash'
const exec = promisify(originalExec)
type DirPath = string

View File

@ -1,8 +1,9 @@
import dotenv from 'dotenv'
import fs from 'fs'
import path from 'path'
import { fileURLToPath } from 'url'
import dotenv from 'dotenv'
import { createDataDir, readInDataDir, writeInDataDir } from '../utils.js'
import { apiStats } from './fetch-api-stats.js'

View File

@ -6,13 +6,13 @@ import { useTranslation } from 'react-i18next'
import { Route, Routes } from 'react-router-dom'
import styled, { css } from 'styled-components'
import Route404 from '@/components/Route404'
import Footer from '@/components/layout/Footer/Footer'
import Header from '@/components/layout/Header'
import Route404 from '@/components/Route404'
import {
engineFactory,
EngineProvider,
Rules,
engineFactory,
useEngine,
useSetupSafeSituation,
} from '@/components/utils/EngineContext'
@ -21,17 +21,17 @@ import { useAxeCoreAnalysis } from '@/hooks/useAxeCoreAnalysis'
import { useGetFullURL } from '@/hooks/useGetFullURL'
import { useIsEmbedded } from '@/hooks/useIsEmbedded'
import { useSaveAndRestoreScrollPosition } from '@/hooks/useSaveAndRestoreScrollPosition'
import Accessibilité from '@/pages/Accessibilité'
import Documentation from '@/pages/Documentation'
import Offline from '@/pages/Offline'
import Plan from '@/pages/Plan'
import Landing from '@/pages/_landing/Landing'
import Accessibilité from '@/pages/Accessibilité'
import Assistants from '@/pages/assistants/index'
import Budget from '@/pages/budget/index'
import IntegrationTest from '@/pages/dev/IntegrationTest'
import Documentation from '@/pages/Documentation'
import Iframes from '@/pages/iframes'
import Integration from '@/pages/integration/index'
import Nouveautés from '@/pages/nouveautés/index'
import Offline from '@/pages/Offline'
import Plan from '@/pages/Plan'
import Simulateurs from '@/pages/simulateurs'
import SimulateursEtAssistants from '@/pages/simulateurs-et-assistants'
import Stats from '@/pages/statistiques/LazyStats'

View File

@ -10,9 +10,9 @@ import { batchUpdateSituation } from '@/store/actions/actions'
import { situationSelector } from '@/store/selectors/simulationSelectors'
import { catchDivideByZeroError } from '@/utils'
import { ExplicableRule } from './conversation/Explicable'
import { Condition, WhenApplicable } from './EngineValue'
import { SimulationGoal } from './Simulation'
import { ExplicableRule } from './conversation/Explicable'
import { FromTop } from './ui/animate'
import { useEngine } from './utils/EngineContext'

View File

@ -2,9 +2,9 @@ import { DottedName } from 'modele-social'
import Engine, {
ASTNode,
EvaluatedNode,
formatValue,
PublicodesExpression,
RuleNode,
formatValue,
} from 'publicodes'
import React from 'react'
import { useTranslation } from 'react-i18next'

View File

@ -1,10 +1,10 @@
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'
import logoSvgFR from '@/assets/images/logo-monentreprise.svg'
import logoSvgFRDark from '@/assets/images/logo-monentreprise_white.svg'
import logoSvgEN from '@/assets/images/logo-mycompany.svg'
import logoSvgFR from '@/assets/images/logo-monentreprise.svg'
import logoSvgENDark from '@/assets/images/logo-mycompany_white.svg'
import logoSvgEN from '@/assets/images/logo-mycompany.svg'
import { useDarkMode } from '@/hooks/useDarkMode'
/* Figma source: https://www.figma.com/file/YJUpRNO12lcPUDsEYEXzT9/logo-monentreprisee-urssaf-edition */

View File

@ -1,11 +1,11 @@
import { DottedName } from 'modele-social'
import {
ASTNode,
formatValue,
ParsedRules,
reduceAST,
Rule,
RuleNode,
formatValue,
reduceAST,
} from 'publicodes'
import { Fragment, useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'

View File

@ -1,4 +1,4 @@
import { Suspense, lazy, useRef } from 'react'
import { lazy, Suspense, useRef } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import styled from 'styled-components'

View File

@ -1,15 +1,15 @@
import { OverlayProvider } from '@react-aria/overlays'
import { ErrorBoundary } from '@sentry/react'
import i18next from 'i18next'
import { ReactNode, createContext } from 'react'
import { createContext, ReactNode } from 'react'
import { HelmetProvider } from 'react-helmet-async'
import { I18nextProvider, useTranslation } from 'react-i18next'
import { Provider as ReduxProvider } from 'react-redux'
import { BrowserRouter } from 'react-router-dom'
import logo from '@/assets/images/logo-monentreprise.svg'
import { DisableAnimationOnPrintProvider } from '@/components/utils/DisableAnimationContext'
import { ThemeColorsProvider } from '@/components/utils/colors'
import { DisableAnimationOnPrintProvider } from '@/components/utils/DisableAnimationContext'
import { GlobalStyle } from '@/design-system/global-style'
import { Container, Grid } from '@/design-system/layout'
import DesignSystemThemeProvider from '@/design-system/root'

View File

@ -1,5 +1,5 @@
import { DottedName } from 'modele-social'
import { PublicodesExpression, formatValue } from 'publicodes'
import { formatValue, PublicodesExpression } from 'publicodes'
import React, { useCallback, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import styled from 'styled-components'
@ -11,11 +11,11 @@ import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { updateSituation } from '@/store/actions/actions'
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
import RuleLink from '../RuleLink'
import { ExplicableRule } from '../conversation/Explicable'
import RuleInput, { InputProps } from '../conversation/RuleInput'
import AnimatedTargetValue from '../ui/AnimatedTargetValue'
import RuleLink from '../RuleLink'
import { Appear } from '../ui/animate'
import AnimatedTargetValue from '../ui/AnimatedTargetValue'
import { useEngine } from '../utils/EngineContext'
import { useInitialRender } from '../utils/useInitialRender'

View File

@ -5,8 +5,8 @@ import { Trans, useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
import styled from 'styled-components'
import ShareOrSaveSimulationBanner from '@/components/ShareSimulationBanner'
import { ConversationProps } from '@/components/conversation/Conversation'
import ShareOrSaveSimulationBanner from '@/components/ShareSimulationBanner'
import { PopoverWithTrigger } from '@/design-system'
import { Grid, Spacing } from '@/design-system/layout'
import { Link } from '@/design-system/typography/link'

View File

@ -8,8 +8,8 @@ import { Strong } from '@/design-system/typography'
import { H4 } from '@/design-system/typography/heading'
import { Body } from '@/design-system/typography/paragraphs'
import Value from '../EngineValue'
import SeeAnswersButton from '../conversation/SeeAnswersButton'
import Value from '../EngineValue'
export function CompanyDetails({
showSituation = false,

View File

@ -4,9 +4,9 @@ import React, { useCallback, useEffect, useState } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
import RuleInput from '@/components/conversation/RuleInput'
import Notifications from '@/components/Notifications'
import QuickLinks from '@/components/QuickLinks'
import RuleInput from '@/components/conversation/RuleInput'
import { useEngine } from '@/components/utils/EngineContext'
import { Button } from '@/design-system/buttons'
import { Emoji } from '@/design-system/emoji'

View File

@ -1,5 +1,5 @@
import { NumberFieldProps } from '@react-types/numberfield'
import { ASTNode, Unit, parseUnit, serializeUnit } from 'publicodes'
import { ASTNode, parseUnit, serializeUnit, Unit } from 'publicodes'
import { useCallback, useContext, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'

View File

@ -4,8 +4,8 @@ import Engine, {
EvaluatedNode,
Evaluation,
PublicodesExpression,
RuleNode,
reduceAST,
RuleNode,
} from 'publicodes'
import React, { useContext } from 'react'
@ -18,9 +18,9 @@ import { Choice, MultipleAnswerInput, OuiNonInput } from './ChoicesInput'
import DateInput from './DateInput'
import { MultipleChoicesInput } from './MulipleChoicesInput'
import ParagrapheInput from './ParagrapheInput'
import TextInput from './TextInput'
import SelectPaysDétachement from './select/SelectPaysDétachement'
import SelectAtmp from './select/SelectTauxRisque'
import TextInput from './TextInput'
type InputType = 'radio' | 'card' | 'toggle' | 'select'

View File

@ -4,8 +4,8 @@ import styled, { css } from 'styled-components'
import {
Commune,
SearchCommune,
fetchCommuneDetails,
SearchCommune,
searchCommunes,
} from '@/api/commune'
import { TextField } from '@/design-system/field'

View File

@ -7,7 +7,7 @@ import { Link } from '@/design-system/typography/link'
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import * as safeLocalStorage from '../../../storage/safeLocalStorage'
import { TrackPage, TrackingContext } from '../../ATInternetTracking'
import { TrackingContext, TrackPage } from '../../ATInternetTracking'
export default function Privacy({
label,

View File

@ -3,9 +3,9 @@ import { Hit } from 'react-instantsearch-core'
import { connectHits } from 'react-instantsearch-dom'
import styled from 'styled-components'
import InfoBulle from '@/design-system/InfoBulle'
import { SmallCard } from '@/design-system/card'
import { Emoji } from '@/design-system/emoji'
import InfoBulle from '@/design-system/InfoBulle'
import { Grid } from '@/design-system/layout'
import { H3 } from '@/design-system/typography/heading'
import { MergedSimulatorDataValues } from '@/hooks/useCurrentSimulatorData'

View File

@ -3,9 +3,9 @@ import { Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
import styled from 'styled-components'
import urssafSrc from '@/assets/images/Urssaf.svg'
import assuranceMaladieSrc from '@/assets/images/assurance-maladie.svg'
import dgfipSrc from '@/assets/images/logo-dgfip.svg'
import urssafSrc from '@/assets/images/Urssaf.svg'
import Value, {
Condition,
WhenApplicable,

View File

@ -2,8 +2,8 @@ import React, { useEffect, useState } from 'react'
import { Trans } from 'react-i18next'
import styled from 'styled-components'
import { ScrollToElement } from '@/components/utils/Scroll'
import { Markdown } from '@/components/utils/markdown'
import { ScrollToElement } from '@/components/utils/Scroll'
import { Checkbox } from '@/design-system/field'
import { Grid, Spacing } from '@/design-system/layout'
import { Link } from '@/design-system/typography/link'

View File

@ -1,8 +1,8 @@
import React, { useContext } from 'react'
import {
SpringConfig,
animated,
config as configPresets,
SpringConfig,
useSpring,
useTrail,
} from 'react-spring'

View File

@ -1,4 +1,4 @@
import { ReactNode, createContext, useState } from 'react'
import { createContext, ReactNode, useState } from 'react'
import { ThemeProvider } from 'styled-components'
import { useDarkMode } from '@/hooks/useDarkMode'

View File

@ -1,10 +1,10 @@
import { DottedName } from 'modele-social'
import Engine, {
EvaluatedNode,
isPublicodesError,
PublicodesExpression,
Rule,
RuleNode,
isPublicodesError,
} from 'publicodes'
import { createContext, useContext, useMemo } from 'react'
import { useDispatch, useSelector } from 'react-redux'

View File

@ -1,8 +1,8 @@
import Engine, { PublicodesExpression } from 'publicodes'
import {
createContext,
Dispatch,
SetStateAction,
createContext,
useContext,
useRef,
useState,

View File

@ -1,6 +1,6 @@
import {
ReactNode,
createContext,
ReactNode,
useContext,
useEffect,
useMemo,

View File

@ -2,10 +2,10 @@ import { AriaListBoxOptions, useListBox, useOption } from '@react-aria/listbox'
import type { ListState } from '@react-stately/list'
import type { Node } from '@react-types/shared'
import {
createContext,
HTMLAttributes,
ReactNode,
RefObject,
createContext,
useContext,
useRef,
} from 'react'

View File

@ -1,4 +1,4 @@
import { ComponentType, ReactNode, createContext, useContext } from 'react'
import { ComponentType, createContext, ReactNode, useContext } from 'react'
import styled, { css } from 'styled-components'
import { SpacingKey } from '../theme'

View File

@ -1,6 +1,6 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import styled, { CSSProperties, DefaultTheme, css } from 'styled-components'
import styled, { css, CSSProperties, DefaultTheme } from 'styled-components'
import { ForceThemeProvider } from '@/components/utils/DarkModeContext'
import { Palette, SmallPalette } from '@/types/styled'

View File

@ -1,9 +1,9 @@
import isbot from 'isbot'
import { ReactNode } from 'react'
import styled, {
css,
StyleSheetManager,
ThemeProvider,
css,
} from 'styled-components'
import urssafTheme from '@/design-system/theme'

View File

@ -1,9 +1,9 @@
import { useButton } from '@react-aria/button'
import { AriaButtonProps } from '@react-types/button'
import React, {
CSSProperties,
ComponentProps,
ComponentPropsWithRef,
CSSProperties,
ForwardedRef,
useCallback,
useRef,

View File

@ -1,7 +1,7 @@
import { ExpirationPlugin } from 'workbox-expiration'
import { cleanupOutdatedCaches, precacheAndRoute } from 'workbox-precaching'
import { offlineFallback } from 'workbox-recipes'
import { Route, registerRoute, setDefaultHandler } from 'workbox-routing'
import { registerRoute, Route, setDefaultHandler } from 'workbox-routing'
import { NetworkFirst, StaleWhileRevalidate } from 'workbox-strategies'
declare let self: ServiceWorkerGlobalScope

View File

@ -1,6 +1,6 @@
import rules, { DottedName } from 'modele-social'
import Engine from 'publicodes'
import { RulePage, getDocumentationSiteMap } from 'publicodes-react'
import { getDocumentationSiteMap, RulePage } from 'publicodes-react'
import { ComponentProps, useMemo, useRef } from 'react'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
@ -17,9 +17,9 @@ import styled from 'styled-components'
import { References } from '@/components/References'
import SearchRules from '@/components/search/SearchRules'
import { FromBottom } from '@/components/ui/animate'
import { Markdown } from '@/components/utils/markdown'
import Meta from '@/components/utils/Meta'
import { ScrollToTop } from '@/components/utils/Scroll'
import { Markdown } from '@/components/utils/markdown'
import { Accordion, Item } from '@/design-system'
import { Button } from '@/design-system/buttons'
import { Spacing } from '@/design-system/layout'

View File

@ -2,9 +2,9 @@ import { Trans, useTranslation } from 'react-i18next'
import styled from 'styled-components'
import { TrackPage } from '@/components/ATInternetTracking'
import PageHeader from '@/components/PageHeader'
import Footer from '@/components/layout/Footer/Footer'
import Header from '@/components/layout/Header'
import PageHeader from '@/components/PageHeader'
import Meta from '@/components/utils/Meta'
import { Button } from '@/design-system/buttons'
import { Container, Grid, Spacing } from '@/design-system/layout'
@ -16,9 +16,9 @@ import useSimulatorsData from '@/hooks/useSimulatorsData'
import { useSitePaths } from '@/sitePaths'
import { SimulateurCard } from '../simulateurs-et-assistants'
import SearchOrCreate from './SearchOrCreate'
import illustration2Svg from './illustration2.svg'
import illustrationSvg from './illustration.svg'
import illustration2Svg from './illustration2.svg'
import SearchOrCreate from './SearchOrCreate'
export default function Landing() {
const simulators = useSimulatorsData()

View File

@ -2,8 +2,8 @@ import { Trans, useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
import { TrackPage } from '@/components/ATInternetTracking'
import { CheckItem, Checklist } from '@/components/ui/Checklist'
import { FromBottom } from '@/components/ui/animate'
import { CheckItem, Checklist } from '@/components/ui/Checklist'
import DefaultHelmet from '@/components/utils/DefaultHelmet'
import Scroll from '@/components/utils/Scroll'
import { Button } from '@/design-system/buttons'

View File

@ -4,9 +4,9 @@ import { ScrollToTop } from '@/components/utils/Scroll'
import { LANDING_LEGAL_STATUS_LIST, useSitePaths } from '@/sitePaths'
import AfterRegistration from './AfterRegistration'
import ChoixStatutJuridique from './choix-statut-juridique'
import CreationChecklist from './CreationChecklist'
import GuideStatut from './GuideStatut'
import ChoixStatutJuridique from './choix-statut-juridique'
export default function ChoixDuStatut() {
const { relativeSitePaths } = useSitePaths()

View File

@ -3,7 +3,7 @@ import styled from 'styled-components'
import HelpButtonWithPopover from '@/design-system/buttons/HelpButtonWithPopover'
import { Li, Ul } from '@/design-system/typography/list'
import { Body, baseParagraphStyle } from '@/design-system/typography/paragraphs'
import { baseParagraphStyle, Body } from '@/design-system/typography/paragraphs'
export const StyledTable = styled.table`
${baseParagraphStyle}

View File

@ -6,11 +6,11 @@ import { useDispatch, useSelector } from 'react-redux'
import styled from 'styled-components'
import { TrackPage } from '@/components/ATInternetTracking'
import RuleInput from '@/components/conversation/RuleInput'
import { Condition, WhenAlreadyDefined } from '@/components/EngineValue'
import PageHeader from '@/components/PageHeader'
import RuleInput from '@/components/conversation/RuleInput'
import Warning from '@/components/ui/WarningBlock'
import { FromTop } from '@/components/ui/animate'
import Warning from '@/components/ui/WarningBlock'
import DefaultHelmet from '@/components/utils/DefaultHelmet'
import { useEngine } from '@/components/utils/EngineContext'
import { Grid } from '@/design-system/layout'

View File

@ -6,10 +6,10 @@ import { useDispatch } from 'react-redux'
import styled, { css } from 'styled-components'
import { TrackPage } from '@/components/ATInternetTracking'
import Value, { Condition } from '@/components/EngineValue'
import ShareOrSaveSimulationBanner from '@/components/ShareSimulationBanner'
import { ExplicableRule } from '@/components/conversation/Explicable'
import RuleInput from '@/components/conversation/RuleInput'
import Value, { Condition } from '@/components/EngineValue'
import ShareOrSaveSimulationBanner from '@/components/ShareSimulationBanner'
import { FromTop } from '@/components/ui/animate'
import { useEngine } from '@/components/utils/EngineContext'
import { Message } from '@/design-system'

View File

@ -1,8 +1,8 @@
import Conversation from '@/components/conversation/Conversation'
import Value, { Condition, WhenAlreadyDefined } from '@/components/EngineValue'
import ShareOrSaveSimulationBanner from '@/components/ShareSimulationBanner'
import Conversation from '@/components/conversation/Conversation'
import Progress from '@/components/ui/Progress'
import { FromTop } from '@/components/ui/animate'
import Progress from '@/components/ui/Progress'
import { useEngine } from '@/components/utils/EngineContext'
import { Markdown } from '@/components/utils/markdown'
import { Message } from '@/design-system'

View File

@ -3,6 +3,8 @@ import { Trans } from 'react-i18next'
import { useDispatch } from 'react-redux'
import { TrackPage } from '@/components/ATInternetTracking'
import { CompanyDetails } from '@/components/company/Details'
import { CompanySearchField } from '@/components/company/SearchField'
import {
Condition,
WhenAlreadyDefined,
@ -10,10 +12,8 @@ import {
WhenNotAlreadyDefined,
} from '@/components/EngineValue'
import PageHeader from '@/components/PageHeader'
import { CompanyDetails } from '@/components/company/Details'
import { CompanySearchField } from '@/components/company/SearchField'
import Warning from '@/components/ui/WarningBlock'
import { FromTop } from '@/components/ui/animate'
import Warning from '@/components/ui/WarningBlock'
import { useEngine } from '@/components/utils/EngineContext'
import { Markdown } from '@/components/utils/markdown'
import { Message } from '@/design-system'
@ -31,8 +31,8 @@ import { resetCompany } from '@/store/actions/companyActions'
import { SimpleField } from '../components/Fields'
import Exceptions from './components/Exceptions'
import NotHandledCase from './components/NotHandledCase'
import { useProgress } from './components/hooks'
import NotHandledCase from './components/NotHandledCase'
import illustration from './components/undraw_fill_in_mie5.svg'
export const OBJECTIFS: DottedName[] = [

View File

@ -29,8 +29,8 @@ import { getMeta } from '@/utils'
import { SimpleField } from '../components/Fields'
import FormulaireTitle from './components/FormulaireTitle'
import ModeAccompagnement from './components/ModeAccompagnement'
import { useProgress } from './components/hooks'
import ModeAccompagnement from './components/ModeAccompagnement'
export const OBJECTIFS: Array<DottedName> = [
'entreprise . imposition',

View File

@ -1,10 +1,10 @@
import { BlobProvider } from '@react-pdf/renderer'
import { RuleNode, utils } from 'publicodes'
import { Suspense, lazy, useContext, useRef, useState } from 'react'
import { lazy, Suspense, useContext, useRef, useState } from 'react'
import SignaturePad from 'react-signature-pad-wrapper'
import { ThemeContext } from 'styled-components'
import { TrackPage, TrackingContext } from '@/components/ATInternetTracking'
import { TrackingContext, TrackPage } from '@/components/ATInternetTracking'
import { Condition } from '@/components/EngineValue'
import { EngineContext, EngineProvider } from '@/components/utils/EngineContext'
import { Message, PopoverWithTrigger } from '@/design-system'

View File

@ -1,5 +1,5 @@
import PDFElement from '@react-pdf/renderer'
import { RuleNode, formatValue } from 'publicodes'
import { formatValue, RuleNode } from 'publicodes'
import { useContext } from 'react'
import { EngineContext } from '@/components/utils/EngineContext'

View File

@ -1,11 +1,11 @@
import { DottedName } from 'modele-social'
import Engine, { PublicodesExpression } from 'publicodes'
import { Fragment, Suspense, lazy, useCallback, useContext } from 'react'
import { Fragment, lazy, Suspense, useCallback, useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { TrackPage } from '@/components/ATInternetTracking'
import { WhenApplicable, WhenNotApplicable } from '@/components/EngineValue'
import RuleInput from '@/components/conversation/RuleInput'
import { WhenApplicable, WhenNotApplicable } from '@/components/EngineValue'
import BrowserOnly from '@/components/utils/BrowserOnly'
import DefaultHelmet from '@/components/utils/DefaultHelmet'
import { EngineContext, EngineProvider } from '@/components/utils/EngineContext'

View File

@ -2,8 +2,8 @@ import { Trans, useTranslation } from 'react-i18next'
import { connect, useSelector } from 'react-redux'
import { TrackPage } from '@/components/ATInternetTracking'
import { CheckItem, Checklist, ChecklistProps } from '@/components/ui/Checklist'
import { FromBottom } from '@/components/ui/animate'
import { CheckItem, Checklist, ChecklistProps } from '@/components/ui/Checklist'
import DefaultHelmet from '@/components/utils/DefaultHelmet'
import { H1, H2, H3 } from '@/design-system/typography/heading'
import { Link } from '@/design-system/typography/link'

View File

@ -5,10 +5,10 @@ import { useEffect, useRef, useState } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
import {
generatePath,
Navigate,
Route,
Routes,
generatePath,
useParams,
} from 'react-router-dom'
import styled from 'styled-components'
@ -18,11 +18,11 @@ import {
searchDenominationOrSiren,
} from '@/api/fabrique-social'
import { TrackPage } from '@/components/ATInternetTracking'
import { CompanyDetails } from '@/components/company/Details'
import RuleInput from '@/components/conversation/RuleInput'
import { Condition, WhenApplicable } from '@/components/EngineValue'
import PageHeader from '@/components/PageHeader'
import { PlaceDesEntreprisesButton } from '@/components/PlaceDesEntreprises'
import { CompanyDetails } from '@/components/company/Details'
import RuleInput from '@/components/conversation/RuleInput'
import { FromTop } from '@/components/ui/animate'
import { ForceThemeProvider } from '@/components/utils/DarkModeContext'
import DefaultHelmet from '@/components/utils/DefaultHelmet'

View File

@ -4,9 +4,9 @@ import styled, { css } from 'styled-components'
import { Appear } from '@/components/ui/animate'
import { Chip } from '@/design-system'
import InfoBulle from '@/design-system/InfoBulle'
import { Button, HelpButtonWithPopover } from '@/design-system/buttons'
import { ChevronIcon } from '@/design-system/icons'
import InfoBulle from '@/design-system/InfoBulle'
import { Grid } from '@/design-system/layout'
import { H3, H4 } from '@/design-system/typography/heading'
import { Link } from '@/design-system/typography/link'

View File

@ -2,8 +2,8 @@ import { Trans, useTranslation } from 'react-i18next'
import styled from 'styled-components'
import { TrackPage } from '@/components/ATInternetTracking'
import FoldingMessage from '@/components/ui/FoldingMessage'
import { FromBottom } from '@/components/ui/animate'
import FoldingMessage from '@/components/ui/FoldingMessage'
import DefaultHelmet from '@/components/utils/DefaultHelmet'
import { H1, H2 } from '@/design-system/typography/heading'
import { Body } from '@/design-system/typography/paragraphs'

View File

@ -15,9 +15,9 @@ import { H4 } from '@/design-system/typography/heading'
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { useSitePaths } from '@/sitePaths'
import { StoreContext } from '../StoreContext'
import { toggleActivité } from '../actions'
import { getTranslatedActivité } from '../activitésData'
import { StoreContext } from '../StoreContext'
type ActiviteCardProps = {
title: string

View File

@ -5,8 +5,8 @@ import { Navigate, useParams } from 'react-router-dom'
import { TrackPage } from '@/components/ATInternetTracking'
import { FromBottom } from '@/components/ui/animate'
import { ScrollToTop } from '@/components/utils/Scroll'
import { Markdown } from '@/components/utils/markdown'
import { ScrollToTop } from '@/components/utils/Scroll'
import { Emoji } from '@/design-system/emoji'
import { Radio, RadioGroup } from '@/design-system/field'
import { H1, H2, H3 } from '@/design-system/typography/heading'
@ -14,13 +14,13 @@ import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { useSitePaths } from '@/sitePaths'
import { getValueFrom } from '@/utils'
import { selectSeuilRevenus } from './actions'
import { getTranslatedActivité } from './activitésData'
import { ActivitéSelection } from './ActivitésSelection'
import Exonérations from './Exonérations'
import NextButton from './NextButton'
import { StoreContext } from './StoreContext'
import { selectSeuilRevenus } from './actions'
import { getTranslatedActivité } from './activitésData'
import { estExonéréeSelector } from './selectors'
import { StoreContext } from './StoreContext'
export type Activity = {
titre: string

View File

@ -9,15 +9,15 @@ import { Grid, Spacing } from '@/design-system/layout'
import { H1, H2 } from '@/design-system/typography/heading'
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { ActiviteCard } from './ActiviteCard'
import { Activity } from './Activité'
import NextButton from './NextButton'
import { StoreContext } from './StoreContext'
import { ActiviteCard } from './ActiviteCard'
import { activités } from './activitésData'
import NextButton from './NextButton'
import {
activitésEffectuéesSelector,
activitésRéponduesSelector,
} from './selectors'
import { StoreContext } from './StoreContext'
export default function ActivitésSelection() {
const { t } = useTranslation()

View File

@ -5,9 +5,9 @@ import { CheckItem, Checklist } from '@/components/ui/Checklist'
import { H2 } from '@/design-system/typography/heading'
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { changeCritèreExonération } from './actions'
import { Activity } from './Activité'
import { StoreContext } from './StoreContext'
import { changeCritèreExonération } from './actions'
export default function Exonération({
exceptionsExonération,

View File

@ -4,9 +4,9 @@ import { Trans } from 'react-i18next'
import { Button } from '@/design-system/buttons'
import { useSitePaths } from '@/sitePaths'
import { StoreContext } from './StoreContext'
import { activitéVue } from './actions'
import { nextActivitéSelector } from './selectors'
import { StoreContext } from './StoreContext'
type NextButtonProps = {
activité: string

View File

@ -1,9 +1,9 @@
import {
createContext,
Dispatch,
ReactNode,
ReducerAction,
ReducerState,
createContext,
useCallback,
useReducer,
} from 'react'

View File

@ -16,7 +16,6 @@ import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { useSitePaths } from '@/sitePaths'
import { ActiviteCard } from './ActiviteCard'
import { StoreContext } from './StoreContext'
import illustration from './images/multitasking.svg'
import {
activitésEffectuéesSelector,
@ -24,6 +23,7 @@ import {
nextActivitéSelector,
régimeGénéralDisponibleSelector,
} from './selectors'
import { StoreContext } from './StoreContext'
export default function VotreSituation() {
const { absoluteSitePaths } = useSitePaths()

View File

@ -5,8 +5,8 @@ import styled from 'styled-components'
import { TrackPage } from '@/components/ATInternetTracking'
import MoreInfosOnUs from '@/components/MoreInfosOnUs'
import { ScrollToTop } from '@/components/utils/Scroll'
import { Markdown } from '@/components/utils/markdown'
import { ScrollToTop } from '@/components/utils/Scroll'
import { Item } from '@/design-system'
import { Emoji } from '@/design-system/emoji'
import { Select } from '@/design-system/field/Select'

View File

@ -4,11 +4,11 @@ import { Navigate, useMatch, useNavigate } from 'react-router-dom'
import styled from 'styled-components'
import { TrackPage } from '@/components/ATInternetTracking'
import MoreInfosOnUs from '@/components/MoreInfosOnUs'
import { determinant, useHideNewsBanner } from '@/components/layout/NewsBanner'
import MoreInfosOnUs from '@/components/MoreInfosOnUs'
import { MarkdownWithAnchorLinks } from '@/components/utils/markdown'
import Meta from '@/components/utils/Meta'
import { ScrollToTop } from '@/components/utils/Scroll'
import { MarkdownWithAnchorLinks } from '@/components/utils/markdown'
import { Item } from '@/design-system'
import { Emoji } from '@/design-system/emoji'
import { Select } from '@/design-system/field/Select'

View File

@ -5,10 +5,10 @@ import { TrackPage } from '@/components/ATInternetTracking'
import PageHeader from '@/components/PageHeader'
import Meta from '@/components/utils/Meta'
import { Chip } from '@/design-system'
import InfoBulle from '@/design-system/InfoBulle'
import { Card } from '@/design-system/card'
import { SmallCard } from '@/design-system/card/SmallCard'
import { Emoji } from '@/design-system/emoji'
import InfoBulle from '@/design-system/InfoBulle'
import { Grid } from '@/design-system/layout'
import { Strong } from '@/design-system/typography'
import { H2, H3 } from '@/design-system/typography/heading'

View File

@ -12,8 +12,8 @@ import Simulation, {
SimulationGoal,
SimulationGoals,
} from '@/components/Simulation'
import StackedBarChart from '@/components/StackedBarChart'
import { InstitutionsPartenairesAutoEntrepreneur } from '@/components/simulationExplanation/InstitutionsPartenaires'
import StackedBarChart from '@/components/StackedBarChart'
import { Message } from '@/design-system'
import { Emoji } from '@/design-system/emoji'
import { H2 } from '@/design-system/typography/heading'

View File

@ -11,8 +11,8 @@ import Simulation, {
SimulationGoal,
SimulationGoals,
} from '@/components/Simulation'
import Warning from '@/components/ui/WarningBlock'
import { FromTop } from '@/components/ui/animate'
import Warning from '@/components/ui/WarningBlock'
import { useEngine } from '@/components/utils/EngineContext'
import { Strong } from '@/design-system/typography'
import { H2 } from '@/design-system/typography/heading'

View File

@ -5,10 +5,10 @@ import { useDispatch } from 'react-redux'
import styled from 'styled-components'
import { DottedName } from '@/../../modele-social'
import Value from '@/components/EngineValue'
import { SwitchInput } from '@/components/conversation/ChoicesInput'
import { ExplicableRule } from '@/components/conversation/Explicable'
import RuleInput from '@/components/conversation/RuleInput'
import Value from '@/components/EngineValue'
import { useEngine } from '@/components/utils/EngineContext'
import { Message } from '@/design-system'
import { Button } from '@/design-system/buttons'

View File

@ -11,7 +11,7 @@ import RuleLink from '@/components/RuleLink'
import { HelpIcon } from '@/design-system/icons'
import { Grid } from '@/design-system/layout'
import { OptionType, getBestOption } from '../utils'
import { getBestOption, OptionType } from '../utils'
import StatusCard from './StatusCard'
const getStatusLabelsArray = (statusArray: OptionType[]) =>

View File

@ -3,11 +3,11 @@ import { Trans } from 'react-i18next'
import styled from 'styled-components'
import { DottedName } from '@/../../modele-social'
import { ExplicableRule } from '@/components/conversation/Explicable'
import Value, {
WhenAlreadyDefined,
WhenValueEquals,
} from '@/components/EngineValue'
import { ExplicableRule } from '@/components/conversation/Explicable'
import { Accordion, Item } from '@/design-system'
import { Emoji } from '@/design-system/emoji'
import { ExternalLinkIcon, PlusCircleIcon } from '@/design-system/icons'

View File

@ -12,7 +12,7 @@ import { H2 } from '@/design-system/typography/heading'
import { StyledLink } from '@/design-system/typography/link'
import { Body } from '@/design-system/typography/paragraphs'
import { OptionType, getBestOption } from '../utils'
import { getBestOption, OptionType } from '../utils'
import AllerPlusLoinRevenus from './AllerPlusLoinRevenus'
import StatusCard from './StatusCard'
import WarningTooltip from './WarningTooltip'

View File

@ -1,8 +1,8 @@
import {
createContext,
Dispatch,
ReactNode,
SetStateAction,
createContext,
useContext,
useState,
} from 'react'

View File

@ -3,6 +3,8 @@ import { useDispatch, useSelector } from 'react-redux'
import styled from 'styled-components'
import { TrackPage } from '@/components/ATInternetTracking'
import { StyledInputSuggestion } from '@/components/conversation/InputSuggestions'
import RuleInput from '@/components/conversation/RuleInput'
import Value from '@/components/EngineValue'
import Notifications from '@/components/Notifications'
import {
@ -10,10 +12,8 @@ import {
SimulationGoal,
SimulationGoals,
} from '@/components/Simulation'
import { StyledInputSuggestion } from '@/components/conversation/InputSuggestions'
import RuleInput from '@/components/conversation/RuleInput'
import Warning from '@/components/ui/WarningBlock'
import { FromTop } from '@/components/ui/animate'
import Warning from '@/components/ui/WarningBlock'
import { H2 } from '@/design-system/typography/heading'
import { Link } from '@/design-system/typography/link'
import { Body, Intro } from '@/design-system/typography/paragraphs'

View File

@ -2,8 +2,8 @@ import { useEffect, useMemo } from 'react'
import { Trans } from 'react-i18next'
import { Navigate, Route, Routes, useLocation } from 'react-router-dom'
import { ScrollToTop } from '@/components/utils/Scroll'
import { usePersistingState } from '@/components/utils/persistState'
import { ScrollToTop } from '@/components/utils/Scroll'
import { Link } from '@/design-system/typography/link'
import { useIsEmbedded } from '@/hooks/useIsEmbedded'
import useSimulatorsData from '@/hooks/useSimulatorsData'

View File

@ -2,6 +2,7 @@ import { Trans } from 'react-i18next'
import { useDispatch } from 'react-redux'
import ChiffreAffairesActivitéMixte from '@/components/ChiffreAffairesActivitéMixte'
import RuleInput from '@/components/conversation/RuleInput'
import { Condition } from '@/components/EngineValue'
import PeriodSwitch from '@/components/PeriodSwitch'
import RuleLink from '@/components/RuleLink'
@ -11,7 +12,6 @@ import Simulation, {
SimulationGoal,
SimulationGoals,
} from '@/components/Simulation'
import RuleInput from '@/components/conversation/RuleInput'
import IndépendantExplanation from '@/components/simulationExplanation/IndépendantExplanation'
import { Message } from '@/design-system'
import { Emoji } from '@/design-system/emoji'

View File

@ -4,9 +4,9 @@ import { choixStatutJuridiqueConfig } from '../assistants/choix-du-statut/choix-
import { déclarationChargesSocialesIndépendantConfig } from '../assistants/declaration-charges-sociales-independant/config'
import { déclarationRevenuIndépendantBetaConfig } from '../assistants/declaration-revenu-independants/config'
import { demandeMobilitéConfig } from '../assistants/demande-mobilité/config'
import { économieCollaborativeConfig } from '../assistants/économie-collaborative/config'
import { pourMonEntrepriseConfig } from '../assistants/pour-mon-entreprise/config'
import { rechercheCodeApeConfig } from '../assistants/recherche-code-ape/config'
import { économieCollaborativeConfig } from '../assistants/économie-collaborative/config'
import { PageConfig, SimulatorsDataParams } from './_configs/types'
import { artisteAuteurConfig } from './artiste-auteur/config'
import { autoEntrepreneurConfig } from './auto-entrepreneur/config'

View File

@ -1,10 +1,10 @@
import { Suspense, lazy, useState } from 'react'
import { lazy, Suspense, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { TrackPage } from '@/components/ATInternetTracking'
import Privacy from '@/components/layout/Footer/Privacy'
import MoreInfosOnUs from '@/components/MoreInfosOnUs'
import PageHeader from '@/components/PageHeader'
import Privacy from '@/components/layout/Footer/Privacy'
import Meta from '@/components/utils/Meta'
import { ScrollToTop } from '@/components/utils/Scroll'
import { Message } from '@/design-system'

View File

@ -9,9 +9,9 @@ import { toAtString } from '@/components/ATInternetTracking'
import PagesChart from '@/components/charts/PagesCharts'
import { useScrollToHash } from '@/components/utils/markdown'
import { Item, Message, Radio, ToggleGroup } from '@/design-system'
import InfoBulle from '@/design-system/InfoBulle'
import { Emoji } from '@/design-system/emoji'
import { Select } from '@/design-system/field/Select'
import InfoBulle from '@/design-system/InfoBulle'
import { Grid, Spacing } from '@/design-system/layout'
import { H2, H3 } from '@/design-system/typography/heading'
import { Body } from '@/design-system/typography/paragraphs'

View File

@ -1,6 +1,6 @@
import { DottedName } from 'modele-social'
import reduceReducers from 'reduce-reducers'
import { Reducer, combineReducers } from 'redux'
import { combineReducers, Reducer } from 'redux'
import { SimulationConfig, Situation } from '@/pages/simulateurs/_configs/types'
import { Action } from '@/store/actions/actions'

View File

@ -1,6 +1,6 @@
import { composeWithDevToolsDevelopmentOnly } from '@redux-devtools/extension'
import { createReduxEnhancer } from '@sentry/react'
import { StoreEnhancer, applyMiddleware, createStore } from 'redux'
import { applyMiddleware, createStore, StoreEnhancer } from 'redux'
import reducers from '@/store/reducers/rootReducer'

View File

@ -1,10 +1,10 @@
import { DottedName } from 'modele-social'
import Engine, {
formatValue,
isPublicodesError,
PublicodesExpression,
Rule,
RuleNode,
formatValue,
isPublicodesError,
} from 'publicodes'
import { Situation } from '@/store/reducers/rootReducer'

View File

@ -1,5 +1,6 @@
import { unlinkSync, writeFileSync } from 'fs'
import path from 'path'
import { defineConfig } from 'vite'
import { PageConfig } from '@/pages/simulateurs/_configs/types'

View File

@ -1,6 +1,7 @@
import yaml from '@rollup/plugin-yaml'
import { statSync } from 'fs'
import path from 'path'
import yaml from '@rollup/plugin-yaml'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'

View File

@ -1,12 +1,13 @@
/* eslint-disable no-console */
import fs from 'fs/promises'
import path from 'path'
import replace from '@rollup/plugin-replace'
import yaml, { ValidYamlType } from '@rollup/plugin-yaml'
import legacy from '@vitejs/plugin-legacy'
import react from '@vitejs/plugin-react-swc'
import fs from 'fs/promises'
import path from 'path'
import serveStatic from 'serve-static'
import { Plugin, defineConfig, loadEnv } from 'vite'
import { defineConfig, loadEnv, Plugin } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
import { runScriptOnFileChange } from './scripts/runScriptOnFileChange'