Skip to content

Commit

Permalink
Merge pull request #219 from InseeFr/Release-3.0.9
Browse files Browse the repository at this point in the history
Release 3.0.9
  • Loading branch information
JeromeMBourgeois authored Nov 4, 2021
2 parents 2924bce + 0230466 commit 2944c84
Show file tree
Hide file tree
Showing 39 changed files with 1,729 additions and 960 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ Web application for the management of concepts, classifications and other statis
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=InseeFr_Bauhaus&metric=coverage)](https://sonarcloud.io/dashboard?id=InseeFr_Bauhaus)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

The documentation can be found in the [docs](https://github.com/InseeFr/Bauhaus/tree/master/docs) folder and [browsed online](https://inseefr.github.io/Bauhaus).
The documentation can be found in the [docs](https://github.com/InseeFr/Bauhaus/tree/main/docs) folder and [browsed online](https://inseefr.github.io/Bauhaus).

[Storybook](https://inseefr.github.io/Bauhaus/storybook) is also available online.

## How to start

```
git clone [email protected]:InseeFr/Bauhaus.git
cd Bauhaus
yarn
yarn build-insee
yarn start
```
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Bauhaus",
"version": "3.0.8",
"version": "3.0.9",
"description": "Web application for the management of concepts, classifications and other statistical objects",
"repository": {
"type": "git",
Expand All @@ -27,8 +27,8 @@
"dependencies": {
"@inseefr/iam": "^0.0.1-rc11",
"@inseefr/wilco": "0.0.5",
"bauhaus-structures": "^0.0.0",
"bauhaus-operations": "^0.0.0",
"bauhaus-structures": "^0.0.0",
"bootstrap": "3.4.1",
"create-react-class": "^15.6.3",
"dompurify": "2.2.9",
Expand Down
14 changes: 3 additions & 11 deletions app/src/js/applications/codelists/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,14 @@ const CodesListComponent = () => {
<div className="container">
<Switch>
<Route exact path="/codelists" component={Home} />
<Route
exact
path="/codelists/components/create"
component={CodelistEdit}
/>
<Route exact path="/codelists/create" component={CodelistEdit} />
<Route exact path="/codelists/search" component={SearchFormList} />
<Route
exact
path="/codelists/components/:id"
path="/codelists/:id"
component={CodelistComponentView}
/>
<Route
exact
path="/codelists/components/:id/modify"
component={CodelistEdit}
/>
<Route exact path="/codelists/:id/modify" component={CodelistEdit} />
</Switch>
</div>
</>
Expand Down
43 changes: 0 additions & 43 deletions app/src/js/applications/concepts/home-container.js

This file was deleted.

30 changes: 18 additions & 12 deletions app/src/js/applications/concepts/home.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
import React from 'react';
import PropTypes from 'prop-types';
import React, { useEffect } from 'react';
import {
PageTitle,
SearchableList,
NewButton,
PublishButton,
ExportButton,
VerticalMenu,
Loading
} from '@inseefr/wilco';
import check from 'js/utils/auth';
import { propTypes as conceptOverviewPropTypes } from 'js/utils/concepts/concept-overview';
import { propTypes as permissionOverviewPropTypes } from 'js/utils/auth/permission-overview';
import D from 'js/i18n';
import { useDispatch, useSelector } from 'react-redux';
import { Auth } from 'bauhaus-utilities';
import loadConceptList from 'js/actions/concepts/list';
import * as select from 'js/reducers';

const ConceptsHome = ({
concepts,
permission: { authType, roles }
}) => {
const ConceptsHome = () => {
const permission = useSelector(state => Auth.getPermission(state))
const concepts = useSelector(state => select.getConceptList(state));
const dispatch = useDispatch();
useEffect(() => {
if (!concepts) {
dispatch(loadConceptList())
}
}, [concepts, dispatch]);
if (!concepts) return <Loading />;

const { authType, roles } = permission;
const authImpl = check(authType);
const adminOrContributor = authImpl.isAdminOrContributor(roles);
const adminOrCreator = authImpl.isAdminOrConceptCreator(roles);
Expand Down Expand Up @@ -51,9 +61,5 @@ const ConceptsHome = ({
</div>
);
}
ConceptsHome.propTypes = {
concepts: PropTypes.arrayOf(conceptOverviewPropTypes.isRequired),
permission: permissionOverviewPropTypes.isRequired,
};

export default ConceptsHome;
15 changes: 0 additions & 15 deletions app/src/js/applications/concepts/home.spec.js

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/js/applications/concepts/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Switch, Route } from 'react-router-dom';

import ConceptsContainer from 'js/applications/concepts/home-container';
import Concepts from 'js/applications/concepts/home';
import ConceptsSearchListContainer from 'js/applications/concepts/advanced-search/home-container';
import ConceptCompareContainer from 'js/applications/concepts/compare/home-container';
import ConceptSendContainer from 'js/applications/concepts/send/home-container';
Expand Down Expand Up @@ -31,7 +31,7 @@ export default () => {
<>
<Menu />
<Switch>
<Route exact path="/concepts" component={ConceptsContainer} />
<Route exact path="/concepts" component={Concepts} />
<Route
exact
path="/concepts/search"
Expand Down
6 changes: 3 additions & 3 deletions app/src/js/applications/operations/document/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const SearchableList = ({
const [year, month, day] = content.updatedDate.split('-');
extraInformations.push(`${day}/${month}/${year}`);
}
return `${content[label]} ${extraInformations.length > 0 ? `(${extraInformations.join(' - ')})` : ''}`;
return <>{content[label]} <i>{extraInformations.length > 0 ? `(${extraInformations.join('-')})` : ''}</i></>;
}
const hitEls = hits.map((item) => (
<li key={item.id} className="list-group-item">
Expand All @@ -52,7 +52,7 @@ const SearchableList = ({
));

return (
<div className={`=text-center`}>
<>
<div className="row form-group">
<div className="col-md-12">
<input
Expand All @@ -71,7 +71,7 @@ const SearchableList = ({
{nbResults(hits, D)}
</p>
<Pagination itemEls={hitEls} itemsPerPage="10" />
</div>
</>
);
};

Expand Down
14 changes: 5 additions & 9 deletions app/src/js/i18n/dictionary/operations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ const dictionary = {
fr: 'Familles',
en: 'Families',
},
creatorTitle: {
fr: 'Propriétaires',
en: 'Owners',
},
seriesTitle: {
fr: 'Séries',
en: 'Series',
Expand Down Expand Up @@ -233,20 +229,20 @@ const dictionary = {
en: 'You are about to permanently delete this documentation. Are you sure?',
},
exportSimsTips: {
fr: 'Veuillez sélectionner les options d\'export',
en: 'Please select the export options'
fr: "Veuillez sélectionner les options d'export",
en: 'Please select the export options',
},
exportSimsIncludeLg1: {
fr: 'Inclure la première langue',
en: 'Include first language'
en: 'Include first language',
},
exportSimsIncludeLg2: {
fr: 'Inclure la seconde langue',
en: 'Include second language'
en: 'Include second language',
},
exportSimsIncludeEmptyMas: {
fr: 'Inclure les rubriques vides',
en: 'Include the empty rubrics'
en: 'Include the empty rubrics',
},
...documentsD,
...validationD,
Expand Down
62 changes: 31 additions & 31 deletions docs/book.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"gitbook": "3.2.2",
"title": "Bauhaus",
"plugins": [
"edit-link",
"prism",
"-highlight",
"github",
"anchorjs",
"image-captions",
"include-codeblock"
],
"root": "./",
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/InseeFr/Bauhaus/tree/master/docs",
"label": "Edit This Page"
},
"github": {
"url": "https://github.com/InseeFr/Bauhaus/"
},
"theme-default": {
"styles": {
"website": "gitbook.css"
}
},
"prism": {
"lang": {
"shell": "bash"
}
}
}
"gitbook": "3.2.2",
"title": "Bauhaus",
"plugins": [
"edit-link",
"prism",
"-highlight",
"github",
"anchorjs",
"image-captions",
"include-codeblock"
],
"root": "./",
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/InseeFr/Bauhaus/tree/main/docs",
"label": "Edit This Page"
},
"github": {
"url": "https://github.com/InseeFr/Bauhaus/"
},
"theme-default": {
"styles": {
"website": "gitbook.css"
}
},
"prism": {
"lang": {
"shell": "bash"
}
}
}
}
4 changes: 2 additions & 2 deletions docs/en/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ docker run -it -p 8083:80 -e BAUHAUS_API_URL=http://192.168.1.12:8081/api bauha

If you're new to JavaScript, you might need to first install [node](https://nodejs.org/en/download/) and [yarn](https://github.com/yarnpkg/yarn) on your computer.

`yarn` is the `Node.js` package manager. `yarn install` will download all the dependencies needed by the project, as described in the `dependencies` and `devDepedencies` sections of the [package.json](https://github.com/InseeFr/Bauhaus/blob/master/package.json) file.
`yarn` is the `Node.js` package manager. `yarn install` will download all the dependencies needed by the project, as described in the `dependencies` and `devDepedencies` sections of the [package.json](https://github.com/InseeFr/Bauhaus/blob/main/package.json) file.

`yarn start` will launch the `dev` command defined in the `scripts` section of the same `package.json` file. This command will launch a local web server serving the main HTML file ([src/js/index.html](https://github.com/InseeFr/Bauhaus/blob/master/public/index.html)) and all the relevant assets.
`yarn start` will launch the `dev` command defined in the `scripts` section of the same `package.json` file. This command will launch a local web server serving the main HTML file ([src/js/index.html](https://github.com/InseeFr/Bauhaus/blob/main/public/index.html)) and all the relevant assets.

`yarn build` will launch the compilation with some optimizations for production. It copies all the static assets and the resulting bundle file in the `dist` folder.

Expand Down
4 changes: 2 additions & 2 deletions docs/fr/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ docker run -it -p 8083:80 -e BAUHAUS_API_URL=http://192.168.1.12:8081/api bauha

Si vous débutez avec ces technologies, vous aurez vraisemblablement besoin d'installer dans un premier temps sur votre ordinateur [node](https://nodejs.org/en/download/) et [yarn](https://github.com/yarnpkg/yarn).

`yarn` est un gestionnaire de modules pour `Node.js`. `yarn install` téléchargera toutes les dépendances du projet, décrites dans la section `dependencies` et `devDepedencies` du fichier [package.json](https://github.com/InseeFr/Bauhaus/blob/master/package.json).
`yarn` est un gestionnaire de modules pour `Node.js`. `yarn install` téléchargera toutes les dépendances du projet, décrites dans la section `dependencies` et `devDepedencies` du fichier [package.json](https://github.com/InseeFr/Bauhaus/blob/main/package.json).

`yarn start` démarre un serveur de développement qui sert la page d'accueil de l'application ([src/js/index.html](https://github.com/InseeFr/Bauhaus/blob/master/public/index.html)) et toutes les ressources nécessaires.
`yarn start` démarre un serveur de développement qui sert la page d'accueil de l'application ([src/js/index.html](https://github.com/InseeFr/Bauhaus/blob/main/public/index.html)) et toutes les ressources nécessaires.

`yarn build` lance la compilation du code avec des optimisations pour la mise en production. Elle copie toutes les ressources statiques et le fichier `JavaScript` compilé dans le dossier `dist`.

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"babel-jest": "26.0.1",
"babel-loader": "8.1.0",
"babel-polyfill": "^6.26.0",
"eslint": "7.28.0",
"eslint": "7.32.0",
"eslint-config-prettier": "6.15.0",
"eslint-config-react-app": "6.0.0",
"eslint-plugin-flowtype": "5.2.0",
Expand All @@ -50,15 +50,15 @@
"jest-localstorage-mock": "2.4.3",
"lcov-result-merger": "3.1.0",
"prettier": "2.3.2",
"webpack": "5.49.0"
"webpack": "5.58.1"
},
"dependencies": {
"dompurify": "2.2.9",
"@babel/preset-react": "^7.12.13",
"jest-environment-jsdom-sixteen": "^1.0.3",
"prop-types": "15.7.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-redux": "7.2.0",
"react-router-dom": "5.2.0",
"redux": "4.0.5",
Expand Down
Loading

0 comments on commit 2944c84

Please sign in to comment.