Ajoute des types TypeScript

pull/976/head
Maxime Quandalle 2020-04-12 23:30:58 +02:00
parent 5269d32d81
commit 7b7dc15624
38 changed files with 326 additions and 286 deletions

View File

@ -106,7 +106,6 @@
"@babel/core": "^7.6.4",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"monaco-editor-webpack-plugin": "^1.9.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
@ -132,6 +131,7 @@
"@types/react-router-hash-link": "^1.2.1",
"@types/react-syntax-highlighter": "^11.0.4",
"@types/styled-components": "^4.1.19",
"@types/webpack": "^4.41.10",
"@types/webpack-env": "^1.14.1",
"akh": "^3.1.2",
"autoprefixer": "^9.3.1",
@ -176,6 +176,7 @@
"mocha": "^5.0.4",
"mocha-webpack": "^2.0.0-beta.0",
"mock-local-storage": "^1.0.5",
"monaco-editor-webpack-plugin": "^1.9.0",
"nearley-loader": "^2.0.0",
"postcss-loader": "^2.1.2",
"prettier": "^1.19.1",

View File

@ -4,7 +4,7 @@ import { TrackerProvider } from 'Components/utils/withTracker'
import { createBrowserHistory } from 'history'
import { AvailableLangs } from 'i18n'
import i18next from 'i18next'
import React, { useEffect } from 'react'
import React, { useEffect, useMemo } from 'react'
import { I18nextProvider } from 'react-i18next'
import { Provider as ReduxProvider } from 'react-redux'
import { Router } from 'react-router-dom'
@ -42,14 +42,14 @@ if (
}
export type ProviderProps = {
tracker?: Tracker
basename: string
sitePaths: SitePaths
language: AvailableLangs
initialStore: RootState
onStoreCreated: (store: Store) => void
reduxMiddlewares: Array<Middleware>
children: React.ReactNode
tracker?: Tracker
sitePaths?: SitePaths
initialStore?: RootState
onStoreCreated?: (store: Store) => void
reduxMiddlewares?: Array<Middleware>
}
export default function Provider({
@ -62,9 +62,13 @@ export default function Provider({
onStoreCreated,
children
}: ProviderProps) {
const history = createBrowserHistory({
basename: process.env.NODE_ENV === 'production' ? '' : basename
})
const history = useMemo(
() =>
createBrowserHistory({
basename: process.env.NODE_ENV === 'production' ? '' : basename
}),
[]
)
useEffect(() => {
tracker?.connectToHistory(history)
return () => {
@ -82,10 +86,12 @@ export default function Provider({
...(reduxMiddlewares ?? [])
)
)
if (language) {
i18next.changeLanguage(language)
if (initialStore) initialStore.lang = language
}
useEffect(() => {
if (language) {
i18next.changeLanguage(language)
}
}, [])
if (language && initialStore) initialStore.lang = language
const store = createStore(reducers, initialStore, storeEnhancer)
onStoreCreated?.(store)
@ -113,7 +119,7 @@ export default function Provider({
color={iframeCouleur && decodeURIComponent(iframeCouleur)}
>
<TrackerProvider value={tracker!}>
<SitePathProvider value={sitePaths}>
<SitePathProvider value={sitePaths as any}>
<I18nextProvider i18n={i18next}>
<Router history={history}>
<>{children}</>

View File

@ -2,8 +2,9 @@ import { SitePaths } from 'Components/utils/withSitePaths'
import { History } from 'history'
import { RootState, SimulationConfig } from 'Reducers/rootReducer'
import { ThunkAction } from 'redux-thunk'
import { DottedName } from 'Rules'
import { DottedName, Situation } from 'Rules'
import { deletePersistedSimulation } from '../storage/persistSimulation'
import { CompanyStatusAction } from './companyStatusActions'
export type Action =
| ResetSimulationAction
@ -19,8 +20,9 @@ export type Action =
| SetSituationBranchAction
| UpdateDefaultUnitAction
| SetActiveTargetAction
| CompanyStatusAction
export type ThunkResult<R> = ThunkAction<
export type ThunkResult<R = void> = ThunkAction<
R,
RootState,
{ history: History; sitePaths: SitePaths },
@ -138,7 +140,11 @@ export const updateUnit = (defaultUnit: string) =>
defaultUnit
} as const)
export function setExample(name: string, situation, dottedName: DottedName) {
export function setExample(
name: string,
situation: Situation,
dottedName: DottedName
) {
return { type: 'SET_EXAMPLE', name, situation, dottedName } as const
}

View File

@ -1,11 +1,48 @@
import { dropWhile } from 'ramda'
import { nextQuestionUrlSelector } from 'Selectors/companyStatusSelectors'
import { Action, ThunkResult } from './actions'
const thenGoToNextQuestion = actionCreator => (...args: unknown[]) => (
dispatch,
getState,
{ history, sitePaths }
) => {
export type CompanyStatusAction =
| CompanyIsSoleProprietorshipAction
| DefineDirectorStatusAction
| MultipleAssociatesAction
| CompanyIsMicroentrepriseAction
| SpecifyDirectorsShareAction
| ResetCompanyStatusChoiceAction
type CompanyIsSoleProprietorshipAction = {
type: 'COMPANY_IS_SOLE_PROPRIETORSHIP'
isSoleProprietorship?: boolean
}
type DefineDirectorStatusAction = {
type: 'DEFINE_DIRECTOR_STATUS'
status: DirectorStatus
}
type MultipleAssociatesAction = {
type: 'COMPANY_HAS_MULTIPLE_ASSOCIATES'
multipleAssociates?: boolean
}
type CompanyIsMicroentrepriseAction = {
type: 'COMPANY_IS_MICROENTERPRISE'
autoEntrepreneur?: boolean
}
type SpecifyDirectorsShareAction = {
type: 'SPECIFY_DIRECTORS_SHARE'
minorityDirector?: boolean
}
type ResetCompanyStatusChoiceAction = {
type: 'RESET_COMPANY_STATUS_CHOICE'
answersToReset?: string[]
}
const thenGoToNextQuestion = (actionCreator: (...args: any[]) => Action) => (
...args: any[]
): ThunkResult => (dispatch, getState, { history, sitePaths }) => {
dispatch(actionCreator(...args))
history.push(nextQuestionUrlSelector(getState(), { sitePaths }))
}
@ -52,7 +89,7 @@ export const directorIsInAMinority = thenGoToNextQuestion(
} as const)
)
export const goToCompanyStatusChoice = () => (
export const goToCompanyStatusChoice = (): ThunkResult => (
dispatch,
_,
{ history, sitePaths }
@ -63,7 +100,7 @@ export const goToCompanyStatusChoice = () => (
history.push(sitePaths.créer.index)
}
export const resetCompanyStatusChoice = (from: string) => (
export const resetCompanyStatusChoice = (from: string): ThunkResult => (
dispatch,
getState
) => {
@ -77,5 +114,5 @@ export const resetCompanyStatusChoice = (from: string) => (
dispatch({
type: 'RESET_COMPANY_STATUS_CHOICE',
answersToReset
})
} as const)
}

View File

@ -25,6 +25,16 @@ export async function searchDenominationOrSiren(value: string) {
return searchFullText(value)
}
type SireneData = {
etablissement: Array<{
siren: string
is_siege: string
categorie_entreprise: string
activite_principale: string
l1_normalisee: string
}>
}
export type Etablissement = {
siren: string
denomination?: string
@ -39,7 +49,7 @@ async function searchFullText(
if (!response.ok) {
return null
}
const json = await response.json()
const json: SireneData = await response.json()
const etablissements = json.etablissement
.filter(
({ is_siege, categorie_entreprise, activite_principale }) =>

View File

@ -8,7 +8,6 @@ import { animated, config, useSpring } from 'react-spring'
import { DottedName } from 'Rules'
import { parsedRulesSelector } from 'Selectors/analyseSelectors'
import répartitionSelector from 'Selectors/repartitionSelectors'
import { isIE } from '../utils'
import './Distribution.css'
import './PaySlip'
import RuleLink from './RuleLink'
@ -73,7 +72,7 @@ export function DistributionBranch({
className="distribution-chart__item"
style={{ opacity: styles.opacity }}
>
<BranchIcône icône={icon ?? branche.icons} />
<BranchIcône icône={(icon ?? branche.icons) as string} />
<div className="distribution-chart__item-content">
<p className="distribution-chart__counterparts">
<span className="distribution-chart__branche-name">
@ -95,15 +94,19 @@ export function DistributionBranch({
)
}
let ChartItemBar = ({ styles, color, montant }) => (
type ChartItemBarProps = {
styles: React.CSSProperties
color: string
montant: number
}
let ChartItemBar = ({ styles, color, montant }: ChartItemBarProps) => (
<div className="distribution-chart__bar-container">
<animated.div
className="distribution-chart__bar"
style={{
backgroundColor: color,
...(!isIE()
? { flex: styles.flex }
: { minWidth: styles.flex * 500 + 'px' })
...styles
}}
/>
<div
@ -120,7 +123,7 @@ let ChartItemBar = ({ styles, color, montant }) => (
</div>
)
let BranchIcône = ({ icône }) => (
let BranchIcône = ({ icône }: { icône: string }) => (
<div className="distribution-chart__legend">
<span className="distribution-chart__icon">{emoji(icône)}</span>
</div>

View File

@ -20,7 +20,7 @@ export default function RulePage() {
const brancheName = useSelector(situationBranchNameSelector)
const valuesToShow = !useSelector(noUserInputSelector)
const { name } = useParams()
const decodedRuleName = decodeRuleName(name)
const decodedRuleName = decodeRuleName(name ?? '')
const renderRule = (dottedName: DottedName) => {
return (

View File

@ -1,12 +1,26 @@
import { normalizeDateString } from 'Engine/date'
import { RuleInputProps } from 'Engine/RuleInput'
import { Rule } from 'Engine/types'
import React, { useCallback, useMemo } from 'react'
import styled from 'styled-components'
import InputSuggestions from './InputSuggestions'
import SendButton from './SendButton'
export default function DateInput({ suggestions, onChange, onSubmit, value }) {
type DateInputProps = {
onChange: RuleInputProps['onChange']
onSubmit: RuleInputProps['onSubmit']
value: RuleInputProps['value']
suggestions: Rule['suggestions']
}
export default function DateInput({
suggestions,
onChange,
onSubmit,
value
}: DateInputProps) {
const dateValue = useMemo(() => {
if (!value) return undefined
if (!value || typeof value !== 'string') return undefined
const [day, month, year] = normalizeDateString(value).split('/')
return `${year}-${month}-${day}`
}, [value])
@ -32,7 +46,7 @@ export default function DateInput({ suggestions, onChange, onSubmit, value }) {
onFirstClick={value => {
onChange(normalizeDateString(value as string))
}}
onSecondClick={() => onSubmit('suggestion')}
onSecondClick={() => onSubmit?.('suggestion')}
/>
</div>
<div className="answer">

View File

@ -1,3 +1,4 @@
import { Rule } from 'Engine/types'
import { toPairs } from 'ramda'
import React, { useState } from 'react'
import { useTranslation } from 'react-i18next'
@ -6,7 +7,7 @@ import { defaultUnitSelector } from 'Selectors/analyseSelectors'
import { convertUnit, parseUnit, Unit } from '../../engine/units'
type InputSuggestionsProps = {
suggestions: Record<string, number>
suggestions?: Rule['suggestions']
onFirstClick: (val: number | string) => void
onSecondClick?: (val: number | string) => void
unit?: Unit
@ -18,7 +19,7 @@ export default function InputSuggestions({
onFirstClick,
unit
}: InputSuggestionsProps) {
const [suggestion, setSuggestion] = useState<number>()
const [suggestion, setSuggestion] = useState<string | number>()
const { t } = useTranslation()
const defaultUnit = parseUnit(useSelector(defaultUnitSelector) ?? '')
if (!suggestions) return null
@ -27,8 +28,11 @@ export default function InputSuggestions({
<div css="display: flex; align-items: baseline; ">
<small>Suggestions :</small>
{toPairs(suggestions).map(([text, value]: [string, number]) => {
value = unit ? convertUnit(unit, defaultUnit, value) : value
{toPairs(suggestions).map(([text, value]: [string, string | number]) => {
value =
unit && typeof value === 'number'
? convertUnit(unit, defaultUnit, value)
: value
return (
<button
className="ui__ link-button"

View File

@ -7,19 +7,19 @@ import { Trans } from 'react-i18next'
import Explicable from './Explicable'
import SendButton from './SendButton'
/* Ceci est une saisie de type "radio" : l'utilisateur choisit une réponse dans une liste, ou une liste de listes.
Les données @choices sont un arbre de type:
- nom: motif CDD # La racine, unique, qui formera la Question. Ses enfants sont les choix possibles
enfants:
- nom: motif classique
enfants:
- nom: motif saisonnier
- nom: motif remplacement
- nom: motif contrat aidé
- nom: motif complément de formation
/* Ceci est une saisie de type "radio" : l'utilisateur choisit une réponse dans
une liste, ou une liste de listes. Les données @choices sont un arbre de type:
- nom: motif CDD # La racine, unique, qui formera la Question. Ses enfants
sont les choix possibles enfants:
- nom: motif classique enfants:
- nom: motif saisonnier
- nom: motif remplacement
- nom: motif contrat aidé
- nom: motif complément de formation
A chaque nom est associé une propriété 'données' contenant l'entité complète (et donc le titre, le texte d'aide etc.) : ce n'est pas à
ce composant (une vue) d'aller les chercher.
A chaque nom est associé une propriété 'données' contenant l'entité complète
(et donc le titre, le texte d'aide etc.) : ce n'est pas à ce composant (une
vue) d'aller les chercher.
*/

View File

@ -1,7 +1,7 @@
import React from 'react'
import './index.css'
export default function Checkbox(props) {
export default function Checkbox(props: React.ComponentProps<'input'>) {
return (
<>
<input

View File

@ -2,7 +2,7 @@ import classnames from 'classnames'
import { Markdown } from 'Components/utils/markdown'
import { ScrollToElement } from 'Components/utils/Scroll'
import { TrackerContext } from 'Components/utils/withTracker'
import React, { Component, useContext, useState } from 'react'
import React, { useContext, useEffect, useState } from 'react'
import Animate from 'Ui/animate'
import Checkbox from '../Checkbox'
import './index.css'
@ -81,40 +81,39 @@ export function CheckItem({
export type ChecklistProps = {
children: React.ReactNode
onItemCheck: (string, boolean) => void
onInitialization: (arg: Array<string>) => void
defaultChecked: { [key: string]: boolean }
onItemCheck?: (name: string, isChecked: boolean) => void
onInitialization?: (arg: Array<string>) => void
defaultChecked?: { [key: string]: boolean }
}
export class Checklist extends Component<ChecklistProps> {
checklist: any
static defaultProps = {
defaultChecked: {},
onItemCheck: () => {},
onInitialization: () => {}
}
constructor(props: ChecklistProps) {
super(props)
this.checklist = React.Children.toArray(props.children)
.filter(Boolean)
.map((child: any) =>
React.cloneElement(child, {
onChange: checked => props.onItemCheck(child.props.name, checked),
defaultChecked:
child.props.defaultChecked || props.defaultChecked[child.props.name]
})
)
props.onInitialization &&
props.onInitialization(
this.checklist.map((child: any) => child.props.name)
)
}
render() {
return (
<ul className="ui__ no-bullet checklist">
{this.checklist.map((checkItem: any) => (
<li key={checkItem.props.name}>{checkItem}</li>
))}
</ul>
)
}
export function Checklist({
children,
onItemCheck,
onInitialization,
defaultChecked
}: ChecklistProps) {
const checklist = React.Children.toArray(children)
.filter(Boolean)
.map(child => {
if (!React.isValidElement(child)) {
throw new Error('Invalid child passed to Checklist')
}
return React.cloneElement(child, {
onChange: (checked: React.ChangeEvent<HTMLInputElement>) =>
onItemCheck?.(child.props.name, checked.target.checked),
defaultChecked:
child.props.defaultChecked || defaultChecked?.[child.props.name]
})
})
useEffect(() => {
onInitialization?.(checklist.map(child => child.props.name))
})
return (
<ul className="ui__ no-bullet checklist">
{checklist.map(checkItem => (
<li key={checkItem.props.name}>{checkItem}</li>
))}
</ul>
)
}

View File

@ -80,7 +80,9 @@ export function ScrollToElement({
...(!children ? { position: 'absolute' } : {})
}}
ref={ref}
/>
>
{children}
</div>
)
}

View File

@ -18,10 +18,10 @@ export const binaryOptionChoices = [
]
type Value = string | number | object | boolean
type Props = {
export type RuleInputProps = {
rules: ParsedRules
dottedName: DottedName
onChange: (value: Value) => void
onChange: (value: Value | null) => void
useSwitch?: boolean
isTarget?: boolean
autoFocus?: boolean
@ -44,7 +44,7 @@ export default function RuleInput({
autoFocus = false,
className,
onSubmit
}: Props) {
}: RuleInputProps) {
let rule = rules[dottedName]
let unit = rule.unit || rule.defaultUnit
let language = useTranslation().i18n.language
@ -139,7 +139,7 @@ export let buildVariantTree = (allRules, path) => {
shouldBeExpanded
? {
canGiveUp,
children: (variants as any).map(v => rec(path + ' . ' + v))
children: variants.map(v => rec(path + ' . ' + v))
}
: null
)

View File

@ -1,7 +1,10 @@
// Currenty we systematically bundle all the rules even if we only need a
// sub-section of them. We might support "code-splitting" the rules in the
// future.
import { Rules as GenericRules } from 'Engine/types'
import {
EvaluatedRule as GenericEvaluatedRule,
Rules as GenericRules
} from 'Engine/types'
import artisteAuteur from './artiste-auteur.yaml'
import base from './base.yaml'
import chômagePartiel from './chômage-partiel.yaml'
@ -21,6 +24,8 @@ import situationPersonnelle from './situation-personnelle.yaml'
export type DottedName = keyof typeof jsonRules
export type Rules = GenericRules<DottedName>
export type EvaluatedRule = GenericEvaluatedRule<DottedName>
export type Situation = Partial<Record<DottedName, string>>
const rules: Rules = {
...base,

View File

@ -58,7 +58,7 @@ const middlewares = [
type InFranceRouteProps = {
basename: ProviderProps['basename']
language: ProviderProps['language']
rules: ProviderProps['initialStore']['rules']
rules: NonNullable<ProviderProps['initialStore']>['rules']
}
function InFranceRoute({ basename, language, rules }: InFranceRouteProps) {

View File

@ -8,13 +8,12 @@ import { Markdown } from 'Components/utils/markdown'
import { ScrollToTop } from 'Components/utils/Scroll'
import { formatValue } from 'Engine/format'
import { getRuleFromAnalysis } from 'Engine/ruleUtils'
import { EvaluatedRule } from 'Engine/types'
import React, { useContext, useEffect, useState } from 'react'
import { Helmet } from 'react-helmet'
import { Trans, useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
import { useLocation } from 'react-router'
import { DottedName } from 'Rules'
import { EvaluatedRule } from 'Rules'
import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors'
import styled from 'styled-components'
import Animate from 'Ui/animate'
@ -191,7 +190,17 @@ function ExplanationSection() {
)
}
function ComparaisonTable({ rows: [head, ...body] }) {
type ComparaisonTableProps = {
rows: [Array<string>, ...Array<Line>]
}
type Line = Array<
EvaluatedRule & {
additionalText?: React.ReactNode
}
>
function ComparaisonTable({ rows: [head, ...body] }: ComparaisonTableProps) {
const columns = head.filter(x => x !== '')
const [currentColumnIndex, setCurrentColumnIndex] = useState(
columns.length - 1
@ -261,7 +270,7 @@ function ComparaisonTable({ rows: [head, ...body] }) {
)
}
function ValueWithLink(rule: EvaluatedRule<DottedName>) {
function ValueWithLink(rule: EvaluatedRule) {
const { language } = useTranslation().i18n
return (
<RuleLink {...rule}>

View File

@ -9,24 +9,25 @@ import React, { useContext } from 'react'
import emoji from 'react-easy-emoji'
import { Helmet } from 'react-helmet'
import { Trans, useTranslation } from 'react-i18next'
import { connect, useSelector } from 'react-redux'
import { useDispatch, useSelector } from 'react-redux'
import { Link } from 'react-router-dom'
import { RootState } from 'Reducers/rootReducer'
import { LegalStatus } from 'Selectors/companyStatusSelectors'
import * as Animate from 'Ui/animate'
import { CheckItem, Checklist } from 'Ui/Checklist'
import StatutDescription from './StatutDescription'
function CreateCompany({
statut,
onChecklistInitialization,
onItemCheck,
onStatusChange
}) {
type CreateCompanyProps = {
statut: LegalStatus
}
export default function CreateCompany({ statut }: CreateCompanyProps) {
const { t, i18n } = useTranslation()
const sitePaths = useContext(SitePathsContext)
const companyCreationChecklist = useSelector(
(state: RootState) => state.inFranceApp.companyCreationChecklist
)
const dispatch = useDispatch()
// TODO : add this logic inside selector
const isAutoentrepreneur = statut.startsWith('auto-entrepreneur')
@ -74,7 +75,7 @@ function CreateCompany({
<Scroll.toTop />
<div css="transform: translateY(2rem);">
<button
onClick={onStatusChange}
onClick={() => dispatch(goToCompanyStatusChoice())}
className="ui__ simple small push-left button"
>
<Trans i18nKey="entreprise.retour"> Choisir un autre statut</Trans>
@ -101,8 +102,12 @@ function CreateCompany({
</p>
<Checklist
key={statut}
onInitialization={items => onChecklistInitialization(statut, items)}
onItemCheck={x => onItemCheck}
onInitialization={items =>
dispatch(initializeCompanyCreationChecklist(statut, items))
}
onItemCheck={(name, isChecked) =>
dispatch(checkCompanyCreationItem(name, isChecked))
}
defaultChecked={companyCreationChecklist}
>
<CheckItem
@ -541,13 +546,11 @@ function CreateCompany({
)
}
export default connect(null, {
onChecklistInitialization: initializeCompanyCreationChecklist,
onItemCheck: checkCompanyCreationItem,
onStatusChange: goToCompanyStatusChoice
})(CreateCompany)
type StatutsExampleProps = {
statut: string
}
let StatutsExample = ({ statut }) => {
let StatutsExample = ({ statut }: StatutsExampleProps) => {
const links = {
SARL: 'https://bpifrance-creation.fr/file/109068/download?token=rmc93Ve3',
EURL: 'https://bpifrance-creation.fr/file/109070/download?token=Ul-rT6Z0'
@ -556,7 +559,7 @@ let StatutsExample = ({ statut }) => {
if (!(statut in links)) return null
return (
<a target="_blank" href={links[statut]}>
<a target="_blank" href={links[statut as keyof typeof links]}>
<Trans i18nKey="entreprise.tâches.statuts.exemple">
Exemple de statuts pour votre
</Trans>{' '}

View File

@ -2,9 +2,10 @@ import { companyHasMultipleAssociates } from 'Actions/companyStatusActions'
import React from 'react'
import { Helmet } from 'react-helmet'
import { Trans, useTranslation } from 'react-i18next'
import { connect } from 'react-redux'
import { useDispatch } from 'react-redux'
const NumberOfAssociates = ({ companyHasMultipleAssociates }) => {
export default function NumberOfAssociates() {
const dispatch = useDispatch()
const { t } = useTranslation()
return (
<>
@ -42,7 +43,7 @@ const NumberOfAssociates = ({ companyHasMultipleAssociates }) => {
<div className="ui__ answer-group">
<button
onClick={() => {
companyHasMultipleAssociates(false)
dispatch(companyHasMultipleAssociates(false))
}}
className="ui__ button"
>
@ -50,7 +51,7 @@ const NumberOfAssociates = ({ companyHasMultipleAssociates }) => {
</button>
<button
onClick={() => {
companyHasMultipleAssociates(true)
dispatch(companyHasMultipleAssociates(true))
}}
className="ui__ button"
>
@ -60,7 +61,3 @@ const NumberOfAssociates = ({ companyHasMultipleAssociates }) => {
</>
)
}
export default connect(null, { companyHasMultipleAssociates })(
NumberOfAssociates
)

View File

@ -59,7 +59,11 @@ export default function PreviousAnswers() {
([key, value]) =>
!isNil(value) && (
<li key={key}>
<Link to={sitePaths.créer.guideStatut[key]}>
<Link
to={
sitePaths.créer.guideStatut[key as keyof typeof legalStatus]
}
>
{requirementToText(key as any, value as any)}
</Link>
</li>

View File

@ -1,11 +1,11 @@
import { isSoleProprietorship } from 'Actions/companyStatusActions'
import { compose } from 'ramda'
import React from 'react'
import { Helmet } from 'react-helmet'
import { Trans, useTranslation } from 'react-i18next'
import { connect } from 'react-redux'
import { useDispatch } from 'react-redux'
const SoleProprietorship = ({ isSoleProprietorship }) => {
export default function SoleProprietorship() {
const dispatch = useDispatch()
const { t } = useTranslation()
return (
<>
@ -69,7 +69,7 @@ const SoleProprietorship = ({ isSoleProprietorship }) => {
<div className="ui__ answer-group">
<button
onClick={() => {
isSoleProprietorship(true)
dispatch(isSoleProprietorship(true))
}}
className="ui__ button"
>
@ -79,7 +79,7 @@ const SoleProprietorship = ({ isSoleProprietorship }) => {
</button>
<button
onClick={() => {
isSoleProprietorship(false)
dispatch(isSoleProprietorship(false))
}}
className="ui__ button"
>
@ -91,7 +91,3 @@ const SoleProprietorship = ({ isSoleProprietorship }) => {
</>
)
}
export default compose(connect(null, { isSoleProprietorship }))(
SoleProprietorship
)

View File

@ -1,11 +1,11 @@
import RuleLink from 'Components/RuleLink'
import { SitePathsContext } from 'Components/utils/withSitePaths'
import { formatValue } from 'Engine/format'
import React, { useContext } from 'react'
import React from 'react'
import emoji from 'react-easy-emoji'
import { Trans } from 'react-i18next'
import Skeleton from 'react-loading-skeleton'
import ReactToPrint from 'react-to-print'
import { DottedName, EvaluatedRule } from 'Rules'
import Animate from 'Ui/animate'
import { useRule } from '../../Simulateurs/ArtisteAuteur'
import simulationConfig from './config.yaml'
@ -14,12 +14,11 @@ type ResultsProp = {
componentRef?: any
}
export function Results({ componentRef }: ResultsProp) {
const results = simulationConfig.objectifs.map(dottedName =>
useRule(dottedName)
const results: EvaluatedRule[] = simulationConfig.objectifs.map(
(dottedName: DottedName) => useRule(dottedName)
)
const onGoingComputation = !results.filter(node => node.nodeValue != null)
.length
const sitePaths = useContext(SitePathsContext)
return (
<div
className="ui__ card lighter-bg"

View File

@ -93,7 +93,7 @@ export default function SocialSecurity() {
<div className="ui__ center-flex">
{company?.statutJuridique === 'EI' &&
!company.isAutoEntrepreneur &&
process.env.MASTER === false && (
process.env.MASTER === 'false' && (
<Link
className="ui__ interactive card box"
to={{

View File

@ -76,7 +76,7 @@ export default function ActivitésSelection() {
type ActivitéSelectionProps = {
activités: Array<string>
currentActivité?: any
currentActivité?: string
}
export const ActivitéSelection = ({
@ -107,7 +107,10 @@ export const ActivitéSelection = ({
)
})}
</div>
<NextButton disabled={nextButtonDisabled} activité={currentActivité} />
<NextButton
disabled={nextButtonDisabled}
activité={currentActivité as any}
/>
</>
)
}

View File

@ -7,7 +7,12 @@ import { activitéVue } from './actions'
import { nextActivitéSelector } from './selectors'
import { StoreContext } from './StoreContext'
export default function NextButton({ activité, disabled }) {
type NextButtonProps = {
activité: string
disabled: boolean
}
export default function NextButton({ activité, disabled }: NextButtonProps) {
const sitePaths = useContext(SitePathsContext)
const { state, dispatch } = useContext(StoreContext)
const nextActivité = nextActivitéSelector(state, activité)

View File

@ -138,7 +138,7 @@ export default function VotreSituation() {
)
}
const ActivitéList = ({ activités }) => {
const ActivitéList = ({ activités }: { activités: string[] }) => {
const { state } = useContext(StoreContext)
return (
<div css="display: flex; flex-wrap: wrap; margin: 0 -1rem;">

View File

@ -4,26 +4,30 @@ export type Action =
| ReturnType<typeof activitéVue>
| ReturnType<typeof changeCritèreExonération>
export const selectSeuilRevenus = (activité, seuilAtteint: number) =>
export const selectSeuilRevenus = (activité: string, seuilAtteint: number) =>
({
type: 'SELECT_SEUIL_REVENUS_ATTEINT',
activité,
seuilAtteint
} as const)
export const toggleActivité = activité =>
export const toggleActivité = (activité: string) =>
({
type: 'TOGGLE_ACTIVITÉ_EFFECTUÉE',
activité
} as const)
export const activitéVue = activité =>
export const activitéVue = (activité: string) =>
({
type: 'ACTIVITÉ_VUE',
activité
} as const)
export const changeCritèreExonération = (activité, index, estRespecté) =>
export const changeCritèreExonération = (
activité: string,
index: string,
estRespecté: boolean
) =>
({
type: 'CHANGE_CRITÈRE_EXONÉRATION',
activité,

View File

@ -10,12 +10,13 @@ import Landing from './Landing'
import Studio from './LazyStudio'
import Mécanismes from './Mécanismes'
function Router({ language, rules }) {
function Router() {
const language = 'fr'
useEffect(() => {
getSessionStorage()?.setItem('lang', language)
}, [language])
return (
<Provider basename="publicodes" language={language} rules={rules}>
<Provider basename="publicodes" language={language}>
<RouterSwitch />
</Provider>
)

View File

@ -1,5 +1,6 @@
import React from 'react'
import { Link } from 'react-router-dom'
export const Header = ({ noSubtitle = false, sectionName = '' }) => (
<header css="text-align: center; a {text-decoration: none}">
<Link to="/">

View File

@ -8,8 +8,9 @@ import emoji from 'react-easy-emoji'
import MonacoEditor from 'react-monaco-editor'
import { useLocation } from 'react-router'
import styled from 'styled-components'
const EXAMPLE_CODE = `
# Bienvenu dans le bac à sable du langage publicode !
# Bienvenue dans le bac à sable du langage publicode !
# Pour en savoir plus sur le langage, consultez le tutoriel :
# => https://publi.codes
@ -25,7 +26,7 @@ dépenses primeur:
- prix . avocat * 3 avocat
`
function useDebounce(value, delay) {
function useDebounce<T>(value: T, delay: number) {
const [debouncedValue, setDebouncedValue] = useState(value)
useEffect(
() => {
@ -196,7 +197,7 @@ export const Results = ({ targets, onClickShare }: ResultsProps) => {
{analysis.temporalValue
?.filter(({ value }) => value !== false)
.map(({ start: du, end: au, value }) => (
<span key={du}>
<span key={`${du ?? ''}-${au ?? ''}`}>
<small>
Du <em>{du}</em> au <em>{au}</em> :{' '}
</small>

View File

@ -3,7 +3,7 @@ declare module NodeJS {
EN_SITE: string
FR_SITE: string
NODE_ENV: 'development' | 'production'
MASTER: boolean
MASTER: 'true' | 'false'
GITHUB_API_SECRET: string
}
}

4
source/types/import-markdown.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare module '*.md' {
const content: string
export default content
}

View File

@ -15,15 +15,7 @@ export const debounce = <F extends (...args: any[]) => void>(
}
}
export function isIE(): boolean {
return (
navigator.appName == 'Microsoft Internet Explorer' ||
(navigator.appName == 'Netscape' &&
new RegExp('Trident/.*rv:([0-9]{1,}[.0-9]{0,})').exec(
navigator.userAgent
) != null)
)
}
export const fetcher = (url: RequestInfo) => fetch(url).then(r => r.json())
export function inIframe(): boolean {
try {

View File

@ -25,7 +25,7 @@ module.exports.default = {
infrance: './source/sites/mon-entreprise.fr/entry.en.tsx',
'simulateur-iframe-integration':
'./source/sites/mon-entreprise.fr/iframe-integration-script.js',
publicodes: './source/sites/publi.codes/entry.js'
publicodes: './source/sites/publi.codes/entry.tsx'
},
output: {
path: path.resolve('./dist/'),
@ -37,7 +37,7 @@ module.exports.default = {
new EnvironmentPlugin({
EN_SITE: '/infrance${path}',
FR_SITE: '/mon-entreprise${path}',
MASTER: false
MASTER: 'false'
}),
new CopyPlugin([

170
yarn.lock
View File

@ -1173,6 +1173,11 @@
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5"
integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==
"@types/anymatch@*":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a"
integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==
"@types/babel__core@^7.1.0":
version "7.1.7"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89"
@ -1411,6 +1416,11 @@
resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47"
integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==
"@types/source-list-map@*":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9"
integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==
"@types/stack-utils@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
@ -1426,11 +1436,44 @@
"@types/react-native" "*"
csstype "^2.2.0"
"@types/tapable@*":
version "1.0.5"
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.5.tgz#9adbc12950582aa65ead76bffdf39fe0c27a3c02"
integrity sha512-/gG2M/Imw7cQFp8PGvz/SwocNrmKFjFsm5Pb8HdbHkZ1K8pmuPzOX4VeVoiEecFCVf4CsN1r3/BRvx+6sNqwtQ==
"@types/uglify-js@*":
version "3.0.5"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.5.tgz#2c70d5c68f6e002e3b2e4f849adc5f162546f633"
integrity sha512-L7EbSkhSaWBpkl+PZAEAqZTqtTeIsq7s/oX/q0LNnxxJoRVKQE0T81XDVyaxjiiKQwiV2vhVeYRqxdRNqGOGJw==
dependencies:
source-map "^0.6.1"
"@types/webpack-env@^1.14.1":
version "1.15.1"
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.1.tgz#c8e84705e08eed430b5e15b39c65b0944e4d1422"
integrity sha512-eWN5ElDTeBc5lRDh95SqA8x18D0ll2pWudU3uWiyfsRmIZcmUXpEsxPU+7+BsdCrO2vfLRC629u/MmjbmF+2tA==
"@types/webpack-sources@*":
version "0.1.7"
resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.7.tgz#0a330a9456113410c74a5d64180af0cbca007141"
integrity sha512-XyaHrJILjK1VHVC4aVlKsdNN5KBTwufMb43cQs+flGxtPAf/1Qwl8+Q0tp5BwEGaI8D6XT1L+9bSWXckgkjTLw==
dependencies:
"@types/node" "*"
"@types/source-list-map" "*"
source-map "^0.6.1"
"@types/webpack@^4.41.10":
version "4.41.10"
resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.10.tgz#2e1f6b3508a249854efe3dcc7690905ac5ee10be"
integrity sha512-vIy0qaq8AjOjZLuFPqpo7nAJzcoVXMdw3mvpNN07Uvdy0p1IpJeLNBe3obdRP7FX2jIusDE7z1pZa0A6qYUgnA==
dependencies:
"@types/anymatch" "*"
"@types/node" "*"
"@types/tapable" "*"
"@types/uglify-js" "*"
"@types/webpack-sources" "*"
source-map "^0.6.0"
"@types/yargs-parser@*":
version "15.0.0"
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d"
@ -1608,11 +1651,6 @@ abab@^2.0.0:
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a"
integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
accepts@~1.3.5, accepts@~1.3.7:
version "1.3.7"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
@ -3781,7 +3819,7 @@ debug@3.1.0, debug@=3.1.0:
dependencies:
ms "2.0.0"
debug@3.2.6, debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6:
debug@3.2.6, debug@^3.0.0, debug@^3.1.0, debug@^3.1.1:
version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
@ -3906,7 +3944,7 @@ detect-file@^1.0.0:
resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=
detect-libc@^1.0.2, detect-libc@^1.0.3:
detect-libc@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
@ -5056,13 +5094,6 @@ fs-extra@^6.0.1:
jsonfile "^4.0.0"
universalify "^0.1.0"
fs-minipass@^1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==
dependencies:
minipass "^2.6.0"
fs-mkdirp-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb"
@ -5791,7 +5822,7 @@ i18next@^19.0.1:
dependencies:
"@babel/runtime" "^7.3.1"
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
@ -5825,13 +5856,6 @@ iframe-resizer@^4.1.1:
resolved "https://registry.yarnpkg.com/iframe-resizer/-/iframe-resizer-4.2.10.tgz#c61c9119bb1bf31931fc3c3bb025e1891b18502c"
integrity sha512-9T/AWavGI5Q7nw2ch7qatkKvhK6S11eatuSh0SXpPXN3MV0HtN97KyifWJSuMj47rD6jbqe1CXT91PLQbexvEQ==
ignore-walk@^3.0.1:
version "3.0.3"
resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37"
integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==
dependencies:
minimatch "^3.0.4"
ignore@^3.3.5:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
@ -7641,21 +7665,6 @@ minimist@~0.0.1:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
dependencies:
safe-buffer "^5.1.2"
yallist "^3.0.0"
minizlib@^1.2.1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==
dependencies:
minipass "^2.9.0"
mississippi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f"
@ -7708,7 +7717,7 @@ mkdirp@0.5.1:
dependencies:
minimist "0.0.8"
mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@~0.5.1:
mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@~0.5.1:
version "0.5.5"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
@ -7870,15 +7879,6 @@ nearley@^2.19.0, nearley@^2.7.10:
randexp "0.4.6"
semver "^5.4.1"
needle@^2.2.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.1.tgz#14af48732463d7475696f937626b1b993247a56a"
integrity sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g==
dependencies:
debug "^3.2.6"
iconv-lite "^0.4.4"
sax "^1.2.4"
negotiator@0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
@ -7977,22 +7977,6 @@ node-notifier@^5.4.2:
shellwords "^0.1.1"
which "^1.3.0"
node-pre-gyp@*:
version "0.14.0"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
dependencies:
detect-libc "^1.0.2"
mkdirp "^0.5.1"
needle "^2.2.1"
nopt "^4.0.1"
npm-packlist "^1.1.6"
npmlog "^4.0.2"
rc "^1.2.7"
rimraf "^2.6.1"
semver "^5.3.0"
tar "^4.4.2"
node-releases@^1.1.53:
version "1.1.53"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4"
@ -8008,14 +7992,6 @@ noop-logger@^0.1.1:
resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2"
integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=
nopt@^4.0.1:
version "4.0.3"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48"
integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==
dependencies:
abbrev "1"
osenv "^0.1.4"
normalize-package-data@^2.3.2:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
@ -8060,27 +8036,6 @@ now-and-later@^2.0.0:
dependencies:
once "^1.3.2"
npm-bundled@^1.0.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b"
integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==
dependencies:
npm-normalize-package-bin "^1.0.1"
npm-normalize-package-bin@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2"
integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==
npm-packlist@^1.1.6:
version "1.4.8"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
dependencies:
ignore-walk "^3.0.1"
npm-bundled "^1.0.1"
npm-normalize-package-bin "^1.0.1"
npm-run-path@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
@ -8088,7 +8043,7 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"
npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2:
npmlog@^4.0.1, npmlog@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
@ -8299,7 +8254,7 @@ os-browserify@^0.3.0:
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"
integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=
os-homedir@^1.0.0, os-homedir@^1.0.1:
os-homedir@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
@ -8313,19 +8268,11 @@ os-locale@^3.1.0:
lcid "^2.0.0"
mem "^4.0.0"
os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
osenv@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
dependencies:
os-homedir "^1.0.0"
os-tmpdir "^1.0.0"
p-defer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
@ -10277,7 +10224,7 @@ select@^1.1.2:
resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=
"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1:
"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
@ -11080,19 +11027,6 @@ tar-stream@^2.0.0:
inherits "^2.0.3"
readable-stream "^3.1.1"
tar@^4.4.2:
version "4.4.13"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
dependencies:
chownr "^1.1.1"
fs-minipass "^1.2.5"
minipass "^2.8.6"
minizlib "^1.2.1"
mkdirp "^0.5.0"
safe-buffer "^5.1.2"
yallist "^3.0.3"
term-size@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69"
@ -12269,7 +12203,7 @@ yallist@^2.1.2:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3:
yallist@^3.0.2:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==