ember-validated-form 5.2.2 → 6.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/CHANGELOG.md +149 -123
- package/README.md +3 -3
- package/addon/components/validated-button/button.hbs +17 -1
- package/addon/components/validated-button.hbs +19 -17
- package/addon/components/validated-button.js +9 -15
- package/addon/components/validated-form.js +7 -9
- package/addon/components/validated-input/error.hbs +15 -1
- package/addon/components/validated-input/hint.hbs +9 -1
- package/addon/components/validated-input/label.hbs +5 -1
- package/addon/components/validated-input/render/wrapper.hbs +5 -0
- package/addon/components/validated-input/render.hbs +29 -27
- package/addon/components/validated-input/render.js +7 -8
- package/addon/components/validated-input/types/checkbox-group.hbs +51 -12
- package/addon/components/validated-input/types/checkbox.hbs +41 -9
- package/addon/components/validated-input/types/input.hbs +17 -2
- package/addon/components/validated-input/types/input.js +0 -1
- package/addon/components/validated-input/types/radio-group.hbs +53 -12
- package/addon/components/validated-input/types/select.hbs +19 -4
- package/addon/components/validated-input/types/select.js +11 -28
- package/addon/components/validated-input/types/textarea.hbs +17 -2
- package/addon/components/validated-input.hbs +52 -52
- package/addon/components/validated-input.js +5 -5
- package/addon/helpers/class-list.js +9 -0
- package/addon/passed-or-default.js +17 -0
- package/app/components/validated-input/{-themes/uikit/hint.js → render/wrapper.js} +1 -1
- package/app/helpers/class-list.js +1 -0
- package/blueprints/ember-validated-form/index.js +1 -0
- package/index.js +63 -0
- package/package.json +40 -44
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -9
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/deploy.yml +0 -28
- package/.github/workflows/release.yml +0 -25
- package/.github/workflows/test.yml +0 -84
- package/addon/-private/themed-component.js +0 -38
- package/addon/components/validated-button/-themes/bootstrap/button.js +0 -10
- package/addon/components/validated-button/-themes/uikit/button.js +0 -10
- package/addon/components/validated-button/button.js +0 -4
- package/addon/components/validated-input/-themes/bootstrap/error.js +0 -5
- package/addon/components/validated-input/-themes/bootstrap/hint.js +0 -5
- package/addon/components/validated-input/-themes/bootstrap/label.js +0 -3
- package/addon/components/validated-input/-themes/bootstrap/render.js +0 -5
- package/addon/components/validated-input/-themes/uikit/error.hbs +0 -4
- package/addon/components/validated-input/-themes/uikit/error.js +0 -3
- package/addon/components/validated-input/-themes/uikit/hint.js +0 -5
- package/addon/components/validated-input/-themes/uikit/label.js +0 -5
- package/addon/components/validated-input/-themes/uikit/render.hbs +0 -110
- package/addon/components/validated-input/-themes/uikit/render.js +0 -5
- package/addon/components/validated-input/hint.js +0 -4
- package/addon/components/validated-input/label.js +0 -4
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs +0 -19
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.js +0 -3
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox.hbs +0 -14
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox.js +0 -3
- package/addon/components/validated-input/types/-themes/bootstrap/input.js +0 -13
- package/addon/components/validated-input/types/-themes/bootstrap/radio-group.hbs +0 -20
- package/addon/components/validated-input/types/-themes/bootstrap/radio-group.js +0 -3
- package/addon/components/validated-input/types/-themes/bootstrap/select.js +0 -13
- package/addon/components/validated-input/types/-themes/bootstrap/textarea.js +0 -13
- package/addon/components/validated-input/types/-themes/uikit/checkbox-group.hbs +0 -19
- package/addon/components/validated-input/types/-themes/uikit/checkbox-group.js +0 -3
- package/addon/components/validated-input/types/-themes/uikit/checkbox.hbs +0 -15
- package/addon/components/validated-input/types/-themes/uikit/checkbox.js +0 -3
- package/addon/components/validated-input/types/-themes/uikit/input.js +0 -13
- package/addon/components/validated-input/types/-themes/uikit/radio-group.hbs +0 -20
- package/addon/components/validated-input/types/-themes/uikit/radio-group.js +0 -3
- package/addon/components/validated-input/types/-themes/uikit/select.js +0 -13
- package/addon/components/validated-input/types/-themes/uikit/textarea.js +0 -13
- package/app/components/validated-button/-themes/bootstrap/button.js +0 -1
- package/app/components/validated-button/-themes/uikit/button.js +0 -1
- package/app/components/validated-input/-themes/bootstrap/error.js +0 -1
- package/app/components/validated-input/-themes/bootstrap/hint.js +0 -1
- package/app/components/validated-input/-themes/bootstrap/label.js +0 -1
- package/app/components/validated-input/-themes/bootstrap/render.js +0 -1
- package/app/components/validated-input/-themes/uikit/error.js +0 -1
- package/app/components/validated-input/-themes/uikit/label.js +0 -1
- package/app/components/validated-input/-themes/uikit/render.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/checkbox-group.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/checkbox.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/input.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/radio-group.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/select.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/textarea.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/checkbox-group.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/checkbox.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/input.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/radio-group.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/select.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/textarea.js +0 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{{#if (has-block)}}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/>
|
|
10
|
-
{{/let}}
|
|
2
|
+
<this.labelComponent
|
|
3
|
+
@label={{@label}}
|
|
4
|
+
@required={{this.required}}
|
|
5
|
+
@isValid={{this.isValid}}
|
|
6
|
+
@isInvalid={{this.isInvalid}}
|
|
7
|
+
@inputId={{this.inputId}}
|
|
8
|
+
/>
|
|
11
9
|
|
|
12
10
|
{{yield
|
|
13
11
|
(hash
|
|
@@ -23,52 +21,54 @@
|
|
|
23
21
|
}}
|
|
24
22
|
|
|
25
23
|
{{#if @hint}}
|
|
26
|
-
|
|
24
|
+
<this.hintComponent @hint={{@hint}} />
|
|
27
25
|
{{/if}}
|
|
28
26
|
|
|
29
27
|
{{#if (and this.showValidity this.errors)}}
|
|
30
|
-
|
|
28
|
+
<this.errorComponent @errors={{this.errors}} />
|
|
31
29
|
{{/if}}
|
|
32
30
|
{{else}}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
@
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
+
@labelComponent={{component
|
|
57
|
+
(ensure-safe-component this.labelComponent)
|
|
58
|
+
label=@label
|
|
59
|
+
required=@required
|
|
60
|
+
isValid=this.isValid
|
|
61
|
+
isInvalid=this.isInvalid
|
|
62
|
+
inputId=this.inputId
|
|
63
|
+
}}
|
|
64
|
+
@hintComponent={{if
|
|
65
|
+
@hint
|
|
66
|
+
(component (ensure-safe-component this.hintComponent) hint=@hint)
|
|
67
|
+
}}
|
|
68
|
+
@errorComponent={{if
|
|
69
|
+
(and this.showValidity this.errors)
|
|
70
|
+
(component (ensure-safe-component this.errorComponent) errors=this.errors)
|
|
71
|
+
}}
|
|
72
|
+
...attributes
|
|
73
|
+
/>
|
|
74
74
|
{{/if}}
|
|
@@ -3,7 +3,7 @@ import { guidFor } from "@ember/object/internals";
|
|
|
3
3
|
import Component from "@glimmer/component";
|
|
4
4
|
import { tracked } from "@glimmer/tracking";
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import passedOrDefault from "ember-validated-form/passed-or-default";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* This component wraps form inputs.
|
|
@@ -26,10 +26,10 @@ export default class ValidatedInputComponent extends Component {
|
|
|
26
26
|
@tracked type;
|
|
27
27
|
@tracked validateBeforeSubmit;
|
|
28
28
|
|
|
29
|
-
@
|
|
30
|
-
@
|
|
31
|
-
@
|
|
32
|
-
@
|
|
29
|
+
@passedOrDefault("error") errorComponent;
|
|
30
|
+
@passedOrDefault("hint") hintComponent;
|
|
31
|
+
@passedOrDefault("label") labelComponent;
|
|
32
|
+
@passedOrDefault("render") renderComponent;
|
|
33
33
|
|
|
34
34
|
constructor(...args) {
|
|
35
35
|
super(...args);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { importSync, getOwnConfig } from "@embroider/macros";
|
|
2
|
+
import { ensureSafeComponent } from "@embroider/util";
|
|
3
|
+
import { cached } from "tracked-toolbox";
|
|
4
|
+
|
|
5
|
+
export default function passedOrDefault(componentName) {
|
|
6
|
+
return function (target, property) {
|
|
7
|
+
return cached(target, property, {
|
|
8
|
+
get() {
|
|
9
|
+
return ensureSafeComponent(
|
|
10
|
+
this.args[property] ??
|
|
11
|
+
importSync(getOwnConfig()[componentName]).default,
|
|
12
|
+
this
|
|
13
|
+
);
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input
|
|
1
|
+
export { default } from "ember-validated-form/components/validated-input/render/wrapper";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "ember-validated-form/helpers/class-list";
|
package/index.js
CHANGED
|
@@ -2,4 +2,67 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
name: require("./package").name,
|
|
5
|
+
|
|
6
|
+
included(...args) {
|
|
7
|
+
this._super.included.apply(this, ...args);
|
|
8
|
+
|
|
9
|
+
const app = this._findHost(this);
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
theme = null,
|
|
13
|
+
scrollErrorIntoView = false,
|
|
14
|
+
defaults = {},
|
|
15
|
+
} = app.options["ember-validated-form"] ?? {};
|
|
16
|
+
|
|
17
|
+
// Theming options
|
|
18
|
+
this.options["@embroider/macros"].setOwnConfig.isDefault = ![
|
|
19
|
+
"uikit",
|
|
20
|
+
"bootstrap",
|
|
21
|
+
].includes(theme);
|
|
22
|
+
this.options["@embroider/macros"].setOwnConfig.isUikit = theme === "uikit";
|
|
23
|
+
this.options["@embroider/macros"].setOwnConfig.isBootstrap =
|
|
24
|
+
theme === "bootstrap";
|
|
25
|
+
|
|
26
|
+
// Features
|
|
27
|
+
this.options["@embroider/macros"].setOwnConfig.scrollErrorIntoView =
|
|
28
|
+
scrollErrorIntoView;
|
|
29
|
+
|
|
30
|
+
// Component defaults
|
|
31
|
+
this.options["@embroider/macros"].setOwnConfig.error =
|
|
32
|
+
defaults.error ?? "ember-validated-form/components/validated-input/error";
|
|
33
|
+
this.options["@embroider/macros"].setOwnConfig.hint =
|
|
34
|
+
defaults.hint ?? "ember-validated-form/components/validated-input/hint";
|
|
35
|
+
this.options["@embroider/macros"].setOwnConfig.label =
|
|
36
|
+
defaults.label ?? "ember-validated-form/components/validated-input/label";
|
|
37
|
+
this.options["@embroider/macros"].setOwnConfig.render =
|
|
38
|
+
defaults.render ??
|
|
39
|
+
"ember-validated-form/components/validated-input/render";
|
|
40
|
+
this.options["@embroider/macros"].setOwnConfig.button =
|
|
41
|
+
defaults.button ??
|
|
42
|
+
"ember-validated-form/components/validated-button/button";
|
|
43
|
+
this.options["@embroider/macros"].setOwnConfig["types/checkbox-group"] =
|
|
44
|
+
defaults["types/checkbox-group"] ??
|
|
45
|
+
"ember-validated-form/components/validated-input/types/checkbox-group";
|
|
46
|
+
this.options["@embroider/macros"].setOwnConfig["types/checkbox"] =
|
|
47
|
+
defaults["types/checkbox"] ??
|
|
48
|
+
"ember-validated-form/components/validated-input/types/checkbox";
|
|
49
|
+
this.options["@embroider/macros"].setOwnConfig["types/input"] =
|
|
50
|
+
defaults["types/input"] ??
|
|
51
|
+
"ember-validated-form/components/validated-input/types/input";
|
|
52
|
+
this.options["@embroider/macros"].setOwnConfig["types/radio-group"] =
|
|
53
|
+
defaults["types/radio-group"] ??
|
|
54
|
+
"ember-validated-form/components/validated-input/types/radio-group";
|
|
55
|
+
this.options["@embroider/macros"].setOwnConfig["types/select"] =
|
|
56
|
+
defaults["types/select"] ??
|
|
57
|
+
"ember-validated-form/components/validated-input/types/select";
|
|
58
|
+
this.options["@embroider/macros"].setOwnConfig["types/textarea"] =
|
|
59
|
+
defaults["types/textarea"] ??
|
|
60
|
+
"ember-validated-form/components/validated-input/types/textarea";
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
options: {
|
|
64
|
+
"@embroider/macros": {
|
|
65
|
+
setOwnConfig: {},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
5
68
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-validated-form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Easily create forms with client-side validations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"form validation",
|
|
9
9
|
"validation messages"
|
|
10
10
|
],
|
|
11
|
-
"repository": "https://github.com/adfinis
|
|
11
|
+
"repository": "https://github.com/adfinis/ember-validated-form",
|
|
12
12
|
"license": "MIT",
|
|
13
|
-
"author": "Adfinis
|
|
13
|
+
"author": "Adfinis AG <info@adfinis.com>",
|
|
14
14
|
"directories": {
|
|
15
15
|
"test": "tests"
|
|
16
16
|
},
|
|
17
|
-
"homepage": "https://adfinis
|
|
17
|
+
"homepage": "https://adfinis.github.io/ember-validated-form",
|
|
18
18
|
"bugs": {
|
|
19
|
-
"url": "https://github.com/adfinis
|
|
19
|
+
"url": "https://github.com/adfinis/ember-validated-form/issues"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "ember build --environment=production",
|
|
@@ -33,28 +33,30 @@
|
|
|
33
33
|
"prepare": "husky install"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
36
|
+
"@embroider/macros": "^1.8.3",
|
|
37
|
+
"@embroider/util": "^1.8.3",
|
|
38
|
+
"@glimmer/component": "^1.1.2",
|
|
39
|
+
"@glimmer/tracking": "^1.1.2",
|
|
40
|
+
"ember-changeset": "^4.1.1",
|
|
41
|
+
"ember-changeset-validations": "^4.1.0",
|
|
42
|
+
"ember-cli-babel": "^7.26.11",
|
|
43
|
+
"ember-cli-htmlbars": "^6.1.0",
|
|
44
|
+
"ember-truth-helpers": "^3.1.1"
|
|
40
45
|
},
|
|
41
46
|
"devDependencies": {
|
|
42
47
|
"@adfinis-sygroup/eslint-config": "1.5.0",
|
|
43
48
|
"@adfinis-sygroup/semantic-release-config": "3.4.0",
|
|
44
49
|
"@ember/optional-features": "2.0.0",
|
|
45
|
-
"@ember/test-helpers": "2.
|
|
46
|
-
"@embroider/test-setup": "1.
|
|
47
|
-
"@fortawesome/ember-fontawesome": "0.
|
|
48
|
-
"@fortawesome/free-solid-svg-icons": "
|
|
49
|
-
"@glimmer/component": "1.0.4",
|
|
50
|
-
"@glimmer/tracking": "1.0.4",
|
|
50
|
+
"@ember/test-helpers": "2.8.1",
|
|
51
|
+
"@embroider/test-setup": "1.8.3",
|
|
52
|
+
"@fortawesome/ember-fontawesome": "0.4.1",
|
|
53
|
+
"@fortawesome/free-solid-svg-icons": "6.2.0",
|
|
51
54
|
"babel-eslint": "10.1.0",
|
|
52
55
|
"broccoli-asset-rev": "3.0.0",
|
|
53
|
-
"ember-
|
|
54
|
-
"ember-
|
|
55
|
-
"ember-cli": "
|
|
56
|
-
"ember-cli-
|
|
57
|
-
"ember-cli-dependency-checker": "3.2.0",
|
|
56
|
+
"ember-auto-import": "2.4.2",
|
|
57
|
+
"ember-cli": "4.7.0",
|
|
58
|
+
"ember-cli-addon-docs": "5.0.0",
|
|
59
|
+
"ember-cli-dependency-checker": "3.3.1",
|
|
58
60
|
"ember-cli-deploy": "1.0.2",
|
|
59
61
|
"ember-cli-deploy-build": "2.0.0",
|
|
60
62
|
"ember-cli-deploy-git": "1.3.4",
|
|
@@ -63,48 +65,42 @@
|
|
|
63
65
|
"ember-cli-sri": "2.1.1",
|
|
64
66
|
"ember-cli-terser": "4.0.2",
|
|
65
67
|
"ember-cli-test-loader": "3.0.0",
|
|
66
|
-
"ember-concurrency": "2.
|
|
67
|
-
"ember-data": "
|
|
68
|
+
"ember-concurrency": "2.3.6",
|
|
69
|
+
"ember-data": "4.4.1",
|
|
68
70
|
"ember-disable-prototype-extensions": "1.1.3",
|
|
69
71
|
"ember-load-initializers": "2.1.2",
|
|
70
|
-
"ember-maybe-import-regenerator": "1.0.0",
|
|
71
|
-
"ember-power-select": "5.0.3",
|
|
72
72
|
"ember-qunit": "5.1.5",
|
|
73
73
|
"ember-resolver": "8.0.3",
|
|
74
|
-
"ember-source": "
|
|
74
|
+
"ember-source": "4.7.0",
|
|
75
75
|
"ember-source-channel-url": "3.0.0",
|
|
76
|
-
"ember-template-lint": "
|
|
77
|
-
"ember-template-lint-plugin-prettier": "
|
|
78
|
-
"ember-try": "
|
|
76
|
+
"ember-template-lint": "4.14.0",
|
|
77
|
+
"ember-template-lint-plugin-prettier": "4.0.0",
|
|
78
|
+
"ember-try": "2.0.0",
|
|
79
79
|
"eslint": "7.32.0",
|
|
80
|
-
"eslint-config-prettier": "8.
|
|
81
|
-
"eslint-plugin-ember": "
|
|
82
|
-
"eslint-plugin-import": "2.
|
|
80
|
+
"eslint-config-prettier": "8.5.0",
|
|
81
|
+
"eslint-plugin-ember": "11.0.6",
|
|
82
|
+
"eslint-plugin-import": "2.26.0",
|
|
83
83
|
"eslint-plugin-node": "11.1.0",
|
|
84
|
-
"eslint-plugin-prettier": "4.
|
|
85
|
-
"eslint-plugin-qunit": "
|
|
86
|
-
"husky": "
|
|
87
|
-
"lint-staged": "
|
|
84
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
85
|
+
"eslint-plugin-qunit": "7.3.1",
|
|
86
|
+
"husky": "8.0.1",
|
|
87
|
+
"lint-staged": "13.0.3",
|
|
88
88
|
"loader.js": "4.7.0",
|
|
89
89
|
"npm-run-all": "4.1.5",
|
|
90
|
-
"prettier": "2.
|
|
91
|
-
"qunit": "2.
|
|
90
|
+
"prettier": "2.7.1",
|
|
91
|
+
"qunit": "2.19.1",
|
|
92
92
|
"qunit-dom": "2.0.0",
|
|
93
|
-
"webpack": "5.
|
|
94
|
-
},
|
|
95
|
-
"resolutions": {
|
|
96
|
-
"@embroider/macros": "^1.1.0",
|
|
97
|
-
"@embroider/util": "^1.1.0"
|
|
93
|
+
"webpack": "5.74.0"
|
|
98
94
|
},
|
|
99
95
|
"engines": {
|
|
100
|
-
"node": "
|
|
96
|
+
"node": "14.* || >= 16"
|
|
101
97
|
},
|
|
102
98
|
"ember": {
|
|
103
99
|
"edition": "octane"
|
|
104
100
|
},
|
|
105
101
|
"ember-addon": {
|
|
106
102
|
"configPath": "tests/dummy/config",
|
|
107
|
-
"demoURL": "https://adfinis
|
|
103
|
+
"demoURL": "https://adfinis.github.io/ember-validated-form"
|
|
108
104
|
},
|
|
109
105
|
"release": {
|
|
110
106
|
"extends": "@adfinis-sygroup/semantic-release-config"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Template for bug reports
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
--
|
|
7
|
-
If possible, please consider creating a basic reproduction of your issue with Ember Twiddle. You can use this twiddle as a starting point:
|
|
8
|
-
|
|
9
|
-
https://ember-twiddle.com/3691a8576c35ff149bfc26a564ec5437
|
package/.github/dependabot.yml
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: Deploy
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
release:
|
|
8
|
-
types: [published]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
deploy:
|
|
12
|
-
name: Deploy
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v2
|
|
16
|
-
- uses: actions/setup-node@v2
|
|
17
|
-
with:
|
|
18
|
-
node-version: 14
|
|
19
|
-
|
|
20
|
-
- name: Install Dependencies
|
|
21
|
-
run: yarn install
|
|
22
|
-
|
|
23
|
-
- name: Deploy to Github Pages
|
|
24
|
-
run: yarn ember deploy production
|
|
25
|
-
env:
|
|
26
|
-
CI: true
|
|
27
|
-
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
|
28
|
-
ADDON_DOCS_UPDATE_LATEST: true
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on: workflow_dispatch
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
release:
|
|
7
|
-
name: Release
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- uses: actions/checkout@v2
|
|
11
|
-
with:
|
|
12
|
-
fetch-depth: 0
|
|
13
|
-
persist-credentials: false
|
|
14
|
-
- uses: actions/setup-node@v2
|
|
15
|
-
with:
|
|
16
|
-
node-version: 14
|
|
17
|
-
|
|
18
|
-
- name: Install dependencies
|
|
19
|
-
run: yarn install
|
|
20
|
-
|
|
21
|
-
- name: Release on NPM
|
|
22
|
-
env:
|
|
23
|
-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
24
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
25
|
-
run: yarn semantic-release
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
name: Test
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
lint:
|
|
13
|
-
name: Lint
|
|
14
|
-
runs-on: [ubuntu-latest]
|
|
15
|
-
|
|
16
|
-
strategy:
|
|
17
|
-
matrix:
|
|
18
|
-
target: [js, hbs]
|
|
19
|
-
|
|
20
|
-
steps:
|
|
21
|
-
- uses: actions/checkout@v2
|
|
22
|
-
- uses: actions/setup-node@v2
|
|
23
|
-
with:
|
|
24
|
-
node-version: 14
|
|
25
|
-
|
|
26
|
-
- name: Install dependencies
|
|
27
|
-
run: yarn install
|
|
28
|
-
|
|
29
|
-
- name: Lint ${{ matrix.target }}
|
|
30
|
-
run: yarn lint:${{ matrix.target }}
|
|
31
|
-
|
|
32
|
-
test:
|
|
33
|
-
name: Tests
|
|
34
|
-
needs: [lint]
|
|
35
|
-
runs-on: [ubuntu-latest]
|
|
36
|
-
|
|
37
|
-
steps:
|
|
38
|
-
- uses: actions/checkout@v2
|
|
39
|
-
- uses: actions/setup-node@v2
|
|
40
|
-
with:
|
|
41
|
-
node-version: 14
|
|
42
|
-
|
|
43
|
-
- name: Install dependencies (no lockfile)
|
|
44
|
-
run: yarn install --no-lockfile
|
|
45
|
-
|
|
46
|
-
- name: Run tests (floating dependencies)
|
|
47
|
-
run: yarn test:ember
|
|
48
|
-
|
|
49
|
-
- name: Install dependencies
|
|
50
|
-
run: yarn install
|
|
51
|
-
|
|
52
|
-
- name: Run tests
|
|
53
|
-
run: yarn test:ember
|
|
54
|
-
env:
|
|
55
|
-
COVERAGE: true
|
|
56
|
-
|
|
57
|
-
- name: Upload coverage report to Codecov
|
|
58
|
-
uses: codecov/codecov-action@v1
|
|
59
|
-
with:
|
|
60
|
-
file: ./coverage/lcov.info
|
|
61
|
-
|
|
62
|
-
try-one:
|
|
63
|
-
name: Additional Tests
|
|
64
|
-
needs: [test]
|
|
65
|
-
runs-on: [ubuntu-latest]
|
|
66
|
-
|
|
67
|
-
strategy:
|
|
68
|
-
matrix:
|
|
69
|
-
scenario:
|
|
70
|
-
- ember-lts-3.24
|
|
71
|
-
- ember-lts-3.28
|
|
72
|
-
- ember-release
|
|
73
|
-
|
|
74
|
-
steps:
|
|
75
|
-
- uses: actions/checkout@v2
|
|
76
|
-
- uses: actions/setup-node@v2
|
|
77
|
-
with:
|
|
78
|
-
node-version: 14
|
|
79
|
-
|
|
80
|
-
- name: Install dependencies
|
|
81
|
-
run: yarn install
|
|
82
|
-
|
|
83
|
-
- name: Run tests
|
|
84
|
-
run: yarn ember try:one ${{ matrix.scenario }}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { getOwner } from "@ember/application";
|
|
2
|
-
|
|
3
|
-
export default function (component) {
|
|
4
|
-
return function (_, propertyName) {
|
|
5
|
-
return {
|
|
6
|
-
get() {
|
|
7
|
-
const parts = component.split("/");
|
|
8
|
-
const componentName = parts.slice(1, parts.length).join("/");
|
|
9
|
-
|
|
10
|
-
if (this.args[propertyName]) {
|
|
11
|
-
return this.args[propertyName];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const config =
|
|
15
|
-
getOwner(this).resolveRegistration("config:environment")[
|
|
16
|
-
"ember-validated-form"
|
|
17
|
-
] !== undefined
|
|
18
|
-
? getOwner(this).resolveRegistration("config:environment")[
|
|
19
|
-
"ember-validated-form"
|
|
20
|
-
]
|
|
21
|
-
: {};
|
|
22
|
-
|
|
23
|
-
const theme = config.theme;
|
|
24
|
-
const defaultComponent = config.defaults?.[componentName];
|
|
25
|
-
|
|
26
|
-
const name = parts.pop();
|
|
27
|
-
const basePath = parts.join("/");
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
defaultComponent ||
|
|
31
|
-
(theme
|
|
32
|
-
? `${basePath}/-themes/${theme}/${name}`
|
|
33
|
-
: `${basePath}/${name}`)
|
|
34
|
-
);
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Component from "../../button";
|
|
2
|
-
|
|
3
|
-
export default class BootstrapButton extends Component {
|
|
4
|
-
get class() {
|
|
5
|
-
const style = this.args.type === "submit" ? "btn-primary" : "btn-default";
|
|
6
|
-
const loading = this.args.loading ? "loading" : "";
|
|
7
|
-
|
|
8
|
-
return `btn ${style} ${loading}`;
|
|
9
|
-
}
|
|
10
|
-
}
|