1- {{ #if  (has-block }} 
2-   <this .labelComponent
3-     @label ={{ @label }} 
4-     @required ={{ this.required }} 
5-     @isValid ={{ this.isValid }} 
6-     @isInvalid ={{ this.isInvalid }} 
7-     @inputId ={{ this.inputId }} 
8-   />
9- 
10-   {{ yield 
11-     (hash 
12-       value =this._val 
13-       update =this.update 
14-       setDirty =this.setDirty 
15-       model =model 
16-       name =name 
17-       inputId =this.inputId 
18-       isValid =this.isValid 
19-       isInvalid =this.isInvalid 
1+ {{ #let 
2+   (component 
3+     (ensure-safe-component 
4+       (or labelComponent component " validated-input/label" 
205    )
21-   }} 
22- 
23-   {{ #if  @hint }} 
24-     <this .hintComponent @hint ={{ @hint }}  id ={{ this.hintId }}  />
25-   {{ /if }} 
6+     label =label 
7+     required =this.required 
8+     isValid =this.isValid 
9+     isInvalid =this.isInvalid 
10+     inputId =this.inputId 
11+   )
12+   (component 
13+     (ensure-safe-component 
14+       (or errorComponent component " validated-input/error" 
15+     )
16+     errors =this.errors 
17+     id =this.errorId 
18+   )
19+   (component 
20+     (ensure-safe-component 
21+       (or hintComponent component " validated-input/hint" 
22+     )
23+     hint =hint 
24+     id =this.hintId 
25+   )
26+   as LabelComponent ErrorComponent HintComponent 
27+ }} 
28+   {{ #if  (has-block }} 
29+     <LabelComponent  />
2630
27-   {{ #if  (and this.showValidity this.errors }} 
28-     <this .errorComponent @errors ={{ this.errors }}  id ={{ this.errorId }}  />
29-   {{ /if }} 
30- {{ else }} 
31-   <this .renderComponent
32-     @type ={{ this.type }} 
33-     @value ={{ this._val }} 
34-     @inputId ={{ this.inputId }} 
35-     @options ={{ @options }} 
36-     @name ={{ @name }} 
37-     @inputName ={{ @inputName }} 
38-     @disabled ={{ @disabled }} 
39-     @autofocus ={{ @autofocus }} 
40-     @autocomplete ={{ @autocomplete }} 
41-     @rows ={{ @rows }} 
42-     @cols ={{ @cols }} 
43-     @model ={{ @model }} 
44-     @isValid ={{ this.isValid }} 
45-     @isInvalid ={{ this.isInvalid }} 
46-     @placeholder ={{ @placeholder }} 
47-     @class ={{ @class }} 
48-     @prompt ={{ @prompt }} 
49-     @promptIsSelectable ={{ @promptIsSelectable }} 
50-     @optionLabelPath ={{ @optionLabelPath }} 
51-     @optionValuePath ={{ @optionValuePath }} 
52-     @optionTargetPath ={{ @optionTargetPath }} 
53-     @multiple ={{ @multiple }} 
54-     @update ={{ this.update }} 
55-     @setDirty ={{ this.setDirty }} 
56-     @submitted ={{ @submitted }} 
57-     @labelComponent ={{ component 
58-       (ensure-safe-component this.labelComponent 
59-       label =label 
60-       required =required 
61-       isValid =this.isValid 
62-       isInvalid =this.isInvalid 
63-       inputId =this.inputId 
64-     }} 
65-     @hintComponent ={{ if 
66-       @hint 
67-       (component 
68-         (ensure-safe-component this.hintComponent hint =hint id =this.hintId 
31+     {{ yield 
32+       (hash 
33+         value =this._val 
34+         update =this.update 
35+         setDirty =this.setDirty 
36+         model =model 
37+         name =name 
38+         inputId =this.inputId 
39+         isValid =this.isValid 
40+         isInvalid =this.isInvalid 
6941      )
7042    }} 
71-     @errorComponent ={{ if 
72-       (and this.showValidity this.errors 
43+ 
44+     {{ #if  @hint }} 
45+       <HintComponent  />
46+     {{ /if }} 
47+ 
48+     {{ #if  (and this.showValidity this.errors }} 
49+       <ErrorComponent  />
50+     {{ /if }} 
51+   {{ else }} 
52+     {{ #let 
7353      (component 
74-         (ensure-safe-component this.errorComponent 
75-         errors =this.errors 
76-         id =this.errorId 
54+         (ensure-safe-component 
55+           (or renderComponent component " validated-input/render" 
56+         )
57+         type =this.type 
58+         value =this._val 
59+         inputId =this.inputId 
60+         options =options 
61+         name =name 
62+         inputName =inputName 
63+         disabled =disabled 
64+         autofocus =autofocus 
65+         autocomplete =autocomplete 
66+         rows =rows 
67+         cols =cols 
68+         model =model 
69+         isValid =this.isValid 
70+         isInvalid =this.isInvalid 
71+         placeholder =placeholder 
72+         class =class 
73+         prompt =prompt 
74+         promptIsSelectable =promptIsSelectable 
75+         optionLabelPath =optionLabelPath 
76+         optionValuePath =optionValuePath 
77+         optionTargetPath =optionTargetPath 
78+         multiple =multiple 
79+         update =this.update 
80+         setDirty =this.setDirty 
81+         submitted =submitted 
82+         labelComponent =LabelComponent 
83+         hintComponent =if hint HintComponent 
84+         errorComponent =if and this.showValidity this.errors ErrorComponent 
7785      )
86+       as RenderComponent 
7887    }} 
79-     aria-invalid ={{ if  this.isInvalid " true" }} 
80-     aria-describedby ={{ if  this.isInvalid this.errorId this.hintId }} 
81-     ...attributes
82-   />
83- {{ /if }} 
88+       <RenderComponent 
89+         aria-invalid ={{ if  this.isInvalid " true" }} 
90+         aria-describedby ={{ if  this.isInvalid this.errorId this.hintId }} 
91+         ...attributes
92+       />
93+     {{ /let }} 
94+   {{ /if }} 
95+ {{ /let }} 
0 commit comments