Composants de l’application ReactJS

AjoutObjectifs

class AjoutObjectifs(props)

This component is used to add or update an objective

AjoutObjectifs.handleCouleurDebutClick

Updates this.state.displayColorStartPicker As long as this.state.displayColorStartPicker is equal to false, the color form is not displayed As soon as it is true, the form appears and the administrator can select the color of his choice

AjoutObjectifs.handleCouleurDebutClose

Set this.state.displayColorStartPicker to false to close the form when the color has been selected

AjoutObjectifs.mettreAJourLaCouleur

Update component state with the color selected by user

AjoutObjectifs.affectationObjectifs(titre, selectionGraphique, nomTerritoire)

Allow the display in value mode of an objective for a type of territory or specific territory

AjoutObjectifs.ajouterBoutonAffectationObjectif(titre, graphique, nomTerritoire)

Add a button associated with the objectives display permission event in mode value for a specific territory or type of territory

AjoutObjectifs.ajouterFormulaireDescription()

Add the form that allows you to enter the description of the objective to display in the tooltip

AjoutObjectifs.ajouterObjectifs(graphiques, anneeRef, couleur)

Integrate the data the administrator has entered into the database

Arguments
  • anneeRef (Entier()) – : reference year used to calculate the objectives.

AjoutObjectifs.choixAnneesReference()

Generate the selection form for the reference year used to calculate the objectives

AjoutObjectifs.choixCouleur()

The color of the target trajectory

AjoutObjectifs.choixDerniereAnneeProjection()

Generate the selection form for the last projection year

AjoutObjectifs.choixTrajectoireCible()

Generate the selection form of the graph to report the objective

AjoutObjectifs.formTitre()

Form for entering the title of the objective (the one that will be displayed in the legend of the graph where it will be reported).

AjoutObjectifs.formaterDonneesObjectifs(trajectoire)

Formats the data obtained when regional administrators enter their objective according to the requirements of the API transmitted

AjoutObjectifs.formulaireAffectationObjectifs(titre, selectionGraphique)

Generate the form that lists the authorizations and from which you can delete them.

AjoutObjectifs.mettreAJourParam(i, param, ref)

Updates the component state with the latest information that the regional administrator enters in the form.

Arguments
  • i (Entier()) – : incremental identifier to identify which year is associated with which value identifiant

AjoutObjectifs.mettreAJourTitre()

Each time the title is modified, it is updated in the component’s state (this.state.titre)

AjoutObjectifs.miseAJourDonneesObjectifs(selectionGraphique, anneeSelectionnee)

Update the data entered by the administrator in the database

Arguments
  • anneeSelectionnee (Entier()) – : reference year used to calculate the objectives.

AjoutObjectifs.modifierEtatAffectation()

This method modifies the state of the component depending on whether the authorization to display the objective in value mode relates to a specific territory or to all territories of the type of the selected one. If the checkbox (Cf. ajouterBoutonAffectationObjectif) is unchecked, this.state.affectationToutTypeTerritoire is false and we publish on a specific territory. Otherwise, we publish on all territories of the same type.

AjoutObjectifs.obtenirAnneesReference(table)

To update an objective, retrieve the reference year used to calculate these objectives (so you can change it if necessary).

AjoutObjectifs.obtenirAssociationTableGraphique()

Retrieve the association between the names of graphs and the names of the tables from which they are built.

AjoutObjectifs.obtenirDonneesObjectifs(supraGoalId)

Retrieve objective data to update it (so you can change it if needed). This function returns a dictionary which contains the data for each objective. For exemple : [{titre : REPOS, table : conso_energetique, graphique : Consommation d’énergie, annee_reference : 2016, annee : 2026, valeur : 50}]

AjoutObjectifs.obtenirListeAffectations(supraGoalId)

Allow to obtain the list of territories for which display is authorized in value mode of the current objective.

AjoutObjectifs.resetCoeffs()

This function resets the values of the target trajectory

AjoutObjectifs.supprimerAffectationObjectifs(titre, selectionGraphique, typeTerritoire, codeTerritoire, nomTerritoire)

Disable the display of objectives for selected territories

APropos

class APropos()

This component is used to manage the “A propos” page of the application

AnalysisAjouter

class AnalysisAjouter(props)

This component is used to add or update an analysis

AnalysisAjouter.ajouterCategorie

Add a category

AnalysisAjouter.construireConfidentiel

Construction of the input field for confidential

AnalysisAjouter.construireFiltreDefaut

Construction of the default filter input field

AnalysisAjouter.construireListeCategories

Construction of the list of available categories

AnalysisAjouter.construireListeThemes

Construction of the list of available themes

AnalysisAjouter.construireNomTable

Construction of the input field for the name of the table to create To replace by a renderTextInput ?

AnalysisAjouter.construireSelectionZone

Construction of the input field disabled_for_zone / only_for_zone

AnalysisAjouter.handleCheckCategorie

Selected category

AnalysisAjouter.handleCheckFromExistingData

update the component state with the choice of data (upload or data already present in the database)

AnalysisAjouter.handleCouleurDebutClick

Manage colorPicker

AnalysisAjouter.handleCreditsAnalysisProducers

update the component state with new value for credits analysis producers

AnalysisAjouter.handleCreditsDataProducers

update the component state with new value for credits data Producers

AnalysisAjouter.handleCreditsDataSources

update the component state with new value for credits data Sources

AnalysisAjouter.handleDisabledCatInDashboard

update the component state with new value for credits data Producers

AnalysisAjouter.handleDisabledInDashboard

update the component state with new value for credits data Producers

AnalysisAjouter.handleGradientBeginningColor

Render start color of the indicator

AnalysisAjouter.handleGradientEndColor

Render end color of the indicator

AnalysisAjouter.handleMaxValueStars

Render max stars value of the indicator

AnalysisAjouter.handleMinValueStars

Render min stars value of the indicator

AnalysisAjouter.handleStarColor

Render end color of the indicator

AnalysisAjouter.onFichierCategorieSelection

update the component state with the new category file to import

AnalysisAjouter.onFichierIndicateurSelection

update the component state with the data file to import

AnalysisAjouter.onFichierPdfMethodoSelection

update the component state with the PDF methodo file

AnalysisAjouter.onIndicatorTypeChanged

update the component state with the indicator type

AnalysisAjouter.ajouterAnalyse()

Add analysis

Renvoie

status – return code of the integration

AnalysisAjouter.componentDidMount(prevProps)

Method executed at the end of the construction of the form It is used to pre-fill the input fields in the case of an indicator update

AnalysisAjouter.getListConfidentialityLayers()

Retrieve the list of available themes

Renvoie

JSON – the list of available themes fr this region

AnalysisAjouter.getListeCategories()

Retrieve the list of available categories

Renvoie

JSON – the list of categories available for this region

AnalysisAjouter.getListeCategoriesModalites()

Retrieve the list of available catégories_modalites

Renvoie

JSON – the list of available catégories_modalites for this region

AnalysisAjouter.getListeThemes()

Retrieve the list of available themes

Renvoie

JSON – the list of available themes fr this region

AnalysisAjouter.isFormValid()

Form validation

Renvoie

status – true or false depending on whether the data is valid or not

AnalysisAjouter.modifierAnalyse()

Modify an analysis

Renvoie

status – return code

AnalysisAjouter.render()
Renvoie

dom – the rendering of the component

AnalysisAjouter.renderField(id, label, field, className, helpMessage)

Generic renderer for a form line

Arguments
  • id (str()) – : field identifier

  • label (str()) – : field label

  • field (input()) – : input (form)

  • className (str()) – : class name of the component. Opionnal

  • helpMessage (str()) – : title displayed on hover. If not specified, will be searched in this.helpMessages[id]

AnalysisAjouter.renderIndicatorsList(indicators)

Generate indicator list for children indicators.

AnalysisAjouter.renderTextInput(id, label, className, helpMessage, placeHolder)

Renderer for an input type field

Arguments
  • id (str()) – : field identifier

  • label (str()) – : field label

  • className (str()) – : class name of the component. Optionnal

  • helpMessage (str()) – : title displayed on hover. If not specified, will be searched in this.helpMessages[id]

  • placeHolder (str()) – : text displayed in input when empty. If not specified, will be searched in this.placeHolders[id]

AnalysisManage

class AnalysisManage(props)

This component is used to manage existing analysis

AnalysisManage.getTrProps(state, rowInfo, instance)

getTrProps is used to color the rows of the table according to criteria

Arguments
  • state (json()) – : current row state

  • rowInfo (json()) – : current row info (columns, values)

  • instance (json()) – : array instance

Renvoie

json – the style for the current row

AnalysisManage.render()
Renvoie

dom – the rendering of the component

AnalysisMap

class AnalysisMap(props)

Small map representing an indicator, present in a dashboard

AnalysisMap.buildFilterLegend(data, category)

Builds the legend with which we can select or delete modalities in the data to be displayed using checkboxes, from modalities by categories.

AnalysisMap.fetchConfiguration(filters)

Retrieve map data for the representation. Adapted from Analysis.fetchData

AnalysisMap.filterFromLegend(modality)

Launches a main component method to add/remove a modality to the filter Triggered when a checkbox associated with a modality is checked

Arguments
  • modality (string()) – : checked / unchecked modality

AnalysisMap.getDataMap()

Simulates the Analysis.getDataMap function to transmit data to OlMap

AnalysisOrder

class AnalysisOrder(props)

This component is used to change the display order of indicators and themes

AnalysisOrder.render()
Renvoie

dom – the rendering of the component

Auth

class Auth(props)

This component is used to manage user authentication

Auth.disconnect()

Disconnect the current user

Auth.getUserInfo()

Get infos on current connected user

Auth.handleTimeOut(exp)

Manage connection time

Auth.refreshConnexion()

Refresh connexion

CategoriesManage

class CategoriesManage(props)

This component is used to manage indicator categories

CategoriesManage.onFichierCategorieSelection

update the component state with the uploaded category file

CategoriesManage.exportCategoryContent(categoryName)

Export table data to CSV file using exportToCSV function (utils).

CategoriesManage.getCategoriesDataTables()

Retrieve list of categories tables contents

Renvoie

json – the list of tables

CategoriesManage.getListeCategories()

Retrieve the list of available categories

Renvoie

JSON – the list of categories available for this region

CategoriesManage.render()
Renvoie

dom – the rendering of the component

CategoriesManage.toggleDetailsCell(details)
Arguments
  • details (obj()) – the objects

ChartsContainer

class ChartsContainer(props)

This component is used to integrate one or more graphics in a page.

Charts

class Charts(props)

This component is used to create a chart (several types possible)

Charts.buildLegend(data)

Builds the legend with which we can select or delete modalities in the data to be displayed using checkboxes, from modalities by categories.

Charts.calculer_avg(arr)

calculate the average value of a season for climate data

Charts.desactiverInfoBullesGraphiques()

Disable tooltip for graph

Charts.filtrerSurLegende(modalite)

Launches a main component method to add/remove a modality to the filter. This method is triggered when you check a box associated with a modality

Contact

class Contact(props)

This component is used to manage the « contact » page of the application

CourbesComparees

class CourbesComparees(props)

This component is used to create a graph with compared curves (energy consumption and production curves)

CourbesComparees.componentDidUpdate(prevProps)

This function updates the data from which we build charts when changing territory

CourbesEmpilees

class CourbesEmpilees(props)

This component used to create a graph with stacked curves

CourbesEmpilees.buildLegend(data)

Builds the legend with which we can select or delete modalities in the data to be displayed using checkboxes, from modalities by categories.

CourbesEmpilees.componentDidUpdate(prevProps)

This function updates the data from which we build the stacked curves charts when changing territory

CourbesEmpilees.filtrerSurLegende(event)

Launches a main component method to add/remove a modality to the filter Triggered when a checkbox associated with a modality is checked

CourbesEmpilees.totalParAnnee(data, liste_annees:)

This function returns the total of values by type. Thus, they are formatted in order to be used in the graph where the curves of renewable energy production and final energy consumption are displayed, within the impact results.

Arguments
  • data (object()) – : array of data by type, then by year/value

  • liste_annees: (object()) – list of years for which data is available for consumption and production

DataManage

class DataManage(props)

this component is used to manage indicator data

DataManage.onFichierDataSelection

Data file to import

DataManage.resetActions

Restores actions to their original state

DataManage.anneePerimetreGeographique(object, string)

Updates the date of the geographic perimeter that the user has selected

Arguments
  • object (e()) – : event triggered by the selection of a new year in the dropdown menu

  • string (table()) – : Name of the table concerned by the update of the perimeter date in which the data contained therein is expressed

DataManage.getDataTables()

Retrieve list of data tables

Renvoie

json – the list of tables

DataManage.isConvertible(header)
Test if the table is convertible :
  • has a « commune » and « valeur » column

  • does not have a « commune_dest » column (flow data isn’t convertible yet)

  • does not have a « geom » column (pixel data isn’t convertible yet)

Arguments
  • header – The header of the table (first 5 lines)

Renvoie

boolean – true if the table is convertible, false otherwise

DataManage.render()
Renvoie

dom – the render of the component

DiagrammeCirculaire

class DiagrammeCirculaire(props)

This component is used to create a pie chart (circular diagram)

DiagrammeCirculaire.addTotalInfo(data)

Returns an information about total value

Arguments
  • data (object()) – the dataset used as inputs

Renvoie

the data tables formatted

DiagrammeCirculaire.buildLegend(data)

Builds the legend with which we can select or delete modalities in the data to be displayed using checkboxes, from modalities by categories.

DiagrammeCirculaire.componentDidUpdate(prevProps, prevState)

This function updates the data from which we build the pie charts when changing territory

DiagrammeCirculaire.filtrerSurLegende(event)

Launches a main component method to add/remove a modality to the filter Triggered when a checkbox associated with a modality is checked

DiagrammeRadar

class DiagrammeRadar(props)

This component is used to create a radar chart

DiagrammeRadar.componentDidUpdate(prevProps)

This function updates the data from which we build the radar charts when changing territory

DiagrammeRadar.filtrerSurLegende(modalite)

Launches a main component method to add/remove a modality to the filter Triggered when a checkbox associated with a modality is checked

POIEdition

class POIEdition(props)

This component is used to add equipment to the database

POIEdition.buildTableName

Build a selection field with autocomplete for table name creation

POIEdition.buildThemesList

Build the themes selection field (with autocomplete)

POIEdition.displayExistingSVGIcon

Retrieve the existing SVG icon depending on the type of icon we want

POIEdition.handleColorPickerChoice

Handle color picker choice

POIEdition.handleColorPickerClick

Handle color picker click

POIEdition.handleColorPickerClose

Handle color picker closing

POIEdition.onChangeName

POI name

POIEdition.onDataFileSelection

Data file to import

POIEdition.onIconLegendFileSelection

Icon legend file to import

POIEdition.onIconPlainFileSelection

Icon file to import

POIEdition.onIconProjectFileSelection

Icon « project » file to import (i.e. when the POI is not working yet)

POIEdition.onMethodoPdfSelection

Methodological PDF

POIEdition.reloadPictures

Reloads the svg icons

POIEdition.retrieveMethodologicalPdf

Retrieve methodological PDF

POIEdition.updateCreditsDataProducers

update the component state with new value for credits data Producers

POIEdition.updateCreditsDataSources

update the component state with new value for credits data Sources

POIEdition.updateExportable

Update the ability to export data of the POI into a csv file.

POIEdition.updateStatus

Update En projet or En service display in legend.

POIEdition.addPOI()

Adds a new POI layer

Renvoie

status – false if the form is invalid

POIEdition.buildIconAnchorSelect()

Selector for the type of icon (determines the relative anchor point)

POIEdition.checkTableNameValidity(value)

checks the table name entered by the user

POIEdition.formIsValid()

Validate the form

Renvoie

status – true or false whether data is valid

POIEdition.formSelectionTypeGeom()

Creates a select object to choose between different geometry types

Renvoie

the select tool

POIEdition.render()

Render component

Renvoie

dom – the DOM of the component

POIEdition.renderCheckbox(id, label)

Render a checkbox form field

Arguments
  • id (str()) – : field id

  • label (str()) – : field label

POIEdition.renderField(id, label, field)

Render a generic form field

Arguments
  • id (str()) – : field id

  • label (str()) – : field label

  • field (input()) – : input (form)

POIEdition.renderTextInput(id, label)

Render an input form field

Arguments
  • id (str()) – : field id

  • label (str()) – : field label

POIEdition.updatePOI()

Update an existing POI

Renvoie

status – returns false if the update fails (form invalid)

POIEdition.updateSelectedGeom(e)

Handles changing geometry type

Arguments
  • e (event()) –

POIManage

class POIManage(props)

This component is used to manage the equipment in the database

Filters

class Filters(props)

This component is used to filter the data sources used to calculate the cartographic data. It manages the home page of the site with the display of the map, graphics, legends and any filters.

FormGenerator

class FormGenerator(props)

This component is used to generate forms for user login

FabriqueRepresentation

class FabriqueRepresentation(props)

This component is used to instantiate a representation component (CircularDiagram, StackedCurves etc.) according to the representation parameter to add in the properties.

FabriqueRepresentation.changeCategorySelection(category, modality)

Update the specific filters currently stored based on selection field.

FabriqueRepresentation.getSpecificCategoryFilters(key)

Get specific rules applying to current graph

Arguments
  • key (string()) – the unique key used to identify current graph in the dashboard

Renvoie

a list of filters

FabriqueRepresentation.insertSpecificCategorySelector(categoriesSettings, filtersInitiated, representationDetails, key)

Add switch or selection field for specific categories.

FabriqueRepresentation.switchButtonCategory(category, modalities_filtered)

Update the specific filters currently stored based on switch button edited.

GestionObjectifs

class GestionObjectifs(props)

This component displays a table from which you can delete an objective or access the update interface of an objective (which is the same as that of adding an objective but with the values pre-filled with what has previously saved in the database).

GestionObjectifs.obtenirObjectifs()

Get the characteristics of the objectives (title, reference year, graph)

GestionObjectifs.supprimerObjectif(propsTableau)

Delete an objective

DashboardList

class DashboardList(props)

Ce composant permet de gérer les tableaux de bords existants

DashboardList.chargerTableauBord(id_tableau_bord:)
Déclenchée sur événement.

Réinitialise la variable this.props.parentApi.data.tableauBordDonnees selon les données du tableau de bord chargé par un.e utilisateur.rice

Arguments
  • id_tableau_bord: (entier()) – identifiant du tableau de bord sélectionné

DashboardList.componentDidUpdate(prevProps, prevState)
Lorsqu’un.e utilisateur.rice déclenche un événement et que la fonction render est lancée à nouveau

on met à jour la liste des tableaux de bord qui doivent figurer dans l’onglet « tableaux de bord ». Cette opération est nécessaire en cas de suppression d’un tableau de bord pour que cette modification soit bien prise en compte lors du rechargement de la liste des tableaux de bord.

DashboardList.duplicateDashboard(dashboard)
Déclenchée sur événement

Duplicate a dashboard

Arguments
  • dashboard (object()) –

DashboardList.formaterDonneesThematiques(donnees)
formate les données au format attendu par le composant TableauBord (nécessaire à

l’initialisation au chargement de this.props.parentApi.data.tableauBordDonnees)

DashboardList.getTrProps(state, rowInfo, instance)

getTrProps sert à colorier les lignes du tableau selon des critères

Arguments
  • state (json()) – : état de la ligne courante

  • rowInfo (json()) – : infos sur la ligne courante (colonnes, valeurs)

  • instance (json()) – : instance du tableau

Renvoie

json – la définition du style pour la ligne courante

DashboardList.handleShare(event, is_readonly_share)

Called from a form onSubmit event

DashboardList.openSharePopup(row, shareTitle, isReadonlyShare)

Open a popup to type the email addresses

DashboardList.supprimerTableauBord(id_tableau_bord)
Déclenchée sur événement

Supprime un tableau de bord

Arguments
  • id_tableau_bord (entier()) – : identifiant en base du tableau de bord que l’on veut supprimer

Histogramme

class Histogramme(props)

This component is used to create a Histogram chart.

Histogramme.buildLegend(data, categorie)

Builds the legend with which we can select or delete modalities in the data to be displayed using checkboxes, from modalities by categories.

Arguments
  • data (Object()) –

  • categorie (string()) –

Histogramme.componentDidUpdate(prevProps)

This function updates the data from which we build the histogram charts when changing territory

Histogramme.filtrerSurLegende(event)

Launches a main component method to add/remove a modality to the filter Triggered when a checkbox associated with a modality is checked

HistogrammeDataRatio

class HistogrammeDataRatio(props)

This component is used to create a Histogram chart using ratios rather than raw data

HistogrammeDataRatio.buildLegend(data)

Builds the legend with which we can select or delete modalities in the data to be displayed using checkboxes, from modalities by categories.

HistogrammeDataRatio.componentDidUpdate(prevProps, prevState)

This function updates the data from which we build the histogram charts when changing territory

HistogrammeDataRatio.filtrerSurLegende(event)

Launches a main component method to add/remove a modality to the filter Triggered when a checkbox associated with a modality is checked

HistogrammeNormalise

class HistogrammeNormalise(props)

This component allows you to create a Histogram chart using normalized data

HistogrammeNormalise.buildLegend(data, categorie)

Builds the legend with which we can select or delete modalities in the data to be displayed using checkboxes, from modalities by categories.

Arguments
  • data (Object()) –

  • categorie (string()) –

HistogrammeNormalise.componentDidUpdate(prevProps)

This function updates the data from which we build the histogram charts when changing territory

HistogrammeNormalise.filtrerSurLegende(event)

Launches a main component method to add/remove a modality to the filter Triggered when a checkbox associated with a modality is checked

POIHistory

class POIHistory(props)

This component allows you to manage the history of modifications on data layers

DataHistory

class DataHistory(props)

Ce composant permet de gérer l’historique des modifications sur les couches de données

DetailsPopup

DetailsPopup(props)

Display a popup on the full screen

How to use?

You can call DetailsPopup by giving it a variable and a callback. Make sure that if you use the variable to trigger showing the popup, you do not forget, in the callback, to remove the forcing. Otherwise, the popup will always be displayed as show props forces displaying the variable over any internal state.

<DetailsPopup
             title="A specific title"
             content={contentVariable}
             show={showPopup}
             emptyMsg="Nothing to show"
             callbackAfterClosing={() => toggleDetailsCell()} />

Examples

See DataHistory Component.

Arguments
  • props (ReactProps()) – Should contain the following elements: * title (string) * content (string) * emptyMsg (string) to be displayed when content is empty * callbackAfterClosing (callable) to be called after closing the window * show (boolean) forces showing the window

Infos

class Infos(props)

Ce composant permet d’afficher une infobulle.

Infos.buildSource()

Build html legend for current analysis sources and providers

Infos.categoriesSelectionTools()

Build html tools to select category when manipulating categories either of switch button or of selection type.

Infos.updateAnalysisSelectedUnit(newUnit)

Check we changed unit and, if new unit is valid (inside available units) for current analysis, will trigger updateSelectedUnitAnalysis from parent api.

Arguments
  • newUnit (integer()) – new value for selected unit

Infos.updateAnalysisSelectedYear(newYear)

Check we changed year and, if new year is valid (inside available years) for current analysis, will trigger updateSelectedYearAnalysis from parent api.

Arguments
  • newYear (integer()) – new value for selected year

Jauge

class Jauge(props)

This component is used to create a gauge chart.

Jauge.componentDidUpdate(prevProps)

This function updates the data from which we build the gauge charts when changing territory

JaugeCirculaire

class JaugeCirculaire(props)

This component is used to create a circular gauge chart.

JaugeCirculaire.componentDidUpdate(prevProps)

This function updates the data from which we build the gauge charts when changing territory

Legend

class Legend(props)

This component is used to create a legend for indicators and equipment.

Legend.exportPoiToCsv(poiLayer, pdfUrl)

Structure les données d’équipements et les exporte en CSV

Arguments
  • poiLayer (*()) – : la couche d’équipements à exporter

  • pdfUrl (*()) – : l’url du PDF méthodologie

MainMap

class MainMap(props)

The main map displayed at the root of the application. Here are defined the interactions between the map and the user. The representation of the map is managed in OlMap.js

### Popup workflow: * Outside edit mode, render depends on state.hoverdeFeatures and state.shouldDisplayEditButton * Edit mode is activated by state.editOn and parametrized by state.editedFeature * mouseClick / mouseMove => updatePopup (state.hoveredFeatures, popup.position) => updateEditStatus (state.shouldDisplayEditButton) * componentDidUpdate => updatePoiFeatureTemplate (poiFeatureTemplate) * onClick => startEdit (state.editOn, state.editedFeature) => updatePopup… * index.js => newFeature (state.editOn, state.editedFeature) * onSubmit => submitFeature ()

MainMap.lockPopup

Disables the update of the popup (position and hoveredFeatures)

MainMap.poiFeatureTemplate

Dict storing some features properties, to build the POI adding form

MainMap.clearInteractions()

Supprime les interactions de modifications des features et nettoie les layers

MainMap.didMountCallback(olMap)

Called after the child component’s Map was created

MainMap.getFeatureProperties(feature)

Get the parsed properties of a POI feature, or the value_ attribute if not found

MainMap.getStarsFromValue(value)

Create JSX for a number of stars.

Arguments
  • value (float()) – The nb of stars

Renvoie

the JSX containing the stars

MainMap.isEditableLayer(layerName)

Check if the layer name is from an editable POI layer

MainMap.isPoiLayer(layerName)

Check if the layer name is from a POI one

MainMap.renderPoiInPopup(feature)

Render a POI Layer inside the popup

MainMap.renderPopup()

Renders the popup as a JSX with the control buttons and the content

MainMap.renderPopupAnalysisValue(feature, layerName, value)

Render an analysis value inside the popup

Renvoie

JSX.Element – The JSX representing the value

MainMap.renderPopupContent(hoveredFeatures)

Render the content of the popup (exculding buttons at the top and bottom)

Renvoie

JSX.Element – The JSX for the content of the popup

MainMap.renderValue(val)

Compose un JSX pour l’affichage d’une valeur dans la popup

MainMap.submitFeature(event)

Enregistrement d’une feature (attributs) nouvelle ou modifiée

MainMap.thousandsWithSpace(value)

Formats a number with spaces between thousands

Arguments
  • value (number()) – Value

Renvoie

string – Formatted value as string

MainMap.updatePopup(dontClose=false)

Updates the position of the popup and the state hoveredFeatures.

Arguments
  • dontClose (boolean()) – don’t close the popup, even in no features are hovered

Renvoie

The new hoveredFeatures state

MarqueurSVG

class MarqueurSVG(props)

This component is used to create an SVG marker

MarqueurSVG.componentDidUpdate(prevProps)

This function updates the data from which we build the SVG marker when changing territory

MentionsLegales

class MentionsLegales()

This component is used to to display the legal notices relating to the selected region

Messages

class Messages(props)

This component is used to display an alert message at the top of the application

TerritorialSynthesis

class TerritorialSynthesis(props)

This component is used to manage the rendering of the territorial synthesis table

TerritorialSynthesis.exportData(format, includePDF, resolve)

This function is used to export summary table data to CSV file. The name of the CSV file will be donnees_synthese_territoriale_ZONETYPE_ZONEID.csv.

TerritorialSynthesis.exportPdf()

Export current page in PDF using different sections to divide the table in two parts.

OlMap

class OlMap(props)

This component is a map that can display indicators (analysis) and equipments (POI).

Workflow: - componentDidMount:

  • init some objects

  • load data into this.state, creating timeouts if not available

  • componentDidUpdate: - reload data if props changed - display data or refresh already displayed data if state or props changed

Arguments
  • id (String()) – unique identifier for the map container (required)

  • parentApi (Object()) – data and callbacks from index.js (required)

  • zone (Object()) – type of the zone as { zone: str, maille: str } (required)

  • currentZone (String()) – id of the zone (required)

  • analysisId (number()) – id of the analysis to show

  • poiLayers (Array()) – layers of POI to show

  • filterString (string()) – unique id for a filter, only used for updating

  • classMethod (string()) – method for choropleth colorization. Either « quantile » (default), « equidistant » or « logarithmic »

  • metaStyle (Object()) – styles info used for representation

  • mapOptions (Object()) – additionnal options passed to new Map()

  • viewOptions (Object()) – additionnal options passed to new View()

  • didMountCallback (function()) – called at the end of componentDidMount to add interactions in the map

  • updateAnalysisMeta (function()) – callback called when analysis” metadata is updated

  • getDataMap (function()) – getter for map data. Default to analysisManager.getDataMap

OlMap.addVTLayerStyle(data)

Add the vectorTile layer style Handle chloropleth colors and confidentiality for all types and scales

OlMap.clearLayer(layer)

Clear the specified layer if it exists

OlMap.displayAnalysis()

Main function used to display analyses. Clear existing layers and display the layer selected. Handle Pixels layers separately.

OlMap.displayCircleAnalysis(current_data, meta, nbClasses)

Display one circle analysis feature.

Arguments
  • current_data (Object()) – contains feature data

  • meta (Object()) – whole layer metadata (colorScale, afficherVersionSimple) dataDeuxiemeRepresentation, etc.)

  • nbClasses (integer()) – how many classes are displayed (useful only for specific accessibilite_emploi analysis)

OlMap.displayFlowAnalysis(current_data)

Display a single flow feature. Will require a few data in current_data object:

  • orig

  • dest

  • country_dest

  • lab_o

  • lab_d

  • val

Arguments
  • current_data (Object()) – contains feature data

OlMap.displayHighlightFeature()

Display the highlight effect around selected zone Then, recenter the view around this zone

OlMap.displayPixelAnalysis(data, meta)

Display a pixel type layer using VectorTileSource. Will restrict the data (if possible) to current zone through props.zone and props.currentZone.

Arguments
  • data (Object()) – contains layer data

  • meta (Object()) – whole layer metadata (layer name, layer type - raw pixel or categorical pixels, nb of classes, color start, color end, etc.)

OlMap.displayPoiLayer(activatedPoi)

Display POI layers, using VectorTileSource for Point layers and VectorSource for other layers.

Arguments
  • activatedPoi (Array()) – list of POI layers activated

OlMap.displayStationMesures()

Display measure stations for climate data

OlMap.displayVTZones()

Display the vector tiles for mailles. Should be called before displayAnalysis

OlMap.displayWMSLayer(data, meta)

Display a WMS feed.

Arguments
  • data (Object()) – contains layer data

  • meta (Object()) – whole layer metadata (layer name, layer type - raw pixel or categorical pixels, nb of classes, color start, color end, etc.)

OlMap.isZoneDefined(zone, currentZone)

Returns true if zone, zone.zone, zone.maille and currentZone are all considered as defined, i.e are neither undefined, «  » nor « undefined ».

OlMap.loadAnalysis()

Load data for analysis

OlMap.loadHighlightFeature()

Loads the feature for zone highlighting

OlMap.removeLayer(layer)

Clear and remove the specified layer if it exists

OlMap.resetFeatureStyle(feature)

Resets a feature and returns the default zone style

OlMap.resetVTLayerStyle()

Reset the vectorTile layer style

PlanActionsScenarii

class PlanActionsScenarii(props)

Ce composant permet de gérer les scénarios des plans d’actions

PlanActionsTrajectoiresCibles

class PlanActionsTrajectoiresCibles(props)

Ce composant permet de définir et d’afficher les trajectoires cibles. Il génère les trajectoires cibles et qui est appelé dans PlanActions.

PlanActionsTrajectoiresCibles.initTrajectoire()

Get the target trajectory from props and do the linear interpolation on it

PlanActionsTrajectoiresCibles.linearInterpolation(knownX, knownY, newX)

Interpolate Y values corresponding to newX depending on known values TODO: also use this function when changing the trajectory

Arguments
  • knownX (Array()) – X coordinates of known values, sorted in ascending order

  • knownY (Array()) – Y coordinates of known values, array of same length as knownX

  • newX (Array()) – X coordinates of wanted values, sorted in ascending order

Renvoie

Array – Calculated Y values, array of same length as newX

PlanActionsTrajectoiresCibles.saveTrajectoiresCibles(reset)

Call props.saveTrajectoiresCible with the right values and parameters

PlanActions

class PlanActions(props)

This component is used to manage action plans and contains all the functionalities of the territorial strategy page.

PlanActions.importFile

Data file to import

PlanActions.activatePCAETintegration()

Toggles the PCAET integration, either from ADEME or TerriSTORY. Reinitializes also target trajectories.

PlanActions.chargerParametresStrategies(tableRow)

Callback to update a table

Arguments
  • tableRow (json()) – : current line

PlanActions.exportResults(e)

Export the results inside an excel file from backend

PlanActions.getCheckedActionsCoeffs()

Get the actions coeffs from actions checked in local state element.

Renvoie

an object of checked actions

PlanActions.loadParams(actionsScenario, params, advanced, trajectoires, zone_type, zone_id, description, titre, url)

Load param when the user select a specific scenario, and change display to planActions

Arguments
  • actionsScenario (array()) – the scenario of actions

  • params (array()) – the params used

  • advanced (array()) – the advanced params used

  • trajectoires (array()) – the trajectories used

  • zone_type (string()) – the type of zone

  • zone_id (string()) – the zone ID

  • description (string()) – the description of current plan

  • titre (string()) – the title of current plan

  • url (string()) – the url to use to load data

PlanActions.loadSavedActions()

Load the saved actions

PlanActions.resetCoeffs(e)

Reset all coeffs to default values.

Arguments
  • e (event()) – the event triggered

Renvoie

if the user doesn’t confirm, exits

PlanActions.resetTargetTrajectories(e)

Reset target trajectories.

Arguments
  • e (event()) – the event triggered

Renvoie

if the user doesn’t confirm, exits

PlanActions.saveCanvasAsPng(ref)

Save as png the canvas containing the image

Arguments
  • ref (string()) – the ref to use

PlanActions.tooltipTotal(infos)

Display a customized total tooltip text.

Arguments
  • infos (array()) – the data to display

Renvoie

the string to display in the tooltip

PoiMap

class PoiMap(props)

Small map representing installations, present in a dashboard. The id_analysis prop must correspond to an existing POI theme.

PoiMap.buildLegend(displayedLayers)

Builds the legend with which we can select or delete modalities in the data to be displayed using checkboxes, from modalities by themes.

PoiMap.filterLegend(event, layerName)

Add or remove a layer from displayed ones Triggered when a checkbox associated with a layer is checked

Profile

class Profile(props)

This component manages the profile of the connected user

Profile.modeAjoutMiseAJourObjectifs

Updates the state of the component with a parameter that defines whether to launch the AjoutObjectif component to add an objective or to update one.

Profile.updateTabDataDidacticFile

Update of the index of the tab to open for the data didactic file (list or edition)

Profile.updateTabDataSource

Update of the index of the tab to open for the data sources logo (list or edition)

Profile.updateTabEquipements

Mise à jour de l’index de l’onglet à ouvrir pour les équipements (liste ou édition)

Profile.updateTabIndicateur

Updates index of tab to open for indicators in edition mode

RegionSelect

class RegionSelect(props)

This component is used to manage the selection page for the different regions

Reset

class Reset()

This component is used to reset the display information

SelectionObjet

ZoneSelect(props)

Select a zone from the list given by parentApi.controllers.zonesManager, for any usage. The onSelect callback is called each time a valid zone (type+maille+id) is selected by the user.

This component uses the triplet {zoneType: str, zoneMaille: str, zoneId: str}, not the old format {zone: {zone: str, maille: str}, zoneId: str}.

Arguments
  • props (Object()) –

  • props.zoneType (string()) – Type of default selected zone

  • props.zoneMaille (string()) – Type of default selected maille

  • props.zoneId (string()) – Id of default selected zone

  • props.title (string()) – Title of the selector. Default « Territoire ». Set to «  » to disable

  • props.className (string()) – Additional classNames for styling

  • props.parentApi (Object()) –

Renvoie

JSX.Element

MainZoneSelect()

Selection component for the main zone: parentApi.data.zone/parentApi.data.currentZone. Override className and containerClassName to change the style; else the main map style will be used (absolute position at top center).

class VisualizationSelect()

This component is used to select an indicator and its display in dashboards.

VisualizationSelect.VisualizationSelect
VisualizationSelect.obtenirTypeObjetApresChangement

Met à jour l’état du composant à partir de l’objet sélectionné

VisualizationSelect.outilDeSelection(l)

Retourne un composant React autocomplete qui permet de sélectionner un objet et intègre une fonctionnalité de filtre

Arguments
  • l (Liste()) – : liste des choix possibles pour le deuxième menu déroulant Exemple : { 0: Object { code: 1, nom: « Diagramme circulaire » } 1: Object { code: 2, nom: « Courbes empilées » } }

VisualizationSelect.selectionTypeObjet(listeObjetsPremiereSelection)

Cette fonction retourne la liste des balises html <option> à ajouter au premier menu déroulant de sélection d’objet

Arguments
  • listeObjetsPremiereSelection (Liste()) – : liste des objets à ajouter au menu déroulant et à intégrer dans des balises <option> exemple : { 0: Object { id: 1, nom: « Consommation d’énergie », data: « conso_energetique », … } }

Settings

class Settings(callback)

This component is used to get the configurations of all regions form the regions configuration table.

Settings.fetchConfiguration(callback)

Calls the API to get the list of available regions.

Arguments
  • callback (callable()) – function called at the end of the treatment of available regions.

Subscribe

class Subscribe(props)

This component is used to register a new user

SuiviEnergetique

class SuiviEnergetique(props)

This component is used to display energy consumption and production tracking graphs

SuiviEnergetique.getPdfSaveButtons(id_analysis, ref, nom)

factorizes the creation of the Save graphic, export and PDF methodo buttons

Arguments
  • id_analysis (*()) – : the id of the current indicator, used to find the name of PDF methodo

  • ref (*()) – : the reference of the part of the code to export

  • nom (*()) – : the name used to save the exported graph

Support

class Support(props)

This component is used to display the Support page

DashboardShow

class DashboardShow(props)

Ce composant permet d’afficher un tableau de bord spécifique.

DashboardShow.builtPoiOrAnalysisUrl(currentZoneType, currentZoneId, currentMaille, analysisOrPoiId, theme, isPoi)

This function returns the url to an analysis or a group of POI

DashboardShow.chargerTableauBord(id_tableau_bord:)
Déclenchée sur événement.

Réinitialise la variable this.props.parentApi.data.tableauBordDonnees selon les données du tableau de bord chargé par un.e utilisateur.rice

Arguments
  • id_tableau_bord: (number()) – identifiant du tableau de bord sélectionné

DashboardShow.componentDidUpdate(prevState:)
Cette fonction est appelé lorsque l’état du composant principal change

elle permet d’appeler la fonction saveAsPDF() et de réinitialiser displayPdfVersion

Arguments
  • prevState: – propriétés du composant principal avant le changement

DashboardShow.displayDashboard(finalGraphs, groups)

Display the full graphs dashboard by listing thematical groups first, and then, inside each group, all territorial graphs.

Arguments
  • finalGraphs (array()) – all graphs to display grouped by territory

  • groups (array()) – all groups of graphs to display

Renvoie

JSX tree

DashboardShow.displayTerritoriesNames(zoneInfos)

Display territory or territories names.

Arguments
  • zoneInfos (str()) – current zone name

Renvoie

JSX tree show territory choice

DashboardShow.displayTerritoryChoice()

Display territory or territories names.

Renvoie

JSX tree show territory choice

DashboardShow.formaterDonneesThematiques(données:)
Formate les données au format attendu par le composant TableauBord (nécessaire à

l’initialisation au chargement de this.props.parentApi.data.tableauBordDonnees)

Arguments
  • données: (object()) – données propre à une thématique enregistrée en base de données La structure de ce paramètre est : { id : identifiant titre : titre identifiant_tableau : identifiant du tableau de bord graphiques : [ { identifiant_analyse : identifiant de l’analyse representation: représentation categories { première catégorie { nom : nom de la catégorie (ex : secteurs, energies, usages, type_prod_enr etc.) titre : titre de la catégorie (ex : Par secteurs, Par filières de production etc.) visible : true si on doit l’afficher false sinon } … } }, … ] }

DashboardShow.getComparedTerritoriesFromUrl()

Filter URL to retrieve territories.

DashboardShow.getComparedTerritoriesToUrl()

Create URL sharing territories comparison.

DashboardShow.getGraphsByGroupOneTerritory(currentZoneType, currentZoneId, currentMaille)
Cette fonction retourne la liste de toutes les lignes au sein desquelles se trouvent tous les indicateurs qui

contiennent les différents graphiques (dans le cas où il y en a plusieurs). Il s’agit d’une liste d’éléments html et composants React que la méthode render restitue. Ils sont organisés de telle manière qu’on peut ensuite les mettre facilement en forme selon la structure que le ou la créateur.rice du tableau de bord a définie.

On parcourt dans cette fonction les données d’un tableau de bord organisées dans un objet de la manière suivante { id : identifiant du tableau de bord à restituer,

titre : titre du tableau de bord à restituer, description : sa description, donnée au moment de sa création, data : date de sa création ou de sa dernière mise à jour. thematiques: [

{

id : identifiant de la thématique titre : titre identifiant_tableau : identifiant du tableau de bord graphiques : [

{

identifiant_analyse : identifiant de l’analyse representation: représentation categories {

première catégories {

nom : nom de la catégorie (ex : secteurs, energies, usages, type_prod_enr etc.) titre : titre de la catégorie (ex : Par secteurs, Par filières de production etc.) visible : true si on doit l’afficher false sinon

}

]

]

}

DashboardShow.handlePdfDownload()

This function allows to change the display value when the user clicks on the « export PDF » button.

DashboardShow.removeTerritory(index)

Remove territory from territorial comparison.

Arguments
  • index (number()) – index of territory to remove

DashboardShow.saveAsPdf(callback)

Saving dashboard as PDF file.

DashboardShow.toggleTerritoryComparison(e)

Handle toggling territory comparison.

Arguments
  • e (object()) – event triggered when toggling switch

DashboardShow.trouverTableauBordARestituer()
Cette fonction retourne les données du tableau de bord sélectionné par l’utilisateur.rice

parmi ses tableaux de bord si elle est connectée et qu’elle en a créé et les tableaux de bord disponibles pour le territoire sélectionné

DashboardShow.updateAnalysisSelectedUnit(newUnit)

Check we changed unit and, if new unit is valid (inside available units) for specific graph, changes unit sent to FabriqueRepresentation.

Arguments
  • newUnit (integer()) – new value for selected unit

DashboardEdition

class DashboardEdition(props)

Permet de générer la structure d’un tableau de bord. Pour tout renseignement sur les fonctions de this.props.parentApi.callbacks, consultez le fichier ../src/index.js

L’enregistrement des données se fait dans la variable this.props.parentApi.data.tableauBordDonnees dont la structure est la suivante : { donnees: {

thematique1{
numero_analyse {

id_analysis (identifiant de l’analyse), representation : representation sélectionnée, categories { (uniquement celles dont la case est cochée)

categorie1 {titre: titre, categorie: nom de la catégorie, visble: true si elle est active false sinon}

}

}

} thematique2: etc.

} metadonnees: {titre: titre du tableau de bord, description: description du tableau de bord} (À préciser par l’utilsiateur.trice) }

DashboardEdition.buttonAddNewIndicator(groupNumber)

Retourne une balise html destinée à ajouter une analyse au tableau de bord

Arguments
  • groupNumber (int()) – : group ID

DashboardEdition.buttonCategoriesSelection(thematique, cle_analyse, categorie)

Ajoute une case à cocher / décocher pour chaque catégorie disponible, qu’on peut choisir - ou non - d’afficher dans le tableau de bord

Arguments
  • cle_analyse (entier()) – : numéro de l’analyse (identifiant incrémental)

DashboardEdition.buttonDeleteGroup(groupNumber)

Ajoute un bouton qui permet lorsqu’on clique dessus, de supprimer une thématique.

Arguments
  • groupNumber (entier()) – : identifiant incrémental de la thématique ou de l’enjeu dans alquelle est située l’analyse

DashboardEdition.buttonNewGroup()

Ajoute un bouton qui permet d’accéder au formulaire de création d’une nouvelle thématique”

DashboardEdition.buttonPublishDashboard(typeTerritoire, codeInseeTerritoire, dashboardId)

Ajoute un bouton associé à l’événement de publication d’un tableau de bord

Arguments
  • dashboardId (entier()) – : identifiant du tableau de bord

DashboardEdition.buttonUpdateDashboard(dashboardId)

Ajoute un bouton associé à l’événement de mise à jour d’un tableau de bord

Arguments
  • dashboardId (entier()) – : identifiant du tableau de bord

DashboardEdition.componentDidUpdate(props, etatComposant)
Lorsqu’un.e utilisateur.rice déclenche un événement et que la fonction render est lancée à nouveau

on met à jour la liste des tableaux de bord qui doivent figurer dans l’onglet « tableaux de bord ». Cette opération est nécessaire notamment lors de la mise à jour ou l’enregistrement d’un nouveau tableau de bord.

DashboardEdition.deleteGroup(groupNumber)
Déclenchée sur événement

Supprimer une thématique.

Arguments
  • groupNumber (entier()) – : Identifiant incrémental de la thématique ou de l’enjeu dans alquelle est située l’analyse

DashboardEdition.editGroupTitle(event, groupNumber)
Déclenchée sur événement (changement de l’état du formulaire où on saisit le titre de la ligne)

Modifie le titre d’une ligne à chaque changement d’état du formulaire modification de la clé (this.props.parentApi.data.tableauBordDonnees.donnees[thematique])

Arguments
  • groupNumber (entier()) – : Identifiant unique de la ligne dont on souhaite modifier le nom

DashboardEdition.formMetadata()
Ajoute le formulaire qui permet de saisir les métadonnées i.e le titre et

la description du tableau de bord.

DashboardEdition.formatDataForSavingDashboard()
Cette fonction structure les données selon les exigences de l’API pour l’enregistrement des tableaux

de bord. Pour rappel, l’enregistrement des tableaux de bord est réalisé dans deux tables : l’une contient les métadonnées (titre description, identifiant unique, auteur.rice), et une autre qui contient les données relatives aux lignes (identifiant, identifiant du tableau de bord auquel elles appartiennent, liste des indicateurs et de leurs représentations)

DashboardEdition.increaseDataSizeForSVG(tailleSVG, tailleData, imageSVG, groupNumber, representation, id_analysis, a)

Cette fonction permet de augmenter la taille de la donnée - représentation SVG

DashboardEdition.increaseSVGIconSize(tailleSVG, tailleData, imageSVG, groupNumber, representation, id_analysis, a)

Cette fonction permet de augmenter la taille de l’icon SVG - représentation SVG

DashboardEdition.insertIndicatorDeleteButton(groupNumber, cle_analyse)

Ajoute un bouton qui permet de créer une thématique aux données du tableau de bord

Arguments
  • groupNumber (entier()) – : identifiant incrémental de la thématique ou de l’enjeu dans alquelle est située l’analyse

  • cle_analyse (entier()) – : numéro de lo’analyse (identifiant incrémental)

DashboardEdition.maxAnalysisNumber()
Retourne le numéro d’un indicateur dont la valeur est maximale afin d’éviter que l’ajout d’un nouvel

indicateur en écrase un qui existe déjà (il faut à tout prix que ce numéro d’indicateur soit discriminant)

DashboardEdition.moveGroup(groupNumber, mouvement)

déplace une thématique vers le haut ou vers le bas

Arguments
  • groupNumber (integer()) – le numéro de la thématique qui se déplace

  • mouvement (up|down()) – le mouvement (up|down)

DashboardEdition.publishDashboard(typeTerritoire, codeInseeTerritoire, dashboardId)

Affecte un type de territoire et / ou territoire à un tableau de bord en base de données

Arguments
  • dashboardId (entier()) – : identifiant du tableau de bord

DashboardEdition.reduceDataSizeForSVG(tailleSVG, tailleData, imageSVG, groupNumber, representation, id_analysis, a)

Cette fonction permet de reduire la taille de la donnée - représentation SVG

DashboardEdition.reduceSVGIconSize(tailleSVG, tailleData, imageSVG, groupNumber, representation, id_analysis, a)

Cette fonction permet de reduire la taille de l’icon SVG - représentation SVG

DashboardEdition.removeIndicator(groupNumber, cle_analyse)
Déclenchée sur événement

Supprime une thématique aux données du tableau de bord

Arguments
  • groupNumber (entier()) – : Identifiant incrémental de la thématique ou de l’enjeu dans alquelle est située l’analyse

  • cle_analyse (entier()) – : numéro de lo’analyse (identifiant incrémental)

DashboardEdition.saveDashboard(mise_a_jour)
Déclenchée sur événement

Ajoute les métadonnées {titre: titre du tableau de bord, description: description du tableau de bord} aux donneés du tableau de bord.

Arguments
  • mise_a_jour (booléen()) – : Vrai si cet enregistrement fait suite à une suppression (c’est donc une mise à jour)

DashboardEdition.showChart()
Si une analyse et la représentation associée ont été sélectionnées, cette méthode retourne un composant constitué par :
  • La liste des catégories accompagnées d’une case à cocher pour lesquelles on décide ou non d’afficher le graphique

  • Les graphiques instanciés en fonction de la representation par le composant FabriqueRepresentation.

Nous rappelons ici le format des données de la variable this.props.parentApi.data.tableauBordDonnees (disponible dans la documentation de ce comoposant) très souvent sollicitée {

donnees: {
thematique1{
numero_analyse {

id_analysis (identifiant de l’analyse), representation : representation sélectionnée, categories {

categorie1 {titre: titre, categorie: nom de la catégorie, visible: true si la catégorie doit s’afficher false sinon}

}

}

} thematique2: etc.

} metadonnees: {titre: titre du tableau de bord, description: description du tableau de bord} (À préciser par l’utilsiateur.trice)

}

DashboardEdition.toggleCategoriesSelectionForIndicator(groupNumber:, cle_analyse, categorie)
Déclenchée sur événement

Supprime une catégorie aux données du tableau de bord

Arguments
  • groupNumber: (entier()) – Identifiant incrémental de la thématique ou de l’enjeu dans alquelle est située l’analyse

  • cle_analyse (entier()) – : numéro de lo’analyse (identifiant incrémental)

DashboardEdition.updateDashboard(dashboardId)
Déclenchée sur événement

Met à jour un tableau de bord

Arguments
  • dashboardId (entier()) – : identifiant en base du tableau de bord que l’on veut mettre à jour

DashboardEdition.updateIndicatorsNumbersInGroups(groupNumber, newObjectType)
Déclenchée sur événement

Cette fonction sert à mettre à jour le nombre d’indicateurs que comprend une thématique du tableau de bord.

Arguments
  • groupNumber (int()) – : group ID

  • newObjectType (mixed()) – : object type (default: undefined)

DashboardEdition.updateNumbersGroups(nombreThematiques)
Déclenchée sur appel de la fonction ajouterThematique elle-même déclenchée sur événement

Ajoute une thématique aux données du tableau de bord

TerritoiresManage

class TerritoiresManage(props)

Gestion des données des indicateurs

TerritoiresManage.onFichierDataSelection

Fichier de données à importer

TerritoiresManage.resetActions

Remise à l’état initial des actions

TerritoiresManage.ajouterDonnees(nom)

Intégration des données associées aux mailles territoriales sous la forme d’une table située en base de données au sein du schéma régional

TerritoiresManage.componentDidUpdate(props, state)

Cette fonction est déclenchée dès que le composant est sollicité d’une quelconque manière. Ici, si l’état du composant est différent de son état avant la mise à jour, on relance la methode render.

TerritoiresManage.lancerMiseAJourMaillagesTerritoire()

Lance la procédure de mise à jour partielle concernant les tables territoriales des schémas régionaux comme occitanie.epci, occitanie.petr ou encore auvergne_rhone_aleps.teposcv

TerritoiresManage.lancerMiseAJourTerritoire()

Lance la procédure de mise à jour / crétion de l’ensemble des données associées aux territoires c’est-à-dire - Les tables territoriales des schémas régionaux comme occitanie.epci, occitanie.petr ou encore auvergne_rhone_aleps.teposcv - Les tables des communes, epci et départements de France indispensables au fonctionnement de l’indicateur « migrations pendulaires »

TerritoiresManage.mettreAJourDonnee(tableRow)

Callback pour la mise à jour d’une table

Arguments
  • tableRow (json()) – : ligne courante

TerritoiresManage.mettreAJourTableTerritoire(url)

Déclenchée sur événement, Lance la mise à jour de la table des territoires.

TerritoiresManage.obtenirListeDonneesGeoObligatoires(region)

Met à jour l’état du composant avec la liste des tables de données géographiques On dispose pour la table des communes IGN sur toutes les France et de la table des territoires, si elle est déjà présente en base ou non.

Arguments
  • region (region()) – : Nom de la région sélectionnée

TerritoiresManage.obtenirListeDonneesObligatoires(region)

Met à jour l’état du composant avec la liste des tables à afficher dans le tableau. On dispose alors de l’information de si cette table est directement lié à un indi- -cateur et de si elle est déjà présente en base de données.

TerritoiresManage.render()

Rendu du composant

Renvoie

dom – le rendu du composant

TerritoiresManage.tableTerritoire(evenement)

Récupère le fichier à partir duquel on met à jour la table des territoires.

Arguments
  • evenement (événement()) – : événement qui permet d’obtenir la liste des fichiers (format shp) sélectionnés

TerritoiresManage.uploadIGNFile(evenement)

Récupère le fichier à partir duquel on met à jour la table des territoires.

Arguments
  • evenement (événement()) – : événement qui permet d’obtenir la liste des fichiers (format shp) sélectionnés

UsersManage

class UsersManage(props)

This component manages the different users with access to the application

UsersManage.getTrProps(state, rowInfo, instance)

getTrProps is used to color the rows of the table according to criteria

Arguments
  • state (json()) – state of the current row

  • rowInfo (json()) – current row info (columns, values)

  • instance (json()) – array instance

Renvoie

json – the style definition for the current row

UsersManage.render()
Renvoie

dom – the rendering of the component