diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 9fef7d9f4..3e4e57d40 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -617,7 +617,8 @@ "styles": { "tab": "Style", "no-source": "Please select a source before configuring style", - "secondarylabels": "Secondary styles" + "secondarylabels": "Secondary styles", + "step": "Step" } } }, diff --git a/public/locales/fr/translation.json b/public/locales/fr/translation.json index a39da7f08..fa29d3a27 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -619,7 +619,8 @@ "styles": { "tab": "Style", "no-source": "Veuillez choisir une source de données avant de configurer les styles", - "secondarylabels": "Styles secondaires" + "secondarylabels": "Styles secondaires", + "step": "Borne" } } }, diff --git a/src/modules/RA/DataLayer/components/tabs/StyleTab/Style/ColorListField.js b/src/modules/RA/DataLayer/components/tabs/StyleTab/Style/ColorListField.js index a946465d1..647797000 100644 --- a/src/modules/RA/DataLayer/components/tabs/StyleTab/Style/ColorListField.js +++ b/src/modules/RA/DataLayer/components/tabs/StyleTab/Style/ColorListField.js @@ -3,7 +3,11 @@ import randomColor from 'randomcolor'; import { makeStyles } from '@material-ui/core/styles'; +import { number, useTranslate } from 'react-admin'; +import { Field } from 'react-final-form'; +import { TextField } from '@material-ui/core'; import ColorPicker from '../../../../../../../components/react-admin/ColorPicker'; +import Condition from '../../../../../../../components/react-admin/Condition'; import styles from './styles'; @@ -11,8 +15,9 @@ const useStyles = makeStyles(styles); const DEFAULT_MAX_CLASSES = 15; -const ColorListField = ({ value, onChange = () => {}, maxClasses = DEFAULT_MAX_CLASSES }) => { +const ColorListField = ({ path, value, onChange = () => {}, maxClasses = DEFAULT_MAX_CLASSES }) => { const classes = useStyles(); + const translate = useTranslate(); const handleColorChange = index => newValue => { const newColorList = [...value]; @@ -35,13 +40,54 @@ const ColorListField = ({ value, onChange = () => {}, maxClasses = DEFAULT_MAX_C return (