@ember-eui/validated-form 5.14.6 → 5.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -142,6 +142,16 @@
|
|
|
142
142
|
formId=formId
|
|
143
143
|
disabled=@isDisabled
|
|
144
144
|
)
|
|
145
|
+
FieldNestedForm=(component
|
|
146
|
+
"validated-form"
|
|
147
|
+
register=this.register
|
|
148
|
+
unregister=this.unregister
|
|
149
|
+
formHasBeenValidated=this.formHasBeenValidated
|
|
150
|
+
onValidityChange=this.onChildValidityChange
|
|
151
|
+
fullWidth=@fullWidth
|
|
152
|
+
formId=formId
|
|
153
|
+
disabled=@isDisabled
|
|
154
|
+
)
|
|
145
155
|
)
|
|
146
156
|
}}
|
|
147
157
|
</EuiForm>
|
|
@@ -13,6 +13,16 @@ export default class ValidatedForm extends Component {
|
|
|
13
13
|
@tracked isInvalid = false;
|
|
14
14
|
@tracked isTouched = false;
|
|
15
15
|
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.args.register?.(this);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
willDestroy() {
|
|
22
|
+
super.willDestroy(...arguments);
|
|
23
|
+
this.args.unregister?.(this);
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
get isValid() {
|
|
17
27
|
return !this.isInvalid;
|
|
18
28
|
}
|
|
@@ -133,6 +133,14 @@ ember-valitador validator, <EuiCode>length</EuiCode>, <EuiCode>presence</EuiCode
|
|
|
133
133
|
@label='Field must be true'
|
|
134
134
|
@onChange={{set this.data 'fieldSwitch'}}
|
|
135
135
|
/>
|
|
136
|
+
<Form.FieldNestedForm as |NestedForm|>
|
|
137
|
+
<NestedForm.FieldText
|
|
138
|
+
@validations={{hash presence=(hash presence=true)}}
|
|
139
|
+
@label='Nested form field text'
|
|
140
|
+
@value={{this.data.nestedFormFieldText}}
|
|
141
|
+
@onChange={{set this.data 'nestedFormFieldText'}}
|
|
142
|
+
/>
|
|
143
|
+
</Form.FieldNestedForm>
|
|
136
144
|
<EuiButton @type='submit'>
|
|
137
145
|
Submit
|
|
138
146
|
</EuiButton>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/validated-form",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.15.1",
|
|
4
4
|
"description": "The default blueprint for ember-cli addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"postpack": "ember ts:clean"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@ember-eui/core": "^5.
|
|
31
|
+
"@ember-eui/core": "^5.15.1",
|
|
32
32
|
"ember-cli-babel": "^7.26.11",
|
|
33
33
|
"ember-cli-htmlbars": "^6.0.1",
|
|
34
34
|
"ember-cli-typescript": "4.2.1",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"volta": {
|
|
116
116
|
"extends": "../../package.json"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "557764dea53e6451c9b229f0dca78ada9c76507c"
|
|
119
119
|
}
|