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.
Files changed (89) hide show
  1. package/CHANGELOG.md +149 -123
  2. package/README.md +3 -3
  3. package/addon/components/validated-button/button.hbs +17 -1
  4. package/addon/components/validated-button.hbs +19 -17
  5. package/addon/components/validated-button.js +9 -15
  6. package/addon/components/validated-form.js +7 -9
  7. package/addon/components/validated-input/error.hbs +15 -1
  8. package/addon/components/validated-input/hint.hbs +9 -1
  9. package/addon/components/validated-input/label.hbs +5 -1
  10. package/addon/components/validated-input/render/wrapper.hbs +5 -0
  11. package/addon/components/validated-input/render.hbs +29 -27
  12. package/addon/components/validated-input/render.js +7 -8
  13. package/addon/components/validated-input/types/checkbox-group.hbs +51 -12
  14. package/addon/components/validated-input/types/checkbox.hbs +41 -9
  15. package/addon/components/validated-input/types/input.hbs +17 -2
  16. package/addon/components/validated-input/types/input.js +0 -1
  17. package/addon/components/validated-input/types/radio-group.hbs +53 -12
  18. package/addon/components/validated-input/types/select.hbs +19 -4
  19. package/addon/components/validated-input/types/select.js +11 -28
  20. package/addon/components/validated-input/types/textarea.hbs +17 -2
  21. package/addon/components/validated-input.hbs +52 -52
  22. package/addon/components/validated-input.js +5 -5
  23. package/addon/helpers/class-list.js +9 -0
  24. package/addon/passed-or-default.js +17 -0
  25. package/app/components/validated-input/{-themes/uikit/hint.js → render/wrapper.js} +1 -1
  26. package/app/helpers/class-list.js +1 -0
  27. package/blueprints/ember-validated-form/index.js +1 -0
  28. package/index.js +63 -0
  29. package/package.json +40 -44
  30. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -9
  31. package/.github/dependabot.yml +0 -11
  32. package/.github/workflows/deploy.yml +0 -28
  33. package/.github/workflows/release.yml +0 -25
  34. package/.github/workflows/test.yml +0 -84
  35. package/addon/-private/themed-component.js +0 -38
  36. package/addon/components/validated-button/-themes/bootstrap/button.js +0 -10
  37. package/addon/components/validated-button/-themes/uikit/button.js +0 -10
  38. package/addon/components/validated-button/button.js +0 -4
  39. package/addon/components/validated-input/-themes/bootstrap/error.js +0 -5
  40. package/addon/components/validated-input/-themes/bootstrap/hint.js +0 -5
  41. package/addon/components/validated-input/-themes/bootstrap/label.js +0 -3
  42. package/addon/components/validated-input/-themes/bootstrap/render.js +0 -5
  43. package/addon/components/validated-input/-themes/uikit/error.hbs +0 -4
  44. package/addon/components/validated-input/-themes/uikit/error.js +0 -3
  45. package/addon/components/validated-input/-themes/uikit/hint.js +0 -5
  46. package/addon/components/validated-input/-themes/uikit/label.js +0 -5
  47. package/addon/components/validated-input/-themes/uikit/render.hbs +0 -110
  48. package/addon/components/validated-input/-themes/uikit/render.js +0 -5
  49. package/addon/components/validated-input/hint.js +0 -4
  50. package/addon/components/validated-input/label.js +0 -4
  51. package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs +0 -19
  52. package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.js +0 -3
  53. package/addon/components/validated-input/types/-themes/bootstrap/checkbox.hbs +0 -14
  54. package/addon/components/validated-input/types/-themes/bootstrap/checkbox.js +0 -3
  55. package/addon/components/validated-input/types/-themes/bootstrap/input.js +0 -13
  56. package/addon/components/validated-input/types/-themes/bootstrap/radio-group.hbs +0 -20
  57. package/addon/components/validated-input/types/-themes/bootstrap/radio-group.js +0 -3
  58. package/addon/components/validated-input/types/-themes/bootstrap/select.js +0 -13
  59. package/addon/components/validated-input/types/-themes/bootstrap/textarea.js +0 -13
  60. package/addon/components/validated-input/types/-themes/uikit/checkbox-group.hbs +0 -19
  61. package/addon/components/validated-input/types/-themes/uikit/checkbox-group.js +0 -3
  62. package/addon/components/validated-input/types/-themes/uikit/checkbox.hbs +0 -15
  63. package/addon/components/validated-input/types/-themes/uikit/checkbox.js +0 -3
  64. package/addon/components/validated-input/types/-themes/uikit/input.js +0 -13
  65. package/addon/components/validated-input/types/-themes/uikit/radio-group.hbs +0 -20
  66. package/addon/components/validated-input/types/-themes/uikit/radio-group.js +0 -3
  67. package/addon/components/validated-input/types/-themes/uikit/select.js +0 -13
  68. package/addon/components/validated-input/types/-themes/uikit/textarea.js +0 -13
  69. package/app/components/validated-button/-themes/bootstrap/button.js +0 -1
  70. package/app/components/validated-button/-themes/uikit/button.js +0 -1
  71. package/app/components/validated-input/-themes/bootstrap/error.js +0 -1
  72. package/app/components/validated-input/-themes/bootstrap/hint.js +0 -1
  73. package/app/components/validated-input/-themes/bootstrap/label.js +0 -1
  74. package/app/components/validated-input/-themes/bootstrap/render.js +0 -1
  75. package/app/components/validated-input/-themes/uikit/error.js +0 -1
  76. package/app/components/validated-input/-themes/uikit/label.js +0 -1
  77. package/app/components/validated-input/-themes/uikit/render.js +0 -1
  78. package/app/components/validated-input/types/-themes/bootstrap/checkbox-group.js +0 -1
  79. package/app/components/validated-input/types/-themes/bootstrap/checkbox.js +0 -1
  80. package/app/components/validated-input/types/-themes/bootstrap/input.js +0 -1
  81. package/app/components/validated-input/types/-themes/bootstrap/radio-group.js +0 -1
  82. package/app/components/validated-input/types/-themes/bootstrap/select.js +0 -1
  83. package/app/components/validated-input/types/-themes/bootstrap/textarea.js +0 -1
  84. package/app/components/validated-input/types/-themes/uikit/checkbox-group.js +0 -1
  85. package/app/components/validated-input/types/-themes/uikit/checkbox.js +0 -1
  86. package/app/components/validated-input/types/-themes/uikit/input.js +0 -1
  87. package/app/components/validated-input/types/-themes/uikit/radio-group.js +0 -1
  88. package/app/components/validated-input/types/-themes/uikit/select.js +0 -1
  89. package/app/components/validated-input/types/-themes/uikit/textarea.js +0 -1
@@ -1,13 +1,11 @@
1
1
  {{#if (has-block)}}
2
- {{#let (component this.labelComponent) as |LabelComponent|}}
3
- <LabelComponent
4
- @label={{@label}}
5
- @required={{this.required}}
6
- @isValid={{this.isValid}}
7
- @isInvalid={{this.isInvalid}}
8
- @inputId={{this.inputId}}
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
- {{component this.hintComponent hint=@hint}}
24
+ <this.hintComponent @hint={{@hint}} />
27
25
  {{/if}}
28
26
 
29
27
  {{#if (and this.showValidity this.errors)}}
30
- {{component this.errorComponent errors=this.errors}}
28
+ <this.errorComponent @errors={{this.errors}} />
31
29
  {{/if}}
32
30
  {{else}}
33
- {{#let (component this.renderComponent) as |RenderComponent|}}
34
- <RenderComponent
35
- @type={{this.type}}
36
- @value={{this._val}}
37
- @inputId={{this.inputId}}
38
- @options={{@options}}
39
- @name={{@name}}
40
- @inputName={{@inputName}}
41
- @disabled={{@disabled}}
42
- @autofocus={{@autofocus}}
43
- @autocomplete={{@autocomplete}}
44
- @rows={{@rows}}
45
- @cols={{@cols}}
46
- @model={{@model}}
47
- @isValid={{this.isValid}}
48
- @isInvalid={{this.isInvalid}}
49
- @placeholder={{@placeholder}}
50
- @class={{@class}}
51
- @promptIsSelectable={{@promptIsSelectable}}
52
- @optionLabelPath={{@optionLabelPath}}
53
- @optionValuePath={{@optionValuePath}}
54
- @optionTargetPath={{@optionTargetPath}}
55
- @includeBlank={{@includeBlank}}
56
- @multiple={{@multiple}}
57
- @update={{this.update}}
58
- @setDirty={{this.setDirty}}
59
- @labelComponent={{component
60
- this.labelComponent
61
- label=@label
62
- required=@required
63
- isValid=this.isValid
64
- isInvalid=this.isInvalid
65
- inputId=this.inputId
66
- }}
67
- @hintComponent={{if @hint (component this.hintComponent hint=@hint)}}
68
- @errorComponent={{if
69
- (and this.showValidity this.errors)
70
- (component this.errorComponent errors=this.errors)
71
- }}
72
- />
73
- {{/let}}
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 themedComponent from "../-private/themed-component";
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
- @themedComponent("validated-input/render") renderComponent;
30
- @themedComponent("validated-input/label") labelComponent;
31
- @themedComponent("validated-input/hint") hintComponent;
32
- @themedComponent("validated-input/error") errorComponent;
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,9 @@
1
+ import { helper } from "@ember/component/helper";
2
+ import { isEmpty } from "@ember/utils";
3
+
4
+ export default helper(function classList(classes) {
5
+ return classes
6
+ .filter((cls) => !isEmpty(cls))
7
+ .map((cls) => cls.trim())
8
+ .join(" ");
9
+ });
@@ -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/-themes/uikit/hint";
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";
@@ -10,6 +10,7 @@ module.exports = {
10
10
  packages: [
11
11
  { name: "ember-changeset" },
12
12
  { name: "ember-changeset-validations" },
13
+ { name: "ember-truth-helpers" },
13
14
  ],
14
15
  });
15
16
  },
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": "5.2.2",
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-sygroup/ember-validated-form",
11
+ "repository": "https://github.com/adfinis/ember-validated-form",
12
12
  "license": "MIT",
13
- "author": "Adfinis SyGroup AG <info@adfinis-sygroup.ch>",
13
+ "author": "Adfinis AG <info@adfinis.com>",
14
14
  "directories": {
15
15
  "test": "tests"
16
16
  },
17
- "homepage": "https://adfinis-sygroup.github.io/ember-validated-form",
17
+ "homepage": "https://adfinis.github.io/ember-validated-form",
18
18
  "bugs": {
19
- "url": "https://github.com/adfinis-sygroup/ember-validated-form/issues"
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
- "ember-auto-import": "^2.4.0",
37
- "ember-cli-babel": "^7.26.6",
38
- "ember-cli-htmlbars": "^5.7.1",
39
- "ember-truth-helpers": "^3.0.0"
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.6.0",
46
- "@embroider/test-setup": "1.1.0",
47
- "@fortawesome/ember-fontawesome": "0.3.1",
48
- "@fortawesome/free-solid-svg-icons": "5.15.4",
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-changeset": "4.0.0-beta.2",
54
- "ember-changeset-validations": "4.0.0-beta.2",
55
- "ember-cli": "3.28.1",
56
- "ember-cli-addon-docs": "4.2.2",
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.2.1",
67
- "ember-data": "3.28.3",
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": "3.28.1",
74
+ "ember-source": "4.7.0",
75
75
  "ember-source-channel-url": "3.0.0",
76
- "ember-template-lint": "3.15.0",
77
- "ember-template-lint-plugin-prettier": "2.0.1",
78
- "ember-try": "1.4.0",
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.3.0",
81
- "eslint-plugin-ember": "10.5.8",
82
- "eslint-plugin-import": "2.25.4",
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.0.0",
85
- "eslint-plugin-qunit": "6.2.0",
86
- "husky": "7.0.4",
87
- "lint-staged": "12.3.3",
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.5.1",
91
- "qunit": "2.17.2",
90
+ "prettier": "2.7.1",
91
+ "qunit": "2.19.1",
92
92
  "qunit-dom": "2.0.0",
93
- "webpack": "5.68.0"
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": "12.* || 14.* || >= 16"
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-sygroup.github.io/ember-validated-form"
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
@@ -1,11 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: "/"
5
- schedule:
6
- interval: "weekly"
7
- day: "friday"
8
- time: "12:00"
9
- timezone: "Europe/Zurich"
10
- open-pull-requests-limit: 10
11
- versioning-strategy: increase
@@ -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
- }
@@ -1,10 +0,0 @@
1
- import Component from "../../button";
2
-
3
- export default class UikitButton extends Component {
4
- get class() {
5
- const style =
6
- this.args.type === "submit" ? "uk-button-primary" : "uk-button-default";
7
-
8
- return `uk-button ${style}`;
9
- }
10
- }
@@ -1,4 +0,0 @@
1
- import Component from "@glimmer/component";
2
-
3
- // eslint-disable-next-line ember/no-empty-glimmer-component-classes
4
- export default class ButtonComponent extends Component {}
@@ -1,5 +0,0 @@
1
- import Component from "../../error";
2
-
3
- export default class BootstrapErrorComponent extends Component {
4
- class = "invalid-feedback";
5
- }
@@ -1,5 +0,0 @@
1
- import Component from "../../hint";
2
-
3
- export default class BootstrapHintComponent extends Component {
4
- class = "form-text text-muted";
5
- }
@@ -1,3 +0,0 @@
1
- import Component from "../../label";
2
-
3
- export default class BootstrapLabelComponent extends Component {}
@@ -1,5 +0,0 @@
1
- import Component from "../../render";
2
-
3
- export default class BootstrapRenderComponent extends Component {
4
- class = "form-group";
5
- }
@@ -1,4 +0,0 @@
1
- <small
2
- class="uk-text-danger"
3
- ...attributes
4
- >{{yield}}{{this.errorString}}</small>