@@ -3,8 +3,14 @@ import MetaBindPlugin from './main';
33import { Logger } from './utils/Logger' ;
44import { AbstractInputField } from './inputFields/AbstractInputField' ;
55import { InputFieldFactory } from './inputFields/InputFieldFactory' ;
6- import { InputFieldArgument , InputFieldDeclaration , InputFieldDeclarationParser } from './parsers/InputFieldDeclarationParser' ;
6+ import {
7+ InputFieldArgumentType ,
8+ InputFieldDeclaration ,
9+ InputFieldDeclarationParser
10+ } from './parsers/InputFieldDeclarationParser' ;
711import { MetaBindBindTargetError , MetaBindInternalError } from './utils/Utils' ;
12+ import { AbstractInputFieldArgument } from "./inputFieldArguments/AbstractInputFieldArgument" ;
13+ import { ClassInputFieldArgument } from "./inputFieldArguments/ClassInputFieldArgument" ;
814
915export enum InputFieldMarkdownRenderChildType {
1016 INLINE_CODE_BLOCK ,
@@ -146,15 +152,15 @@ export class InputFieldMarkdownRenderChild extends MarkdownRenderChild {
146152 }
147153 }
148154
149- getArguments ( name : string ) : InputFieldArgument [ ] {
155+ getArguments ( name : InputFieldArgumentType ) : AbstractInputFieldArgument [ ] {
150156 if ( ! this . inputFieldDeclaration ) {
151157 throw new MetaBindInternalError ( 'inputFieldDeclaration is undefined, can not retrieve arguments' ) ;
152158 }
153159
154- return this . inputFieldDeclaration . arguments . filter ( x => x . name === name ) ;
160+ return this . inputFieldDeclaration . argumentContainer . arguments . filter ( x => x . identifier === name ) ;
155161 }
156162
157- getArgument ( name : string ) : InputFieldArgument | undefined {
163+ getArgument ( name : InputFieldArgumentType ) : AbstractInputFieldArgument | undefined {
158164 return this . getArguments ( name ) . at ( 0 ) ;
159165 }
160166
@@ -189,9 +195,9 @@ export class InputFieldMarkdownRenderChild extends MarkdownRenderChild {
189195
190196 this . inputField . render ( container ) ;
191197
192- const classArgument = this . getArguments ( 'class' ) ;
193- if ( classArgument ) {
194- this . inputField . getHtmlElement ( ) . addClasses ( classArgument . map ( x => x . value ) ) ;
198+ const classArguments : ClassInputFieldArgument [ ] = this . getArguments ( InputFieldArgumentType . CLASS ) ;
199+ if ( classArguments ) {
200+ this . inputField . getHtmlElement ( ) . addClasses ( classArguments . map ( x => x . value ) . flat ( ) ) ;
195201 }
196202
197203
0 commit comments