ember-validated-form 4.1.0 → 5.0.0
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 +1 -1
- package/.github/workflows/test.yml +1 -1
- package/CHANGELOG.md +24 -0
- package/README.md +2 -2
- 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 +4 -8
- package/addon/components/validated-form.hbs +21 -0
- package/addon/components/validated-form.js +32 -46
- 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 -13
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs +19 -0
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.js +1 -4
- 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 +1 -4
- 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 +9 -11
- 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 +17 -0
- package/addon/components/validated-input/types/select.js +3 -7
- 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 +1 -10
- package/app/components/validated-form.js +1 -7
- package/config/environment.js +1 -1
- package/package.json +40 -28
- package/.dependabot/config.yml +0 -14
- 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 -108
- 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 -107
- package/addon/templates/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs +0 -14
- 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-group.hbs +0 -15
- 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-group.hbs +0 -14
- 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
|
@@ -56,8 +56,7 @@
|
|
|
56
56
|
@multiple={{@multiple}}
|
|
57
57
|
@update={{this.update}}
|
|
58
58
|
@setDirty={{this.setDirty}}
|
|
59
|
-
@labelComponent={{
|
|
60
|
-
component
|
|
59
|
+
@labelComponent={{component
|
|
61
60
|
this.labelComponent
|
|
62
61
|
label=@label
|
|
63
62
|
required=@required
|
|
@@ -66,11 +65,10 @@
|
|
|
66
65
|
inputId=this.inputId
|
|
67
66
|
}}
|
|
68
67
|
@hintComponent={{if @hint (component this.hintComponent hint=@hint)}}
|
|
69
|
-
@errorComponent={{
|
|
70
|
-
if
|
|
68
|
+
@errorComponent={{if
|
|
71
69
|
(and this.showValidity this.errors)
|
|
72
70
|
(component this.errorComponent errors=this.errors)
|
|
73
71
|
}}
|
|
74
72
|
/>
|
|
75
73
|
{{/let}}
|
|
76
|
-
{{/if}}
|
|
74
|
+
{{/if}}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { setComponentTemplate } from "@ember/component";
|
|
2
1
|
import { action, set, get } from "@ember/object";
|
|
3
2
|
import { guidFor } from "@ember/object/internals";
|
|
4
3
|
import Component from "@glimmer/component";
|
|
5
4
|
import { tracked } from "@glimmer/tracking";
|
|
6
5
|
|
|
7
6
|
import themedComponent from "../-private/themed-component";
|
|
8
|
-
import template from "../templates/components/validated-input";
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* This component wraps form inputs.
|
|
@@ -20,7 +18,7 @@ import template from "../templates/components/validated-input";
|
|
|
20
18
|
* @class validated-input
|
|
21
19
|
* @export default
|
|
22
20
|
*/
|
|
23
|
-
export class
|
|
21
|
+
export default class ValidatedInputComponent extends Component {
|
|
24
22
|
inputId = guidFor(this);
|
|
25
23
|
|
|
26
24
|
@tracked dirty;
|
|
@@ -40,11 +38,6 @@ export class ValidatedInput extends Component {
|
|
|
40
38
|
this.required = this.args.required ?? false;
|
|
41
39
|
this.type = this.args.type ?? "text";
|
|
42
40
|
this.validateBeforeSubmit = this.args.validateBeforeSubmit ?? true;
|
|
43
|
-
|
|
44
|
-
this.renderComponent = this.args.renderComponent ?? this.renderComponent;
|
|
45
|
-
this.labelComponent = this.args.labelComponent ?? this.labelComponent;
|
|
46
|
-
this.hintComponent = this.args.hintComponent ?? this.hintComponent;
|
|
47
|
-
this.errorComponent = this.args.errorComponent ?? this.errorComponent;
|
|
48
41
|
}
|
|
49
42
|
|
|
50
43
|
get _val() {
|
|
@@ -97,5 +90,3 @@ export class ValidatedInput extends Component {
|
|
|
97
90
|
}
|
|
98
91
|
}
|
|
99
92
|
}
|
|
100
|
-
|
|
101
|
-
export default setComponentTemplate(template, ValidatedInput);
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import config from "../config/environment";
|
|
4
|
-
|
|
5
|
-
export default ValidatedForm.extend({
|
|
6
|
-
config: config["ember-validated-form"],
|
|
7
|
-
});
|
|
1
|
+
export { default } from "ember-validated-form/components/validated-form";
|
package/config/environment.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-validated-form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Easily create forms with client-side validations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -20,11 +20,14 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "ember build --environment=production",
|
|
23
|
-
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint
|
|
23
|
+
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
|
|
24
|
+
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
|
|
24
25
|
"lint:hbs": "ember-template-lint .",
|
|
25
|
-
"lint:
|
|
26
|
+
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
27
|
+
"lint:js": "eslint . --cache",
|
|
28
|
+
"lint:js:fix": "eslint . --fix",
|
|
26
29
|
"start": "ember serve",
|
|
27
|
-
"test": "npm-run-all lint
|
|
30
|
+
"test": "npm-run-all lint test:*",
|
|
28
31
|
"test:ember": "ember test",
|
|
29
32
|
"test:ember-compatibility": "ember try:each"
|
|
30
33
|
},
|
|
@@ -35,27 +38,29 @@
|
|
|
35
38
|
]
|
|
36
39
|
},
|
|
37
40
|
"dependencies": {
|
|
38
|
-
"ember-auto-import": "^
|
|
39
|
-
"ember-cli-babel": "^7.26.
|
|
41
|
+
"ember-auto-import": "^2.2.0",
|
|
42
|
+
"ember-cli-babel": "^7.26.6",
|
|
40
43
|
"ember-cli-htmlbars": "^5.7.1",
|
|
41
44
|
"ember-one-way-select": "^4.0.1",
|
|
42
45
|
"ember-truth-helpers": "^3.0.0"
|
|
43
46
|
},
|
|
44
47
|
"devDependencies": {
|
|
45
|
-
"@adfinis-sygroup/eslint-config": "1.
|
|
46
|
-
"@adfinis-sygroup/semantic-release-config": "3.
|
|
47
|
-
"@babel/core": "7.
|
|
48
|
+
"@adfinis-sygroup/eslint-config": "1.4.2",
|
|
49
|
+
"@adfinis-sygroup/semantic-release-config": "3.2.0",
|
|
50
|
+
"@babel/core": "7.15.8",
|
|
48
51
|
"@ember/optional-features": "2.0.0",
|
|
52
|
+
"@ember/test-helpers": "2.5.0",
|
|
53
|
+
"@embroider/test-setup": "0.45.0",
|
|
49
54
|
"@fortawesome/ember-fontawesome": "0.2.3",
|
|
50
|
-
"@fortawesome/free-solid-svg-icons": "5.15.
|
|
55
|
+
"@fortawesome/free-solid-svg-icons": "5.15.4",
|
|
51
56
|
"@glimmer/component": "1.0.4",
|
|
52
57
|
"@glimmer/tracking": "1.0.4",
|
|
53
58
|
"babel-eslint": "10.1.0",
|
|
54
59
|
"broccoli-asset-rev": "3.0.0",
|
|
55
|
-
"ember-changeset": "3.
|
|
56
|
-
"ember-changeset-validations": "3.
|
|
57
|
-
"ember-cli": "3.
|
|
58
|
-
"ember-cli-addon-docs": "
|
|
60
|
+
"ember-changeset": "3.15.0",
|
|
61
|
+
"ember-changeset-validations": "3.16.0",
|
|
62
|
+
"ember-cli": "3.28.1",
|
|
63
|
+
"ember-cli-addon-docs": "4.0.3",
|
|
59
64
|
"ember-cli-dependency-checker": "3.2.0",
|
|
60
65
|
"ember-cli-deploy": "1.0.2",
|
|
61
66
|
"ember-cli-deploy-build": "2.0.0",
|
|
@@ -67,35 +72,42 @@
|
|
|
67
72
|
"ember-cli-terser": "4.0.2",
|
|
68
73
|
"ember-cli-test-loader": "3.0.0",
|
|
69
74
|
"ember-concurrency": "2.1.2",
|
|
70
|
-
"ember-data": "3.
|
|
75
|
+
"ember-data": "3.28.3",
|
|
71
76
|
"ember-disable-prototype-extensions": "1.1.3",
|
|
72
77
|
"ember-load-initializers": "2.1.2",
|
|
73
|
-
"ember-maybe-import-regenerator": "0.
|
|
78
|
+
"ember-maybe-import-regenerator": "1.0.0",
|
|
74
79
|
"ember-power-select": "4.1.6",
|
|
75
|
-
"ember-qunit": "
|
|
76
|
-
"ember-resolver": "8.0.
|
|
77
|
-
"ember-source": "3.
|
|
80
|
+
"ember-qunit": "5.1.5",
|
|
81
|
+
"ember-resolver": "8.0.3",
|
|
82
|
+
"ember-source": "3.28.1",
|
|
78
83
|
"ember-source-channel-url": "3.0.0",
|
|
79
|
-
"ember-template-lint": "
|
|
84
|
+
"ember-template-lint": "3.9.0",
|
|
85
|
+
"ember-template-lint-plugin-prettier": "2.0.1",
|
|
80
86
|
"ember-try": "1.4.0",
|
|
81
87
|
"eslint": "7.32.0",
|
|
82
88
|
"eslint-config-prettier": "8.3.0",
|
|
83
|
-
"eslint-plugin-ember": "
|
|
84
|
-
"eslint-plugin-import": "2.
|
|
89
|
+
"eslint-plugin-ember": "10.5.5",
|
|
90
|
+
"eslint-plugin-import": "2.24.2",
|
|
85
91
|
"eslint-plugin-node": "11.1.0",
|
|
86
|
-
"eslint-plugin-prettier": "
|
|
87
|
-
"
|
|
88
|
-
"
|
|
92
|
+
"eslint-plugin-prettier": "4.0.0",
|
|
93
|
+
"eslint-plugin-qunit": "6.2.0",
|
|
94
|
+
"husky": "7.0.2",
|
|
95
|
+
"lint-staged": "11.2.0",
|
|
89
96
|
"loader.js": "4.7.0",
|
|
90
97
|
"npm-run-all": "4.1.5",
|
|
91
|
-
"prettier": "2.
|
|
92
|
-
"qunit
|
|
98
|
+
"prettier": "2.4.1",
|
|
99
|
+
"qunit": "2.17.2",
|
|
100
|
+
"qunit-dom": "2.0.0",
|
|
101
|
+
"webpack": "5.58.0"
|
|
93
102
|
},
|
|
94
103
|
"resolutions": {
|
|
95
104
|
"graceful-fs": ">=4.2.0"
|
|
96
105
|
},
|
|
97
106
|
"engines": {
|
|
98
|
-
"node": "14.* || >= 16"
|
|
107
|
+
"node": "12.* || 14.* || >= 16"
|
|
108
|
+
},
|
|
109
|
+
"ember": {
|
|
110
|
+
"edition": "octane"
|
|
99
111
|
},
|
|
100
112
|
"ember-addon": {
|
|
101
113
|
"configPath": "tests/dummy/config",
|
package/.dependabot/config.yml
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
version: 1
|
|
2
|
-
update_configs:
|
|
3
|
-
- package_manager: "javascript"
|
|
4
|
-
directory: "/"
|
|
5
|
-
update_schedule: "live"
|
|
6
|
-
version_requirement_updates: "increase_versions"
|
|
7
|
-
automerged_updates:
|
|
8
|
-
- match:
|
|
9
|
-
dependency_type: "development"
|
|
10
|
-
update_type: "semver:minor"
|
|
11
|
-
commit_message:
|
|
12
|
-
prefix: "fix"
|
|
13
|
-
prefix_development: "chore"
|
|
14
|
-
include_scope: true
|
package/.prettierignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
package.json
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{#if hasBlock}}{{~yield~}}{{else}}{{~label~}}{{/if}}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{{yield (hash
|
|
2
|
-
model=model
|
|
3
|
-
loading=loading
|
|
4
|
-
input=(component "validated-input"
|
|
5
|
-
model=model
|
|
6
|
-
submitted=submitted
|
|
7
|
-
validateBeforeSubmit=validateBeforeSubmit
|
|
8
|
-
)
|
|
9
|
-
submit=(component "validated-button"
|
|
10
|
-
class=submitClass
|
|
11
|
-
type="submit"
|
|
12
|
-
loading=loading
|
|
13
|
-
label="Save"
|
|
14
|
-
)
|
|
15
|
-
)}}
|
|
@@ -1,108 +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 (or (eq type "checkboxGroup") (eq type "checkbox-group"))}}
|
|
40
|
-
{{component checkboxGroupComponent
|
|
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
|
-
{{else if (eq type "checkbox")}}
|
|
54
|
-
{{component checkboxComponent
|
|
55
|
-
value=value
|
|
56
|
-
options=options
|
|
57
|
-
inputId=inputId
|
|
58
|
-
name=(or inputName name)
|
|
59
|
-
disabled=disabled
|
|
60
|
-
|
|
61
|
-
isValid=isValid
|
|
62
|
-
isInvalid=isInvalid
|
|
63
|
-
|
|
64
|
-
update=update
|
|
65
|
-
setDirty=setDirty
|
|
66
|
-
|
|
67
|
-
labelComponent=labelComponent
|
|
68
|
-
}}
|
|
69
|
-
{{else if (eq type "textarea")}}
|
|
70
|
-
{{component textareaComponent
|
|
71
|
-
inputId=inputId
|
|
72
|
-
name=(or inputName name)
|
|
73
|
-
value=value
|
|
74
|
-
placeholder=placeholder
|
|
75
|
-
disabled=disabled
|
|
76
|
-
autofocus=autofocus
|
|
77
|
-
autocomplete=autocomplete
|
|
78
|
-
rows=rows
|
|
79
|
-
cols=cols
|
|
80
|
-
|
|
81
|
-
isValid=isValid
|
|
82
|
-
isInvalid=isInvalid
|
|
83
|
-
|
|
84
|
-
update=(action update value="target.value")
|
|
85
|
-
setDirty=setDirty
|
|
86
|
-
}}
|
|
87
|
-
{{else}}
|
|
88
|
-
{{component inputComponent
|
|
89
|
-
type=type
|
|
90
|
-
inputId=inputId
|
|
91
|
-
name=(or inputName name)
|
|
92
|
-
value=value
|
|
93
|
-
placeholder=placeholder
|
|
94
|
-
disabled=disabled
|
|
95
|
-
autofocus=autofocus
|
|
96
|
-
autocomplete=autocomplete
|
|
97
|
-
|
|
98
|
-
isValid=isValid
|
|
99
|
-
isInvalid=isInvalid
|
|
100
|
-
|
|
101
|
-
update=(action update value="target.value")
|
|
102
|
-
setDirty=setDirty
|
|
103
|
-
}}
|
|
104
|
-
{{/if}}
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
{{component hintComponent}}
|
|
108
|
-
{{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,107 +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 (or (eq type "checkboxGroup") (eq type "checkbox-group"))}}
|
|
40
|
-
{{component checkboxGroupComponent
|
|
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
|
-
{{else if (eq type "checkbox")}}
|
|
54
|
-
{{component checkboxComponent
|
|
55
|
-
value=value
|
|
56
|
-
options=options
|
|
57
|
-
inputId=inputId
|
|
58
|
-
name=(or inputName name)
|
|
59
|
-
disabled=disabled
|
|
60
|
-
|
|
61
|
-
isValid=isValid
|
|
62
|
-
isInvalid=isInvalid
|
|
63
|
-
|
|
64
|
-
update=update
|
|
65
|
-
setDirty=setDirty
|
|
66
|
-
|
|
67
|
-
labelComponent=labelComponent
|
|
68
|
-
}}
|
|
69
|
-
{{else if (eq type "textarea")}}
|
|
70
|
-
{{component textareaComponent
|
|
71
|
-
inputId=inputId
|
|
72
|
-
name=(or inputName name)
|
|
73
|
-
value=value
|
|
74
|
-
placeholder=placeholder
|
|
75
|
-
disabled=disabled
|
|
76
|
-
autofocus=autofocus
|
|
77
|
-
autocomplete=autocomplete
|
|
78
|
-
rows=rows
|
|
79
|
-
cols=cols
|
|
80
|
-
|
|
81
|
-
isValid=isValid
|
|
82
|
-
isInvalid=isInvalid
|
|
83
|
-
|
|
84
|
-
update=(action update value="target.value")
|
|
85
|
-
setDirty=setDirty
|
|
86
|
-
}}
|
|
87
|
-
{{else}}
|
|
88
|
-
{{component inputComponent
|
|
89
|
-
type=type
|
|
90
|
-
inputId=inputId
|
|
91
|
-
name=(or inputName name)
|
|
92
|
-
value=value
|
|
93
|
-
placeholder=placeholder
|
|
94
|
-
disabled=disabled
|
|
95
|
-
autofocus=autofocus
|
|
96
|
-
autocomplete=autocomplete
|
|
97
|
-
|
|
98
|
-
isValid=isValid
|
|
99
|
-
isInvalid=isInvalid
|
|
100
|
-
|
|
101
|
-
update=(action update value="target.value")
|
|
102
|
-
setDirty=setDirty
|
|
103
|
-
}}
|
|
104
|
-
{{/if}}
|
|
105
|
-
|
|
106
|
-
{{component hintComponent}}
|
|
107
|
-
{{component errorComponent}}
|
package/addon/templates/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{{#each options as |option i|}}
|
|
2
|
-
<div class="custom-control custom-checkbox">
|
|
3
|
-
<input
|
|
4
|
-
type = "checkbox"
|
|
5
|
-
class = "custom-control-input {{if isValid "is-valid"}} {{if isInvalid "is-invalid"}}"
|
|
6
|
-
checked = {{includes option.key value}}
|
|
7
|
-
name = {{name}}
|
|
8
|
-
id = "{{inputId}}-{{i}}"
|
|
9
|
-
disabled = {{disabled}}
|
|
10
|
-
{{on "input" (fn this.onUpdate option.key)}}
|
|
11
|
-
>
|
|
12
|
-
<label class="custom-control-label" for="{{inputId}}-{{i}}">{{option.label}}</label>
|
|
13
|
-
</div>
|
|
14
|
-
{{/each}}
|
|
@@ -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,15 +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 = "checkbox"
|
|
6
|
-
class = "uk-checkbox uk-margin-small-right"
|
|
7
|
-
checked = {{includes option.key value}}
|
|
8
|
-
name = {{name}}
|
|
9
|
-
id = "{{inputId}}-{{i}}"
|
|
10
|
-
disabled = {{disabled}}
|
|
11
|
-
{{on "input" (fn this.onUpdate option.key)}}
|
|
12
|
-
>
|
|
13
|
-
{{option.label}}
|
|
14
|
-
</label>
|
|
15
|
-
{{/each}}
|
|
@@ -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 = "checkbox"
|
|
5
|
-
checked = {{eq value option.key}}
|
|
6
|
-
value = {{option.key}}
|
|
7
|
-
name = {{name}}
|
|
8
|
-
id = "{{inputId}}-{{i}}"
|
|
9
|
-
disabled = {{disabled}}
|
|
10
|
-
{{on "input" (fn this.onUpdate option.key)}}
|
|
11
|
-
>
|
|
12
|
-
{{option.label}}
|
|
13
|
-
</label>
|
|
14
|
-
{{/each}}
|
|
@@ -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
|
-
|