diff --git a/README.md b/README.md index 2af2e1c504bf0ba772f8d8c654ea305d23991c51..1ee1be58002ce74835f77c55d0dded97fcb89c2f 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ and then : - dans _src/app/calculators/ma-calculette_ : Créer _ma-calculette.config.json_ sur le modèle des autres. - Les ids utilisés doivent correspondre au symbole fourni à classe _BaseParam_ (1er paramètre du constructeur) + Les ids utilisés doivent correspondre au symbole fourni à classe _ParamDefinition_ (1er paramètre du constructeur) Ne pas oublier de spécifier : - éventuellement le type de noeud par défaut de la calculette dans les options avec le champ "_defaultNodeType_". Si ce champ est absent, sa valeur est "_ComputeNodeType.None_". Ce champ sert par ex pour les sections paramétrées à déterminer le type de section à afficher lors de la création de la calculette. diff --git a/src/app/components/base-param-input/base-param-input.component.ts b/src/app/components/base-param-input/base-param-input.component.ts index f879a787b01580e72c5b0b0199826001cebc2598..8144f03d7d98e0861c8946980a46b773988e682d 100644 --- a/src/app/components/base-param-input/base-param-input.component.ts +++ b/src/app/components/base-param-input/base-param-input.component.ts @@ -1,19 +1,18 @@ // cf. https://blog.thoughtram.io/angular/2016/07/27/custom-form-controls-in-angular-2.html -import { Component, Input, forwardRef, OnInit, DoCheck, ChangeDetectorRef } from "@angular/core"; -import { ControlValueAccessor, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormControl } from "@angular/forms"; +import { Component, ChangeDetectorRef } from "@angular/core"; -import { BaseParam, NumericalString, Message, ParamDomain, ParamDomainValue, Observable } from "jalhyd"; +import { NumericalString, Message, ParamDefinition, ParamDomain, ParamDomainValue, Observable } from "jalhyd"; -import { InternationalisationService, LanguageCode } from "../../services/internationalisation/internationalisation.service"; +import { InternationalisationService } from "../../services/internationalisation/internationalisation.service"; import { GenericInputComponent } from "../generic-input/generic-input.component"; export class NgBaseParam extends Observable { - private _param: BaseParam; + private _param: ParamDefinition; constructor(symb: string, d: ParamDomain | ParamDomainValue, val: number) { super(); - this._param = new BaseParam(symb, d, val); + this._param = new ParamDefinition(symb, d, val); } public get symbol() { diff --git a/src/app/components/generic-input/generic-input.component.ts b/src/app/components/generic-input/generic-input.component.ts index f392282fbf554d0d9403413e36b4b6a0cfd287be..e5513138b57a21d92d89b82c262a947ab8cfd775 100644 --- a/src/app/components/generic-input/generic-input.component.ts +++ b/src/app/components/generic-input/generic-input.component.ts @@ -360,7 +360,7 @@ export class TestInputComponent extends GenericInputComponent { // exemple où le modèle est une classe dont on ne gère qu'un membre -import { BaseParam } from "jalhyd"; +import { ParamDefinition } from "jalhyd"; @Component({ selector: "test2-input", @@ -376,7 +376,7 @@ export class Test2InputComponent extends GenericInputComponent { } // paramètre géré - private get _param(): BaseParam { + private get _param(): ParamDefinition { return this._model; } diff --git a/src/app/formulaire/ngparam.ts b/src/app/formulaire/ngparam.ts index 3eb725cc73213b47bfb02f8d1474d0b1b897eaf2..50125790a4fd68293ae9ae70ebc2d952eb698f0b 100644 --- a/src/app/formulaire/ngparam.ts +++ b/src/app/formulaire/ngparam.ts @@ -387,7 +387,7 @@ export class NgParameter extends InputField implements Observer { public update(sender: any, data: any) { switch (data["action"]) { - case "baseparamAfterValue": // changement de valeur envoyé par l'objet référencé + case "paramdefinitionAfterValue": // changement de valeur envoyé par l'objet référencé this.notifyValueModified(sender); break; }