Skip to content
Snippets Groups Projects
Select Git revision
  • 55c8c7103614356cd8b88bb0081453be33061491
  • master default protected
  • doc-script-gen-off-tests
  • 366-signe-a-cote-du-droit-en-vigueur-sur-l-ui-pour-indiquer-que-la-reforme-a-eu-lieu-mais-qu-elle-n
  • revalo_retraites
  • 381-pb-affichage-labels-des-parametres-sur-plus-de-3-lignes
  • ajoute-duplicate-aide-logement
  • poc_castype_ia
  • parametres-editables-budget
  • ui-parametres
  • 355-les-dispositifs-prestations-sociales-du-graphique-se-cachent-montrent-en-meme-temps-2
  • 358-les-variables-dont-le-montant-est-nul-apparaissent-en-bleu-et-non-cliquables
  • 356-ajuster-la-largeur-sur-les-graphiques-budgetaires
  • incoherence_cas_type_0
  • fix-ui-suppression-tranches-baremes
  • ajout-agregat-cehr-version-plf
  • impact_carbone
  • xlsx
  • header_revamp
  • 270-concevoir-la-page-d-accueil-leximpact
  • 219-conversion-des-montants-min-et-max-de-l-axe-des-x-en-smic
  • 0.0.1177
  • 0.0.1176
  • 0.0.1175
  • 0.0.1174
  • 0.0.1173
  • 0.0.1172
  • 0.0.1171
  • 0.0.1170
  • 0.0.1169
  • 0.0.1168
  • 0.0.1167
  • 0.0.1166
  • 0.0.1165
  • 0.0.1164
  • 0.0.1163
  • 0.0.1162
  • 0.0.1161
  • 0.0.1160
  • 0.0.1159
  • 0.0.1158
41 results

BracketEdit.svelte

Blame
  • parameters.ts 1.61 KiB
    export type AnyParameter = Parameter | ParameterNode | Scale
    
    export interface Parameter extends ParameterBase {
      class: ParameterClass.Parameter
      values: ParameterAtInstant[]
    }
    
    export interface ParameterAtInstant {
      instant: string
      name: string
      source?: string
      unit?: Unit
      value: number | string | string[]
    }
    
    export interface ParameterBase {
      class: ParameterClass
      description?: string
      documentation?: string
      id: string // Generated attribute (last part of name)
      name: string
      parent?: ParameterNode // Generated attribute
      reference?: string | string[] | { [instant: string]: string | string[] }
      referring_variables?: string[]
      source?: string
      title: string // Generated attribute constructed using description or name
      titles: string // Generated attribute aggregating the titles of every ancestors
      unit?: Unit
    }
    
    export enum ParameterClass {
      Node = "Node",
      Parameter = "Parameter",
      Scale = "Scale",
    }
    
    export interface ParameterNode extends ParameterBase {
      children: { [id: string]: AnyParameter }
      class: ParameterClass.Node
    }
    
    export interface Scale extends ParameterBase {
      brackets: { [instant: string]: { [threshold: string]: number | null } | null }
      class: ParameterClass.Scale
      rate_unit?: Unit.Rate
      threshold_unit?: Unit.Currency
      type: ScaleType
    }
    
    export enum ScaleType {
      MarginalRate = "marginal_rate",
      SingleAmount = "single_amount",
    }
    
    export enum Unit {
      CodesDepartements = "codes départements",
      CountryCode = "ISO 3166-1 alpha-2", // Two-letters code of a country
      Currency = "currency",
      Month = "month",
      Rate = "/1", // Number between 0 and 1
      Year = "year",
    }