11import { Inject } from '@angular/core' ;
22import { FormFieldModel } from '../models/form-field.model' ;
33import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model' ;
4- import {
5- DynamicFormControlLayout ,
6- DynamicInputModel ,
7- DynamicInputModelConfig
8- } from '@ng-dynamic-forms/core' ;
4+ import { DynamicFormControlLayout , } from '@ng-dynamic-forms/core' ;
95import {
106 CONCAT_FIRST_INPUT_SUFFIX ,
117 CONCAT_GROUP_SUFFIX ,
@@ -22,6 +18,7 @@ import {
2218 PARSER_OPTIONS ,
2319 SUBMISSION_ID
2420} from './field-parser' ;
21+ import { DsDynamicInputModel , DsDynamicInputModelConfig } from '../ds-dynamic-form-ui/models/ds-dynamic-input.model' ;
2522
2623export class ConcatFieldParser extends FieldParser {
2724
@@ -58,21 +55,24 @@ export class ConcatFieldParser extends FieldParser {
5855 concatGroup . group = [ ] ;
5956 concatGroup . separator = this . separator ;
6057
61- const input1ModelConfig : DynamicInputModelConfig = this . initModel (
58+ const input1ModelConfig : DsDynamicInputModelConfig = this . initModel (
6259 id + CONCAT_FIRST_INPUT_SUFFIX ,
6360 false ,
6461 true ,
6562 true ,
6663 false
6764 ) ;
68- const input2ModelConfig : DynamicInputModelConfig = this . initModel (
65+ const input2ModelConfig : DsDynamicInputModelConfig = this . initModel (
6966 id + CONCAT_SECOND_INPUT_SUFFIX ,
7067 false ,
7168 true ,
7269 true ,
7370 false
7471 ) ;
7572
73+ input1ModelConfig . hideRequiredHint = true ;
74+ input2ModelConfig . hideRequiredHint = true ;
75+
7676 if ( hasNoValue ( concatGroup . hint ) && hasValue ( input1ModelConfig . hint ) && hasNoValue ( input2ModelConfig . hint ) ) {
7777 concatGroup . hint = input1ModelConfig . hint ;
7878 input1ModelConfig . hint = undefined ;
@@ -98,8 +98,8 @@ export class ConcatFieldParser extends FieldParser {
9898 input2ModelConfig . placeholder = placeholder [ 1 ] ;
9999 }
100100
101- const model1 = new DynamicInputModel ( input1ModelConfig , clsInput ) ;
102- const model2 = new DynamicInputModel ( input2ModelConfig , clsInput ) ;
101+ const model1 = new DsDynamicInputModel ( input1ModelConfig , clsInput ) ;
102+ const model2 = new DsDynamicInputModel ( input2ModelConfig , clsInput ) ;
103103 concatGroup . group . push ( model1 ) ;
104104 concatGroup . group . push ( model2 ) ;
105105
0 commit comments