From 6de970f0e38de69dc3d4374b2c417c5ec1325973 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sat, 26 Oct 2019 18:21:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Migration=20vers=20TypeScript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Outils ====== Ce commit retire le tooling de Flow, et ajoute le support de TypeScript pour les fichiers .ts et .tsx. Il n'est pas nécessaire de tout migrer d'un coup ce qui facilite la transition. On garde en effet le compilateur Babel avec un preset TypeScript (ce qui permet donc de retirer à la fois les types Flow et TypeScript) plutôt que d'utiliser le compilateur standard pour la conversion du code. Cela permet aussi de mieux s'intégrer avec d'autres outils, notamment les test-runners. Ajout d'une nouvelle commande `yarn run type-check`, intégrée dans CircleCI. Par ailleurs ajout du support de l'opérateur ?? pour donner des valeurs par défaut (nullish-coalescing-operator). Typage des libraires tierces ============================ Les principales libraires que nous utilisons ont un typage TypeScript de bon niveau, ce qui facilite l'intégration. J'ai mis à jour react-i18next et i18next afin de corriger un problème de typage. Typage du code ============== Le typage est loin d'être complet dans ce commit, en particulier il manque les types relatifs au state Redux, ainsi qu'au moteur (règle, explication). Néanmoins le typage des contextes fonctionne, en particulier sitePaths (avec un type récursif non trivial !) qui a déjà permis de détecter un lien mort. Le typage des "paths" (Components/, Règles/, etc.) fonctionne bien, y compris avec l'auto-complétion automatique des import par Typescript. TypeScript se révèle déjà bien agréable dans VSCode (auto-complétion, refacto, etc.) ! Reste à migrer progressivement le reste du code ! --- .eslintrc.yaml | 2 - .flowconfig | 33 - .prettierrc | 22 +- .vscode/extensions.json | 1 - .vscode/settings.json | 8 +- CONTRIBUTION.md | 2 +- babel.config.js | 3 +- circle.yml | 10 +- jest.config.js | 2 +- jsconfig.json | 37 - package.json | 23 +- source/Provider.js | 2 + source/{Tracker.js => Tracker.ts} | 26 +- source/actions/actions.js | 1 - .../companyCreationChecklistActions.js | 1 - source/actions/companyStatusActions.js | 1 - source/actions/hiringChecklistAction.js | 1 - source/components/Banner.js | 6 +- source/components/CompanyDetails.js | 18 +- source/components/Feedback/FeedbackForm.js | 1 - source/components/Feedback/PageFeedback.js | 6 +- source/components/FindCompany.js | 13 +- source/components/PaySlip.js | 1 - source/components/PaySlipSections.js | 3 +- source/components/PreviousSimulationBanner.js | 1 - source/components/QuickLinks.js | 5 +- .../components/{Route404.js => Route404.tsx} | 3 +- source/components/RuleLink.js | 42 - source/components/RuleLink.tsx | 34 + source/components/SchemeComparaison.js | 5 +- source/components/SearchBar.js | 2 +- source/components/TargetSelection.js | 4 +- source/components/Value.js | 5 +- .../conversation/select/SelectTauxRisque.js | 2 +- source/components/index.js | 6 +- .../rule/{Algorithm.js => Algorithm.tsx} | 3 +- .../rule/{ColoredYaml.js => ColoredYaml.tsx} | 0 .../{Destinataire.js => Destinataire.tsx} | 0 .../rule/{Namespace.js => Namespace.tsx} | 0 .../rule/{References.js => References.tsx} | 8 +- .../rule/{RuleSource.js => RuleSource.tsx} | 0 ...ValuesContext.js => ShowValuesContext.tsx} | 0 ...TargetValue.js => AnimatedTargetValue.tsx} | 17 +- source/components/ui/Button/index.js | 12 - source/components/ui/Button/index.tsx | 10 + .../ui/Checkbox/{index.js => index.tsx} | 2 +- .../ui/Checklist/{index.js => index.tsx} | 62 +- .../ui/{InfoBulle.js => InfoBulle.tsx} | 2 +- .../ui/{Progress.js => Progress.tsx} | 0 .../ui/{SocialIcon.js => SocialIcon.tsx} | 4 +- source/components/ui/animate.js | 161 ---- source/components/ui/animate.tsx | 163 ++++ .../{DisableScroll.js => DisableScroll.ts} | 0 ...{embeddedContext.js => embeddedContext.ts} | 0 .../utils/{markdown.js => markdown.tsx} | 11 +- .../{persistState.js => persistState.ts} | 6 +- .../utils/{withColours.js => withColours.tsx} | 79 +- source/components/utils/withSitePaths.js | 34 - source/components/utils/withSitePaths.tsx | 30 + source/components/utils/withTracker.js | 19 - source/components/utils/withTracker.tsx | 19 + source/engine/index.js | 2 +- source/{i18n.js => i18n.ts} | 0 source/reducers/inFranceAppReducer.js | 1 - source/reducers/rootReducer.js | 1 - source/reducers/storageReducer.js | 1 - source/server.js | 1 + .../mon-entreprise.fr/{App.js => App.tsx} | 88 +- .../{entry.en.js => entry.en.tsx} | 0 .../{entry.fr.js => entry.fr.tsx} | 0 .../layout/Footer/{Contact.js => Contact.tsx} | 0 .../layout/Footer/{Footer.js => Footer.tsx} | 29 +- .../layout/Footer/{Privacy.js => Privacy.tsx} | 0 .../sites/mon-entreprise.fr/layout/Header.js | 50 -- .../sites/mon-entreprise.fr/layout/Header.tsx | 52 ++ ...torActions.js => trackSimulatorActions.ts} | 7 +- ...erRegistration.js => AfterRegistration.tsx} | 79 +- ...ationChecklist.js => CreationChecklist.tsx} | 236 +++--- .../Créer/GuideStatut/AutoEntrepreneur.js | 72 -- .../Créer/GuideStatut/AutoEntrepreneur.tsx | 53 ++ .../{DirectorStatus.js => DirectorStatus.tsx} | 24 +- ...inorityDirector.js => MinorityDirector.tsx} | 49 +- .../Créer/GuideStatut/NumberOfAssociate.js | 75 -- .../Créer/GuideStatut/NumberOfAssociate.tsx | 66 ++ ...{PickLegalStatus.js => PickLegalStatus.tsx} | 101 +-- .../Créer/GuideStatut/PreviousAnswers.js | 62 -- .../Créer/GuideStatut/PreviousAnswers.tsx | 58 ++ ...roprietorship.js => SoleProprietorship.tsx} | 10 +- .../pages/Créer/GuideStatut/index.js | 91 --- .../pages/Créer/GuideStatut/index.tsx | 75 ++ .../pages/Créer/{Home.js => Home.tsx} | 72 +- ...tutDescription.js => StatutDescription.tsx} | 9 +- .../mon-entreprise.fr/pages/Créer/index.js | 43 - .../mon-entreprise.fr/pages/Créer/index.tsx | 33 + .../Dev/{ColorPicker.js => ColorPicker.tsx} | 0 .../pages/Dev/{Couleur.js => Couleur.tsx} | 1 - ...IntegrationTest.js => IntegrationTest.tsx} | 0 .../pages/Dev/{Personas.js => Personas.tsx} | 0 .../pages/Dev/{Sitemap.js => Sitemap.tsx} | 0 ...pleSituations.js => ExampleSituations.tsx} | 21 +- .../{RulesList.js => RulesList.tsx} | 3 +- .../Documentation/{index.js => index.tsx} | 9 +- .../Gérer/{Embaucher.js => Embaucher.tsx} | 6 +- .../pages/Gérer/{Home.js => Home.tsx} | 10 +- .../pages/Gérer/SchemeSelection.js | 75 -- .../pages/Gérer/SchemeSelection.tsx | 73 ++ ...{SécuritéSociale.js => SécuritéSociale.tsx} | 5 +- .../pages/Gérer/{Video.js => Video.tsx} | 0 .../pages/Gérer/{index.js => index.tsx} | 0 .../{IframeFooter.js => IframeFooter.tsx} | 0 ...teurEmbauche.js => SimulateurEmbauche.tsx} | 0 .../pages/Iframes/{index.js => index.tsx} | 0 .../pages/Landing/{Landing.js => Landing.tsx} | 41 +- .../pages/Simulateurs/AssimiléSalarié.js | 58 -- .../pages/Simulateurs/AssimiléSalarié.tsx | 57 ++ ...toEntrepreneur.js => AutoEntrepreneur.tsx} | 8 +- .../pages/Simulateurs/{Home.js => Home.tsx} | 0 .../{Indépendant.js => Indépendant.tsx} | 10 +- .../Simulateurs/{Salarié.js => Salarié.tsx} | 74 +- ...meComparaison.js => SchemeComparaison.tsx} | 0 .../pages/Simulateurs/{index.js => index.tsx} | 0 .../integration/{Iframe.js => Iframe.tsx} | 4 +- .../integration/{Library.js => Library.tsx} | 0 .../pages/integration/Options.js | 35 - .../pages/integration/Options.tsx | 41 + .../pages/integration/{index.js => index.tsx} | 14 +- .../ÉconomieCollaborative/VotreSituation.js | 4 +- .../{sitePaths.js => sitePaths.ts} | 71 +- source/storage/persistEverything.js | 1 - source/storage/persistSimulation.js | 1 - source/storage/serializeSimulation.js | 1 - source/types/ActionsTypes.js | 1 - source/types/Analysis.js | 1 - source/types/CDD.js | 1 - source/types/ContratSalarié.js | 1 - source/types/Entreprise.js | 1 - source/types/RegleTypes.ts | 4 + source/types/ResultViewTypes.js | 1 - source/types/Situation.js | 11 - source/types/Situation.ts | 10 + source/types/{State.js => State.ts} | 17 +- source/types/companyCreationChecklistTypes.js | 1 - .../{companyTypes.js => companyTypes.ts} | 53 +- source/types/hiringChecklistTypes.js | 1 - source/types/shared.js | 1 - source/types/typescript/css-prop.d.ts | 1 + source/types/typescript/import-images.d.ts | 14 + source/types/typescript/import-yaml.ts | 6 + source/types/typescript/react-easy-emoji.d.ts | 5 + source/{utils.js => utils.ts} | 36 +- source/webpack.common.js | 23 +- test/companyStatusSelectors.test.js | 1 - test/ficheDePaieSelector.test.js | 1 - test/utils.test.js | 2 +- tsconfig.json | 33 + yarn.lock | 771 +++++------------- 156 files changed, 1797 insertions(+), 2237 deletions(-) delete mode 100644 .flowconfig delete mode 100644 jsconfig.json rename source/{Tracker.js => Tracker.ts} (54%) rename source/components/{Route404.js => Route404.tsx} (91%) delete mode 100644 source/components/RuleLink.js create mode 100644 source/components/RuleLink.tsx rename source/components/rule/{Algorithm.js => Algorithm.tsx} (97%) rename source/components/rule/{ColoredYaml.js => ColoredYaml.tsx} (100%) rename source/components/rule/{Destinataire.js => Destinataire.tsx} (100%) rename source/components/rule/{Namespace.js => Namespace.tsx} (100%) rename source/components/rule/{References.js => References.tsx} (89%) rename source/components/rule/{RuleSource.js => RuleSource.tsx} (100%) rename source/components/rule/{ShowValuesContext.js => ShowValuesContext.tsx} (100%) rename source/components/ui/{AnimatedTargetValue.js => AnimatedTargetValue.tsx} (85%) delete mode 100644 source/components/ui/Button/index.js create mode 100644 source/components/ui/Button/index.tsx rename source/components/ui/Checkbox/{index.js => index.tsx} (99%) rename source/components/ui/Checklist/{index.js => index.tsx} (63%) rename source/components/ui/{InfoBulle.js => InfoBulle.tsx} (80%) rename source/components/ui/{Progress.js => Progress.tsx} (100%) rename source/components/ui/{SocialIcon.js => SocialIcon.tsx} (96%) delete mode 100644 source/components/ui/animate.js create mode 100644 source/components/ui/animate.tsx rename source/components/utils/{DisableScroll.js => DisableScroll.ts} (100%) rename source/components/utils/{embeddedContext.js => embeddedContext.ts} (100%) rename source/components/utils/{markdown.js => markdown.tsx} (68%) rename source/components/utils/{persistState.js => persistState.ts} (85%) rename source/components/utils/{withColours.js => withColours.tsx} (68%) delete mode 100644 source/components/utils/withSitePaths.js create mode 100644 source/components/utils/withSitePaths.tsx delete mode 100644 source/components/utils/withTracker.js create mode 100644 source/components/utils/withTracker.tsx rename source/{i18n.js => i18n.ts} (100%) rename source/sites/mon-entreprise.fr/{App.js => App.tsx} (63%) rename source/sites/mon-entreprise.fr/{entry.en.js => entry.en.tsx} (100%) rename source/sites/mon-entreprise.fr/{entry.fr.js => entry.fr.tsx} (100%) rename source/sites/mon-entreprise.fr/layout/Footer/{Contact.js => Contact.tsx} (100%) rename source/sites/mon-entreprise.fr/layout/Footer/{Footer.js => Footer.tsx} (87%) rename source/sites/mon-entreprise.fr/layout/Footer/{Privacy.js => Privacy.tsx} (100%) delete mode 100644 source/sites/mon-entreprise.fr/layout/Header.js create mode 100644 source/sites/mon-entreprise.fr/layout/Header.tsx rename source/sites/mon-entreprise.fr/middlewares/{trackSimulatorActions.js => trackSimulatorActions.ts} (95%) rename source/sites/mon-entreprise.fr/pages/Créer/{AfterRegistration.js => AfterRegistration.tsx} (61%) rename source/sites/mon-entreprise.fr/pages/Créer/{CreationChecklist.js => CreationChecklist.tsx} (76%) delete mode 100644 source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/AutoEntrepreneur.js create mode 100644 source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/AutoEntrepreneur.tsx rename source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/{DirectorStatus.js => DirectorStatus.tsx} (54%) rename source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/{MinorityDirector.js => MinorityDirector.tsx} (51%) delete mode 100644 source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/NumberOfAssociate.js create mode 100644 source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/NumberOfAssociate.tsx rename source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/{PickLegalStatus.js => PickLegalStatus.tsx} (53%) delete mode 100644 source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PreviousAnswers.js create mode 100644 source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PreviousAnswers.tsx rename source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/{SoleProprietorship.js => SoleProprietorship.tsx} (94%) delete mode 100644 source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/index.js create mode 100644 source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/index.tsx rename source/sites/mon-entreprise.fr/pages/Créer/{Home.js => Home.tsx} (60%) rename source/sites/mon-entreprise.fr/pages/Créer/{StatutDescription.js => StatutDescription.tsx} (94%) delete mode 100644 source/sites/mon-entreprise.fr/pages/Créer/index.js create mode 100644 source/sites/mon-entreprise.fr/pages/Créer/index.tsx rename source/sites/mon-entreprise.fr/pages/Dev/{ColorPicker.js => ColorPicker.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Dev/{Couleur.js => Couleur.tsx} (98%) rename source/sites/mon-entreprise.fr/pages/Dev/{IntegrationTest.js => IntegrationTest.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Dev/{Personas.js => Personas.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Dev/{Sitemap.js => Sitemap.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Documentation/{ExampleSituations.js => ExampleSituations.tsx} (80%) rename source/sites/mon-entreprise.fr/pages/Documentation/{RulesList.js => RulesList.tsx} (89%) rename source/sites/mon-entreprise.fr/pages/Documentation/{index.js => index.tsx} (70%) rename source/sites/mon-entreprise.fr/pages/Gérer/{Embaucher.js => Embaucher.tsx} (97%) rename source/sites/mon-entreprise.fr/pages/Gérer/{Home.js => Home.tsx} (97%) delete mode 100644 source/sites/mon-entreprise.fr/pages/Gérer/SchemeSelection.js create mode 100644 source/sites/mon-entreprise.fr/pages/Gérer/SchemeSelection.tsx rename source/sites/mon-entreprise.fr/pages/Gérer/{SécuritéSociale.js => SécuritéSociale.tsx} (94%) rename source/sites/mon-entreprise.fr/pages/Gérer/{Video.js => Video.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Gérer/{index.js => index.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Iframes/{IframeFooter.js => IframeFooter.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Iframes/{SimulateurEmbauche.js => SimulateurEmbauche.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Iframes/{index.js => index.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Landing/{Landing.js => Landing.tsx} (81%) delete mode 100644 source/sites/mon-entreprise.fr/pages/Simulateurs/AssimiléSalarié.js create mode 100644 source/sites/mon-entreprise.fr/pages/Simulateurs/AssimiléSalarié.tsx rename source/sites/mon-entreprise.fr/pages/Simulateurs/{AutoEntrepreneur.js => AutoEntrepreneur.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Simulateurs/{Home.js => Home.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Simulateurs/{Indépendant.js => Indépendant.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Simulateurs/{Salarié.js => Salarié.tsx} (86%) rename source/sites/mon-entreprise.fr/pages/Simulateurs/{SchemeComparaison.js => SchemeComparaison.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/Simulateurs/{index.js => index.tsx} (100%) rename source/sites/mon-entreprise.fr/pages/integration/{Iframe.js => Iframe.tsx} (97%) rename source/sites/mon-entreprise.fr/pages/integration/{Library.js => Library.tsx} (100%) delete mode 100644 source/sites/mon-entreprise.fr/pages/integration/Options.js create mode 100644 source/sites/mon-entreprise.fr/pages/integration/Options.tsx rename source/sites/mon-entreprise.fr/pages/integration/{index.js => index.tsx} (77%) rename source/sites/mon-entreprise.fr/{sitePaths.js => sitePaths.ts} (71%) create mode 100644 source/types/RegleTypes.ts delete mode 100644 source/types/Situation.js create mode 100644 source/types/Situation.ts rename source/types/{State.js => State.ts} (59%) rename source/types/{companyTypes.js => companyTypes.ts} (51%) create mode 100644 source/types/typescript/css-prop.d.ts create mode 100644 source/types/typescript/import-images.d.ts create mode 100644 source/types/typescript/import-yaml.ts create mode 100644 source/types/typescript/react-easy-emoji.d.ts rename source/{utils.js => utils.ts} (63%) create mode 100644 tsconfig.json diff --git a/.eslintrc.yaml b/.eslintrc.yaml index e1e6822a3..1300a1d6d 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -18,7 +18,6 @@ parser: babel-eslint plugins: - react - react-hooks - - flowtype env: browser: true commonjs: true @@ -38,7 +37,6 @@ globals: extends: - eslint:recommended - - plugin:flowtype/recommended - plugin:react/recommended - prettier - prettier/flowtype diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index b92312cf7..000000000 --- a/.flowconfig +++ /dev/null @@ -1,33 +0,0 @@ -[ignore] - -/documentation/.* -/node_modules/.* - -[include] - - -[libs] - -[options] -esproposal.class_static_fields=enable -esproposal.class_instance_fields=enable -esproposal.optional_chaining=enable - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FixMe -suppress_type=$FlowExpectedError - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy - -module.name_mapper='^Engine\(.*\)$' -> '/source/engine\1' -module.name_mapper='^Règles\(.*\)$' -> '/source/règles\1' -module.name_mapper='^Ui\(.*\)$' -> '/source/components/ui\1' -module.name_mapper='^Components\(.*\)$' -> '/source/components\1' -module.name_mapper='^Selectors\(.*\)$' -> '/source/selectors\1' -module.name_mapper='^Reducers\(.*\)$' -> '/source/reducers\1' -module.name_mapper='^Actions\(.*\)$' -> '/source/actions\1' -module.name_mapper='^Types\(.*\)$' -> '/source/types\1' -module.name_mapper='^Images\(.*\)$' -> '/source/images\1' diff --git a/.prettierrc b/.prettierrc index 6b25dd61e..cd7993086 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,12 +1,12 @@ { - "printWidth": 80, - "trailingComma": "none", - "bracketSpacing": true, - "jsxBracketSameLine": true, - "useTabs": true, - "semi": false, - "singleQuote": true, - "arrowParens": "avoid", - "proseWrap": "preserve", - "tabWidth": 2 -} \ No newline at end of file + "printWidth": 80, + "trailingComma": "none", + "bracketSpacing": true, + "jsxBracketSameLine": true, + "useTabs": true, + "semi": false, + "singleQuote": true, + "arrowParens": "avoid", + "proseWrap": "preserve", + "tabWidth": 2 +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5503b77d6..8e934edf0 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,5 @@ { "recommendations": [ - "flowtype.flow-for-vscode", "esbenp.prettier-vscode", "ban.spellright", "jpoissonnier.vscode-styled-components" diff --git a/.vscode/settings.json b/.vscode/settings.json index 7fa0ea7e1..2254040d8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,9 +4,11 @@ "fr" ], "spellright.documentTypes": [ - "yaml" + "yaml", + "git-commit" ], "editor.codeActionsOnSave": { "source.organizeImports": true - } -} \ No newline at end of file + }, + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index 2369a956a..1ff76871e 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -18,13 +18,13 @@ L'application est écrite en JavaScript, elle est exécuté uniquement côté cl Nous utilisons : +- [TypeScript](https://www.typescriptlang.org) pour ajouter un système de typage à notre code JavaScript. Le typage n'est pas utilisé partout et il n'est pas obligatoire de le prendre en compte pour contribuer. - [Yarn](https://yarnpkg.com/fr) pour la gestion des dépendances (à la place de NPM qui est souvent utilisé dans les applications JavaScript) - [React](https://reactjs.org) pour la gestion de l'interface utilisateur - [Redux](https://redux.js.org) pour gérer le “state” de l'application côté client - [Prettier](https://prettier.io/) pour formater le code source, l'idéal est de configurer votre éditeur de texte pour que les fichiers soit formatés automatiquement quand vous sauvegardez un fichier. Si vous utilisez [VS Code](https://code.visualstudio.com/) cette configuration est automatique. - [Webpack](https://webpack.js.org) pour le “bundling” - [Eslint](http://eslint.org) qui permet par exemple d'éviter de garder des variables inutilisées -- [Flow](https://flow.org/) pour ajouter un système de typage à notre code JavaScript. Le typage Flow n'est pas utilisé partout et il n'est pas obligatoire de le prendre en compte pour contribuer. - [Ramda](https://ramdajs.com) comme libraire d'utilitaires pour manipuler les listes/objects/etc (c'est une alternative à lodash ou underscore) - [Mocha](https://mochajs.org), [Jest](https://jestjs.io) et [Cypress](https://www.cypress.io) pour les l'execution des tests. Plus d'informations dans la section consacrée aux tests. diff --git a/babel.config.js b/babel.config.js index 734ed5a14..a6735e70b 100644 --- a/babel.config.js +++ b/babel.config.js @@ -9,12 +9,13 @@ module.exports = { } ], '@babel/react', + '@babel/preset-typescript', '@babel/flow' ], plugins: [ '@babel/plugin-proposal-class-properties', - '@babel/plugin-proposal-do-expressions', '@babel/plugin-proposal-optional-chaining', + '@babel/plugin-proposal-nullish-coalescing-operator', '@babel/plugin-proposal-object-rest-spread', '@babel/plugin-syntax-dynamic-import', 'react-hot-loader/babel', diff --git a/circle.yml b/circle.yml index 36dff8e7d..4846da99b 100644 --- a/circle.yml +++ b/circle.yml @@ -30,13 +30,20 @@ commands: - run: CYPRESS_baseUrl=<< parameters.base_url >> yarn run cypress run --parallel --record --key 21660df5-36a5-4c49-b23d-801799b0c759 --env language=<< parameters.language >> --config integrationFolder=cypress/integration/<< parameters.integration_folder >> jobs: + type-check: + docker: + - image: node + steps: + - install + - run: | + yarn run type-check + unit-test: docker: - image: node steps: - install - run: | - yarn run flow-typed install git config --global core.quotepath false yarn test yarn test-regressions @@ -86,6 +93,7 @@ workflows: version: 2 test: jobs: + - type-check - unit-test - end-to-end-test - production-end-to-end-test: diff --git a/jest.config.js b/jest.config.js index 762d1093f..5f6772e4b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -177,7 +177,7 @@ module.exports = { // ie ['jest-transform-nearley', 'babel-jest'], so we removed ES6 module from nearley output. '\\.ne$': 'jest-transform-nearley', '\\.yaml$': 'yaml-jest', - '\\.js?$': 'babel-jest' + '\\.(js|tsx?)$': 'babel-jest' }, // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index a141ea395..000000000 --- a/jsconfig.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "exclude": [ - "node_modules" - ], - "include": [ - "source/**/*" - ], - "paths": { - "Engine": [ - "source/engine" - ], - "Règles": [ - "source/règles" - ], - "Actions": [ - "source/actions" - ], - "Ui": [ - "source/components/ui" - ], - "Components": [ - "source/components" - ], - "Selectors": [ - "source/selectors" - ], - "Reducers": [ - "source/reducers" - ], - "Types": [ - "source/types" - ], - "Images": [ - "source/image" - ] - } -} \ No newline at end of file diff --git a/package.json b/package.json index 2fe70fb95..086db6e4c 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "core-js": "^3.2.1", "focus-trap-react": "^3.1.2", "fuse.js": "^3.4.2", - "i18next": "^14.1.1", + "i18next": "^18.0.1", "iframe-resizer": "^4.1.1", "js-yaml": "^3.13.1", "moo": "^0.5.0", @@ -41,7 +41,7 @@ "react-easy-emoji": "^1.2.0", "react-helmet": "6.0.0-beta", "react-highlight-words": "^0.11.0", - "react-i18next": "^10.0.1", + "react-i18next": "^11.0.0", "react-loading-skeleton": "^1.1.2", "react-markdown": "^4.1.0", "react-number-format": "^4.0.8", @@ -85,6 +85,7 @@ "test-expressions": "yarn test-common --grep 'Suite expressions'", "test-units": "mocha-webpack --webpack-config source/webpack.test.js --require source-map-support/register --include componentTestSetup.js --require mock-local-storage --require test/helpers/browser.js test/units.test.js", "test-regressions": "jest", + "type-check": "tsc --noEmit", "compile-lib": "yarn webpack --config source/webpack.lib.js", "compile-dev": "FR_SITE='http://localhost:5000${path}' EN_SITE='http://localhost:5001${path}' yarn run compile", "mon-entreprise:serve": "PORT=5000 serve --config serve.mon-entreprise.json --no-clipboard", @@ -96,13 +97,25 @@ "devDependencies": { "@babel/core": "^7.6.4", "@babel/plugin-proposal-class-properties": "^7.1.0", - "@babel/plugin-proposal-do-expressions": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4", "@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", "@babel/preset-env": "^7.6.3", "@babel/preset-flow": "^7.0.0-beta.51", "@babel/preset-react": "^7.0.0", + "@babel/preset-typescript": "^7.6.0", + "@types/iframe-resizer": "^3.5.7", + "@types/node": "^12.11.7", + "@types/ramda": "^0.26.33", + "@types/react": "^16.9.11", + "@types/react-addons-css-transition-group": "^15.0.5", + "@types/react-dom": "^16.9.3", + "@types/react-helmet": "^5.0.13", + "@types/react-redux": "^7.1.5", + "@types/react-router": "^5.1.2", + "@types/react-router-dom": "^5.1.0", + "@types/styled-components": "^4.1.19", "akh": "^3.1.2", "autoprefixer": "^9.3.1", "babel-eslint": "^11.0.0-beta.0", @@ -123,13 +136,10 @@ "enzyme-adapter-react-16": "^1.1.1", "eslint": "^6.5.1", "eslint-config-prettier": "^4.0.0", - "eslint-plugin-flowtype": "^3.2.1", "eslint-plugin-react": "^7.12.4", "eslint-plugin-react-hooks": "^2.0.1", "express": "^4.16.3", "file-loader": "^1.1.11", - "flow-bin": "^0.92.0", - "flow-typed": "^2.4.0", "html-loader": "^0.5.5", "html-webpack-plugin": "^3.2.0", "http-server": "^0.11.1", @@ -159,6 +169,7 @@ "style-loader": "^0.23.1", "styled-components": "^4.2.0", "toml-loader": "^1.0.0", + "typescript": "^3.7.1-rc", "url-loader": "^1.0.1", "webpack": "^4.39.3", "webpack-cli": "^3.1.2", diff --git a/source/Provider.js b/source/Provider.js index ed88f079c..94e3d7f0e 100644 --- a/source/Provider.js +++ b/source/Provider.js @@ -23,9 +23,11 @@ if ( navigator.serviceWorker .register('/sw.js') .then(registration => { + // eslint-disable-next-line no-console console.log('SW registered: ', registration) }) .catch(registrationError => { + // eslint-disable-next-line no-console console.log('SW registration failed: ', registrationError) }) }) diff --git a/source/Tracker.js b/source/Tracker.ts similarity index 54% rename from source/Tracker.js rename to source/Tracker.ts index bcda6793a..7da1add4c 100644 --- a/source/Tracker.js +++ b/source/Tracker.ts @@ -1,13 +1,17 @@ -/* @flow */ import { debounce } from './utils' -import type { BrowserHistory } from 'history/createBrowserHistory' -type PushType = ( - | ['trackPageView'] - | ['trackEvent', string, string] - | ['trackEvent', string, string, string] - | ['trackEvent', string, string, string, number] -) => void +declare global { + interface Window { _paq: any; } +} + +function push(args: ['trackPageView']): void +function push(args: ['trackEvent']): void +function push(args: ['trackEvent', string, string]): void +function push(args: ['trackEvent', string, string, string]): void +function push(args: ['trackEvent', string, string, string, string, string]): void +function push(args: ['trackEvent', string, string, string, number]): void +function push() {} +type PushType = typeof push export default class Tracker { push: PushType @@ -16,10 +20,10 @@ export default class Tracker { constructor(pushFunction: PushType = args => window._paq.push(args)) { if (typeof window !== 'undefined') window._paq = window._paq || [] - this.push = debounce(200, pushFunction) + this.push = debounce(200, pushFunction) as PushType } - connectToHistory(history: BrowserHistory) { + connectToHistory(history) { this.unlistenFromHistory = history.listen(loc => { this.track(loc) }) @@ -48,5 +52,5 @@ export default class Tracker { } export const devTracker = new Tracker( - (console && console.log && console.log.bind(console)) || (() => {}) // eslint-disable-line no-console + (console?.log?.bind(console)) ?? (() => {}) // eslint-disable-line no-console ) diff --git a/source/actions/actions.js b/source/actions/actions.js index 1fe6bf54a..95846d8dc 100644 --- a/source/actions/actions.js +++ b/source/actions/actions.js @@ -1,4 +1,3 @@ -/* @flow */ import type { ResetSimulationAction, LoadPreviousSimulationAction, diff --git a/source/actions/companyCreationChecklistActions.js b/source/actions/companyCreationChecklistActions.js index 9a19c1f59..6788cdfe2 100644 --- a/source/actions/companyCreationChecklistActions.js +++ b/source/actions/companyCreationChecklistActions.js @@ -1,4 +1,3 @@ -/* @flow */ import type { InitializeCompanyCreationChecklistAction, CheckCompanyCreationItemAction diff --git a/source/actions/companyStatusActions.js b/source/actions/companyStatusActions.js index 9e701424e..845ee6b73 100644 --- a/source/actions/companyStatusActions.js +++ b/source/actions/companyStatusActions.js @@ -1,4 +1,3 @@ -/* @flow */ import { dropWhile, last } from 'ramda' import { nextQuestionUrlSelector } from 'Selectors/companyStatusSelectors' diff --git a/source/actions/hiringChecklistAction.js b/source/actions/hiringChecklistAction.js index 42380401b..de2de028c 100644 --- a/source/actions/hiringChecklistAction.js +++ b/source/actions/hiringChecklistAction.js @@ -1,4 +1,3 @@ -/* @flow */ import type { InitializeHiringChecklistAction, CheckHiringItemAction diff --git a/source/components/Banner.js b/source/components/Banner.js index 68b912bc6..9514ea217 100644 --- a/source/components/Banner.js +++ b/source/components/Banner.js @@ -1,5 +1,3 @@ -/* @flow */ - import React from 'react' import emoji from 'react-easy-emoji' import { connect } from 'react-redux' @@ -24,9 +22,9 @@ let Banner = ({ hidden = false, children, icon }: PropTypes) => ) : null -export default (connect( +export default connect( (state: State, { hidden }: PropTypes) => ({ hidden: hidden || firstStepCompletedSelector(state) }), {} -)(Banner): React$ComponentType) +)(Banner) diff --git a/source/components/CompanyDetails.js b/source/components/CompanyDetails.js index 598a749ad..15146cc54 100644 --- a/source/components/CompanyDetails.js +++ b/source/components/CompanyDetails.js @@ -1,8 +1,7 @@ -import { React, T } from 'Components' -import { useEffect, useMemo, useState } from 'react' +import { T } from 'Components' +import React, { useEffect, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import Skeleton from 'react-loading-skeleton' -// $FlowFixMe import 'react-select/dist/react-select.css' import { fetchCompanyDetails } from '../api/sirene' @@ -33,8 +32,8 @@ export default function CompanyDetails({ siren, denomination }) { ({siren}) ) : ( - - )} + + )}

@@ -43,8 +42,8 @@ export default function CompanyDetails({ siren, denomination }) { {company ? ( DateFormatter.format(new Date(company.date_creation)) ) : ( - - )} + + )} , domiciliée à{' '} {company ? ( @@ -53,10 +52,9 @@ export default function CompanyDetails({ siren, denomination }) { {company.etablissement_siege.code_postal}) ) : ( - - )} + + )}

- ) } diff --git a/source/components/Feedback/FeedbackForm.js b/source/components/Feedback/FeedbackForm.js index 91418a937..40a211896 100644 --- a/source/components/Feedback/FeedbackForm.js +++ b/source/components/Feedback/FeedbackForm.js @@ -1,4 +1,3 @@ -/* @flow */ import { ScrollToElement } from 'Components/utils/Scroll' import withTracker from 'Components/utils/withTracker' diff --git a/source/components/Feedback/PageFeedback.js b/source/components/Feedback/PageFeedback.js index 196cf3104..c3fa97d7a 100644 --- a/source/components/Feedback/PageFeedback.js +++ b/source/components/Feedback/PageFeedback.js @@ -1,5 +1,3 @@ -/* @flow */ - import withTracker from 'Components/utils/withTracker' import React, { Component } from 'react' import { Trans } from 'react-i18next' @@ -166,7 +164,7 @@ class PageFeedback extends Component { const PageFeedbackWithRouter = ({ location, ...props }) => ( ) -export default (compose( +export default compose( withRouter, withTracker -)(PageFeedbackWithRouter): React$ComponentType) +)(PageFeedbackWithRouter) diff --git a/source/components/FindCompany.js b/source/components/FindCompany.js index 9e8452724..5efc80097 100644 --- a/source/components/FindCompany.js +++ b/source/components/FindCompany.js @@ -1,9 +1,8 @@ import { setEntreprise } from 'Actions/existingCompanyActions' -import { React, T } from 'Components' +import { T } from 'Components' import CompanyDetails from 'Components/CompanyDetails' -import { useCallback, useMemo, useState } from 'react' +import React, { useCallback, useMemo, useState } from 'react' import { useDispatch } from 'react-redux' -// $FlowFixMe import 'react-select/dist/react-select.css' import { searchDenominationOrSiren } from '../api/sirene' import { debounce } from '../utils' @@ -13,7 +12,7 @@ export default function Search() { const [isLoading, setLoadingState] = useState(false) const handleSearch = useCallback( - function (value) { + function(value) { searchDenominationOrSiren(value).then(results => { setLoadingState(false) setSearchResults(results) @@ -67,7 +66,11 @@ export default function Search() { debouncedHandleSearch(e.target.value) }} /> - {!isLoading && searchResults === null &&

Aucun résultat

} + {!isLoading && searchResults === null && ( +

+ Aucun résultat +

+ )} {searchResults && searchResults.map(({ siren, denomination }) => ( diff --git a/source/components/PaySlip.js b/source/components/PaySlip.js index dd48a38db..544715ef1 100644 --- a/source/components/PaySlip.js +++ b/source/components/PaySlip.js @@ -1,4 +1,3 @@ -/* @flow */ import type { FicheDePaie } from 'Types/ResultViewTypes' import withColours from 'Components/utils/withColours' import Value from 'Components/Value' diff --git a/source/components/PaySlipSections.js b/source/components/PaySlipSections.js index a13932fb3..c447ecc3a 100644 --- a/source/components/PaySlipSections.js +++ b/source/components/PaySlipSections.js @@ -1,5 +1,6 @@ -import { React, T } from 'Components' +import { T } from 'Components' import Value from 'Components/Value' +import React from 'react' import RuleLink from './RuleLink' export let SalaireBrutSection = ({ getRule }) => { diff --git a/source/components/PreviousSimulationBanner.js b/source/components/PreviousSimulationBanner.js index dee12d869..bec4f7a6b 100644 --- a/source/components/PreviousSimulationBanner.js +++ b/source/components/PreviousSimulationBanner.js @@ -1,4 +1,3 @@ -/* @flow */ import { deletePreviousSimulation, loadPreviousSimulation diff --git a/source/components/QuickLinks.js b/source/components/QuickLinks.js index 91e6228be..92ffe93c4 100644 --- a/source/components/QuickLinks.js +++ b/source/components/QuickLinks.js @@ -1,4 +1,3 @@ -/* @flow */ import { goToQuestion } from 'Actions/actions' import { T } from 'Components' import { compose, contains, filter, reject, toPairs } from 'ramda' @@ -59,7 +58,7 @@ const QuickLinks = ({ ) } -export default (connect( +export default connect( (state, props) => ({ key: props.language, currentQuestion: currentQuestionSelector(state), @@ -70,4 +69,4 @@ export default (connect( { goToQuestion } -)(QuickLinks): React$ComponentType) +)(QuickLinks) diff --git a/source/components/Route404.js b/source/components/Route404.tsx similarity index 91% rename from source/components/Route404.js rename to source/components/Route404.tsx index 73119505a..02ed47b07 100644 --- a/source/components/Route404.js +++ b/source/components/Route404.tsx @@ -1,5 +1,6 @@ -import { React, T } from 'Components' +import { T } from 'Components' import image from 'Images/map-directions.png' +import React from 'react' import emoji from 'react-easy-emoji' import { Link } from 'react-router-dom' diff --git a/source/components/RuleLink.js b/source/components/RuleLink.js deleted file mode 100644 index 54c4bb8c4..000000000 --- a/source/components/RuleLink.js +++ /dev/null @@ -1,42 +0,0 @@ -/* @flow */ -import withColours from 'Components/utils/withColours' -import withSitePaths from 'Components/utils/withSitePaths' -import { encodeRuleName, nameLeaf } from 'Engine/rules' -import { compose } from 'ramda' -import React from 'react' -import { Link } from 'react-router-dom' -import './RuleLink.css' -import type { Règle } from 'Types/RegleTypes' -import type { ThemeColours } from 'Components/utils/withColours' - -type Props = Règle & { - sitePaths: Object, - style: CSSStyleDeclaration, - colours: ThemeColours -} -const RuleLink = ({ - dottedName, - title, - colours: { colour }, - style, - sitePaths, - children -}: Props) => { - const newPath = - sitePaths.documentation.index + '/' + encodeRuleName(dottedName) - - return ( - - {children || title || nameLeaf(dottedName)} - - ) -} - -export default compose( - withSitePaths, - withColours -)(RuleLink) diff --git a/source/components/RuleLink.tsx b/source/components/RuleLink.tsx new file mode 100644 index 000000000..9ed36598a --- /dev/null +++ b/source/components/RuleLink.tsx @@ -0,0 +1,34 @@ +import { ThemeColoursContext } from 'Components/utils/withColours' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import { encodeRuleName, nameLeaf } from 'Engine/rules' +import React, { useContext } from 'react' +import { Link } from 'react-router-dom' +import { Règle } from 'Types/RegleTypes' +import './RuleLink.css' + +type RuleLinkProps = Règle & { + style: React.CSSProperties + children: React.ReactNode +} + +export default function RuleLink({ + dottedName, + title, + style, + children +}: RuleLinkProps) { + const sitePaths = useContext(SitePathsContext) + const { colour } = useContext(ThemeColoursContext) + const newPath = + sitePaths.documentation.index + '/' + encodeRuleName(dottedName) + + return ( + + {children || title || nameLeaf(dottedName)} + + ) +} diff --git a/source/components/SchemeComparaison.js b/source/components/SchemeComparaison.js index 7d1ef90b8..1a1bc0435 100644 --- a/source/components/SchemeComparaison.js +++ b/source/components/SchemeComparaison.js @@ -1,4 +1,3 @@ -/* @flow */ import { setSituationBranch } from 'Actions/actions' import { defineDirectorStatus, @@ -639,7 +638,7 @@ const RuleValueLink = compose( } ) -export default (compose( +export default compose( withSimulationConfig(ComparaisonConfig), connect( state => ({ @@ -657,4 +656,4 @@ export default (compose( setSituationBranch } ) -)(SchemeComparaison): React$Component) +)(SchemeComparaison) diff --git a/source/components/SearchBar.js b/source/components/SearchBar.js index badbba945..b1a95a0dd 100644 --- a/source/components/SearchBar.js +++ b/source/components/SearchBar.js @@ -1,5 +1,5 @@ import withSitePaths from 'Components/utils/withSitePaths' -import { encodeRuleName } from 'Engine/rules.js' +import { encodeRuleName } from 'Engine/rules' import Fuse from 'fuse.js' import { compose, pick, sortBy } from 'ramda' import React, { useMemo, useRef, useState } from 'react' diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index 7cdfeaf0e..2d756d479 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -5,14 +5,14 @@ import PeriodSwitch from 'Components/PeriodSwitch' import RuleLink from 'Components/RuleLink' import { ThemeColoursContext } from 'Components/utils/withColours' import withSitePaths from 'Components/utils/withSitePaths' +import { formatCurrency } from 'Engine/format' import { encodeRuleName } from 'Engine/rules' import { isEmpty, isNil } from 'ramda' -import React, { useEffect, useState, useContext } from 'react' +import React, { useContext, useEffect, useState } from 'react' import emoji from 'react-easy-emoji' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { Link } from 'react-router-dom' -import { formatCurrency } from 'Engine/format' import { analysisWithDefaultsSelector, useSituation, diff --git a/source/components/Value.js b/source/components/Value.js index a0770c2c8..7c796d96f 100644 --- a/source/components/Value.js +++ b/source/components/Value.js @@ -1,6 +1,7 @@ -import { React, T } from 'Components' -import { useTranslation } from 'react-i18next' +import { T } from 'Components' import { formatValue } from 'Engine/format' +import React from 'react' +import { useTranslation } from 'react-i18next' // let booleanTranslations = { true: '✅', false: '❌' } diff --git a/source/components/conversation/select/SelectTauxRisque.js b/source/components/conversation/select/SelectTauxRisque.js index ee1935485..ac892b56e 100644 --- a/source/components/conversation/select/SelectTauxRisque.js +++ b/source/components/conversation/select/SelectTauxRisque.js @@ -3,7 +3,7 @@ import ReactSelect from 'react-select' import 'react-select/dist/react-select.css' import { FormDecorator } from '../FormDecorator' import './Select.css' -import SelectOption from './SelectOption.js' +import SelectOption from './SelectOption' function ReactSelectWrapper({ value, diff --git a/source/components/index.js b/source/components/index.js index 3e2031c79..cab8f1f87 100644 --- a/source/components/index.js +++ b/source/components/index.js @@ -1,8 +1,6 @@ -import React, { Component } from 'react' -import emoji from 'react-easy-emoji' +import React from 'react' import { Trans } from 'react-i18next' let T = ({ k, ...props }) => -export { React, Component, T, emoji } - +export { T } diff --git a/source/components/rule/Algorithm.js b/source/components/rule/Algorithm.tsx similarity index 97% rename from source/components/rule/Algorithm.js rename to source/components/rule/Algorithm.tsx index 240511398..767f5f263 100644 --- a/source/components/rule/Algorithm.js +++ b/source/components/rule/Algorithm.tsx @@ -1,7 +1,8 @@ import classNames from 'classnames' -import { React, T } from 'Components' +import { T } from 'Components' import { makeJsx } from 'Engine/evaluation' import { any, identity, path } from 'ramda' +import React from 'react' import { Trans } from 'react-i18next' import './Algorithm.css' // The showValues prop is passed as a context. It used to be delt in CSS (not(.showValues) display: none), both coexist right now diff --git a/source/components/rule/ColoredYaml.js b/source/components/rule/ColoredYaml.tsx similarity index 100% rename from source/components/rule/ColoredYaml.js rename to source/components/rule/ColoredYaml.tsx diff --git a/source/components/rule/Destinataire.js b/source/components/rule/Destinataire.tsx similarity index 100% rename from source/components/rule/Destinataire.js rename to source/components/rule/Destinataire.tsx diff --git a/source/components/rule/Namespace.js b/source/components/rule/Namespace.tsx similarity index 100% rename from source/components/rule/Namespace.js rename to source/components/rule/Namespace.tsx diff --git a/source/components/rule/References.js b/source/components/rule/References.tsx similarity index 89% rename from source/components/rule/References.js rename to source/components/rule/References.tsx index 02474c979..ba68daceb 100644 --- a/source/components/rule/References.js +++ b/source/components/rule/References.tsx @@ -1,7 +1,7 @@ import { toPairs } from 'ramda' import React from 'react' -import { capitalise0 } from '../../utils' import references from 'Règles/ressources/références/références.yaml' +import { capitalise0 } from '../../utils' import './References.css' const findRefKey = link => @@ -32,7 +32,11 @@ function Ref({ name, link }) { ) } -export default function References({ refs }) { +interface ReferencesProps { + refs: { [key: string]: string } +} + +export default function References({ refs }: ReferencesProps) { let references = toPairs(refs) return (
    diff --git a/source/components/rule/RuleSource.js b/source/components/rule/RuleSource.tsx similarity index 100% rename from source/components/rule/RuleSource.js rename to source/components/rule/RuleSource.tsx diff --git a/source/components/rule/ShowValuesContext.js b/source/components/rule/ShowValuesContext.tsx similarity index 100% rename from source/components/rule/ShowValuesContext.js rename to source/components/rule/ShowValuesContext.tsx diff --git a/source/components/ui/AnimatedTargetValue.js b/source/components/ui/AnimatedTargetValue.tsx similarity index 85% rename from source/components/ui/AnimatedTargetValue.js rename to source/components/ui/AnimatedTargetValue.tsx index a5c1d86a7..5ce84d116 100644 --- a/source/components/ui/AnimatedTargetValue.js +++ b/source/components/ui/AnimatedTargetValue.tsx @@ -1,13 +1,13 @@ -/* @flow */ +import { formatCurrency } from 'Engine/format' import React, { useRef } from 'react' import ReactCSSTransitionGroup from 'react-addons-css-transition-group' import { useTranslation } from 'react-i18next' -import { formatCurrency } from 'Engine/format' import { usePeriod } from 'Selectors/analyseSelectors' import './AnimatedTargetValue.css' -type Props = { - value: ?number +interface AnimatedTargetValueProps { + value?: number + children: React.ReactNode } function formatDifference(difference, language) { @@ -15,8 +15,11 @@ function formatDifference(difference, language) { return prefix + formatCurrency(difference, language) } -export default function AnimatedTargetValue({ value, children }: Props) { - const previousValue = useRef() +export default function AnimatedTargetValue({ + value, + children +}: AnimatedTargetValueProps) { + const previousValue = useRef() const { language } = useTranslation().i18n // We don't want to show the animated if the difference comes from a change in the period @@ -54,7 +57,7 @@ export default function AnimatedTargetValue({ value, children }: Props) { } const Evaporate = React.memo( - ({ children, style }: { children: string, style: Object }) => ( + ({ children, style }: { children: string; style: Object }) => ( ) => ( - @@ -108,10 +98,8 @@ const CreateCompany = ({

    - onChecklistInitialization(statut, items) - } - onItemCheck={onItemCheck} + onInitialization={items => onChecklistInitialization(statut, items)} + onItemCheck={x => onItemCheck} defaultChecked={companyCreationChecklist}> -

    {emoji('🧰')} Ressources utiles

    +

    + {emoji('🧰')} Ressources utiles +

    - - {isAutoentrepreneur && -

    Simulateur de revenus auto-entrepreneur

    - - Simuler le montant de vos cotisations sociales et de votre impôt et estimez votre futur revenu net. - -
    - - } - {['EI', 'EIRL', 'EURL'].includes(statut) && - -

    Simulateur de cotisations indépendant

    - - Simuler le montant de vos cotisations sociales pour bien préparer votre business plan. -
    - - } - {['SAS', 'SASU'].includes(statut) && - -

    Simulateur de cotisations assimilé-salarié

    - - Simuler le montant de vos cotisations sociales pour bien préparer votre business plan. - -
    - - } + {isAutoentrepreneur && ( + + +

    Simulateur de revenus auto-entrepreneur

    + + Simuler le montant de vos cotisations sociales et de votre impôt + et estimez votre futur revenu net. + +
    + + )} + {['EI', 'EIRL', 'EURL'].includes(statut) && ( + + +

    Simulateur de cotisations indépendant

    + + Simuler le montant de vos cotisations sociales pour bien + préparer votre business plan. + +
    + + )} + {['SAS', 'SASU'].includes(statut) && ( + + +

    Simulateur de cotisations assimilé-salarié

    + + Simuler le montant de vos cotisations sociales pour bien + préparer votre business plan. + +
    + + )}

    Après la création

    - SIREN, SIRET, code APE, KBis. Un petit glossaire des termes que vous pourrez (éventuellement) rencontrer après la création. + SIREN, SIRET, code APE, KBis. Un petit glossaire des termes que + vous pourrez (éventuellement) rencontrer après la création.
    - {i18n.language === 'fr' && ( -

    Guide de création URSSAF

    - - Des conseils sur comment - préparer son projet pour se lancer dans la création et une - présentation détaillée de votre protection sociale. -
    -
    - PDF -
    -
    )} + {i18n.language === 'fr' && ( + +

    Guide de création URSSAF

    + + Des conseils sur comment préparer son projet pour se lancer dans + la création et une présentation détaillée de votre protection + sociale. + +
    +
    + PDF +
    +
    + )}
    - + ) } -export default compose( - withSitePaths, - connect( - state => ({ - companyCreationChecklist: state.inFranceApp.companyCreationChecklist, - }), - { - onChecklistInitialization: initializeCompanyCreationChecklist, - onItemCheck: checkCompanyCreationItem, - onStatusChange: goToCompanyStatusChoice - } - ) + +export default connect( + null, + { + onChecklistInitialization: initializeCompanyCreationChecklist, + onItemCheck: checkCompanyCreationItem, + onStatusChange: goToCompanyStatusChoice + } )(CreateCompany) let StatutsExample = ({ statut }) => { diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/AutoEntrepreneur.js b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/AutoEntrepreneur.js deleted file mode 100644 index 5d6ffbf10..000000000 --- a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/AutoEntrepreneur.js +++ /dev/null @@ -1,72 +0,0 @@ -/* @flow */ -import { isAutoentrepreneur } from 'Actions/companyStatusActions' -import { React, T } from 'Components' -import SchemeComparaison from 'Components/SchemeComparaison' -import { compose } from 'ramda' -import { Helmet } from 'react-helmet' -import { withTranslation } from 'react-i18next' -import { connect } from 'react-redux' - -import type { TFunction } from 'react-i18next' - -type Props = { - isAutoentrepreneur: (?boolean) => void, - t: TFunction -} - -const Autoentrepreneur = ({ isAutoentrepreneur, t }: Props) => ( - <> - - {t('autoentrepreneur.page.titre', 'Auto-entrepreneur')} - - Un auto-entrepreneur bénéficie d'un système simplifié de déclaration - et de paiement, pour lesquelles les impôts et cotisations sociales - sont basés sur le chiffre d'affaires réalisé chaque mois. C'est un - choix intéressant si vous n'avez pas besoin de beaucoup de capital - et que vous souhaitez démarrer rapidement. - - } - /> - -

    - - Entreprise individuelle ou auto-entrepreneur - -

    - -

    - À la différence de l'entreprise individuelle, l'auto-entrepreneur - bénéficie d'un régime simplifié de déclaration et de paiement : les - cotisations sociales et l'impôt sur le revenu sont calculés sur le - chiffre d'affaires encaissé. -

    -

    - Note : Certaines activités sont exclues de ce statut ( - - {' '} - voir la liste - - ). Certaines activités sont réglementées avec une qualification ou une - expérience professionnelle ( - - voir la liste - - ). -

    -
    -
    - -
    - -) - -export default compose( - withTranslation(), - connect( - null, - { isAutoentrepreneur } - ) -)(Autoentrepreneur) diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/AutoEntrepreneur.tsx b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/AutoEntrepreneur.tsx new file mode 100644 index 000000000..588493678 --- /dev/null +++ b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/AutoEntrepreneur.tsx @@ -0,0 +1,53 @@ +import { T } from 'Components' +import SchemeComparaison from 'Components/SchemeComparaison' +import React from 'react' +import { Helmet } from 'react-helmet' +import { useTranslation } from 'react-i18next' + +export default function Autoentrepreneur() { + const { t } = useTranslation() + return ( + <> + + {t('autoentrepreneur.page.titre', 'Auto-entrepreneur')} + + +

    + + Entreprise individuelle ou auto-entrepreneur + +

    + +

    + À la différence de l'entreprise individuelle, l'auto-entrepreneur + bénéficie d'un régime simplifié de déclaration et de paiement : les + cotisations sociales et l'impôt sur le revenu sont calculés sur le + chiffre d'affaires encaissé. +

    +

    + Note : Certaines activités sont exclues de ce statut + ( + + {' '} + voir la liste + + ). Certaines activités sont réglementées avec une qualification ou une + expérience professionnelle ( + + voir la liste + + ). +

    +
    +
    + +
    + + ) +} diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/DirectorStatus.js b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/DirectorStatus.tsx similarity index 54% rename from source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/DirectorStatus.js rename to source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/DirectorStatus.tsx index 64deaea3e..dda64e13b 100644 --- a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/DirectorStatus.js +++ b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/DirectorStatus.tsx @@ -1,19 +1,10 @@ -/* @flow */ -import { defineDirectorStatus } from 'Actions/companyStatusActions' -import { React, T } from 'Components' +import { T } from 'Components' import SchemeComparaison from 'Components/SchemeComparaison' -import { compose } from 'ramda' +import React from 'react' import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' -import { connect } from 'react-redux' -import type { DirectorStatus } from 'Types/companyTypes' - -type Props = { - defineDirectorStatus: (?DirectorStatus) => void, - sitePaths: Object -} -const DefineDirectorStatus = ({ defineDirectorStatus }: Props) => { +export default function DefineDirectorStatus() { const { t } = useTranslation() return ( <> @@ -25,7 +16,7 @@ const DefineDirectorStatus = ({ defineDirectorStatus }: Props) => { name="description" content={t( 'statut du dirigeant.page.description', - 'Ce choix est important parce qu\'il détermine le régime de sécurité sociale et la couverture sociale de l\'administrateur. Chaque option a des implications juridiques et conduit à un statut différent lors de la création de votre entreprise.' + "Ce choix est important parce qu'il détermine le régime de sécurité sociale et la couverture sociale de l'administrateur. Chaque option a des implications juridiques et conduit à un statut différent lors de la création de votre entreprise." )} /> @@ -45,10 +36,3 @@ const DefineDirectorStatus = ({ defineDirectorStatus }: Props) => { ) } - -export default compose( - connect( - null, - { defineDirectorStatus } - ) -)(DefineDirectorStatus) diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/MinorityDirector.js b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/MinorityDirector.tsx similarity index 51% rename from source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/MinorityDirector.js rename to source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/MinorityDirector.tsx index bf00efa7d..96219b655 100644 --- a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/MinorityDirector.js +++ b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/MinorityDirector.tsx @@ -1,18 +1,13 @@ -/* @flow */ -import { directorIsInAMinority } from 'Actions/companyStatusActions'; -import { React, T } from 'Components'; -import { compose } from 'ramda'; -import { Helmet } from 'react-helmet'; -import { withTranslation } from 'react-i18next'; -import { connect } from 'react-redux'; -import type { TFunction } from 'react-i18next' +import { directorIsInAMinority } from 'Actions/companyStatusActions' +import { T } from 'Components' +import React from 'react' +import { Helmet } from 'react-helmet' +import { useTranslation } from 'react-i18next' +import { useDispatch } from 'react-redux' -type Props = { - directorIsInAMinority: (?boolean) => void, - t: TFunction -} - -const MinorityDirector = ({ directorIsInAMinority, t }: Props) => { +export default function MinorityDirector() { + const { t } = useTranslation() + const dispatch = useDispatch() return ( <> @@ -26,7 +21,7 @@ const MinorityDirector = ({ directorIsInAMinority, t }: Props) => { name="description" content={t( 'gérant minoritaire.page.description', - 'Certaines règles particulières s\'appliquent en fonction du nombre d\'actions détenues par l\'administrateur, ce qui peut conduire à un statut différent lors de la création de votre société' + "Certaines règles particulières s'appliquent en fonction du nombre d'actions détenues par l'administrateur, ce qui peut conduire à un statut différent lors de la création de votre société" )} /> @@ -40,12 +35,14 @@ const MinorityDirector = ({ directorIsInAMinority, t }: Props) => {

    • - Gérant majoritaire : Vous êtes l'administrateur majoritaire - (ou faite partie d'un conseil d'administration majoritaire). -
    • + Gérant majoritaire : Vous êtes l'administrateur + majoritaire (ou faite partie d'un conseil d'administration + majoritaire). +
    • - Gérant minoritaire : Vous êtes administrateur minoritaire ou égalitaire (ou faites partie d'un conseil d'administration - minoritaire ou égalitaire). + Gérant minoritaire : Vous êtes administrateur + minoritaire ou égalitaire (ou faites partie d'un conseil + d'administration minoritaire ou égalitaire).
    @@ -53,14 +50,14 @@ const MinorityDirector = ({ directorIsInAMinority, t }: Props) => {
    - -
    - - -) - -export default compose( - withTranslation(), - connect( - null, - { companyHasMultipleAssociates } - ) -)(NumberOfAssociates) diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/NumberOfAssociate.tsx b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/NumberOfAssociate.tsx new file mode 100644 index 000000000..2008d3806 --- /dev/null +++ b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/NumberOfAssociate.tsx @@ -0,0 +1,66 @@ +import { companyHasMultipleAssociates } from 'Actions/companyStatusActions' +import { T } from 'Components' +import React from 'react' +import { Helmet } from 'react-helmet' +import { useTranslation } from 'react-i18next' +import { connect } from 'react-redux' + +const NumberOfAssociates = ({ companyHasMultipleAssociates }) => { + const { t } = useTranslation() + return ( + <> + + + {t( + 'associés.page.titre', + "Nombre d'associés pour créer une entreprise" + )} + + + +

    + Seul ou à plusieurs +

    + +

    + Une entreprise avec un seul associé est plus simple à créer et gérer. + Un associé peut-être une personne physique (un individu) ou une + personne morale (par exemple une société). +

    +

    + Note : ce choix n'est pas définitif. Vous pouvez tout à fait commencer + votre société seul, et accueillir de nouveaux associés au cours de + votre développement. +

    +
    + +
    + + +
    + + ) +} + +export default connect( + null, + { companyHasMultipleAssociates } +)(NumberOfAssociates) diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PickLegalStatus.js b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PickLegalStatus.tsx similarity index 53% rename from source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PickLegalStatus.js rename to source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PickLegalStatus.tsx index 438a5cccf..d90067bc0 100644 --- a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PickLegalStatus.js +++ b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PickLegalStatus.tsx @@ -1,43 +1,34 @@ -/* @flow */ -import { React, T } from 'Components' -import withSitePaths from 'Components/utils/withSitePaths' -import { compose, filter } from 'ramda' +import { T } from 'Components' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import { filter } from 'ramda' +import React, { useContext } from 'react' import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' -import { connect } from 'react-redux' +import { useSelector } from 'react-redux' import { Link } from 'react-router-dom' -import { possibleStatusSelector } from 'Selectors/companyStatusSelectors' +import { + LegalStatus, + possibleStatusSelector +} from 'Selectors/companyStatusSelectors' import StatutDescription from '../StatutDescription' -import type { RouterHistory } from 'react-router' -import type { LegalStatus } from 'Selectors/companyStatusSelectors' -type Props = { - history: RouterHistory, - possibleStatus: { [LegalStatus]: boolean }, - goBackToPreviousQuestion: () => void, - sitePaths: Object, - setMainStatus: LegalStatus => void, - language: string +const StatutButton = ({ statut }: { statut: LegalStatus }) => { + const sitePaths = useContext(SitePathsContext) + const { t } = useTranslation() + return ( +
    + + {statut.includes('auto-entrepreneur') ? ( + Devenir + ) : ( + Créer une + )}{' '} + {t(statut)} + +
    + ) } -const StatutButton = withSitePaths( - ({ statut, sitePaths }: { statut: LegalStatus, sitePaths: Object }) => { - const { t } = useTranslation() - return ( -
    - - {statut.includes('auto-entrepreneur') ? ( - Devenir - ) : ( - Créer une - )}{' '} - {t(statut)} - -
    - ) - } -) - const StatutTitle = ({ statut, language }) => statut === 'EI' ? ( <> @@ -85,11 +76,9 @@ const StatutTitle = ({ statut, language }) => ) : null -const SetMainStatus = ({ - history, - possibleStatus, -}: Props) => { +export default function SetMainStatus() { const { t, i18n } = useTranslation() + const possibleStatus = useSelector(possibleStatusSelector) return ( <> @@ -101,30 +90,28 @@ const SetMainStatus = ({

    - {Object.keys(possibleStatus).every(Boolean) ? Liste des statuts juridiques : Votre forme juridique} + {Object.keys(possibleStatus).every(Boolean) ? ( + Liste des statuts juridiques + ) : ( + Votre forme juridique + )}

      - {Object.keys(filter(Boolean, possibleStatus)).map(statut => ( -
    • - - - {' '} -

      - -

      - -
    • - ))} + {Object.keys(filter(Boolean, possibleStatus as any)).map( + (statut: keyof typeof possibleStatus) => ( +
    • + + + {' '} +

      + +

      + +
    • + ) + )}
    - ) } - -export default compose( - withSitePaths, - connect( - state => ({ possibleStatus: possibleStatusSelector(state) }), - ) -)(SetMainStatus) diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PreviousAnswers.js b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PreviousAnswers.js deleted file mode 100644 index d10836a13..000000000 --- a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PreviousAnswers.js +++ /dev/null @@ -1,62 +0,0 @@ -/* @flow */ -import { React, T } from 'Components' -import withSitePaths from 'Components/utils/withSitePaths' -import { compose, isNil } from 'ramda' -import { connect } from 'react-redux' -import { Link } from 'react-router-dom' -import type { LegalStatusRequirements } from 'Types/companyTypes' - -const requirementToText = (key, value) => { - switch (key) { - case 'multipleAssociates': - return value ? Plusieurs associés : Un seul associé - case 'soleProprietorship': - return value ? ( - - Entreprise individuelle - - ) : ( - Société - ) - case 'directorStatus': - return value === 'SELF_EMPLOYED' ? ( - Indépendant - ) : ( - Assimilé salarié - ) - case 'autoEntrepreneur': - return value ? Auto-entrepreneur : Pas en auto-entrepreneur - case 'minorityDirector': - return value ? Gérant minoritaire : Gérant majoritaire - } -} -type OwnProps = {} -type Props = LegalStatusRequirements & { - goToCompanyStatusChoice: () => void, - sitePaths: Object -} - -const PreviousAnswers = ({ - sitePaths, - legalStatus -}: Props) => !!Object.values(legalStatus).length && ( -
      - {Object.entries(legalStatus).map( - ([key, value]) => - !isNil(value) && ( -
    • - - {requirementToText(key, value)} - -
    • - ) - )} -
    -) - -export default (compose( - connect( - state => ({ legalStatus: state.inFranceApp.companyLegalStatus }), - ), - withSitePaths -)(PreviousAnswers): React$ComponentType) diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PreviousAnswers.tsx b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PreviousAnswers.tsx new file mode 100644 index 000000000..d25d0e521 --- /dev/null +++ b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/PreviousAnswers.tsx @@ -0,0 +1,58 @@ +import { T } from 'Components' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import { isNil } from 'ramda' +import React, { useContext } from 'react' +import { useSelector } from 'react-redux' +import { Link } from 'react-router-dom' +import { LegalStatusRequirements } from 'Types/companyTypes' + +const requirementToText = ( + key: keyof LegalStatusRequirements, + value: string +) => { + switch (key) { + case 'multipleAssociates': + return value ? Plusieurs associés : Un seul associé + case 'soleProprietorship': + return value ? ( + + Entreprise individuelle + + ) : ( + Société + ) + case 'directorStatus': + return value === 'SELF_EMPLOYED' ? ( + Indépendant + ) : ( + Assimilé salarié + ) + case 'autoEntrepreneur': + return value ? Auto-entrepreneur : Pas en auto-entrepreneur + case 'minorityDirector': + return value ? Gérant minoritaire : Gérant majoritaire + } +} + +export default function PreviousAnswers() { + const sitePaths = useContext(SitePathsContext) + const legalStatus = useSelector( + state => state.inFranceApp.companyLegalStatus + ) + return ( + !!Object.values(legalStatus).length && ( +
      + {Object.entries(legalStatus).map( + ([key, value]) => + !isNil(value) && ( +
    • + + {requirementToText(key as any, value as any)} + +
    • + ) + )} +
    + ) + ) +} diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/SoleProprietorship.js b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/SoleProprietorship.tsx similarity index 94% rename from source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/SoleProprietorship.js rename to source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/SoleProprietorship.tsx index 36734e1dd..499808edb 100644 --- a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/SoleProprietorship.js +++ b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/SoleProprietorship.tsx @@ -1,16 +1,12 @@ -/* @flow */ import { isSoleProprietorship } from 'Actions/companyStatusActions' -import { React, T } from 'Components' +import { T } from 'Components' import { compose } from 'ramda' +import React from 'react' import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' import { connect } from 'react-redux' -type Props = { - isSoleProprietorship: (?boolean) => void -} - -const SoleProprietorship = ({ isSoleProprietorship }: Props) => { +const SoleProprietorship = ({ isSoleProprietorship }) => { const { t } = useTranslation() return ( <> diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/index.js b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/index.js deleted file mode 100644 index e086e3982..000000000 --- a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/index.js +++ /dev/null @@ -1,91 +0,0 @@ -/* @flow */ -import { resetCompanyStatusChoice } from 'Actions/companyStatusActions'; -import { T } from 'Components'; -import { SitePathsContext } from 'Components/utils/withSitePaths'; -import { toPairs } from 'ramda'; -import React, { useContext, useEffect } from 'react'; -import { useDispatch } from 'react-redux'; -import { NavLink, Route, Switch, useLocation } from 'react-router-dom'; -import Animate from 'Ui/animate'; -import AutoEntrepreneur from './AutoEntrepreneur'; -import DirectorStatus from './DirectorStatus'; -import MinorityDirector from './MinorityDirector'; -import NumberOfAssociate from './NumberOfAssociate'; -import PickLegalStatus from './PickLegalStatus'; -import PreviousAnswers from './PreviousAnswers'; -import SoleProprietorship from './SoleProprietorship'; - - - -const useResetFollowingAnswers = () => { - const dispatch = useDispatch(); - const sitePaths = useContext(SitePathsContext); - const location = useLocation(); - useEffect(() => { - const companyStatusCurrentQuestionName = (toPairs( - sitePaths.créer.guideStatut - ).find(([, pathname]) => location.pathname === pathname) || [])[0] - if (!companyStatusCurrentQuestionName) { - return - } - dispatch(resetCompanyStatusChoice(companyStatusCurrentQuestionName)) - }, [location.pathname, dispatch, sitePaths.créer.guideStatut]) -} - -export default function Créer() { - const sitePaths = useContext(SitePathsContext); - const location = useLocation(); - useResetFollowingAnswers(); - return ( - <> -
    - - ← Retour - -
    -

    - Choix du statut juridique -

    - - - - - - - - - - - - - - - - - - - - - - - - - ) -} - diff --git a/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/index.tsx b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/index.tsx new file mode 100644 index 000000000..214fe4c90 --- /dev/null +++ b/source/sites/mon-entreprise.fr/pages/Créer/GuideStatut/index.tsx @@ -0,0 +1,75 @@ +import { resetCompanyStatusChoice } from 'Actions/companyStatusActions' +import { T } from 'Components' +import Animate from 'Ui/animate' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import { toPairs } from 'ramda' +import React, { useContext, useEffect } from 'react' +import { useDispatch } from 'react-redux' +import { NavLink, Route, Switch, useLocation } from 'react-router-dom' +import AutoEntrepreneur from './AutoEntrepreneur' +import DirectorStatus from './DirectorStatus' +import MinorityDirector from './MinorityDirector' +import NumberOfAssociate from './NumberOfAssociate' +import PickLegalStatus from './PickLegalStatus' +import PreviousAnswers from './PreviousAnswers' +import SoleProprietorship from './SoleProprietorship' + +const useResetFollowingAnswers = () => { + const dispatch = useDispatch() + const sitePaths = useContext(SitePathsContext) + const location = useLocation() + useEffect(() => { + const companyStatusCurrentQuestionName = (toPairs( + sitePaths.créer.guideStatut + ).find(([, pathname]) => location.pathname === pathname) || [])[0] + if (!companyStatusCurrentQuestionName) { + return + } + dispatch(resetCompanyStatusChoice(companyStatusCurrentQuestionName)) + }, [location.pathname, dispatch, sitePaths.créer.guideStatut]) +} + +export default function Créer() { + const sitePaths = useContext(SitePathsContext) + const location = useLocation() + useResetFollowingAnswers() + return ( + <> +
    + + ← Retour + +
    +

    + Choix du statut juridique +

    + + + + + + + + + + + + + + + + + + + + + + + + + ) +} diff --git a/source/sites/mon-entreprise.fr/pages/Créer/Home.js b/source/sites/mon-entreprise.fr/pages/Créer/Home.tsx similarity index 60% rename from source/sites/mon-entreprise.fr/pages/Créer/Home.js rename to source/sites/mon-entreprise.fr/pages/Créer/Home.tsx index 9f4713887..0927ae4c6 100644 --- a/source/sites/mon-entreprise.fr/pages/Créer/Home.js +++ b/source/sites/mon-entreprise.fr/pages/Créer/Home.tsx @@ -1,6 +1,4 @@ -/* @flow */ import { T } from 'Components' -import Animate from 'Components/ui/animate' import { SitePathsContext } from 'Components/utils/withSitePaths' import React, { useContext } from 'react' import { Helmet } from 'react-helmet' @@ -8,21 +6,22 @@ import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { Link } from 'react-router-dom' import { nextQuestionUrlSelector } from 'Selectors/companyStatusSelectors' +import Animate from 'Ui/animate' import créerSvg from './créer.svg' export default function Créer() { const { t } = useTranslation() - const sitePaths = useContext(SitePathsContext); - const nextQuestionUrl = useSelector(state => nextQuestionUrlSelector(state, { sitePaths })); - const guideAlreadyStarted = useSelector(state => !!Object.keys(state.inFranceApp.companyLegalStatus) - .length); + const sitePaths = useContext(SitePathsContext) + const nextQuestionUrl = useSelector(state => + nextQuestionUrlSelector(state, { sitePaths }) + ) + const guideAlreadyStarted = useSelector( + state => !!Object.keys(state.inFranceApp.companyLegalStatus).length + ) return ( - {t( - 'créer.titre', - 'Créer une entreprise' - )} + {t('créer.titre', 'Créer une entreprise')}

    @@ -30,18 +29,30 @@ export default function Créer() {

    - -

    +

    - Avant d'entamer les démarches administratives pour créer votre entreprise, vous devez choisir un statut juridique adapté à votre activité + Avant d'entamer les démarches administratives pour créer votre + entreprise, vous devez choisir un statut juridique adapté à votre + activité

    - {!guideAlreadyStarted ? t('créer.cta.default', 'Trouver le bon statut') : t('créer.cta.continue', 'Continuer le guide')} + to={ + guideAlreadyStarted && nextQuestionUrl + ? nextQuestionUrl + : sitePaths.créer.guideStatut.multipleAssociates + }> + {!guideAlreadyStarted + ? t('créer.cta.default', 'Trouver le bon statut') + : t('créer.cta.continue', 'Continuer le guide')} -

    Le cas des professions libérales réglementées n'est pas encore traité

    +

    + + Le cas des professions libérales réglementées n'est pas encore + traité + +

    -

    Ressources utiles

    +

    + Ressources utiles +

    Liste des statuts juridiques

    - Vous savez déjà quel statut choisir ? Accédez directement à la liste des démarches associées - + Vous savez déjà quel statut choisir ? Accédez directement à la + liste des démarches associées + + to={{ + pathname: sitePaths.simulateurs.comparaison, + state: { fromCréer: true } + }}> -

    Comparateur de régimes

    - Indépendant, assimilé-salarié ou auto-entrepreneur ? Calculez les différences en terme de revenus, cotisations, retraite, etc - + Indépendant, assimilé-salarié ou auto-entrepreneur ? Calculez les + différences en terme de revenus, cotisations, retraite, etc +
    @@ -86,15 +103,14 @@ export default function Créer() { className="ui__ interactive card button-choice lighter-bg" to={sitePaths.créer['auto-entrepreneur']}> -

    Démarche auto-entrepreneur

    - Vous souhaitez devenir auto-entrepreneur ? Découvrez les étapes pour bien démarrer votre activité - + Vous souhaitez devenir auto-entrepreneur ? Découvrez les étapes + pour bien démarrer votre activité +
    -
    + ) } - diff --git a/source/sites/mon-entreprise.fr/pages/Créer/StatutDescription.js b/source/sites/mon-entreprise.fr/pages/Créer/StatutDescription.tsx similarity index 94% rename from source/sites/mon-entreprise.fr/pages/Créer/StatutDescription.js rename to source/sites/mon-entreprise.fr/pages/Créer/StatutDescription.tsx index 23d14f7c4..b54e04fa5 100644 --- a/source/sites/mon-entreprise.fr/pages/Créer/StatutDescription.js +++ b/source/sites/mon-entreprise.fr/pages/Créer/StatutDescription.tsx @@ -1,9 +1,8 @@ -/* @flow */ -// eslint-disable-next-line no-unused-vars -import { React, T } from 'Components' -import type { LegalStatus } from 'Selectors/companyStatusSelectors' +import { T } from 'Components' +import React from 'react' +import { LegalStatus } from 'Selectors/companyStatusSelectors' type Props = { - StatutDescription: LegalStatus + statut: LegalStatus } const StatutDescription = ({ statut }: Props) => diff --git a/source/sites/mon-entreprise.fr/pages/Créer/index.js b/source/sites/mon-entreprise.fr/pages/Créer/index.js deleted file mode 100644 index 45a40fa2f..000000000 --- a/source/sites/mon-entreprise.fr/pages/Créer/index.js +++ /dev/null @@ -1,43 +0,0 @@ -import { ScrollToTop } from 'Components/utils/Scroll'; -import { SitePathsContext } from 'Components/utils/withSitePaths'; -import React, { useContext } from 'react'; -import { Route, Switch } from 'react-router'; -import { useLocation } from 'react-router-dom'; -import { LANDING_LEGAL_STATUS_LIST } from '../../sitePaths'; -import AfterRegistration from './AfterRegistration'; -import CreationChecklist from './CreationChecklist'; -import GuideStatut from './GuideStatut'; -import Home from './Home'; - - -export default function CreateMyCompany() { - const sitePaths = useContext(SitePathsContext); - const location = useLocation() - return ( - <> - - - - {LANDING_LEGAL_STATUS_LIST.map(statut => ( - - - - )) - } - - - - - - ) -} diff --git a/source/sites/mon-entreprise.fr/pages/Créer/index.tsx b/source/sites/mon-entreprise.fr/pages/Créer/index.tsx new file mode 100644 index 000000000..cfea9bba9 --- /dev/null +++ b/source/sites/mon-entreprise.fr/pages/Créer/index.tsx @@ -0,0 +1,33 @@ +import { ScrollToTop } from 'Components/utils/Scroll' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import React, { useContext } from 'react' +import { Route, Switch } from 'react-router' +import { useLocation } from 'react-router-dom' +import { LANDING_LEGAL_STATUS_LIST } from '../../sitePaths' +import AfterRegistration from './AfterRegistration' +import CreationChecklist from './CreationChecklist' +import GuideStatut from './GuideStatut' +import Home from './Home' + +export default function CreateMyCompany() { + const sitePaths = useContext(SitePathsContext) + const location = useLocation() + return ( + <> + + + + {LANDING_LEGAL_STATUS_LIST.map(statut => ( + + + + ))} + + + + + ) +} diff --git a/source/sites/mon-entreprise.fr/pages/Dev/ColorPicker.js b/source/sites/mon-entreprise.fr/pages/Dev/ColorPicker.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Dev/ColorPicker.js rename to source/sites/mon-entreprise.fr/pages/Dev/ColorPicker.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Dev/Couleur.js b/source/sites/mon-entreprise.fr/pages/Dev/Couleur.tsx similarity index 98% rename from source/sites/mon-entreprise.fr/pages/Dev/Couleur.js rename to source/sites/mon-entreprise.fr/pages/Dev/Couleur.tsx index 23bc3ce7e..f677b566b 100644 --- a/source/sites/mon-entreprise.fr/pages/Dev/Couleur.js +++ b/source/sites/mon-entreprise.fr/pages/Dev/Couleur.tsx @@ -1,4 +1,3 @@ -/* @flow */ import withColours, { ThemeColoursProvider } from 'Components/utils/withColours' import React, { Suspense, useState } from 'react' diff --git a/source/sites/mon-entreprise.fr/pages/Dev/IntegrationTest.js b/source/sites/mon-entreprise.fr/pages/Dev/IntegrationTest.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Dev/IntegrationTest.js rename to source/sites/mon-entreprise.fr/pages/Dev/IntegrationTest.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Dev/Personas.js b/source/sites/mon-entreprise.fr/pages/Dev/Personas.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Dev/Personas.js rename to source/sites/mon-entreprise.fr/pages/Dev/Personas.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Dev/Sitemap.js b/source/sites/mon-entreprise.fr/pages/Dev/Sitemap.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Dev/Sitemap.js rename to source/sites/mon-entreprise.fr/pages/Dev/Sitemap.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Documentation/ExampleSituations.js b/source/sites/mon-entreprise.fr/pages/Documentation/ExampleSituations.tsx similarity index 80% rename from source/sites/mon-entreprise.fr/pages/Documentation/ExampleSituations.js rename to source/sites/mon-entreprise.fr/pages/Documentation/ExampleSituations.tsx index 690755bc2..c58600915 100644 --- a/source/sites/mon-entreprise.fr/pages/Documentation/ExampleSituations.js +++ b/source/sites/mon-entreprise.fr/pages/Documentation/ExampleSituations.tsx @@ -1,10 +1,10 @@ // Page listing the engine's currently implemented mecanisms and their tests -import { React, T } from 'Components' -import withColours from 'Components/utils/withColours' +import { T } from 'Components' +import { ThemeColoursContext } from 'Components/utils/withColours' import { analyseMany } from 'Engine/traverse' -import { compose } from 'ramda' +import React, { useContext } from 'react' import emoji from 'react-easy-emoji' -import { connect } from 'react-redux' +import { useSelector } from 'react-redux' import examples from 'Règles/cas-types.yaml' import { parsedRulesSelector, @@ -28,13 +28,10 @@ export default function ExampleSituations() { ) } -const Example = compose( - connect(state => ({ - defaults: ruleDefaultsSelector(state), - parsedRules: parsedRulesSelector(state) - })), - withColours -)(function Example({ ex: { nom, situation }, parsedRules, defaults, colours }) { +const Example = function Example({ ex: { nom, situation } }) { + const defaults = useSelector(ruleDefaultsSelector) as object + const parsedRules = useSelector(parsedRulesSelector) + const colours = useContext(ThemeColoursContext) let [total, net, netAprèsImpôts] = analyseMany(parsedRules, [ 'total', 'net', @@ -77,4 +74,4 @@ const Example = compose(
) -}) +} diff --git a/source/sites/mon-entreprise.fr/pages/Documentation/RulesList.js b/source/sites/mon-entreprise.fr/pages/Documentation/RulesList.tsx similarity index 89% rename from source/sites/mon-entreprise.fr/pages/Documentation/RulesList.js rename to source/sites/mon-entreprise.fr/pages/Documentation/RulesList.tsx index 0f6d73fd6..d1feaa2c7 100644 --- a/source/sites/mon-entreprise.fr/pages/Documentation/RulesList.js +++ b/source/sites/mon-entreprise.fr/pages/Documentation/RulesList.tsx @@ -1,5 +1,6 @@ -import { React, T } from 'Components' +import { T } from 'Components' import SearchBar from 'Components/SearchBar' +import React from 'react' import { useSelector } from 'react-redux' import 'react-select/dist/react-select.css' import { flatRulesSelector } from 'Selectors/analyseSelectors' diff --git a/source/sites/mon-entreprise.fr/pages/Documentation/index.js b/source/sites/mon-entreprise.fr/pages/Documentation/index.tsx similarity index 70% rename from source/sites/mon-entreprise.fr/pages/Documentation/index.js rename to source/sites/mon-entreprise.fr/pages/Documentation/index.tsx index 542977d1c..7174fe755 100644 --- a/source/sites/mon-entreprise.fr/pages/Documentation/index.js +++ b/source/sites/mon-entreprise.fr/pages/Documentation/index.tsx @@ -1,11 +1,12 @@ import RulePage from 'Components/RulePage' -import withSitePaths from 'Components/utils/withSitePaths' -import React from 'react' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import React, { useContext } from 'react' import { Route, Switch } from 'react-router' import ExampleSituations from './ExampleSituations' import RulesList from './RulesList' -export default withSitePaths(function Documentation({ sitePaths }) { +export default function Documentation() { + const sitePaths = useContext(SitePathsContext) return ( @@ -20,4 +21,4 @@ export default withSitePaths(function Documentation({ sitePaths }) { /> ) -}) +} diff --git a/source/sites/mon-entreprise.fr/pages/Gérer/Embaucher.js b/source/sites/mon-entreprise.fr/pages/Gérer/Embaucher.tsx similarity index 97% rename from source/sites/mon-entreprise.fr/pages/Gérer/Embaucher.js rename to source/sites/mon-entreprise.fr/pages/Gérer/Embaucher.tsx index 189cf59cf..1a22d930e 100644 --- a/source/sites/mon-entreprise.fr/pages/Gérer/Embaucher.js +++ b/source/sites/mon-entreprise.fr/pages/Gérer/Embaucher.tsx @@ -1,10 +1,10 @@ -/* @flow */ import { checkHiringItem, initializeHiringChecklist } from 'Actions/hiringChecklistAction' -import { React, T } from 'Components' +import { T } from 'Components' import { compose } from 'ramda' +import React from 'react' import { Helmet } from 'react-helmet' import { withTranslation } from 'react-i18next' import { connect } from 'react-redux' @@ -201,7 +201,7 @@ export default compose( withTranslation(), connect( - state => ({ hiringChecklist: state.inFranceApp.hiringChecklist }), + state => ({ hiringChecklist: (state as any).inFranceApp.hiringChecklist }), { onChecklistInitialization: initializeHiringChecklist, onItemCheck: checkHiringItem diff --git a/source/sites/mon-entreprise.fr/pages/Gérer/Home.js b/source/sites/mon-entreprise.fr/pages/Gérer/Home.tsx similarity index 97% rename from source/sites/mon-entreprise.fr/pages/Gérer/Home.js rename to source/sites/mon-entreprise.fr/pages/Gérer/Home.tsx index a43680e8b..2c142a669 100644 --- a/source/sites/mon-entreprise.fr/pages/Gérer/Home.js +++ b/source/sites/mon-entreprise.fr/pages/Gérer/Home.tsx @@ -1,11 +1,11 @@ import { resetEntreprise, specifyIfAutoEntrepreneur, specifyIfDirigeantMajoritaire } from 'Actions/existingCompanyActions' -import { React, T } from 'Components' +import { T } from 'Components' import CompanyDetails from 'Components/CompanyDetails' import FindCompany from 'Components/FindCompany' import Overlay from 'Components/Overlay' import { ScrollToTop } from 'Components/utils/Scroll' import { SitePathsContext } from 'Components/utils/withSitePaths' -import { useContext, useEffect, useRef, useState } from 'react' +import React, { useContext, useEffect, useRef, useState } from "react" import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' @@ -39,10 +39,10 @@ const infereRégimeFromCompanyDetails = company => { export default function SocialSecurity() { const { t } = useTranslation() - const company = useSelector(state => state.inFranceApp.existingCompany) + const company = useSelector(state => state.inFranceApp.existingCompany) const sitePaths = useContext(SitePathsContext) const régime = infereRégimeFromCompanyDetails(company) - + return ( <> @@ -205,7 +205,7 @@ const CompanySection = ({ company }) => { } }, [company, searchModal]) - const dispatch = useDispatch(company) + const dispatch = useDispatch() const handleAnswerAutoEntrepreneur = isAutoEntrepreneur => { dispatch(specifyIfAutoEntrepreneur(isAutoEntrepreneur)) showAutoEntrepreneurModal(false) diff --git a/source/sites/mon-entreprise.fr/pages/Gérer/SchemeSelection.js b/source/sites/mon-entreprise.fr/pages/Gérer/SchemeSelection.js deleted file mode 100644 index 26924e3b9..000000000 --- a/source/sites/mon-entreprise.fr/pages/Gérer/SchemeSelection.js +++ /dev/null @@ -1,75 +0,0 @@ -import { T } from 'Components' -import withSitePaths from 'Components/utils/withSitePaths' -import { compose } from 'ramda' -import React from 'react' -import emoji from 'react-easy-emoji' -import { Helmet } from 'react-helmet' -import { withTranslation } from 'react-i18next' -import { Link } from 'react-router-dom' -import animate from 'Ui/animate' - -const SchemeChoice = compose( - withTranslation(), - withSitePaths -)(({ sitePaths, t }) => ( - - - {t('selectionRégime.page.titre', 'Selection du régime')} - -

- Quel régime souhaitez-vous explorer ? -

-

- - {emoji('☂')} - - Assimilé salarié - - ( - - SAS, SASU ou SARL avec gérant minoritaire - - ) - - - - - {emoji('👩‍🔧')} - - Indépendant - - ( - - EI, EIRL, EURL ou SARL avec gérant majoritaire - - ) - - - - - {emoji('🚶‍♂️')} - Auto-entrepreneur - -

-

- - Vous ne savez pas lequel choisir ? - -

-

- - Comparer les régimes - -

-
-)) - -export default SchemeChoice diff --git a/source/sites/mon-entreprise.fr/pages/Gérer/SchemeSelection.tsx b/source/sites/mon-entreprise.fr/pages/Gérer/SchemeSelection.tsx new file mode 100644 index 000000000..607250aa3 --- /dev/null +++ b/source/sites/mon-entreprise.fr/pages/Gérer/SchemeSelection.tsx @@ -0,0 +1,73 @@ +import { T } from 'Components' +import animate from 'Ui/animate' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import React, { useContext } from 'react' +import emoji from 'react-easy-emoji' +import { Helmet } from 'react-helmet' +import { useTranslation } from 'react-i18next' +import { Link } from 'react-router-dom' + +export default function SchemeChoice() { + const sitePaths = useContext(SitePathsContext) + const { t } = useTranslation() + return ( + + + {t('selectionRégime.page.titre', 'Selection du régime')} + +

+ Quel régime souhaitez-vous explorer ? +

+

+ + {emoji('☂')} + + Assimilé salarié + + ( + + SAS, SASU ou SARL avec gérant minoritaire + + ) + + + + + {emoji('👩‍🔧')} + + Indépendant + + ( + + EI, EIRL, EURL ou SARL avec gérant majoritaire + + ) + + + + + {emoji('🚶‍♂️')} + Auto-entrepreneur + +

+

+ + Vous ne savez pas lequel choisir ? + +

+

+ + Comparer les régimes + +

+
+ ) +} diff --git a/source/sites/mon-entreprise.fr/pages/Gérer/SécuritéSociale.js b/source/sites/mon-entreprise.fr/pages/Gérer/SécuritéSociale.tsx similarity index 94% rename from source/sites/mon-entreprise.fr/pages/Gérer/SécuritéSociale.js rename to source/sites/mon-entreprise.fr/pages/Gérer/SécuritéSociale.tsx index d986b6f40..5a7df2b19 100644 --- a/source/sites/mon-entreprise.fr/pages/Gérer/SécuritéSociale.js +++ b/source/sites/mon-entreprise.fr/pages/Gérer/SécuritéSociale.tsx @@ -1,7 +1,8 @@ -import { React, T } from 'Components' +import { T } from 'Components' +import * as Animate from 'Ui/animate' +import React from 'react' import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' -import * as Animate from 'Ui/animate' import Video from './Video' export default function SocialSecurity() { diff --git a/source/sites/mon-entreprise.fr/pages/Gérer/Video.js b/source/sites/mon-entreprise.fr/pages/Gérer/Video.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Gérer/Video.js rename to source/sites/mon-entreprise.fr/pages/Gérer/Video.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Gérer/index.js b/source/sites/mon-entreprise.fr/pages/Gérer/index.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Gérer/index.js rename to source/sites/mon-entreprise.fr/pages/Gérer/index.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Iframes/IframeFooter.js b/source/sites/mon-entreprise.fr/pages/Iframes/IframeFooter.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Iframes/IframeFooter.js rename to source/sites/mon-entreprise.fr/pages/Iframes/IframeFooter.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Iframes/SimulateurEmbauche.js b/source/sites/mon-entreprise.fr/pages/Iframes/SimulateurEmbauche.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Iframes/SimulateurEmbauche.js rename to source/sites/mon-entreprise.fr/pages/Iframes/SimulateurEmbauche.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Iframes/index.js b/source/sites/mon-entreprise.fr/pages/Iframes/index.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Iframes/index.js rename to source/sites/mon-entreprise.fr/pages/Iframes/index.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Landing/Landing.js b/source/sites/mon-entreprise.fr/pages/Landing/Landing.tsx similarity index 81% rename from source/sites/mon-entreprise.fr/pages/Landing/Landing.js rename to source/sites/mon-entreprise.fr/pages/Landing/Landing.tsx index 4ab42dc33..9ea34d4c9 100644 --- a/source/sites/mon-entreprise.fr/pages/Landing/Landing.js +++ b/source/sites/mon-entreprise.fr/pages/Landing/Landing.tsx @@ -1,17 +1,19 @@ -import { T } from 'Components'; -import { SitePathsContext } from 'Components/utils/withSitePaths'; -import logoSvg from 'Images/logo.svg'; -import React, { useContext } from 'react'; -import emoji from 'react-easy-emoji'; -import { useSelector } from 'react-redux'; -import { Link } from 'react-router-dom'; -import Footer from '../../layout/Footer/Footer'; -import illustrationSvg from './illustration.svg'; -import './Landing.css'; +import { T } from 'Components' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import logoSvg from 'Images/logo.svg' +import React, { useContext } from 'react' +import emoji from 'react-easy-emoji' +import { useSelector } from 'react-redux' +import { Link } from 'react-router-dom' +import Footer from '../../layout/Footer/Footer' +import illustrationSvg from './illustration.svg' +import './Landing.css' export default function Landing() { const sitePaths = useContext(SitePathsContext) - const statutChoisi = useSelector(state => state.inFranceApp.companyStatusChoice); + const statutChoisi = useSelector( + state => state.inFranceApp.companyStatusChoice + ) return (
@@ -38,7 +40,9 @@ export default function Landing() {
+ to={ + statutChoisi ? sitePaths.créer[statutChoisi] : sitePaths.créer.index + }>
{emoji('💡')}

Créer une entreprise

@@ -79,15 +83,14 @@ export default function Landing() { Commencer
-
- {emoji('🧮')} Voir la liste des simulateurs + {emoji('🧮')}{' '} + Voir la liste des simulateurs
@@ -114,10 +117,10 @@ export default function Landing() {

Nous sommes une petite{' '} équipe autonome et pluridisciplinaire au sein de l’ - URSSAF. Nous avons à coeur d’être au - plus proche de nos usagers afin d’améliorer en permanence ce site - conformément à la méthode des{' '} - Startups d’État. + URSSAF. Nous avons à coeur + d’être au plus proche de nos usagers afin d’améliorer en permanence + ce site conformément à la méthode des{' '} + Startup d’État.

N’hésitez pas à nous remonter vos remarques et suggestions à{' '} diff --git a/source/sites/mon-entreprise.fr/pages/Simulateurs/AssimiléSalarié.js b/source/sites/mon-entreprise.fr/pages/Simulateurs/AssimiléSalarié.js deleted file mode 100644 index ece7b9796..000000000 --- a/source/sites/mon-entreprise.fr/pages/Simulateurs/AssimiléSalarié.js +++ /dev/null @@ -1,58 +0,0 @@ -import { T } from 'Components' -import SalaryExplanation from 'Components/SalaryExplanation' -import Warning from 'Components/SimulateurWarning' -import Simulation from 'Components/Simulation' -import assimiléConfig from 'Components/simulationConfigs/assimilé.yaml' -import withSimulationConfig from 'Components/simulationConfigs/withSimulationConfig' -import { compose } from 'ramda' -import React from 'react' -import emoji from 'react-easy-emoji' -import { Helmet } from 'react-helmet' -import { withTranslation } from 'react-i18next' - -const AssimiléSalarié = ({ t }) => ( - <> - - - {t( - 'simulateurs.assimilé-salarié.page.titre', - 'Assimilé salarié : simulateur officiel de revenus et cotisations' - )} - - - -

- - Simulateur de revenus assimilé salarié - -

- - - {emoji('☂️ ')}{' '} - - Les gérants égalitaires ou minoritaires de SARL ou les - dirigeants de SA et SAS sont assimilés salariés et relèvent du - régime général. Par conséquent, le dirigeant a la même - protection sociale qu'un salarié, mis à part le chômage. - -

- } - /> - } - /> - -) -export default compose( - withSimulationConfig(assimiléConfig), - withTranslation() -)(AssimiléSalarié) diff --git a/source/sites/mon-entreprise.fr/pages/Simulateurs/AssimiléSalarié.tsx b/source/sites/mon-entreprise.fr/pages/Simulateurs/AssimiléSalarié.tsx new file mode 100644 index 000000000..6ca6c598f --- /dev/null +++ b/source/sites/mon-entreprise.fr/pages/Simulateurs/AssimiléSalarié.tsx @@ -0,0 +1,57 @@ +import { T } from 'Components' +import SalaryExplanation from 'Components/SalaryExplanation' +import Warning from 'Components/SimulateurWarning' +import Simulation from 'Components/Simulation' +import assimiléConfig from 'Components/simulationConfigs/assimilé.yaml' +import withSimulationConfig from 'Components/simulationConfigs/withSimulationConfig' +import React from 'react' +import emoji from 'react-easy-emoji' +import { Helmet } from 'react-helmet' +import { useTranslation } from 'react-i18next' + +const AssimiléSalarié = () => { + const { t } = useTranslation() + return ( + <> + + + {t( + 'simulateurs.assimilé-salarié.page.titre', + 'Assimilé salarié : simulateur officiel de revenus et cotisations' + )} + + + +

+ + Simulateur de revenus assimilé salarié + +

+ + + {emoji('☂️ ')}{' '} + + Les gérants égalitaires ou minoritaires de SARL ou les + dirigeants de SA et SAS sont assimilés salariés et relèvent du + régime général. Par conséquent, le dirigeant a la même + protection sociale qu'un salarié, mis à part le chômage. + +

+ } + /> + } + /> + + ) +} +export default withSimulationConfig(assimiléConfig)(AssimiléSalarié) diff --git a/source/sites/mon-entreprise.fr/pages/Simulateurs/AutoEntrepreneur.js b/source/sites/mon-entreprise.fr/pages/Simulateurs/AutoEntrepreneur.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Simulateurs/AutoEntrepreneur.js rename to source/sites/mon-entreprise.fr/pages/Simulateurs/AutoEntrepreneur.tsx index 2c1caff7d..dd18bdede 100644 --- a/source/sites/mon-entreprise.fr/pages/Simulateurs/AutoEntrepreneur.js +++ b/source/sites/mon-entreprise.fr/pages/Simulateurs/AutoEntrepreneur.tsx @@ -1,16 +1,16 @@ import { T } from 'Components' import Warning from 'Components/SimulateurWarning' import Simulation from 'Components/Simulation' -import StackedBarChart from 'Components/StackedBarChart' import indépendantConfig from 'Components/simulationConfigs/auto-entrepreneur.yaml' import withSimulationConfig from 'Components/simulationConfigs/withSimulationConfig' +import StackedBarChart from 'Components/StackedBarChart' import { ThemeColoursContext } from 'Components/utils/withColours' import { getRuleFromAnalysis } from 'Engine/rules' -import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors' -import { useSelector } from 'react-redux' import React, { useContext } from 'react' -import { useTranslation } from 'react-i18next' import { Helmet } from 'react-helmet' +import { useTranslation } from 'react-i18next' +import { useSelector } from 'react-redux' +import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors' const AutoEntrepreneur = () => { const { t } = useTranslation() diff --git a/source/sites/mon-entreprise.fr/pages/Simulateurs/Home.js b/source/sites/mon-entreprise.fr/pages/Simulateurs/Home.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Simulateurs/Home.js rename to source/sites/mon-entreprise.fr/pages/Simulateurs/Home.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Simulateurs/Indépendant.js b/source/sites/mon-entreprise.fr/pages/Simulateurs/Indépendant.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Simulateurs/Indépendant.js rename to source/sites/mon-entreprise.fr/pages/Simulateurs/Indépendant.tsx index 7d31f39ae..0c35f82d3 100644 --- a/source/sites/mon-entreprise.fr/pages/Simulateurs/Indépendant.js +++ b/source/sites/mon-entreprise.fr/pages/Simulateurs/Indépendant.tsx @@ -1,16 +1,16 @@ -import { ThemeColoursContext } from 'Components/utils/withColours' import { T } from 'Components' -import { getRuleFromAnalysis } from 'Engine/rules' import Warning from 'Components/SimulateurWarning' import Simulation from 'Components/Simulation' -import StackedBarChart from 'Components/StackedBarChart' import indépendantConfig from 'Components/simulationConfigs/indépendant.yaml' import withSimulationConfig from 'Components/simulationConfigs/withSimulationConfig' -import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors' +import StackedBarChart from 'Components/StackedBarChart' +import { ThemeColoursContext } from 'Components/utils/withColours' +import { getRuleFromAnalysis } from 'Engine/rules' import React, { useContext } from 'react' import { Helmet } from 'react-helmet' -import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' +import { useSelector } from 'react-redux' +import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors' export default withSimulationConfig(indépendantConfig)(function Indépendant() { const { t } = useTranslation() diff --git a/source/sites/mon-entreprise.fr/pages/Simulateurs/Salarié.js b/source/sites/mon-entreprise.fr/pages/Simulateurs/Salarié.tsx similarity index 86% rename from source/sites/mon-entreprise.fr/pages/Simulateurs/Salarié.js rename to source/sites/mon-entreprise.fr/pages/Simulateurs/Salarié.tsx index 189cf107d..2373cd51b 100644 --- a/source/sites/mon-entreprise.fr/pages/Simulateurs/Salarié.js +++ b/source/sites/mon-entreprise.fr/pages/Simulateurs/Salarié.tsx @@ -1,4 +1,4 @@ -import { React, T } from 'Components' +import { T } from 'Components' import Banner from 'Components/Banner' import PreviousSimulationBanner from 'Components/PreviousSimulationBanner' import SalaryExplanation from 'Components/SalaryExplanation' @@ -7,10 +7,10 @@ import salariéConfig from 'Components/simulationConfigs/salarié.yaml' import withSimulationConfig from 'Components/simulationConfigs/withSimulationConfig' import { IsEmbeddedContext } from 'Components/utils/embeddedContext' import { Markdown } from 'Components/utils/markdown' -import withSitePaths from 'Components/utils/withSitePaths' +import { SitePathsContext } from 'Components/utils/withSitePaths' import urlIllustrationNetBrutEn from 'Images/illustration-net-brut-en.png' import urlIllustrationNetBrut from 'Images/illustration-net-brut.png' -import { compose } from 'ramda' +import React, { useContext } from 'react' import emoji from 'react-easy-emoji' import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' @@ -101,44 +101,42 @@ In addition to the salary, our simulator takes into account the calculation of b There are deferred hiring aids that are not taken into account by our simulator, you can find them on the official portal.` -export let SalarySimulation = compose( - withSimulationConfig(salariéConfig), - withSitePaths -)(({ sitePaths }) => ( - <> - - {emoji('☂️')}{' '} - - Dès que l'embauche d'un salarié est déclarée et qu'il est payé, - il est couvert par le régime général de la Sécurité sociale - (santé, maternité, invalidité, vieillesse, maladie - professionnelle et accidents) et chômage. - -

- } - /> - } - customEndMessages={ - <> - - Vous pouvez maintenant concrétiser votre projet d'embauche. - - {sitePaths.démarcheEmbauche && ( +export let SalarySimulation = withSimulationConfig(salariéConfig)(() => { + const sitePaths = useContext(SitePathsContext) + return ( + <> + + {emoji('☂️')}{' '} + + Dès que l'embauche d'un salarié est déclarée et qu'il est + payé, il est couvert par le régime général de la Sécurité + sociale (santé, maternité, invalidité, vieillesse, maladie + professionnelle et accidents) et chômage. + +

+ } + /> + } + customEndMessages={ + <> + + Vous pouvez maintenant concrétiser votre projet d'embauche. +
+ to={sitePaths.gérer.embaucher}> Connaître les démarches
- )} - - } - /> - - -)) + + } + /> + + + ) +}) diff --git a/source/sites/mon-entreprise.fr/pages/Simulateurs/SchemeComparaison.js b/source/sites/mon-entreprise.fr/pages/Simulateurs/SchemeComparaison.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Simulateurs/SchemeComparaison.js rename to source/sites/mon-entreprise.fr/pages/Simulateurs/SchemeComparaison.tsx diff --git a/source/sites/mon-entreprise.fr/pages/Simulateurs/index.js b/source/sites/mon-entreprise.fr/pages/Simulateurs/index.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/Simulateurs/index.js rename to source/sites/mon-entreprise.fr/pages/Simulateurs/index.tsx diff --git a/source/sites/mon-entreprise.fr/pages/integration/Iframe.js b/source/sites/mon-entreprise.fr/pages/integration/Iframe.tsx similarity index 97% rename from source/sites/mon-entreprise.fr/pages/integration/Iframe.js rename to source/sites/mon-entreprise.fr/pages/integration/Iframe.tsx index 698bad2e0..5400e6bf7 100644 --- a/source/sites/mon-entreprise.fr/pages/integration/Iframe.js +++ b/source/sites/mon-entreprise.fr/pages/integration/Iframe.tsx @@ -2,12 +2,12 @@ import { ScrollToTop } from 'Components/utils/Scroll' import urssafLogo from 'Images/urssaf.svg' import React from 'react' import { Link } from 'react-router-dom' +import { IntegrationCode } from '../Dev/IntegrationTest' +import './iframe.css' import apecLogo from './images/apec.png' import cciLogo from './images/cci.png' import minTraLogo from './images/min-tra.jpg' import poleEmploiLogo from './images/pole-emploi.png' -import './iframe.css' -import { IntegrationCode } from '../../pages/Dev/IntegrationTest' export default function Integration() { return ( diff --git a/source/sites/mon-entreprise.fr/pages/integration/Library.js b/source/sites/mon-entreprise.fr/pages/integration/Library.tsx similarity index 100% rename from source/sites/mon-entreprise.fr/pages/integration/Library.js rename to source/sites/mon-entreprise.fr/pages/integration/Library.tsx diff --git a/source/sites/mon-entreprise.fr/pages/integration/Options.js b/source/sites/mon-entreprise.fr/pages/integration/Options.js deleted file mode 100644 index 7a5239e5f..000000000 --- a/source/sites/mon-entreprise.fr/pages/integration/Options.js +++ /dev/null @@ -1,35 +0,0 @@ -import { React, T } from 'Components' -import { Link } from 'react-router-dom' -import emoji from 'react-easy-emoji' -import withSitePaths from 'Components/utils/withSitePaths' -import illustration from './illustration.png' - -export default withSitePaths(({ sitePaths }) => ( -
-
-

- Intégrez le droit de la sécurité sociale au coeur de vos outils -

-
- -
-

- En plus du site mon-entreprise.fr, nous développons des outils gratuits - et libres à intégrer directement chez vous, dans les parcours habituels - de vos utilisateurs. -

- - {emoji('📱')} Intégrer l'interface de simulation - -

Intégrer l'un de nos simulateurs en un clic dans votre site Web.

-
- - {emoji('🧰')} Intégrer la bibliothèque de calcul - -

- Intégrer les calculs sans l'interface dans votre site Web ou sur votre - serveur, via une bibliothèque NPM. -

-
-
-)) diff --git a/source/sites/mon-entreprise.fr/pages/integration/Options.tsx b/source/sites/mon-entreprise.fr/pages/integration/Options.tsx new file mode 100644 index 000000000..63dbe1e96 --- /dev/null +++ b/source/sites/mon-entreprise.fr/pages/integration/Options.tsx @@ -0,0 +1,41 @@ +import { T } from 'Components' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import React, { useContext } from 'react' +import emoji from 'react-easy-emoji' +import { Link } from 'react-router-dom' +import illustration from './illustration.png' + +export default function Options() { + const sitePaths = useContext(SitePathsContext) + return ( +
+
+

+ Intégrez le droit de la sécurité sociale au coeur de vos outils +

+
+ +
+

+ En plus du site mon-entreprise.fr, nous développons des outils + gratuits et libres à intégrer directement chez vous, dans les parcours + habituels de vos utilisateurs. +

+ + {emoji('📱')} Intégrer l'interface de simulation + +

Intégrer l'un de nos simulateurs en un clic dans votre site Web.

+
+ + {emoji('🧰')} Intégrer la bibliothèque de calcul + +

+ Intégrer les calculs sans l'interface dans votre site Web ou sur votre + serveur, via une bibliothèque NPM. +

+
+
+ ) +} diff --git a/source/sites/mon-entreprise.fr/pages/integration/index.js b/source/sites/mon-entreprise.fr/pages/integration/index.tsx similarity index 77% rename from source/sites/mon-entreprise.fr/pages/integration/index.js rename to source/sites/mon-entreprise.fr/pages/integration/index.tsx index 9b19fd31e..4f28e1879 100644 --- a/source/sites/mon-entreprise.fr/pages/integration/index.js +++ b/source/sites/mon-entreprise.fr/pages/integration/index.tsx @@ -1,13 +1,13 @@ import { ScrollToTop } from 'Components/utils/Scroll' -import React from 'react' -import withSitePaths from 'Components/utils/withSitePaths' +import { SitePathsContext } from 'Components/utils/withSitePaths' +import React, { useContext } from 'react' import { Route, Switch } from 'react-router' - -import Options from './Options' -import Library from './Library' import Iframe from './Iframe' +import Library from './Library' +import Options from './Options' -export default withSitePaths(function Integration({ sitePaths }) { +export default function Integration() { + const sitePaths = useContext(SitePathsContext) return ( <> @@ -21,4 +21,4 @@ export default withSitePaths(function Integration({ sitePaths }) { ) -}) +} diff --git a/source/sites/mon-entreprise.fr/pages/ÉconomieCollaborative/VotreSituation.js b/source/sites/mon-entreprise.fr/pages/ÉconomieCollaborative/VotreSituation.js index efd1b40ee..bacbe7ccb 100644 --- a/source/sites/mon-entreprise.fr/pages/ÉconomieCollaborative/VotreSituation.js +++ b/source/sites/mon-entreprise.fr/pages/ÉconomieCollaborative/VotreSituation.js @@ -124,7 +124,7 @@ export default withSitePaths(function VotreSituation({ sitePaths }) { )}
- + ) }) @@ -147,4 +147,4 @@ const ActivitéList = ({ activités }) => { ))} ) -} +} diff --git a/source/sites/mon-entreprise.fr/sitePaths.js b/source/sites/mon-entreprise.fr/sitePaths.ts similarity index 71% rename from source/sites/mon-entreprise.fr/sitePaths.js rename to source/sites/mon-entreprise.fr/sitePaths.ts index dee5feb36..6d13642b5 100644 --- a/source/sites/mon-entreprise.fr/sitePaths.js +++ b/source/sites/mon-entreprise.fr/sitePaths.ts @@ -1,8 +1,6 @@ -/* @flow */ -import { reduce, toPairs, zipObj } from 'ramda' +import { map, reduce, toPairs, zipObj } from 'ramda' +import { LegalStatus } from 'Selectors/companyStatusSelectors' import i18n from '../../i18n' -import { constructSitePaths } from '../../utils' -import type { LegalStatus } from 'Selectors/companyStatusSelectors' export const LANDING_LEGAL_STATUS_LIST: Array = [ 'EI', @@ -16,23 +14,48 @@ export const LANDING_LEGAL_STATUS_LIST: Array = [ 'SA' ] -const translateTo = language => (str1, str2, options = {}) => +const translateTo = (language: string) => ( + str1: string, + str2: string, + options = {} +) => i18n.t([str1, str2].filter(Boolean), { ...(language ? { lng: language } : {}), ...options }) + +interface HasIndex { + index: string +} + +type SitePathsObject = { + [key in keyof T]: string | SitePathsObject +} + +function constructSitePaths>( + root: string, + { index, ...sitePaths }: T +): T { + return { + index: root + index, + ...map(value => + typeof value === 'string' + ? root + index + value + : constructSitePaths(root + index, value as any) + )(sitePaths as any) + } as any +} + export const constructLocalizedSitePath = (language: string) => { const t = translateTo(language) return constructSitePaths('', { index: '', créer: { index: t('path.créer.index', '/créer'), - ...(LANDING_LEGAL_STATUS_LIST.reduce((paths, statut) => ({ - [statut]: - `/${statut}`, - ...paths - }), {})), - après: t('path.créer.après', '/après-la-création'), + ...(Object.fromEntries( + LANDING_LEGAL_STATUS_LIST.map(statut => [statut, `/${statut}`]) + ) as { [statut in LegalStatus]: string }), + après: t('path.créer.après', '/créer/après-la-création'), guideStatut: { index: t('path.créer.guideStatut.index', '/statut-juridique'), liste: t('path.créer.guideStatut.liste', '/liste'), @@ -61,7 +84,7 @@ export const constructLocalizedSitePath = (language: string) => { gérer: { index: t('path.gérer.index', '/gérer'), embaucher: t('path.gérer.embaucher', '/embaucher'), - sécuritéSociale: t('path.gérer.sécuritéSociale', '/sécurité-sociale'), + sécuritéSociale: t('path.gérer.sécuritéSociale', '/sécurité-sociale') }, simulateurs: { index: t('path.simulateurs.index', '/simulateurs'), @@ -99,7 +122,9 @@ export const constructLocalizedSitePath = (language: string) => { }) } -const deepReduce = (fn, initialValue, object: Object) => +export type SitePathsType = ReturnType + +const deepReduce = (fn, initialValue, object) => reduce( (acc, [key, value]) => typeof value === 'object' @@ -110,16 +135,8 @@ const deepReduce = (fn, initialValue, object: Object) => ) export const generateSiteMap = (sitePaths: Object) => - deepReduce( - (paths, path) => [ - ...paths, - ...([path]) - ], - [], - sitePaths - ) + deepReduce((paths, path) => [...paths, ...[path]], [], sitePaths) -type LangLink = Array<{ href: string, hrefLang: 'fr' | 'en' }> type SiteMap = Array const enSiteMap: SiteMap = generateSiteMap( constructLocalizedSitePath('en') @@ -129,12 +146,6 @@ const frSiteMap: SiteMap = generateSiteMap( ).map(path => (process.env.FR_SITE || '').replace('${path}', path)) export const hrefLangLink = { - en: zipObj( - enSiteMap, - frSiteMap.map(href => [{ href, hrefLang: 'fr' }]) - ), - fr: zipObj( - frSiteMap, - enSiteMap.map(href => [{ href, hrefLang: 'en' }]) - ) + en: zipObj(enSiteMap, frSiteMap.map(href => [{ href, hrefLang: 'fr' }])), + fr: zipObj(frSiteMap, enSiteMap.map(href => [{ href, hrefLang: 'en' }])) } diff --git a/source/storage/persistEverything.js b/source/storage/persistEverything.js index 2d840ce80..28d26b81b 100644 --- a/source/storage/persistEverything.js +++ b/source/storage/persistEverything.js @@ -1,4 +1,3 @@ -/* @flow */ import type { Store } from 'redux' import { omit } from 'ramda' diff --git a/source/storage/persistSimulation.js b/source/storage/persistSimulation.js index 61b0259bc..14535e860 100644 --- a/source/storage/persistSimulation.js +++ b/source/storage/persistSimulation.js @@ -1,4 +1,3 @@ -/* @flow */ import type { Store } from 'redux' import { debounce } from '../utils' diff --git a/source/storage/serializeSimulation.js b/source/storage/serializeSimulation.js index 7768d6b9c..f6eb950a9 100644 --- a/source/storage/serializeSimulation.js +++ b/source/storage/serializeSimulation.js @@ -1,4 +1,3 @@ -/* @flow */ import type { State, SavedSimulation } from '../types/State.js' import { pipe } from 'ramda' import { currentSimulationSelector } from 'Selectors/storageSelectors' diff --git a/source/types/ActionsTypes.js b/source/types/ActionsTypes.js index e3e3c55e5..afd24018d 100644 --- a/source/types/ActionsTypes.js +++ b/source/types/ActionsTypes.js @@ -1,7 +1,6 @@ import type { SitePaths } from 'Components/utils/withSitePaths' import type { RouterHistory } from 'react-router' -/* @flow */ export type LoadPreviousSimulationAction = { type: 'LOAD_PREVIOUS_SIMULATION' diff --git a/source/types/Analysis.js b/source/types/Analysis.js index 0845b65c4..cb7800c27 100644 --- a/source/types/Analysis.js +++ b/source/types/Analysis.js @@ -1,4 +1,3 @@ -/* @flow */ export type Analysis = { cache: { [string]: Object }, targets: Array diff --git a/source/types/CDD.js b/source/types/CDD.js index 7172476d4..7ef5d9d34 100644 --- a/source/types/CDD.js +++ b/source/types/CDD.js @@ -1,4 +1,3 @@ -/* @flow */ export type Événements = | 'poursuite du CDD en CDI' diff --git a/source/types/ContratSalarié.js b/source/types/ContratSalarié.js index f9e8bd9a9..b0a37a8aa 100644 --- a/source/types/ContratSalarié.js +++ b/source/types/ContratSalarié.js @@ -1,4 +1,3 @@ -/* @flow */ import type { OuiNon } from './shared' import type { CDD } from './CDD' diff --git a/source/types/Entreprise.js b/source/types/Entreprise.js index 46e570656..1ecd7b6e4 100644 --- a/source/types/Entreprise.js +++ b/source/types/Entreprise.js @@ -1,4 +1,3 @@ -/* @flow */ import type { OuiNon } from './shared' export type Entreprise = { effectif: string, diff --git a/source/types/RegleTypes.ts b/source/types/RegleTypes.ts new file mode 100644 index 000000000..a224378a8 --- /dev/null +++ b/source/types/RegleTypes.ts @@ -0,0 +1,4 @@ +export interface Règle { + dottedName: string + title: string +} diff --git a/source/types/ResultViewTypes.js b/source/types/ResultViewTypes.js index 482257fc3..f53fa50bb 100644 --- a/source/types/ResultViewTypes.js +++ b/source/types/ResultViewTypes.js @@ -1,4 +1,3 @@ -/* @flow */ import type { RègleAvecMontant, Règle } from './RegleTypes' export type Cotisation = Règle & { diff --git a/source/types/Situation.js b/source/types/Situation.js deleted file mode 100644 index 574da7f7b..000000000 --- a/source/types/Situation.js +++ /dev/null @@ -1,11 +0,0 @@ -/* @flow */ -import type { ContratSalarié } from './ContratSalarié' -import type { Entreprise } from './Entreprise' - -export type Situation = { - 'contrat salarié'?: ContratSalarié, - établissement: { - 'code commune': string - }, - entreprise?: Entreprise -} diff --git a/source/types/Situation.ts b/source/types/Situation.ts new file mode 100644 index 000000000..de55b8bd4 --- /dev/null +++ b/source/types/Situation.ts @@ -0,0 +1,10 @@ +import { ContratSalarié } from './ContratSalarié' +import { Entreprise } from './Entreprise' + +export type Situation = { + 'contrat salarié'?: ContratSalarié + établissement: { + 'code commune': string + } + entreprise?: Entreprise +} diff --git a/source/types/State.js b/source/types/State.ts similarity index 59% rename from source/types/State.js rename to source/types/State.ts index 91df7e3d2..619b356cd 100644 --- a/source/types/State.js +++ b/source/types/State.ts @@ -1,5 +1,4 @@ -/* @flow */ -import type { Situation } from './Situation.js' +import { Situation } from './Situation.js' export type TargetInput = | 'contrat salarié . salaire de base' @@ -7,21 +6,21 @@ export type TargetInput = | 'contrat salarié . salaire de net' export type SavedSimulation = { - situation: Situation, - activeTargetInput: TargetInput, + situation: Situation + activeTargetInput: TargetInput foldedSteps: Array } export type FlatRules = { - [string]: { + [name: string]: { titre: string } } export type State = { - previousSimulation: ?SavedSimulation, + previousSimulation?: SavedSimulation conversationSteps: { - foldedSteps: Array, - currentQuestion: ?string - }, + foldedSteps: Array + currentQuestion?: string + } activeTargetInput: TargetInput } diff --git a/source/types/companyCreationChecklistTypes.js b/source/types/companyCreationChecklistTypes.js index 29d7d1d40..fc54839fb 100644 --- a/source/types/companyCreationChecklistTypes.js +++ b/source/types/companyCreationChecklistTypes.js @@ -1,4 +1,3 @@ -/* @flow */ export type InitializeCompanyCreationChecklistAction = { type: 'INITIALIZE_COMPANY_CREATION_CHECKLIST', diff --git a/source/types/companyTypes.js b/source/types/companyTypes.ts similarity index 51% rename from source/types/companyTypes.js rename to source/types/companyTypes.ts index 58b281b0a..0475039ce 100644 --- a/source/types/companyTypes.js +++ b/source/types/companyTypes.ts @@ -1,60 +1,59 @@ -/* @flow */ -import type { LegalStatus } from 'Selectors/companyStatusSelectors' +import { LegalStatus } from 'Selectors/companyStatusSelectors' export type IsSoleProprietorshipAction = { - type: 'COMPANY_IS_SOLE_PROPRIETORSHIP', - isSoleProprietorship: ?boolean + type: 'COMPANY_IS_SOLE_PROPRIETORSHIP' + isSoleProprietorship?: boolean } export type DirectorStatus = 'SALARIED' | 'SELF_EMPLOYED' export type DefineDirectorStatusAction = { - type: 'DEFINE_DIRECTOR_STATUS', - status: ?DirectorStatus + type: 'DEFINE_DIRECTOR_STATUS' + status?: DirectorStatus } export type CompanyHasMultipleAssociatesAction = { - type: 'COMPANY_HAS_MULTIPLE_ASSOCIATES', - multipleAssociates: ?boolean + type: 'COMPANY_HAS_MULTIPLE_ASSOCIATES' + multipleAssociates?: boolean } export type IsAutoentrepreneurAction = { - type: 'COMPANY_IS_MICROENTERPRISE', - autoEntrepreneur: ?boolean + type: 'COMPANY_IS_MICROENTERPRISE' + autoEntrepreneur?: boolean } export type ChangeChecklistItemAction = { - type: 'CHANGE_CHECKLIST_ITEM', - checklist: string, - value: boolean, + type: 'CHANGE_CHECKLIST_ITEM' + checklist: string + value: boolean name: string } export type DirectorIsInAMinorityAction = { - type: 'SPECIFY_DIRECTORS_SHARE', - minorityDirector: ?boolean + type: 'SPECIFY_DIRECTORS_SHARE' + minorityDirector?: boolean } export type ResetCompanyStatusAction = { - type: 'RESET_COMPANY_STATUS_CHOICE', + type: 'RESET_COMPANY_STATUS_CHOICE' answersToReset?: Array } -export type State = {| - +companyLegalStatus: { +export type State = { + companyLegalStatus: { /* Note on the meanings of null / undefined value: If the key exists and the value is null, the question have been asked, but skipped by the user. If the key does not exists, the question still hasn't been asked. */ - +soleProprietorship?: ?boolean, - +directorStatus?: ?DirectorStatus, - +multipleAssociates?: ?boolean, - +autoEntrepreneur?: ?boolean, - +minorityDirector?: ?boolean - }, - +companyStatusChoice: ?LegalStatus -|} -export type LegalStatusRequirements = $PropertyType + soleProprietorship?: boolean + directorStatus?: DirectorStatus + multipleAssociates?: boolean + autoEntrepreneur?: boolean + minorityDirector?: boolean + } + companyStatusChoice?: LegalStatus +} +export type LegalStatusRequirements = State['companyLegalStatus'] export type Action = | IsSoleProprietorshipAction | DefineDirectorStatusAction diff --git a/source/types/hiringChecklistTypes.js b/source/types/hiringChecklistTypes.js index 0570f91eb..1179ff78f 100644 --- a/source/types/hiringChecklistTypes.js +++ b/source/types/hiringChecklistTypes.js @@ -1,4 +1,3 @@ -/* @flow */ export type InitializeHiringChecklistAction = { type: 'INITIALIZE_HIRING_CHECKLIST', diff --git a/source/types/shared.js b/source/types/shared.js index e7eada524..ca498f296 100644 --- a/source/types/shared.js +++ b/source/types/shared.js @@ -1,3 +1,2 @@ -/* @flow */ export type OuiNon = 'oui' | 'non' diff --git a/source/types/typescript/css-prop.d.ts b/source/types/typescript/css-prop.d.ts new file mode 100644 index 000000000..5d6296f94 --- /dev/null +++ b/source/types/typescript/css-prop.d.ts @@ -0,0 +1 @@ +import 'styled-components/cssprop' diff --git a/source/types/typescript/import-images.d.ts b/source/types/typescript/import-images.d.ts new file mode 100644 index 000000000..fc525faaf --- /dev/null +++ b/source/types/typescript/import-images.d.ts @@ -0,0 +1,14 @@ +declare module '*.svg' { + const content: any + export default content +} + +declare module '*.png' { + const content: any + export default content +} + +declare module '*.jpg' { + const content: any + export default content +} diff --git a/source/types/typescript/import-yaml.ts b/source/types/typescript/import-yaml.ts new file mode 100644 index 000000000..127e8da46 --- /dev/null +++ b/source/types/typescript/import-yaml.ts @@ -0,0 +1,6 @@ +// TODO: We could have better types for yaml imports (it works automatically for JSON modules) + +declare module '*.yaml' { + const content: any + export default content +} diff --git a/source/types/typescript/react-easy-emoji.d.ts b/source/types/typescript/react-easy-emoji.d.ts new file mode 100644 index 000000000..49dfd2aa2 --- /dev/null +++ b/source/types/typescript/react-easy-emoji.d.ts @@ -0,0 +1,5 @@ +declare module 'react-easy-emoji' { + function emoji(input: string): string + + export default emoji +} diff --git a/source/utils.js b/source/utils.ts similarity index 63% rename from source/utils.js rename to source/utils.ts index 87ae539aa..8c878f381 100644 --- a/source/utils.js +++ b/source/utils.ts @@ -1,13 +1,10 @@ -/* @flow */ -import { map } from 'ramda' - export let capitalise0 = (name: string) => name && name[0].toUpperCase() + name.slice(1) -export function debounce( +export function debounce( timeout: number, - fn: ArgType => void -): ArgType => void { + fn: (arg: ArgType) => void +): (arg: ArgType) => void { let timeoutId return (...args) => { clearTimeout(timeoutId) @@ -33,9 +30,9 @@ export function inIframe() { } } -export function softCatch( - fn: ArgType => ReturnType -): ArgType => ReturnType | null { +export function softCatch( + fn: (arg: ArgType) => ReturnType +): (arg: ArgType) => ReturnType | null { return function(...args) { try { return fn(...args) @@ -46,7 +43,10 @@ export function softCatch( } } } -export function mapOrApply(fn: A => B, x: Array | A): Array | B { +export function mapOrApply( + fn: (a: A) => B, + x: Array | A +): Array | B { return Array.isArray(x) ? x.map(fn) : fn(x) } @@ -64,19 +64,3 @@ export function getSessionStorage() { return undefined } } - -export const constructSitePaths = ( - root: string, - { index, ...sitePaths }: { index: string } -) => ({ - index: root + index, - ...map( - value => - typeof value === 'string' - ? root + index + value - : typeof value === 'function' - ? (...args) => mapOrApply(x => root + index + x, value(...args)) - : constructSitePaths(root + index, value), - sitePaths - ) -}) diff --git a/source/webpack.common.js b/source/webpack.common.js index e2f9caa14..0a55ed525 100644 --- a/source/webpack.common.js +++ b/source/webpack.common.js @@ -16,11 +16,12 @@ module.exports.default = { Reducers: path.resolve('source/reducers/'), Types: path.resolve('source/types/'), Images: path.resolve('source/images/') - } + }, + extensions: ['.js', '.ts', '.tsx'] }, entry: { - 'mon-entreprise': './source/sites/mon-entreprise.fr/entry.fr.js', - infrance: './source/sites/mon-entreprise.fr/entry.en.js', + 'mon-entreprise': './source/sites/mon-entreprise.fr/entry.fr.tsx', + 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' @@ -88,12 +89,12 @@ module.exports.commonLoaders = ({ legacy = false } = {}) => { { targets: !legacy ? { - esmodules: true - } + esmodules: true + } : { - esmodules: false, - browsers: ['ie 11'] - }, + esmodules: false, + browsers: ['ie 11'] + }, useBuiltIns: 'entry', corejs: '3' } @@ -103,7 +104,11 @@ module.exports.commonLoaders = ({ legacy = false } = {}) => { } return [ - { test: /\.js$/, loader: babelLoader, exclude: /node_modules|dist/ }, + { + test: /\.(js|ts|tsx)$/, + loader: babelLoader, + exclude: /node_modules|dist/ + }, { test: /\.(jpe?g|png|svg)$/, use: { diff --git a/test/companyStatusSelectors.test.js b/test/companyStatusSelectors.test.js index 7426934d6..4b4bd2f59 100644 --- a/test/companyStatusSelectors.test.js +++ b/test/companyStatusSelectors.test.js @@ -1,4 +1,3 @@ -/* @flow */ import { expect } from 'chai' import { nextQuestionSelector } from 'Selectors/companyStatusSelectors' diff --git a/test/ficheDePaieSelector.test.js b/test/ficheDePaieSelector.test.js index d2b25329f..f6e789e49 100644 --- a/test/ficheDePaieSelector.test.js +++ b/test/ficheDePaieSelector.test.js @@ -1,4 +1,3 @@ -/* @flow */ import { expect } from 'chai' // $FlowFixMe diff --git a/test/utils.test.js b/test/utils.test.js index a4cdd19e1..e9ee6a696 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -1,6 +1,6 @@ var assert = require('assert') -const utils = require('../source/utils.js') +const utils = require('../source/utils') describe('capitalise0', function() { it('should turn the first character into its capital', function() { diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..a30a2d415 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "moduleResolution": "node", + "module": "esnext", + "target": "es2019", + "jsx": "react", + "baseUrl": "source", + // We add the `node` types in order to support `process.env` but this is not + // really what we want since our app is client-side and we only have access + // to process.env and not to other NodeJS variables. + "types": ["node"], + "typeRoots": ["source/types/typescript"], + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "Actions/*": ["actions/*"], + "Components": ["components"], + "Components/*": ["components/*"], + "Ui/*": ["components/ui/*"], + "Engine/*": ["engine/*"], + "Images/*": ["images/*"], + "Reducers/*": ["reducers/*"], + "Règles/*": ["règles/*"], + "Selectors/*": ["selectors/*"], + "Types/*": ["types/*"] + } + }, + "include": ["source/types/typescript"], + "files": [ + "source/sites/mon-entreprise.fr/entry.fr.tsx", + "source/sites/mon-entreprise.fr/entry.en.tsx" + ] +} diff --git a/yarn.lock b/yarn.lock index c6e797a10..b206d6648 100644 --- a/yarn.lock +++ b/yarn.lock @@ -114,6 +114,18 @@ "@babel/helper-replace-supers" "^7.5.5" "@babel/helper-split-export-declaration" "^7.4.4" +"@babel/helper-create-class-features-plugin@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz#769711acca889be371e9bc2eb68641d55218021f" + integrity sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-member-expression-to-functions" "^7.5.5" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.5.5" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/helper-define-map@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz#3dec32c2046f37e09b28c93eb0b103fd2a25d369" @@ -299,14 +311,6 @@ "@babel/helper-create-class-features-plugin" "^7.5.5" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-proposal-do-expressions@^7.0.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-do-expressions/-/plugin-proposal-do-expressions-7.5.0.tgz#ceb594d4a618545b00aa0b5cd61cad4aaaeb7a5a" - integrity sha512-xe0QQrhm+DGj6H23a6XtwkJNimy1fo71O/YVBfrfvfSl0fsq9T9dfoQBIY4QceEIdUo7u9s7OPEdsWEuizfGeg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-do-expressions" "^7.2.0" - "@babel/plugin-proposal-dynamic-import@^7.5.0": version "7.5.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz#e532202db4838723691b10a67b8ce509e397c506" @@ -323,6 +327,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.2.0" +"@babel/plugin-proposal-nullish-coalescing-operator@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.4.4.tgz#41c360d59481d88e0ce3a3f837df10121a769b39" + integrity sha512-Amph7Epui1Dh/xxUxS2+K22/MUi6+6JVTvy3P58tja3B6yKTSjwwx0/d83rF7551D6PVSSoplQb8GCwqec7HRw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread@^7.0.0": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz#61939744f71ba76a3ae46b5eea18a54c16d22e58" @@ -371,13 +383,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-do-expressions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-do-expressions/-/plugin-syntax-do-expressions-7.2.0.tgz#f3d4b01be05ecde2892086d7cfd5f1fa1ead5a2a" - integrity sha512-/u4rJ+XEmZkIhspVuKRS+7WLvm7Dky9j9TvGK5IgId8B3FKir9MG+nQxDZ9xLn10QMBvW58dZ6ABe2juSmARjg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-dynamic-import@^7.0.0", "@babel/plugin-syntax-dynamic-import@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" @@ -406,6 +411,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-nullish-coalescing-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.2.0.tgz#f75083dfd5ade73e783db729bbd87e7b9efb7624" + integrity sha512-lRCEaKE+LTxDQtgbYajI04ddt6WW0WJq57xqkAZ+s11h4YgfRHhVA/Y2VhfPzzFD4qeLHWg32DMp9HooY4Kqlg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" @@ -427,6 +439,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-typescript@^7.2.0": + version "7.3.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz#a7cc3f66119a9f7ebe2de5383cce193473d65991" + integrity sha512-dGwbSMA1YhVS8+31CnPR7LB4pcbrzcV99wQzby4uAfrkZPYZlQ7ImwdpzLqi6Z6IL02b8IAL379CaMwo0x5Lag== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-arrow-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" @@ -704,6 +723,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-typescript@^7.6.0": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.6.3.tgz#dddb50cf3b8b2ef70b22e5326e9a91f05a1db13b" + integrity sha512-aiWINBrPMSC3xTXRNM/dfmyYuPNKY/aexYqBgh0HBI5Y+WO5oRAqW/oROYeYHrF4Zw12r9rK4fMk/ZlAmqx/FQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.6.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-typescript" "^7.2.0" + "@babel/plugin-transform-unicode-regex@^7.6.2": version "7.6.2" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz#b692aad888a7e8d8b1b214be6b9dc03d5031f698" @@ -713,7 +741,7 @@ "@babel/helper-regex" "^7.4.4" regexpu-core "^4.6.0" -"@babel/polyfill@^7.0.0", "@babel/polyfill@^7.4.0": +"@babel/polyfill@^7.4.0": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.4.4.tgz#78801cf3dbe657844eeabf31c1cae3828051e893" integrity sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg== @@ -796,6 +824,14 @@ "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" +"@babel/preset-typescript@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.6.0.tgz#25768cb8830280baf47c45ab1a519a9977498c98" + integrity sha512-4xKw3tTcCm0qApyT6PqM9qniseCE79xGHiUnNdKGdxNsGUc2X7WwZybqIpnTmoukg3nhPceI5KPNzNqLNeIJww== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.6.0" + "@babel/runtime@^7.1.2", "@babel/runtime@^7.4.0": version "7.4.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.5.tgz#582bb531f5f9dc67d2fcb682979894f75e253f12" @@ -1157,21 +1193,6 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" -"@octokit/rest@^15.12.1": - version "15.18.2" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-15.18.2.tgz#3e4d448ce4630c8ac926e14819874175bc271669" - integrity sha512-cXP/hzh21PoZe0HJ74Co33HS3ITayWujXXeb1P8oR9kXt3hEmGsm2FQ4A8PrqV18C26uYkIb4KjjlVBzX1aHjw== - dependencies: - before-after-hook "^1.1.0" - btoa-lite "^1.0.0" - debug "^3.1.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.0" - lodash "^4.17.4" - node-fetch "^2.1.1" - universal-user-agent "^2.0.0" - url-template "^2.0.8" - "@prerenderer/prerenderer@^0.7.2": version "0.7.2" resolved "https://registry.yarnpkg.com/@prerenderer/prerenderer/-/prerenderer-0.7.2.tgz#b26a806bcdb3b313d527b313bdd72a57434b45fd" @@ -1189,11 +1210,6 @@ promise-limit "^2.5.0" puppeteer "^1.7.0" -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" - integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== - "@sinonjs/commons@^1", "@sinonjs/commons@^1.0.2": version "1.4.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.4.0.tgz#7b3ec2d96af481d7a0321252e7b1c94724ec5a78" @@ -1263,6 +1279,24 @@ dependencies: "@babel/types" "^7.3.0" +"@types/history@*": + version "4.7.3" + resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.3.tgz#856c99cdc1551d22c22b18b5402719affec9839a" + integrity sha512-cS5owqtwzLN5kY+l+KgKdRJ/Cee8tlmQoGQuIE9tWnSmS3JMKzmxo2HIAk2wODMifGwO20d62xZQLYz+RLfXmw== + +"@types/hoist-non-react-statics@^3.3.0": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" + integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + +"@types/iframe-resizer@^3.5.7": + version "3.5.7" + resolved "https://registry.yarnpkg.com/@types/iframe-resizer/-/iframe-resizer-3.5.7.tgz#a30de6f049fe2475fe9288e783f814e8c3b627ca" + integrity sha512-SMDeDi0c5HdAtfgJ/UVMCllJyYLWpnnCrufl/E7BOfG2KQvRAmWTE7xK3u6xJHeOlHTpOHo3Ps7tQzsHUSyoWQ== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -1288,11 +1322,109 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.12.tgz#cc791b402360db1eaf7176479072f91ee6c6c7ca" integrity sha512-Uy0PN4R5vgBUXFoJrKryf5aTk3kJ8Rv3PdlHjl6UaX+Cqp1QE0yPQ68MPXGrZOfG7gZVNDIJZYyot0B9ubXUrQ== +"@types/node@^12.11.7": + version "12.11.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.7.tgz#57682a9771a3f7b09c2497f28129a0462966524a" + integrity sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA== + +"@types/prop-types@*": + version "15.7.3" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" + integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== + +"@types/ramda@^0.26.33": + version "0.26.33" + resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.26.33.tgz#5fd1f22381ccf913a3627beb16f468fb57f82d94" + integrity sha512-sUCQmKfAWmlbb6PpFqvndbGgTf0bCcmHLJqMYw8ErVS0UoZTTiz952aFedJhV+JERiVH7poh33358c7p0AAN8A== + dependencies: + ts-toolbelt "^4.7.7" + +"@types/react-addons-css-transition-group@^15.0.5": + version "15.0.5" + resolved "https://registry.yarnpkg.com/@types/react-addons-css-transition-group/-/react-addons-css-transition-group-15.0.5.tgz#73665af6b8efb47730ab583ead4bed5373dae686" + integrity sha512-UIJt5HQDOzRI7AOmnGnc2OZA0N3p7r6yMsxZ3T0+dyGPB3zWiKOPKrMkJr9tyuY3kHKPm26GyihcJKNJdMY8CQ== + dependencies: + "@types/react" "*" + "@types/react-addons-transition-group" "*" + +"@types/react-addons-transition-group@*": + version "15.0.4" + resolved "https://registry.yarnpkg.com/@types/react-addons-transition-group/-/react-addons-transition-group-15.0.4.tgz#5fb10a686e6f0899fecdc0efc63ea7166c24638e" + integrity sha512-0S2cKn9OLYr6N36oRH4ybzidkgQ0UGhuvrFvU3tdktJfrx3muu7MgfIWG434wKg7rcysBEfpmQaNpGteEtx6vw== + dependencies: + "@types/react" "*" + +"@types/react-dom@^16.9.3": + version "16.9.3" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.3.tgz#4006ff0e13958af91313869077c04cb20d9b9d04" + integrity sha512-FUuZKXPr9qlzUT9lhuzrZgLjH63TvNn28Ch3MvKG4B+F52zQtO8DtE0Opbncy3xaucNZM2WIPfuNTgkbKx5Brg== + dependencies: + "@types/react" "*" + +"@types/react-helmet@^5.0.13": + version "5.0.13" + resolved "https://registry.yarnpkg.com/@types/react-helmet/-/react-helmet-5.0.13.tgz#ccda7effa4fbd67d92321c856db504c1a206cb44" + integrity sha512-YvdsLKH9FGAAhoQvjYAyhBo/qpYrY5glpAf6og+0batlGyub6YHAawHx/cfw0rdOxjVPZMNhDC+xNmYnWM7EYQ== + dependencies: + "@types/react" "*" + +"@types/react-native@*": + version "0.60.21" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.21.tgz#81a41cae7b232f52ab3983d854f4a0b0df79531e" + integrity sha512-E7F+P/UG4Utu+kh8Hy544i0m4CzpHw1awNX6hVfkhlu4mXSlAn6KLZzKEkPBbHm7g1kspmZTiuP23HAKZpASPw== + dependencies: + "@types/prop-types" "*" + "@types/react" "*" + +"@types/react-redux@^7.1.5": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.5.tgz#c7a528d538969250347aa53c52241051cf886bd3" + integrity sha512-ZoNGQMDxh5ENY7PzU7MVonxDzS1l/EWiy8nUhDqxFqUZn4ovboCyvk4Djf68x6COb7vhGTKjyjxHxtFdAA5sUA== + dependencies: + "@types/hoist-non-react-statics" "^3.3.0" + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + redux "^4.0.0" + +"@types/react-router-dom@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.0.tgz#8baa84a7fa8c8e7797fb3650ca51f93038cb4caf" + integrity sha512-YCh8r71pL5p8qDwQf59IU13hFy/41fDQG/GeOI3y+xmD4o0w3vEPxE8uBe+dvOgMoDl0W1WUZsWH0pxc1mcZyQ== + dependencies: + "@types/history" "*" + "@types/react" "*" + "@types/react-router" "*" + +"@types/react-router@*", "@types/react-router@^5.1.2": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.2.tgz#41e5e6aa333a7b9a2bfdac753c04e1ca4b3e0d21" + integrity sha512-euC3SiwDg3NcjFdNmFL8uVuAFTpZJm0WMFUw+4eXMUnxa7M9RGFEG0szt0z+/Zgk4G2k9JBFhaEnY64RBiFmuw== + dependencies: + "@types/history" "*" + "@types/react" "*" + +"@types/react@*", "@types/react@^16.9.11": + version "16.9.11" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.11.tgz#70e0b7ad79058a7842f25ccf2999807076ada120" + integrity sha512-UBT4GZ3PokTXSWmdgC/GeCGEJXE5ofWyibCcecRLUVN2ZBpXQGVgQGtG2foS7CrTKFKlQVVswLvf7Js6XA/CVQ== + dependencies: + "@types/prop-types" "*" + csstype "^2.2.0" + "@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" integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== +"@types/styled-components@^4.1.19": + version "4.1.19" + resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-4.1.19.tgz#535b455d7744fda1608c605df82c0800eda61a09" + integrity sha512-nDkoTQ8ItcJiyEvTa24TwsIpIfNKCG+Lq0LvAwApOcjQ8OaeOOCg66YSPHBePHUh6RPt1LA8aEzRlgWhQPFqPg== + dependencies: + "@types/react" "*" + "@types/react-native" "*" + csstype "^2.2.0" + "@types/yargs-parser@*": version "13.1.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-13.1.0.tgz#c563aa192f39350a1d18da36c5a8da382bbd8228" @@ -1530,7 +1662,7 @@ acorn@^7.0.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== -agent-base@4, agent-base@^4.1.0, agent-base@^4.3.0: +agent-base@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== @@ -2240,16 +2372,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -before-after-hook@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.4.0.tgz#2b6bf23dca4f32e628fd2747c10a37c74a4b484d" - integrity sha512-l5r9ir56nda3qu14nAXIlyq1MmUSs0meCIaFAh8HwkFwP1F8eToOuS3ah2VAHHcY04jaYD7FpJC5JTXHYRbkzg== - -big-integer@^1.6.17: - version "1.6.44" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.44.tgz#4ee9ae5f5839fc11ade338fea216b4513454a539" - integrity sha512-7MzElZPTyJ2fNvBkPxtFQ2fWIkVmuzw41+BZHSzpEq3ymB2MfeKp1+yXl/tS75xCx+WnyV+yb0kp+K1C3UNwmQ== - big.js@^3.1.3: version "3.2.0" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" @@ -2265,14 +2387,6 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== -binary@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79" - integrity sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk= - dependencies: - buffers "~0.1.1" - chainsaw "~0.1.0" - bluebird@3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" @@ -2283,11 +2397,6 @@ bluebird@^3.5.1, bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== -bluebird@~3.4.1: - version "3.4.7" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" - integrity sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM= - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" @@ -2465,11 +2574,6 @@ bser@^2.0.0: dependencies: node-int64 "^0.4.0" -btoa-lite@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" - integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= - buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -2480,11 +2584,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer-indexof-polyfill@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.1.tgz#a9fb806ce8145d5428510ce72f278bb363a638bf" - integrity sha1-qfuAbOgUXVQoUQznLyeLs2OmOL8= - buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" @@ -2499,11 +2598,6 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -buffers@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb" - integrity sha1-skV5w77U1tOWru5tmorn9Ugqt7s= - builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -2574,19 +2668,6 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" - integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0= - dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" - cachedir@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-1.3.0.tgz#5e01928bf2d95b5edd94b0942188246740e0dbc4" @@ -2695,13 +2776,6 @@ chain-function@^1.0.0: resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.1.tgz#c63045e5b4b663fb86f1c6e186adaf1de402a1cc" integrity sha512-SxltgMwL9uCko5/ZCLiyG2B7R9fY4pDZUw7hJ4MhirdjBLosoDqkWABi3XMucddHdLiFJMb7PD2MZifZriuMTg== -chainsaw@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98" - integrity sha1-XqtQsor+WAdNDVgpE4iCi15fvJg= - dependencies: - traverse ">=0.3.0 <0.4" - chalk@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -2751,11 +2825,6 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -charenc@~0.0.1: - version "0.0.2" - resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" - integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc= - check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" @@ -2933,13 +3002,6 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" -clone-response@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -3034,11 +3096,6 @@ colors@1.0.3: resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= -colors@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" - integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== - colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -3066,7 +3123,7 @@ commander@2.17.x: resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== -commander@2.20.0, commander@^2.11.0, commander@^2.19.0, commander@^2.20.0: +commander@2.20.0, commander@^2.19.0, commander@^2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== @@ -3330,11 +3387,6 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" -crypt@~0.0.1: - version "0.0.2" - resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" - integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= - crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -3490,6 +3542,11 @@ cssstyle@^1.1.1: dependencies: cssom "0.3.x" +csstype@^2.2.0: + version "2.6.7" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.7.tgz#20b0024c20b6718f4eda3853a1f5a1cce7f5e4a5" + integrity sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ== + csstype@^2.5.2: version "2.6.6" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.6.tgz#c34f8226a94bbb10c32cc0d714afdf942291fc41" @@ -3616,13 +3673,6 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - dedent-js@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/dedent-js/-/dedent-js-1.0.1.tgz#bee5fb7c9e727d85dffa24590d10ec1ab1255305" @@ -3839,18 +3889,6 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" -duplexer2@~0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" - integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME= - dependencies: - readable-stream "^2.0.2" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - duplexify@^3.4.2, duplexify@^3.6.0: version "3.7.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" @@ -4105,13 +4143,6 @@ eslint-config-prettier@^4.0.0: dependencies: get-stdin "^6.0.0" -eslint-plugin-flowtype@^3.2.1: - version "3.13.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.13.0.tgz#e241ebd39c0ce519345a3f074ec1ebde4cf80f2c" - integrity sha512-bhewp36P+t7cEV0b6OdmoRWJCBYRiHFlqPZAG1oS3SF+Y0LQkeDvFSM4oxoxvczD1OdONCXMlJfQFiWLcV9urw== - dependencies: - lodash "^4.17.15" - eslint-plugin-react-hooks@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.0.1.tgz#e898ec26a0a335af6f7b0ad1f0bedda7143ed756" @@ -4681,49 +4712,6 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" integrity sha1-2uRqnXj74lKSJYzB54CkHZXAN4I= -flow-bin@^0.92.0: - version "0.92.1" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.92.1.tgz#32c136c07235f30c42dc0549a0790f370fad4070" - integrity sha512-F5kC5oQOR2FXROAeybJHFqgZP+moKV9fa/53QK4Q4WayTQHdA0KSl48KD1gP0A9mioRLiKUegTva/7I15cX3Iw== - -flow-typed@^2.4.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/flow-typed/-/flow-typed-2.6.1.tgz#e991f53840ad121d9e1f61bd8f8b844cfae57ab1" - integrity sha512-UXhkAHcv4t+sSsuGud35zkV5CVXkEfIbGee545/1WnajM0+na1IKhmccuawg/PVu1Jtc3i127JcuKV/CLhF0oQ== - dependencies: - "@babel/polyfill" "^7.0.0" - "@octokit/rest" "^15.12.1" - colors "^1.3.2" - flowgen "^1.9.0" - fs-extra "^7.0.0" - glob "^7.1.3" - got "^8.3.2" - md5 "^2.2.1" - mkdirp "^0.5.1" - prettier "^1.18.2" - rimraf "^2.6.2" - semver "^5.5.1" - table "^5.0.2" - through "^2.3.8" - unzipper "^0.9.3" - which "^1.3.1" - yargs "^12.0.2" - -flowgen@^1.9.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/flowgen/-/flowgen-1.10.0.tgz#a041ae31d543d22166e7ba7c296b8445deb3c2e4" - integrity sha512-3lsoaa1vxGXhnkHuoE4mLPJi/klvpR3ID8R9CFJ/GBNi+cxJXecWQaUPrWMdNI5tGs8Y+7wrIZaCVFKFLQiGOg== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/highlight" "^7.0.0" - commander "^2.11.0" - lodash "^4.17.4" - paralleljs "^0.2.1" - prettier "^1.16.4" - shelljs "^0.8.3" - typescript "^3.4" - typescript-compiler "^1.4.1-2" - flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -4794,7 +4782,7 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -from2@^2.1.0, from2@^2.1.1: +from2@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= @@ -4820,15 +4808,6 @@ fs-extra@^4.0.2: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-minipass@^1.2.5: version "1.2.6" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" @@ -4859,16 +4838,6 @@ fsevents@^1.2.7: nan "^2.12.1" node-pre-gyp "^0.12.0" -fstream@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" - integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -4932,7 +4901,7 @@ get-stdin@^6.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stream@3.0.0, get-stream@^3.0.0: +get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= @@ -4990,7 +4959,7 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: +glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== @@ -5085,29 +5054,6 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" -got@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" - integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== - dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" - url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.2.2" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" @@ -5169,23 +5115,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -5416,11 +5350,6 @@ htmlparser2@^3.10.0, htmlparser2@^3.3.0, htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^3.1.1" -http-cache-semantics@3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== - http-errors@1.7.2, http-errors@~1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" @@ -5432,14 +5361,6 @@ http-errors@1.7.2, http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - http-proxy-middleware@^0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz#0987e6bb5a5606e5a69168d8f967a87f15dd8aab" @@ -5487,14 +5408,6 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz#271ea8e90f836ac9f119daccd39c19ff7dfb0793" - integrity sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - https-proxy-agent@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" @@ -5503,10 +5416,12 @@ https-proxy-agent@^2.2.1: agent-base "^4.1.0" debug "^3.1.0" -i18next@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-14.1.1.tgz#d569aff68c088151f09fcb0cb6f44b36d62731d3" - integrity sha512-HItn9RHLyrDqe6pw6qXMYHGPHNc3y1FZndJfBlD6k4sRS0FAlYLvqCDVIWFc1XultBgsv348TtvL/lleG6JgBg== +i18next@^18.0.1: + version "18.0.1" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-18.0.1.tgz#10841209f6983df4d8e367204da403d8cbc609cf" + integrity sha512-KWd9qMFXw0qjxF7cTAqQselPCYoHfaLvBs8c6JcNzaQKVxbAlE/wv9EZXPy+JlKUcXCT0qgjcmxrJjmbnEp60A== + dependencies: + "@babel/runtime" "^7.3.1" iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" @@ -5632,7 +5547,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5671,7 +5586,7 @@ inquirer@^6.4.1: strip-ansi "^5.1.0" through "^2.3.6" -interpret@1.2.0, interpret@^1.0.0, interpret@^1.0.1: +interpret@1.2.0, interpret@^1.0.1: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== @@ -5686,14 +5601,6 @@ intl@^1.2.5: resolved "https://registry.yarnpkg.com/intl/-/intl-1.2.5.tgz#82244a2190c4e419f8371f5aa34daa3420e2abde" integrity sha1-giRKIZDE5Bn4Nx9ao02qNCDiq94= -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" - invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -5765,7 +5672,7 @@ is-boolean-object@^1.0.0: resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.0.tgz#98f8b28030684219a95f375cfbd88ce3405dff93" integrity sha1-mPiygDBoQhmpXzdc+9iM40Bd/5M= -is-buffer@^1.1.4, is-buffer@^1.1.5, is-buffer@~1.1.1: +is-buffer@^1.1.4, is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== @@ -5921,11 +5828,6 @@ is-obj@^1.0.1: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= -is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" - integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= - is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" @@ -5962,11 +5864,6 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= -is-retry-allowed@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= - is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -6119,14 +6016,6 @@ istanbul-reports@^2.2.6: dependencies: handlebars "^4.1.2" -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - jest-changed-files@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.9.0.tgz#08d8c15eb79a7fa3fc98269bc14b451ee82f8039" @@ -6614,11 +6503,6 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - json-loader@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" @@ -6710,13 +6594,6 @@ just-extend@^4.0.2: resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.0.2.tgz#f3f47f7dfca0f989c55410a7ebc8854b07108afc" integrity sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw== -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" - integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== - dependencies: - json-buffer "3.0.0" - kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -6793,11 +6670,6 @@ linear-layout-vector@0.0.1: resolved "https://registry.yarnpkg.com/linear-layout-vector/-/linear-layout-vector-0.0.1.tgz#398114d7303b6ecc7fd6b273af7b8401d8ba9c70" integrity sha1-OYEU1zA7bsx/1rJzr3uEAdi6nHA= -listenercount@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" - integrity sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc= - listr-silent-renderer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" @@ -6989,7 +6861,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@4.17.15, lodash@^4.0.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: +lodash@4.17.15, lodash@^4.0.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -7033,16 +6905,6 @@ lower-case@^1.1.1: resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= -lowercase-keys@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" - integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= - -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - lowlight@~1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.11.0.tgz#1304d83005126d4e8b1dc0f07981e9b689ec2efc" @@ -7066,11 +6928,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -macos-release@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" - integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -7141,15 +6998,6 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" -md5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9" - integrity sha1-U6s41f48iJG6RlMp6iP6wFQBJvk= - dependencies: - charenc "~0.0.1" - crypt "~0.0.1" - is-buffer "~1.1.1" - mdast-add-list-metadata@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdast-add-list-metadata/-/mdast-add-list-metadata-1.0.1.tgz#95e73640ce2fc1fa2dcb7ec443d09e2bfe7db4cf" @@ -7284,11 +7132,6 @@ mimic-fn@^2.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -7401,7 +7244,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -7599,11 +7442,6 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" -node-fetch@^2.1.1: - version "2.6.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" - integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -7724,15 +7562,6 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= -normalize-url@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" - integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== - dependencies: - prepend-http "^2.0.0" - query-string "^5.0.1" - sort-keys "^2.0.0" - normalize-url@^1.4.0: version "1.9.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" @@ -7981,7 +7810,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-locale@^3.0.0, os-locale@^3.1.0: +os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== @@ -7990,14 +7819,6 @@ os-locale@^3.0.0, os-locale@^3.1.0: lcid "^2.0.0" mem "^4.0.0" -os-name@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" - integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== - dependencies: - macos-release "^2.2.0" - windows-release "^3.1.0" - os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -8011,11 +7832,6 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -p-cancelable@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" - integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== - p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -8033,11 +7849,6 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= - p-is-promise@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" @@ -8081,13 +7892,6 @@ p-reduce@^1.0.0: resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== - dependencies: - p-finally "^1.0.0" - p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -8117,11 +7921,6 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -paralleljs@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/paralleljs/-/paralleljs-0.2.1.tgz#ebca745d3e09c01e2bebcc14858891ff4510e926" - integrity sha1-68p0XT4JwB4r68wUhYiR/0UQ6SY= - param-case@2.1.x: version "2.1.1" resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" @@ -8661,11 +8460,6 @@ prepend-http@^1.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - prerender-spa-plugin@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/prerender-spa-plugin/-/prerender-spa-plugin-3.4.0.tgz#332f55e68e1bba68bcf176d8c8dfc8380c5dee8a" @@ -8675,7 +8469,7 @@ prerender-spa-plugin@^3.4.0: "@prerenderer/renderer-puppeteer" "^0.2.0" html-minifier "^3.5.16" -prettier@^1.16.4, prettier@^1.18.2: +prettier@^1.16.4: version "1.18.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== @@ -8905,15 +8699,6 @@ query-string@^4.1.0: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -9100,10 +8885,10 @@ react-hot-loader@^4.11.0: shallowequal "^1.1.0" source-map "^0.7.3" -react-i18next@^10.0.1: - version "10.12.2" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-10.12.2.tgz#2f2d79b84c1f3e3844d110e4c9d5c73a48f99418" - integrity sha512-tZCBhUz8rJtgmTi1z2pWEoQBvFHjwOS2+TQ7L4RfJq1LDirXi2m+3Pwg6gUECVCGenWomLufWNiTwRF9fmBrUQ== +react-i18next@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.0.0.tgz#eafb24ff3259caaeb75e27603dab567484b294cc" + integrity sha512-lsY7g+V2VZ3TICEdRr0MTXCcQbliS9TZLI3EZd07mtWMcHmPScepd8TQtjP3ZMfgIJoLeek0mCEMqfCcr6PUzw== dependencies: "@babel/runtime" "^7.3.1" html-parse-stringify2 "2.0.1" @@ -9381,13 +9166,6 @@ recast@~0.11.12: private "~0.1.5" source-map "~0.5.0" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - reduce-css-calc@^1.2.6: version "1.3.0" resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" @@ -9424,6 +9202,14 @@ redux@^3.7.2: loose-envify "^1.1.0" symbol-observable "^1.0.3" +redux@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.4.tgz#4ee1aeb164b63d6a1bcc57ae4aa0b6e6fa7a3796" + integrity sha512-vKv4WdiJxOWKxK0yRoaK3Y4pxxB0ilzVx6dszU2W8wLxlb2yikRph4iV/ymtdJ6ZxpBLFbyrxklnT5yBbQSl3Q== + dependencies: + loose-envify "^1.4.0" + symbol-observable "^1.2.0" + reflect.ownkeys@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" @@ -9723,20 +9509,13 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.3.2: version "1.12.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== dependencies: path-parse "^1.0.6" -responselike@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -9758,13 +9537,6 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - rimraf@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -9772,6 +9544,13 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -9930,7 +9709,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.5.1, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -10037,7 +9816,7 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.4, setimmediate@~1.0.4: +setimmediate@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= @@ -10072,15 +9851,6 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= -shelljs@^0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" - integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -10175,13 +9945,6 @@ sort-keys@^1.0.0: dependencies: is-plain-obj "^1.0.0" -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= - dependencies: - is-plain-obj "^1.0.0" - source-list-map@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" @@ -10595,7 +10358,7 @@ symbol-observable@1.0.1: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= -symbol-observable@^1.0.3: +symbol-observable@^1.0.3, symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== @@ -10610,7 +10373,7 @@ tabbable@^1.0.3: resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-1.1.3.tgz#0e4ee376f3631e42d7977a074dbd2b3827843081" integrity sha512-nOWwx35/JuDI4ONuF0ZTo6lYvI0fY0tZCH1ErzY2EXfu4az50ZyiUX8X073FLiZtmWUVlkRnuXsehjJgCw9tYg== -table@^5.0.2, table@^5.2.3: +table@^5.2.3: version "5.4.6" resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== @@ -10702,16 +10465,11 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through@^2.3.6, through@^2.3.8, through@~2.3.6: +through@^2.3.6, through@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - timers-browserify@^2.0.4: version "2.0.11" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" @@ -10857,11 +10615,6 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -"traverse@>=0.3.0 <0.4": - version "0.3.9" - resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9" - integrity sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk= - trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" @@ -10882,6 +10635,11 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.4.tgz#3b52b1f13924f460c3fbfd0df69b587dbcbc762e" integrity sha512-tdzBRDGWcI1OpPVmChbdSKhvSVurznZ8X36AYURAcl+0o2ldlCY2XPzyXNNxwJwwyIU+rIglTCG4kxtNKBQH7Q== +ts-toolbelt@^4.7.7: + version "4.8.24" + resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-4.8.24.tgz#6df59dbb2f04fb0770d65ab8d754f84cfbae8d2b" + integrity sha512-/Cs0NtCxAqZsg/J8VXaEmO4FVb3Tzv8EDkcxDjp6paoIlbYbZUmNoq8frrqBPoWrZeftTCx3QTbC8GHVa1BJiw== + tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" @@ -10929,15 +10687,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript-compiler@^1.4.1-2: - version "1.4.1-2" - resolved "https://registry.yarnpkg.com/typescript-compiler/-/typescript-compiler-1.4.1-2.tgz#ba4f7db22d91534a1929d90009dce161eb72fd3f" - integrity sha1-uk99si2RU0oZKdkACdzhYety/T8= - -typescript@^3.4: - version "3.5.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" - integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g== +typescript@^3.7.1-rc: + version "3.7.1-rc" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.1-rc.tgz#2054b872d67f8dc732e36c1df397f9327f37ada0" + integrity sha512-2rMtWppLsaPvmpXsoIAXWDBQVnJMw1ITGGSnidMuayLj9iCmMRT69ncKZw/Mk5rXfJkilApKucWQZxproALoRw== uglify-js@3.4.x: version "3.4.10" @@ -11075,13 +10828,6 @@ unist-util-visit@^1.1.0, unist-util-visit@^1.3.0: dependencies: unist-util-visit-parents "^2.0.0" -universal-user-agent@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.1.0.tgz#5abfbcc036a1ba490cb941f8fd68c46d3669e8e4" - integrity sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q== - dependencies: - os-name "^3.0.0" - universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -11100,21 +10846,6 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -unzipper@^0.9.3: - version "0.9.15" - resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.9.15.tgz#97d99203dad17698ee39882483c14e4845c7549c" - integrity sha512-2aaUvO4RAeHDvOCuEtth7jrHFaCKTSXPqUkXwADaLBzGbgZGzUDccoEdJ5lW+3RmfpOZYNx0Rw6F6PUzM6caIA== - dependencies: - big-integer "^1.6.17" - binary "~0.3.0" - bluebird "~3.4.1" - buffer-indexof-polyfill "~1.0.0" - duplexer2 "~0.1.4" - fstream "^1.0.12" - listenercount "~1.0.1" - readable-stream "~2.3.6" - setimmediate "~1.0.4" - upath@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" @@ -11159,23 +10890,6 @@ url-loader@^1.0.1: mime "^2.0.3" schema-utils "^1.0.0" -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -url-template@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" - integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - url@0.11.0, url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -11496,13 +11210,6 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" -windows-release@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.2.0.tgz#8122dad5afc303d833422380680a79cdfa91785f" - integrity sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA== - dependencies: - execa "^1.0.0" - wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" @@ -11729,7 +11436,7 @@ y18n@^3.2.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= -"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: +y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== @@ -11758,14 +11465,6 @@ yaml-loader@^0.5.0: dependencies: js-yaml "^3.5.2" -yargs-parser@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" - integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^13.1.0, yargs-parser@^13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" @@ -11816,24 +11515,6 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" -yargs@^12.0.2: - version "12.0.5" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" - integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== - dependencies: - cliui "^4.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^1.0.1" - os-locale "^3.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1 || ^4.0.0" - yargs-parser "^11.1.1" - yargs@^13.3.0: version "13.3.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83"