ember-validated-form 4.0.1 → 5.1.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.
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -1
- package/.github/dependabot.yml +11 -0
- package/.github/workflows/deploy.yml +2 -2
- package/.github/workflows/test.yml +3 -3
- package/.husky/commit-msg +6 -0
- package/.husky/pre-commit +8 -0
- package/CHANGELOG.md +40 -0
- package/README.md +3 -3
- package/addon/-private/themed-component.js +31 -35
- package/addon/components/validated-button/-themes/bootstrap/button.js +7 -9
- package/addon/components/validated-button/-themes/uikit/button.js +7 -9
- package/addon/components/validated-button/button.hbs +9 -0
- package/addon/components/validated-button/button.js +3 -8
- package/addon/components/validated-button.hbs +17 -0
- package/addon/components/validated-button.js +53 -9
- package/addon/components/validated-form.hbs +28 -0
- package/addon/components/validated-form.js +36 -45
- package/addon/components/validated-input/-themes/bootstrap/error.js +3 -3
- package/addon/components/validated-input/-themes/bootstrap/hint.js +3 -3
- package/addon/components/validated-input/-themes/bootstrap/label.js +1 -1
- package/addon/components/validated-input/-themes/bootstrap/render.js +3 -3
- package/addon/components/validated-input/-themes/uikit/error.hbs +4 -0
- package/addon/components/validated-input/-themes/uikit/error.js +1 -4
- package/addon/components/validated-input/-themes/uikit/hint.js +3 -3
- package/addon/components/validated-input/-themes/uikit/label.js +3 -3
- package/addon/components/validated-input/-themes/uikit/render.hbs +110 -0
- package/addon/components/validated-input/-themes/uikit/render.js +3 -5
- package/addon/components/validated-input/error.hbs +1 -0
- package/addon/components/validated-input/error.js +6 -7
- package/addon/components/validated-input/hint.hbs +1 -0
- package/addon/components/validated-input/hint.js +3 -7
- package/addon/components/validated-input/label.hbs +3 -0
- package/addon/components/validated-input/label.js +3 -8
- package/addon/components/validated-input/render.hbs +108 -0
- package/addon/components/validated-input/render.js +10 -10
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs +19 -0
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.js +3 -0
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox.hbs +14 -0
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox.js +1 -6
- package/addon/components/validated-input/types/-themes/bootstrap/input.js +11 -4
- package/addon/components/validated-input/types/-themes/bootstrap/radio-group.hbs +20 -0
- package/addon/components/validated-input/types/-themes/bootstrap/radio-group.js +1 -4
- package/addon/components/validated-input/types/-themes/bootstrap/select.js +11 -4
- package/addon/components/validated-input/types/-themes/bootstrap/textarea.js +11 -4
- package/addon/components/validated-input/types/-themes/uikit/checkbox-group.hbs +19 -0
- package/addon/components/validated-input/types/-themes/uikit/checkbox-group.js +3 -0
- package/addon/components/validated-input/types/-themes/uikit/checkbox.hbs +15 -0
- package/addon/components/validated-input/types/-themes/uikit/checkbox.js +1 -4
- package/addon/components/validated-input/types/-themes/uikit/input.js +11 -4
- package/addon/components/validated-input/types/-themes/uikit/radio-group.hbs +20 -0
- package/addon/components/validated-input/types/-themes/uikit/radio-group.js +1 -4
- package/addon/components/validated-input/types/-themes/uikit/select.js +11 -4
- package/addon/components/validated-input/types/-themes/uikit/textarea.js +11 -4
- package/addon/components/validated-input/types/checkbox-group.hbs +14 -0
- package/addon/components/validated-input/types/checkbox-group.js +21 -0
- package/addon/components/validated-input/types/checkbox.hbs +9 -0
- package/addon/components/validated-input/types/checkbox.js +10 -6
- package/addon/components/validated-input/types/input.hbs +6 -0
- package/addon/components/validated-input/types/input.js +9 -17
- package/addon/components/validated-input/types/radio-group.hbs +14 -0
- package/addon/components/validated-input/types/radio-group.js +10 -6
- package/addon/components/validated-input/types/select.hbs +72 -0
- package/addon/components/validated-input/types/select.js +118 -6
- package/addon/components/validated-input/types/textarea.hbs +7 -0
- package/addon/components/validated-input/types/textarea.js +9 -17
- package/addon/{templates/components → components}/validated-input.hbs +3 -5
- package/addon/components/validated-input.js +3 -12
- package/app/components/validated-form.js +1 -7
- package/app/components/validated-input/types/-themes/bootstrap/checkbox-group.js +1 -0
- package/app/components/validated-input/types/-themes/uikit/checkbox-group.js +1 -0
- package/app/components/validated-input/types/checkbox-group.js +1 -0
- package/config/environment.js +1 -1
- package/package.json +56 -40
- package/.dependabot/config.yml +0 -14
- package/.husky/precommit +0 -1
- package/.prettierignore +0 -1
- package/addon/templates/components/validated-button/button.hbs +0 -1
- package/addon/templates/components/validated-button.hbs +0 -7
- package/addon/templates/components/validated-form.hbs +0 -15
- package/addon/templates/components/validated-input/-themes/uikit/render.hbs +0 -94
- package/addon/templates/components/validated-input/error.hbs +0 -1
- package/addon/templates/components/validated-input/hint.hbs +0 -1
- package/addon/templates/components/validated-input/label.hbs +0 -1
- package/addon/templates/components/validated-input/render.hbs +0 -93
- package/addon/templates/components/validated-input/types/-themes/bootstrap/checkbox.hbs +0 -10
- package/addon/templates/components/validated-input/types/-themes/bootstrap/radio-group.hbs +0 -15
- package/addon/templates/components/validated-input/types/-themes/bootstrap/select.hbs +0 -16
- package/addon/templates/components/validated-input/types/-themes/uikit/checkbox.hbs +0 -11
- package/addon/templates/components/validated-input/types/-themes/uikit/radio-group.hbs +0 -17
- package/addon/templates/components/validated-input/types/-themes/uikit/select.hbs +0 -17
- package/addon/templates/components/validated-input/types/checkbox.hbs +0 -9
- package/addon/templates/components/validated-input/types/radio-group.hbs +0 -14
- package/addon/templates/components/validated-input/types/select.hbs +0 -16
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
{{#unless (eq type "checkbox")}}
|
|
2
|
-
{{component labelComponent}}
|
|
3
|
-
{{/unless}}
|
|
4
|
-
|
|
5
|
-
<div class="uk-form-controls">
|
|
6
|
-
{{#if (eq type "select")}}
|
|
7
|
-
{{component selectComponent
|
|
8
|
-
disabled=disabled
|
|
9
|
-
name=(or inputName name)
|
|
10
|
-
optionLabelPath=optionLabelPath
|
|
11
|
-
optionValuePath=optionValuePath
|
|
12
|
-
optionTargetPath=optionTargetPath
|
|
13
|
-
includeBlank=includeBlank
|
|
14
|
-
multiple=multiple
|
|
15
|
-
value=value
|
|
16
|
-
options=options
|
|
17
|
-
inputId=inputId
|
|
18
|
-
|
|
19
|
-
isValid=isValid
|
|
20
|
-
isInvalid=isInvalid
|
|
21
|
-
|
|
22
|
-
update=update
|
|
23
|
-
setDirty=setDirty
|
|
24
|
-
}}
|
|
25
|
-
{{else if (or (eq type "radioGroup") (eq type "radio-group"))}}
|
|
26
|
-
{{component radioGroupComponent
|
|
27
|
-
value=value
|
|
28
|
-
options=options
|
|
29
|
-
inputId=inputId
|
|
30
|
-
name=(or inputName name)
|
|
31
|
-
disabled=disabled
|
|
32
|
-
|
|
33
|
-
isValid=isValid
|
|
34
|
-
isInvalid=isInvalid
|
|
35
|
-
|
|
36
|
-
update=update
|
|
37
|
-
setDirty=setDirty
|
|
38
|
-
}}
|
|
39
|
-
{{else if (eq type "checkbox")}}
|
|
40
|
-
{{component checkboxComponent
|
|
41
|
-
value=value
|
|
42
|
-
options=options
|
|
43
|
-
inputId=inputId
|
|
44
|
-
name=(or inputName name)
|
|
45
|
-
disabled=disabled
|
|
46
|
-
|
|
47
|
-
isValid=isValid
|
|
48
|
-
isInvalid=isInvalid
|
|
49
|
-
|
|
50
|
-
update=update
|
|
51
|
-
setDirty=setDirty
|
|
52
|
-
|
|
53
|
-
labelComponent=labelComponent
|
|
54
|
-
}}
|
|
55
|
-
{{else if (eq type "textarea")}}
|
|
56
|
-
{{component textareaComponent
|
|
57
|
-
inputId=inputId
|
|
58
|
-
name=(or inputName name)
|
|
59
|
-
value=value
|
|
60
|
-
placeholder=placeholder
|
|
61
|
-
disabled=disabled
|
|
62
|
-
autofocus=autofocus
|
|
63
|
-
autocomplete=autocomplete
|
|
64
|
-
rows=rows
|
|
65
|
-
cols=cols
|
|
66
|
-
|
|
67
|
-
isValid=isValid
|
|
68
|
-
isInvalid=isInvalid
|
|
69
|
-
|
|
70
|
-
update=(action update value="target.value")
|
|
71
|
-
setDirty=setDirty
|
|
72
|
-
}}
|
|
73
|
-
{{else}}
|
|
74
|
-
{{component inputComponent
|
|
75
|
-
type=type
|
|
76
|
-
inputId=inputId
|
|
77
|
-
name=(or inputName name)
|
|
78
|
-
value=value
|
|
79
|
-
placeholder=placeholder
|
|
80
|
-
disabled=disabled
|
|
81
|
-
autofocus=autofocus
|
|
82
|
-
autocomplete=autocomplete
|
|
83
|
-
|
|
84
|
-
isValid=isValid
|
|
85
|
-
isInvalid=isInvalid
|
|
86
|
-
|
|
87
|
-
update=(action update value="target.value")
|
|
88
|
-
setDirty=setDirty
|
|
89
|
-
}}
|
|
90
|
-
{{/if}}
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
{{component hintComponent}}
|
|
94
|
-
{{component errorComponent}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{yield}}{{#each errors as |e i|}}{{unless (eq i 0) ", "}}{{e}}{{/each}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{yield}}{{hint}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{yield}}{{label}}{{if required " *"}}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
{{#unless (eq type "checkbox")}}
|
|
2
|
-
{{component labelComponent}}
|
|
3
|
-
{{/unless}}
|
|
4
|
-
|
|
5
|
-
{{#if (eq type "select")}}
|
|
6
|
-
{{component selectComponent
|
|
7
|
-
disabled=disabled
|
|
8
|
-
name=(or inputName name)
|
|
9
|
-
promptIsSelectable=promptIsSelectable
|
|
10
|
-
optionLabelPath=optionLabelPath
|
|
11
|
-
optionValuePath=optionValuePath
|
|
12
|
-
optionTargetPath=optionTargetPath
|
|
13
|
-
includeBlank=includeBlank
|
|
14
|
-
multiple=multiple
|
|
15
|
-
value=value
|
|
16
|
-
options=options
|
|
17
|
-
inputId=inputId
|
|
18
|
-
|
|
19
|
-
isValid=isValid
|
|
20
|
-
isInvalid=isInvalid
|
|
21
|
-
|
|
22
|
-
update=update
|
|
23
|
-
setDirty=setDirty
|
|
24
|
-
}}
|
|
25
|
-
{{else if (or (eq type "radioGroup") (eq type "radio-group"))}}
|
|
26
|
-
{{component radioGroupComponent
|
|
27
|
-
value=value
|
|
28
|
-
options=options
|
|
29
|
-
inputId=inputId
|
|
30
|
-
name=(or inputName name)
|
|
31
|
-
disabled=disabled
|
|
32
|
-
|
|
33
|
-
isValid=isValid
|
|
34
|
-
isInvalid=isInvalid
|
|
35
|
-
|
|
36
|
-
update=update
|
|
37
|
-
setDirty=setDirty
|
|
38
|
-
}}
|
|
39
|
-
{{else if (eq type "checkbox")}}
|
|
40
|
-
{{component checkboxComponent
|
|
41
|
-
value=value
|
|
42
|
-
options=options
|
|
43
|
-
inputId=inputId
|
|
44
|
-
name=(or inputName name)
|
|
45
|
-
disabled=disabled
|
|
46
|
-
|
|
47
|
-
isValid=isValid
|
|
48
|
-
isInvalid=isInvalid
|
|
49
|
-
|
|
50
|
-
update=update
|
|
51
|
-
setDirty=setDirty
|
|
52
|
-
|
|
53
|
-
labelComponent=labelComponent
|
|
54
|
-
}}
|
|
55
|
-
{{else if (eq type "textarea")}}
|
|
56
|
-
{{component textareaComponent
|
|
57
|
-
inputId=inputId
|
|
58
|
-
name=(or inputName name)
|
|
59
|
-
value=value
|
|
60
|
-
placeholder=placeholder
|
|
61
|
-
disabled=disabled
|
|
62
|
-
autofocus=autofocus
|
|
63
|
-
autocomplete=autocomplete
|
|
64
|
-
rows=rows
|
|
65
|
-
cols=cols
|
|
66
|
-
|
|
67
|
-
isValid=isValid
|
|
68
|
-
isInvalid=isInvalid
|
|
69
|
-
|
|
70
|
-
update=(action update value="target.value")
|
|
71
|
-
setDirty=setDirty
|
|
72
|
-
}}
|
|
73
|
-
{{else}}
|
|
74
|
-
{{component inputComponent
|
|
75
|
-
type=type
|
|
76
|
-
inputId=inputId
|
|
77
|
-
name=(or inputName name)
|
|
78
|
-
value=value
|
|
79
|
-
placeholder=placeholder
|
|
80
|
-
disabled=disabled
|
|
81
|
-
autofocus=autofocus
|
|
82
|
-
autocomplete=autocomplete
|
|
83
|
-
|
|
84
|
-
isValid=isValid
|
|
85
|
-
isInvalid=isInvalid
|
|
86
|
-
|
|
87
|
-
update=(action update value="target.value")
|
|
88
|
-
setDirty=setDirty
|
|
89
|
-
}}
|
|
90
|
-
{{/if}}
|
|
91
|
-
|
|
92
|
-
{{component hintComponent}}
|
|
93
|
-
{{component errorComponent}}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<input
|
|
2
|
-
class = "custom-control-input {{if isValid "is-valid"}} {{if isInvalid "is-invalid"}}"
|
|
3
|
-
type = "checkbox"
|
|
4
|
-
name = {{name}}
|
|
5
|
-
id = {{inputId}}
|
|
6
|
-
disabled = {{disabled}}
|
|
7
|
-
checked = {{value}}
|
|
8
|
-
onclick = {{action (queue (action update value="target.checked") setDirty)}}
|
|
9
|
-
>
|
|
10
|
-
{{component labelComponent class="custom-control-label"}}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{{#each options as |option i|}}
|
|
2
|
-
<div class="custom-control custom-radio">
|
|
3
|
-
<input
|
|
4
|
-
type = "radio"
|
|
5
|
-
class = "custom-control-input {{if isValid "is-valid"}} {{if isInvalid "is-invalid"}}"
|
|
6
|
-
checked = {{eq value option.key}}
|
|
7
|
-
value = {{option.key}}
|
|
8
|
-
name = {{name}}
|
|
9
|
-
id = "{{inputId}}-{{i}}"
|
|
10
|
-
onclick = {{action (queue (action update option.key) setDirty)}}
|
|
11
|
-
disabled = {{disabled}}
|
|
12
|
-
>
|
|
13
|
-
<label class="custom-control-label" for="{{inputId}}-{{i}}">{{option.label}}</label>
|
|
14
|
-
</div>
|
|
15
|
-
{{/each}}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{{one-way-select
|
|
2
|
-
value = value
|
|
3
|
-
options = options
|
|
4
|
-
optionLabelPath = optionLabelPath
|
|
5
|
-
optionValuePath = optionValuePath
|
|
6
|
-
optionTargetPath = optionTargetPath
|
|
7
|
-
name = name
|
|
8
|
-
id = inputId
|
|
9
|
-
class = (concat "form-control" (if isValid " is-valid") (if isInvalid " is-invalid"))
|
|
10
|
-
update = update
|
|
11
|
-
focusOut = setDirty
|
|
12
|
-
includeBlank = includeBlank
|
|
13
|
-
disabled = disabled
|
|
14
|
-
multiple = multiple
|
|
15
|
-
promptIsSelectable = (or promptIsSelectable false)
|
|
16
|
-
}}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{{#component labelComponent class=(concat (if isValid "uk-text-success") " " (if isInvalid "uk-text-danger"))}}
|
|
2
|
-
<input
|
|
3
|
-
class = "uk-checkbox uk-margin-small-right"
|
|
4
|
-
type = "checkbox"
|
|
5
|
-
name = {{name}}
|
|
6
|
-
id = {{inputId}}
|
|
7
|
-
disabled = {{disabled}}
|
|
8
|
-
checked = {{value}}
|
|
9
|
-
onclick = {{action (queue (action update value="target.checked") setDirty)}}
|
|
10
|
-
>
|
|
11
|
-
{{/component}}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{{#each options as |option i|}}
|
|
2
|
-
{{#unless (eq i 0)}}<br>{{/unless}}
|
|
3
|
-
<label class="uk-form-label {{if isValid "uk-text-success"}} {{if isInvalid "uk-text-danger"}}">
|
|
4
|
-
<input
|
|
5
|
-
type = "radio"
|
|
6
|
-
class = "uk-radio uk-margin-small-right"
|
|
7
|
-
checked = {{eq value option.key}}
|
|
8
|
-
value = {{option.key}}
|
|
9
|
-
name = {{name}}
|
|
10
|
-
id = "{{inputId}}-{{i}}"
|
|
11
|
-
onclick = {{action (queue (action update option.key) setDirty)}}
|
|
12
|
-
disabled = {{disabled}}
|
|
13
|
-
>
|
|
14
|
-
{{option.label}}
|
|
15
|
-
</label>
|
|
16
|
-
{{/each}}
|
|
17
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{{one-way-select
|
|
2
|
-
value = value
|
|
3
|
-
options = options
|
|
4
|
-
optionLabelPath = optionLabelPath
|
|
5
|
-
optionValuePath = optionValuePath
|
|
6
|
-
optionTargetPath = optionTargetPath
|
|
7
|
-
name = name
|
|
8
|
-
id = inputId
|
|
9
|
-
class = (concat "uk-select " (if isValid "uk-form-success") " " (if isInvalid "uk-form-danger"))
|
|
10
|
-
update = update
|
|
11
|
-
focusOut = setDirty
|
|
12
|
-
includeBlank = includeBlank
|
|
13
|
-
disabled = disabled
|
|
14
|
-
multiple = multiple
|
|
15
|
-
promptIsSelectable = (or promptIsSelectable false)
|
|
16
|
-
}}
|
|
17
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{{#each options as |option i|}}
|
|
2
|
-
<label>
|
|
3
|
-
<input
|
|
4
|
-
type = "radio"
|
|
5
|
-
checked = {{eq value option.key}}
|
|
6
|
-
value = {{option.key}}
|
|
7
|
-
name = {{name}}
|
|
8
|
-
id = "{{inputId}}-{{i}}"
|
|
9
|
-
onclick = {{action (queue (action update option.key) setDirty)}}
|
|
10
|
-
disabled = {{disabled}}
|
|
11
|
-
>
|
|
12
|
-
{{option.label}}
|
|
13
|
-
</label>
|
|
14
|
-
{{/each}}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{{one-way-select
|
|
2
|
-
value = value
|
|
3
|
-
options = options
|
|
4
|
-
optionLabelPath = optionLabelPath
|
|
5
|
-
optionValuePath = optionValuePath
|
|
6
|
-
optionTargetPath = optionTargetPath
|
|
7
|
-
name = name
|
|
8
|
-
id = inputId
|
|
9
|
-
update = update
|
|
10
|
-
focusOut = setDirty
|
|
11
|
-
includeBlank = includeBlank
|
|
12
|
-
disabled = disabled
|
|
13
|
-
multiple = multiple
|
|
14
|
-
promptIsSelectable = (or promptIsSelectable false)
|
|
15
|
-
}}
|
|
16
|
-
|