From 0291353c347b41642430142f2d53f61e9834bc9f Mon Sep 17 00:00:00 2001 From: BulotF Date: Fri, 11 Feb 2022 11:33:23 +0100 Subject: [PATCH 01/36] add Classification Publish button --- .../classifications/visualization/controls.js | 9 +++- .../visualization/home-container.js | 48 ++++++++----------- .../classifications/visualization/home.js | 28 +++++++++-- app/src/js/remote-api/classifications-api.js | 23 +++++---- 4 files changed, 66 insertions(+), 42 deletions(-) diff --git a/app/src/js/applications/classifications/visualization/controls.js b/app/src/js/applications/classifications/visualization/controls.js index aa1130f2e..86d0fb9f7 100644 --- a/app/src/js/applications/classifications/visualization/controls.js +++ b/app/src/js/applications/classifications/visualization/controls.js @@ -1,15 +1,22 @@ import React from 'react'; import { withRouter } from 'react-router-dom'; import { goBack, ReturnButton, Button, ActionToolbar } from '@inseefr/wilco'; +import { Auth, ValidationButton } from 'bauhaus-utilities'; import D from 'js/i18n'; -const ClassificationControls = props => { +const ClassificationControls = (props) => { const location = props.history.location.pathname; const treeLocation = `${location}/tree`; return ( + + + - - setSlidingModal(false)}> - + setSlidingModal(false)} + > + ); @@ -83,5 +111,4 @@ const mapDispatchToProps = { loadGeographies: Stores.Geographies.loadGeographies, }; -export default connect(undefined, mapDispatchToProps)(SimsGeographyPicker) - +export default connect(undefined, mapDispatchToProps)(SimsGeographyPicker); From 61a40eed61e193703c340883b3bae889e952dfdf Mon Sep 17 00:00:00 2001 From: BulotF Date: Thu, 3 Mar 2022 17:56:00 +0100 Subject: [PATCH 24/36] correct address of label and typeTerritory in select options --- .../src/sims/sims-geography-picker.js | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/packages/operations/src/sims/sims-geography-picker.js b/packages/operations/src/sims/sims-geography-picker.js index 1c9f6db50..d80729fe9 100644 --- a/packages/operations/src/sims/sims-geography-picker.js +++ b/packages/operations/src/sims/sims-geography-picker.js @@ -48,30 +48,28 @@ const SimsGeographyPicker = ({ onChange, value, loadGeographies }) => { <>
- {territory && ( - gValue === value - )} - filterOption={(option, searchValue) => { - const search = searchValue.toLowerCase(); - const label = option.data.label.toLowerCase(); - const typeTerritory = option.data.typeTerritory.toLowerCase(); - return ( - !searchValue || - label.indexOf(search) >= 0 || - typeTerritory.indexOf(search) >= 0 - ); - }} - options={geographiesOptions} - onChange={(e) => onChange(e ? e.value : '')} - placeholder={''} - isSearchable={true} - noResultsText={D.noResult} - isClearable={true} - formatOptionLabel={formatOptionLabel} - /> - )} + gValue === value + )} + filterOption={(option, searchValue) => { + const search = searchValue.toLowerCase(); + const label = option.label.toLowerCase(); + const typeTerritory = option.typeTerritory.toLowerCase(); + return ( + !searchValue || + label.indexOf(search) >= 0 || + typeTerritory.indexOf(search) >= 0 + ); + }} + options={geographiesOptions} + onChange={(e) => onChange(e ? e.value : '')} + placeholder={''} + isSearchable={true} + noResultsText={D.noResult} + isClearable={true} + formatOptionLabel={formatOptionLabel} + />
From a2a87126848b3b32f5050b2cf008ab358790789f Mon Sep 17 00:00:00 2001 From: Emmanuel DEMEY Date: Thu, 3 Mar 2022 21:36:26 +0100 Subject: [PATCH 25/36] feat: add windows-build-tools --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 398a891c0..503a36822 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,12 @@ yarn yarn build-insee yarn start ``` + +## Issues + +If you are using, you should install the following dependency. + +``` +yarn global add windows-build-tools + +``` From b0dd6eda53953e8e90cef1785247d0294d347051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bulot?= Date: Fri, 4 Mar 2022 11:27:14 +0100 Subject: [PATCH 26/36] Revert "correct address of label and typeTerritory in select options" --- .../src/sims/sims-geography-picker.js | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/packages/operations/src/sims/sims-geography-picker.js b/packages/operations/src/sims/sims-geography-picker.js index d80729fe9..1c9f6db50 100644 --- a/packages/operations/src/sims/sims-geography-picker.js +++ b/packages/operations/src/sims/sims-geography-picker.js @@ -48,28 +48,30 @@ const SimsGeographyPicker = ({ onChange, value, loadGeographies }) => { <>
- gValue === value - )} - filterOption={(option, searchValue) => { - const search = searchValue.toLowerCase(); - const label = option.label.toLowerCase(); - const typeTerritory = option.typeTerritory.toLowerCase(); - return ( - !searchValue || - label.indexOf(search) >= 0 || - typeTerritory.indexOf(search) >= 0 - ); - }} - options={geographiesOptions} - onChange={(e) => onChange(e ? e.value : '')} - placeholder={''} - isSearchable={true} - noResultsText={D.noResult} - isClearable={true} - formatOptionLabel={formatOptionLabel} - /> + {territory && ( + gValue === value + )} + filterOption={(option, searchValue) => { + const search = searchValue.toLowerCase(); + const label = option.data.label.toLowerCase(); + const typeTerritory = option.data.typeTerritory.toLowerCase(); + return ( + !searchValue || + label.indexOf(search) >= 0 || + typeTerritory.indexOf(search) >= 0 + ); + }} + options={geographiesOptions} + onChange={(e) => onChange(e ? e.value : '')} + placeholder={''} + isSearchable={true} + noResultsText={D.noResult} + isClearable={true} + formatOptionLabel={formatOptionLabel} + /> + )}
From 55791f6d60109339eeb17cf0cacee875fc645bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bulot?= Date: Fri, 4 Mar 2022 11:36:53 +0100 Subject: [PATCH 27/36] Revert "Show geography select only when territory is loaded" --- .../src/sims/sims-geography-picker.js | 95 +++++++------------ 1 file changed, 34 insertions(+), 61 deletions(-) diff --git a/packages/operations/src/sims/sims-geography-picker.js b/packages/operations/src/sims/sims-geography-picker.js index 1c9f6db50..ecc6004f3 100644 --- a/packages/operations/src/sims/sims-geography-picker.js +++ b/packages/operations/src/sims/sims-geography-picker.js @@ -9,6 +9,7 @@ import SimsGeographyField from './sims-geography-field'; import './sims-geography-picker.scss'; import { SimsGeographyI18NLabel } from 'bauhaus-operations'; + const SimsGeographyPicker = ({ onChange, value, loadGeographies }) => { const [territory, setTerritory] = useState(); const geographiesOptions = useSelector(Stores.Geographies.getAllOptions); @@ -18,20 +19,15 @@ const SimsGeographyPicker = ({ onChange, value, loadGeographies }) => { }, []); const openViewPanel = useCallback(() => { - setTerritory( - geographiesOptions?.find(({ value: v }) => v === value)?.geography - ); + setTerritory(geographiesOptions?.find(({ value: v }) => v === value)?.geography); setSlidingModal(true); }, [geographiesOptions, value]); - const onSave = useCallback( - (territoryUri) => { - setSlidingModal(false); - loadGeographies(); - onChange(territoryUri); - }, - [loadGeographies, onChange] - ); + const onSave = useCallback((territoryUri) => { + setSlidingModal(false); + loadGeographies(); + onChange(territoryUri) + }, [loadGeographies, onChange]); const onCancel = useCallback(() => { setTerritory(undefined); @@ -41,68 +37,44 @@ const SimsGeographyPicker = ({ onChange, value, loadGeographies }) => { return ; }; - const shouldSeeViewButton = - geographiesOptions?.find(({ value: v }) => v === value)?.typeTerritory === - 'Territoire Statistique'; + const shouldSeeViewButton = geographiesOptions?.find(({ value: v }) => v === value)?.typeTerritory === "Territoire Statistique"; return ( <>
- {territory && ( - gValue === value - )} - filterOption={(option, searchValue) => { - const search = searchValue.toLowerCase(); - const label = option.data.label.toLowerCase(); - const typeTerritory = option.data.typeTerritory.toLowerCase(); - return ( - !searchValue || - label.indexOf(search) >= 0 || - typeTerritory.indexOf(search) >= 0 - ); - }} - options={geographiesOptions} - onChange={(e) => onChange(e ? e.value : '')} - placeholder={''} - isSearchable={true} - noResultsText={D.noResult} - isClearable={true} - formatOptionLabel={formatOptionLabel} - /> - )} + gValue === value + )} + filterOption={(option, searchValue) => { + const search = searchValue.toLowerCase(); + const label = option.data.label.toLowerCase(); + const typeTerritory = option.data.typeTerritory.toLowerCase(); + return !searchValue + || label.indexOf(search) >= 0 + || typeTerritory.indexOf(search) >= 0 + }} + options={geographiesOptions} + onChange={(e) => onChange(e ? e.value : '')} + placeholder={''} + isSearchable={true} + noResultsText={D.noResult} + isClearable={true} + formatOptionLabel={formatOptionLabel} + />
- -
- setSlidingModal(false)} - > - + setSlidingModal(false)}> + ); @@ -111,4 +83,5 @@ const mapDispatchToProps = { loadGeographies: Stores.Geographies.loadGeographies, }; -export default connect(undefined, mapDispatchToProps)(SimsGeographyPicker); +export default connect(undefined, mapDispatchToProps)(SimsGeographyPicker) + From dd7aa34d1a21e95dc14b34ee77ff205dd540b78d Mon Sep 17 00:00:00 2001 From: Emmanuel DEMEY Date: Sat, 5 Mar 2022 15:37:32 +0100 Subject: [PATCH 28/36] feat: test on multiple Node version --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b813b9b1a..dac19919d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,14 @@ jobs: test-build: name: Test & build runs-on: ubuntu-latest + strategy: + matrix: + node: [ 14, 16, 17 ] steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 14.17.0 + node-version: ${{ matrix.node }} - run: yarn # Build modules - run: yarn build-insee From 28321e9a6adbcdbaed994e0ed48a33b8badad3cc Mon Sep 17 00:00:00 2001 From: Emmanuel DEMEY Date: Sat, 5 Mar 2022 16:10:48 +0100 Subject: [PATCH 29/36] feat: test on multiple Node version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dac19919d..1c33c49dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ 14, 16, 17 ] + node: [ 14, 16 ] steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 From ee268fbf6df4eca043c2c5c26e1f99ba2499e2a7 Mon Sep 17 00:00:00 2001 From: Emmanuel DEMEY Date: Sat, 5 Mar 2022 16:19:25 +0100 Subject: [PATCH 30/36] update README with the node.js versions --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 503a36822..85971935e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ The documentation can be found in the [docs](https://github.com/InseeFr/Bauhaus/ ## How to start +The application is tested on Node.js 14 and 16. + ``` git clone git@github.com:InseeFr/Bauhaus.git cd Bauhaus From 5a998c2a54237bb65c4d54a4707547a07de309fc Mon Sep 17 00:00:00 2001 From: Emmanuel DEMEY Date: Mon, 7 Mar 2022 09:31:02 +0100 Subject: [PATCH 31/36] feat: bump dependencies and review emails sent for concepts and collections. --- app/src/js/i18n/dictionary/concepts.js | 10 ++- package.json | 2 +- yarn.lock | 90 +++++++++++++------------- 3 files changed, 50 insertions(+), 52 deletions(-) diff --git a/app/src/js/i18n/dictionary/concepts.js b/app/src/js/i18n/dictionary/concepts.js index 22a31bf14..284a465bc 100644 --- a/app/src/js/i18n/dictionary/concepts.js +++ b/app/src/js/i18n/dictionary/concepts.js @@ -245,11 +245,10 @@ const dictionary = { return `

Bonjour,

Vous trouverez ci-joint la description du concept «  ${prefLabelLg1} - » ${inseeText} extraite de la base RMéS-Concepts.

+ » ${inseeText} extraite de la base RMéS-Bauhaus Concepts.

${validText} -

Pour toute demande concernant ce concept merci de répondre via la boîte fonctionnelle :DG75-Administration RMéS dg75-administration-rmes@insee.fr.

+

Pour toute demande concernant ce concept, merci d’utiliser la boîte fonctionnelle dg75-administration-rmes@insee.fr.

L'équipe RMéS
- Insee - DG
DMCSI - Unité Qualité

`; }, en: (params) => { @@ -296,11 +295,10 @@ const dictionary = { return `

Bonjour,

Vous trouverez ci-joint la composition de la collection de concepts «  ${prefLabelLg1} - » ${inseeText} extraite de la base RMéS-Concepts.

+ » ${inseeText} extraite de la base RMéS-Bauhaus Concepts.

${validText} -

Pour toute demande concernant cette collection merci de répondre via la boîte fonctionnelle :DG75 RMéS-Concepts et définitions.

+

Pour toute demande concernant cette collection, merci d’utiliser la boîte fonctionnelle dg75-administration-rmes@insee.fr.

L'équipe RMéS
- Insee - DG
DMCSI - Unité Qualité

`; }, en: (params) => { diff --git a/package.json b/package.json index baae6dd2d..8d3feeecd 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "jest-localstorage-mock": "^2.4.19", "lcov-result-merger": "3.1.0", "prettier": "^2.5.1", - "webpack": "^5.69.1" + "webpack": "^5.70.0" }, "dependencies": { "@babel/preset-react": "^7.16.7", diff --git a/yarn.lock b/yarn.lock index 946a12310..96df2aab9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2328,7 +2328,7 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.13.0", "@typescript-eslint/utils@^5.10.2": +"@typescript-eslint/utils@5.13.0", "@typescript-eslint/utils@^5.13.0": version "5.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.13.0.tgz#2328feca700eb02837298339a2e49c46b41bd0af" integrity sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ== @@ -3698,12 +3698,12 @@ browserslist@4.14.2: node-releases "^1.1.61" browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.17.5, browserslist@^4.19.1, browserslist@^4.6.2, browserslist@^4.6.4: - version "4.19.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.19.3.tgz#29b7caad327ecf2859485f696f9604214bedd383" - integrity sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg== + version "4.20.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.0.tgz#35951e3541078c125d36df76056e94738a52ebe9" + integrity sha512-bnpOoa+DownbciXj0jVGENf8VYQnE2LNWomhYuCsMmmx9Jd9lwq0WXODuwpSsp8AVdKM2/HorrzxAfbKvWTByQ== dependencies: - caniuse-lite "^1.0.30001312" - electron-to-chromium "^1.4.71" + caniuse-lite "^1.0.30001313" + electron-to-chromium "^1.4.76" escalade "^3.1.1" node-releases "^2.0.2" picocolors "^1.0.0" @@ -3911,10 +3911,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001312: - version "1.0.30001312" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz#e11eba4b87e24d22697dae05455d5aea28550d5f" - integrity sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001313: + version "1.0.30001313" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001313.tgz#a380b079db91621e1b7120895874e2fd62ed2e2f" + integrity sha512-rI1UN0koZUiKINjysQDuRi2VeSCce3bYJNmDcj3PIKREiAmjakugBul1QSkg/fPrlULYl6oWfGg3PbgOSY9X4Q== capture-exit@^2.0.0: version "2.0.0" @@ -4871,14 +4871,14 @@ cssstyle@^2.3.0: cssom "~0.3.6" csstype@^2.5.7: - version "2.6.19" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.19.tgz#feeb5aae89020bb389e1f63669a5ed490e391caa" - integrity sha512-ZVxXaNy28/k3kJg0Fou5MiYpp88j7H9hLZp8PDC3jV0WFjfH5E9xHb56L0W59cPbKbcHXeP4qyT8PrHp8t6LcQ== + version "2.6.20" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.20.tgz#9229c65ea0b260cf4d3d997cb06288e36a8d6dda" + integrity sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA== csstype@^3.0.2: - version "3.0.10" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.10.tgz#2ad3a7bed70f35b965707c092e5f30b327c290e5" - integrity sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA== + version "3.0.11" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33" + integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw== cyclist@^1.0.1: version "1.0.1" @@ -5379,10 +5379,10 @@ ejs@^2.6.1: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== -electron-to-chromium@^1.3.564, electron-to-chromium@^1.4.71: - version "1.4.75" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.75.tgz#d1ad9bb46f2f1bf432118c2be21d27ffeae82fdd" - integrity sha512-LxgUNeu3BVU7sXaKjUDD9xivocQLxFtq6wgERrutdY/yIOps3ODOZExK1jg8DTEg4U8TUCb5MLGeWFOYuxjF3Q== +electron-to-chromium@^1.3.564, electron-to-chromium@^1.4.76: + version "1.4.76" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.76.tgz#a0494baedaf51094b1c172999919becd9975a934" + integrity sha512-3Vftv7cenJtQb+k00McEBZ2vVmZ/x+HEF7pcZONZIkOsESqAqVuACmBxMv0JhzX7u0YltU0vSqRqgBSTAhFUjA== elliptic@^6.5.3: version "6.5.4" @@ -5455,7 +5455,7 @@ enhanced-resolve@^4.3.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.8.3: +enhanced-resolve@^5.9.2: version "5.9.2" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz#0224dcd6a43389ebfb2d55efee517e5466772dd9" integrity sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA== @@ -5739,9 +5739,9 @@ eslint-plugin-react-hooks@^4.2.0, eslint-plugin-react-hooks@^4.3.0: integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA== eslint-plugin-react@^7.21.5, eslint-plugin-react@^7.27.1, eslint-plugin-react@^7.29.2: - version "7.29.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.2.tgz#2d4da69d30d0a736efd30890dc6826f3e91f3f7c" - integrity sha512-ypEBTKOy5liFQXZWMchJ3LN0JX1uPI6n7MN7OPHKacqXAxq5gYC30TdO7wqGYQyxD1OrzpobdHC3hDmlRWDg9w== + version "7.29.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.3.tgz#f4eab757f2756d25d6d4c2a58a9e20b004791f05" + integrity sha512-MzW6TuCnDOcta67CkpDyRfRsEVx9FNMDV8wZsDqe1luHPdGTrQIUaUXD27Ja3gHsdOIs/cXzNchWGlqm+qRVRg== dependencies: array-includes "^3.1.4" array.prototype.flatmap "^1.2.5" @@ -5766,11 +5766,11 @@ eslint-plugin-testing-library@^3.9.2: "@typescript-eslint/experimental-utils" "^3.10.1" eslint-plugin-testing-library@^5.0.1, eslint-plugin-testing-library@^5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.0.5.tgz#5757961ec20a6ca8b0992d2c5487db1b51612d8d" - integrity sha512-0j355vJpJCE/2g+aayIgJRUB6jBVqpD5ztMLGcadR1PgrgGPnPxN1HJuOAsAAwiMo27GwRnpJB8KOQzyNuNZrw== + version "5.0.6" + resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.0.6.tgz#86b0aff2ed0c80f63966c2a4894c06bff382b6d5" + integrity sha512-mMU4+slZsWKHNxtxc5TE2+bs9S//e2uFPlcpTapPhVdnctgn0+G/DaUu6VbT0JLiVMcbBjy3IcfddK+abZawbw== dependencies: - "@typescript-eslint/utils" "^5.10.2" + "@typescript-eslint/utils" "^5.13.0" eslint-scope@5.1.1, eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" @@ -7166,9 +7166,9 @@ http-errors@~1.6.2: statuses ">= 1.4.0 < 2" http-parser-js@>=0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.5.tgz#d7c30d5d3c90d865b4a2e870181f9d6f22ac7ac5" - integrity sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA== + version "0.5.6" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.6.tgz#2e02406ab2df8af8a7abfba62e0da01c62b95afd" + integrity sha512-vDlkRPDJn93swjcjqMSaGSPABbIarsr1TLAui/gLDXzV5VsJNdXNzMYDyNBLQkjWQCJ1uizu8T2oDMhmGt0PRA== http-proxy-agent@^4.0.1: version "4.0.1" @@ -11211,9 +11211,9 @@ postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, po source-map "^0.6.1" postcss@^8.1.0: - version "8.4.7" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.7.tgz#f99862069ec4541de386bf57f5660a6c7a0875a8" - integrity sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A== + version "8.4.8" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.8.tgz#dad963a76e82c081a0657d3a2f3602ce10c2e032" + integrity sha512-2tXEqGxrjvAO6U+CJzDL2Fk2kPHTv1jQsYkSoMeOis2SsYaXRO2COxTdQp99cYvif9JTXaAk9lYGc3VhJt7JPQ== dependencies: nanoid "^3.3.1" picocolors "^1.0.0" @@ -12595,9 +12595,9 @@ rollup@^1.31.1: acorn "^7.1.0" rollup@^2.68.0: - version "2.69.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.69.0.tgz#82aa86682a45e9760146b736c1643bf435506156" - integrity sha512-kjER91tHyek8gAkuz7+558vSnTQ+pITEok1P0aNOS45ZXyngaqPsXJmSel4QPQnJo7EJMjXUU1/GErWkWiKORg== + version "2.70.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.70.0.tgz#17a92e5938e92a251b962352e904c9f558230ec7" + integrity sha512-iEzYw+syFxQ0X9RefVwhr8BA2TNJsTaX8L8dhyeyMECDbmiba+8UQzcu+xZdji0+JQ+s7kouQnw+9Oz5M19XKA== optionalDependencies: fsevents "~2.3.2" @@ -13915,9 +13915,9 @@ ts-pnp@1.2.0, ts-pnp@^1.1.6: integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== tsconfig-paths@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b" - integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== + version "3.13.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.13.0.tgz#f3e9b8f6876698581d94470c03c95b3a48c0e3d7" + integrity sha512-nWuffZppoaYK0vQ1SQmkSsQzJoHA4s6uzdb2waRpD806x9yfq153AdVsWz4je2qZcW+pENrMQXbGQ3sMCkXuhw== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.1" @@ -14653,10 +14653,10 @@ webpack@4.44.2: watchpack "^1.7.4" webpack-sources "^1.4.1" -webpack@^5.69.1: - version "5.69.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.69.1.tgz#8cfd92c192c6a52c99ab00529b5a0d33aa848dc5" - integrity sha512-+VyvOSJXZMT2V5vLzOnDuMz5GxEqLk7hKWQ56YxPW/PQRUuKimPqmEIJOx8jHYeyo65pKbapbW464mvsKbaj4A== +webpack@^5.70.0: + version "5.70.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.70.0.tgz#3461e6287a72b5e6e2f4872700bc8de0d7500e6d" + integrity sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" @@ -14667,7 +14667,7 @@ webpack@^5.69.1: acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.8.3" + enhanced-resolve "^5.9.2" es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" From b21611cdf8f4dd9473b53f33191ea9932352c7cd Mon Sep 17 00:00:00 2001 From: BulotF Date: Tue, 8 Mar 2022 13:52:59 +0100 Subject: [PATCH 32/36] mock permissions in tests --- .../classifications/visualization/controls.spec.js | 11 +++-------- .../classifications/visualization/home.spec.js | 8 +++----- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/src/js/applications/classifications/visualization/controls.spec.js b/app/src/js/applications/classifications/visualization/controls.spec.js index 144fb4914..8cd4bfd2e 100644 --- a/app/src/js/applications/classifications/visualization/controls.spec.js +++ b/app/src/js/applications/classifications/visualization/controls.spec.js @@ -7,20 +7,15 @@ import Controls from './controls'; const mockStore = configureStore([]); const store = mockStore({ - app: { - secondLang: true, - }, + users: { results: { stamp: 'stamp' } }, + app: { secondLang: true, auth: { type: '', user: { roles: [] } } }, }); describe('classification-visualization-controls', () => { it('renders without crashing', () => { render( - {}} - permission={{ authType: '', roles: [''] }} - /> + {}} /> , { wrapper: MemoryRouter, diff --git a/app/src/js/applications/classifications/visualization/home.spec.js b/app/src/js/applications/classifications/visualization/home.spec.js index 199b7040e..4e88972cf 100644 --- a/app/src/js/applications/classifications/visualization/home.spec.js +++ b/app/src/js/applications/classifications/visualization/home.spec.js @@ -7,9 +7,8 @@ import configureStore from 'redux-mock-store'; const mockStore = configureStore([]); const store = mockStore({ - app: { - secondLang: true, - }, + users: { results: { stamp: 'stamp' } }, + app: { secondLang: true, auth: { type: '', user: { roles: [] } } }, }); const classification = { @@ -26,7 +25,7 @@ const classification = { const langs = { lg1: 'fr', lg2: 'en' }; describe('classification-home', () => { - it('renders without crashing', () => { + it('renders without crashing', async () => { render( { classificationId={'classificationId'} langs={langs} secondLang={false} - permission={{ authType: '', roles: [''] }} publish={() => {}} serverSideError={''} /> From d9517b139a37a97583a5038547d895a930ba6d5d Mon Sep 17 00:00:00 2001 From: Emmanuel DEMEY Date: Fri, 11 Mar 2022 14:22:54 +0100 Subject: [PATCH 33/36] feat: bump wilco --- app/package.json | 2 +- package.json | 2 +- packages/operations/package.json | 2 +- packages/utilities/package.json | 2 +- yarn.lock | 11 ++++++----- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/package.json b/app/package.json index 0f5661644..2a63d3ac2 100755 --- a/app/package.json +++ b/app/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "@inseefr/iam": "0.1.1", - "@inseefr/wilco": "0.0.5", + "@inseefr/wilco": "0.0.7", "bauhaus-operations": "^0.0.0", "bauhaus-structures": "^0.0.0", "bootstrap": "3.4.1", diff --git a/package.json b/package.json index 8d3feeecd..7e0d97e50 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "prepare": "husky install" }, "resolutions": { - "@inseefr/wilco": "0.0.5", + "@inseefr/wilco": "0.0.7", "react": "17.0.2", "react-dom": "17.0.2", "react-router-dom": "5.2.0" diff --git a/packages/operations/package.json b/packages/operations/package.json index e0218b8f1..7c924db18 100644 --- a/packages/operations/package.json +++ b/packages/operations/package.json @@ -24,7 +24,7 @@ "rollup-plugin-replace": "^2.2.0" }, "dependencies": { - "@inseefr/wilco": "0.0.5", + "@inseefr/wilco": "0.0.7", "bauhaus-utilities": "0.0.0", "bauhaus-operations": "0.0.0", "dayjs": "^1.10.7", diff --git a/packages/utilities/package.json b/packages/utilities/package.json index 6e6bbb85a..4d4608baa 100644 --- a/packages/utilities/package.json +++ b/packages/utilities/package.json @@ -24,7 +24,7 @@ "rollup-plugin-replace": "^2.2.0" }, "dependencies": { - "@inseefr/wilco": "0.0.5", + "@inseefr/wilco": "0.0.7", "dayjs": "^1.10.7", "draft-js": "0.10.4", "draft-js-export-html": "1.4.1", diff --git a/yarn.lock b/yarn.lock index 96df2aab9..19f42f134 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1290,10 +1290,10 @@ react-router-dom "5.2.0" sass "^1.43.5" -"@inseefr/wilco@0.0.5", "@inseefr/wilco@^1.1.1": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@inseefr/wilco/-/wilco-0.0.5.tgz#0c13eff7a801a1e0ff43b985d501ab6d251ff899" - integrity sha512-kyhsuCeQ9eEfixKCcoLC3G1j04g9uj9wS0Xg3TwgN9BJ9WOVEEnK3hwJuMrYWjEglevkryz0uWnw85ymrXSCvg== +"@inseefr/wilco@0.0.7", "@inseefr/wilco@^1.1.1": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@inseefr/wilco/-/wilco-0.0.7.tgz#ef6809a7b07e91e581370cf4562b9d411d5b840e" + integrity sha512-w8HvYJ3Mfk4hRui6r2YEQsOLQIJGghzSZX5s54BpVezkG4Tfl/1OGLA4sonWGnPNqf04UB4+m8oby2n0KRvtQA== dependencies: lodash.deburr "^4.1.0" lodash.difference "^4.5.0" @@ -1307,6 +1307,7 @@ react-loading "^2.0.3" react-router-dom "^5.1.2" react-select "^3.0.4" + sass "^1.49.9" "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" @@ -12688,7 +12689,7 @@ sass-loader@^10.0.5: schema-utils "^3.0.0" semver "^7.3.2" -sass@^1.43.5: +sass@^1.43.5, sass@^1.49.9: version "1.49.9" resolved "https://registry.yarnpkg.com/sass/-/sass-1.49.9.tgz#b15a189ecb0ca9e24634bae5d1ebc191809712f9" integrity sha512-YlYWkkHP9fbwaFRZQRXgDi3mXZShslVmmo+FVK3kHLUELHHEYrCmL1x6IUjC7wLS6VuJSAFXRQS/DxdsC4xL1A== From 379734f1dbbafc8d46069ffc159b790528d76715 Mon Sep 17 00:00:00 2001 From: Emmanuel DEMEY Date: Fri, 11 Mar 2022 14:31:11 +0100 Subject: [PATCH 34/36] =?UTF-8?q?fix:=20"est=20remplac=C3=A9=20par"=20for?= =?UTF-8?q?=20concept?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/js/applications/concepts/visualization/links.js | 2 +- app/src/js/i18n/dictionary/operations/index.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/js/applications/concepts/visualization/links.js b/app/src/js/applications/concepts/visualization/links.js index a89d5bef8..fbcf73382 100644 --- a/app/src/js/applications/concepts/visualization/links.js +++ b/app/src/js/applications/concepts/visualization/links.js @@ -41,7 +41,7 @@ const LinksList = ({ links, lang, alone, Dictionnary = D1 }) => { - + } diff --git a/app/src/js/i18n/dictionary/operations/index.js b/app/src/js/i18n/dictionary/operations/index.js index abe2ebf76..364486c92 100644 --- a/app/src/js/i18n/dictionary/operations/index.js +++ b/app/src/js/i18n/dictionary/operations/index.js @@ -134,6 +134,10 @@ const dictionary = { fr: 'Est remplacée par', en: 'Is replaced by', }, + replacedByMasc: { + fr: 'Est remplacé par', + en: 'Is replaced by', + }, indicators: { fr: 'Indicateurs produits', en: 'Indicators produced', From c20b471a65150ea09c19b4c4746c239a0ab1df9c Mon Sep 17 00:00:00 2001 From: Alice Lambois <35219063+alicela@users.noreply.github.com> Date: Wed, 16 Mar 2022 10:30:23 +0100 Subject: [PATCH 35/36] Change to version 3.0.17 --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index a9f54eab4..e20b4080e 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,7 +4,7 @@ sonar.host.url=https://sonarcloud.io # Project name & version sonar.projectName=Bauhaus -sonar.projectVersion=3.0.16 +sonar.projectVersion=3.0.17 # Path to sources sonar.sources=app/src,packages/operations/src,packages/structures/src,packages/utilities/src From 2b7194b7f3b15ec1a42bfda42cb9913954198862 Mon Sep 17 00:00:00 2001 From: Alice Lambois <35219063+alicela@users.noreply.github.com> Date: Wed, 16 Mar 2022 10:31:12 +0100 Subject: [PATCH 36/36] Change to version 3.0.17 --- app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/package.json b/app/package.json index aea869a4e..e491bee3e 100755 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "Bauhaus", - "version": "3.0.16", + "version": "3.0.17", "description": "Web application for the management of concepts, classifications and other statistical objects", "repository": { "type": "git",