ember-validated-form 4.1.0 → 5.2.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 (93) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -1
  2. package/.github/dependabot.yml +11 -0
  3. package/.github/workflows/deploy.yml +1 -1
  4. package/.github/workflows/test.yml +1 -1
  5. package/.husky/commit-msg +6 -0
  6. package/.husky/pre-commit +8 -0
  7. package/CHANGELOG.md +32 -0
  8. package/README.md +2 -2
  9. package/addon/-private/themed-component.js +31 -35
  10. package/addon/components/validated-button/-themes/bootstrap/button.js +7 -9
  11. package/addon/components/validated-button/-themes/uikit/button.js +7 -9
  12. package/addon/components/validated-button/button.hbs +9 -0
  13. package/addon/components/validated-button/button.js +3 -8
  14. package/addon/components/validated-button.hbs +17 -0
  15. package/addon/components/validated-button.js +58 -9
  16. package/addon/components/validated-form.hbs +29 -0
  17. package/addon/components/validated-form.js +49 -43
  18. package/addon/components/validated-input/-themes/bootstrap/error.js +3 -3
  19. package/addon/components/validated-input/-themes/bootstrap/hint.js +3 -3
  20. package/addon/components/validated-input/-themes/bootstrap/label.js +1 -1
  21. package/addon/components/validated-input/-themes/bootstrap/render.js +3 -3
  22. package/addon/components/validated-input/-themes/uikit/error.hbs +4 -0
  23. package/addon/components/validated-input/-themes/uikit/error.js +1 -4
  24. package/addon/components/validated-input/-themes/uikit/hint.js +3 -3
  25. package/addon/components/validated-input/-themes/uikit/label.js +3 -3
  26. package/addon/components/validated-input/-themes/uikit/render.hbs +110 -0
  27. package/addon/components/validated-input/-themes/uikit/render.js +3 -5
  28. package/addon/components/validated-input/error.hbs +1 -0
  29. package/addon/components/validated-input/error.js +6 -7
  30. package/addon/components/validated-input/hint.hbs +1 -0
  31. package/addon/components/validated-input/hint.js +3 -7
  32. package/addon/components/validated-input/label.hbs +3 -0
  33. package/addon/components/validated-input/label.js +3 -8
  34. package/addon/components/validated-input/render.hbs +108 -0
  35. package/addon/components/validated-input/render.js +10 -13
  36. package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs +19 -0
  37. package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.js +1 -4
  38. package/addon/components/validated-input/types/-themes/bootstrap/checkbox.hbs +14 -0
  39. package/addon/components/validated-input/types/-themes/bootstrap/checkbox.js +1 -6
  40. package/addon/components/validated-input/types/-themes/bootstrap/input.js +11 -4
  41. package/addon/components/validated-input/types/-themes/bootstrap/radio-group.hbs +20 -0
  42. package/addon/components/validated-input/types/-themes/bootstrap/radio-group.js +1 -4
  43. package/addon/components/validated-input/types/-themes/bootstrap/select.js +11 -4
  44. package/addon/components/validated-input/types/-themes/bootstrap/textarea.js +11 -4
  45. package/addon/components/validated-input/types/-themes/uikit/checkbox-group.hbs +19 -0
  46. package/addon/components/validated-input/types/-themes/uikit/checkbox-group.js +1 -4
  47. package/addon/components/validated-input/types/-themes/uikit/checkbox.hbs +15 -0
  48. package/addon/components/validated-input/types/-themes/uikit/checkbox.js +1 -4
  49. package/addon/components/validated-input/types/-themes/uikit/input.js +11 -4
  50. package/addon/components/validated-input/types/-themes/uikit/radio-group.hbs +20 -0
  51. package/addon/components/validated-input/types/-themes/uikit/radio-group.js +1 -4
  52. package/addon/components/validated-input/types/-themes/uikit/select.js +11 -4
  53. package/addon/components/validated-input/types/-themes/uikit/textarea.js +11 -4
  54. package/addon/components/validated-input/types/checkbox-group.hbs +14 -0
  55. package/addon/components/validated-input/types/checkbox-group.js +9 -11
  56. package/addon/components/validated-input/types/checkbox.hbs +9 -0
  57. package/addon/components/validated-input/types/checkbox.js +10 -6
  58. package/addon/components/validated-input/types/input.hbs +6 -0
  59. package/addon/components/validated-input/types/input.js +9 -17
  60. package/addon/components/validated-input/types/radio-group.hbs +14 -0
  61. package/addon/components/validated-input/types/radio-group.js +10 -6
  62. package/addon/components/validated-input/types/select.hbs +72 -0
  63. package/addon/components/validated-input/types/select.js +118 -6
  64. package/addon/components/validated-input/types/textarea.hbs +7 -0
  65. package/addon/components/validated-input/types/textarea.js +9 -17
  66. package/addon/{templates/components → components}/validated-input.hbs +3 -5
  67. package/addon/components/validated-input.js +1 -10
  68. package/app/components/validated-form.js +1 -7
  69. package/config/environment.js +1 -1
  70. package/package.json +58 -39
  71. package/.dependabot/config.yml +0 -14
  72. package/.husky/precommit +0 -1
  73. package/.prettierignore +0 -1
  74. package/addon/templates/components/validated-button/button.hbs +0 -1
  75. package/addon/templates/components/validated-button.hbs +0 -7
  76. package/addon/templates/components/validated-form.hbs +0 -15
  77. package/addon/templates/components/validated-input/-themes/uikit/render.hbs +0 -108
  78. package/addon/templates/components/validated-input/error.hbs +0 -1
  79. package/addon/templates/components/validated-input/hint.hbs +0 -1
  80. package/addon/templates/components/validated-input/label.hbs +0 -1
  81. package/addon/templates/components/validated-input/render.hbs +0 -107
  82. package/addon/templates/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs +0 -14
  83. package/addon/templates/components/validated-input/types/-themes/bootstrap/checkbox.hbs +0 -10
  84. package/addon/templates/components/validated-input/types/-themes/bootstrap/radio-group.hbs +0 -15
  85. package/addon/templates/components/validated-input/types/-themes/bootstrap/select.hbs +0 -16
  86. package/addon/templates/components/validated-input/types/-themes/uikit/checkbox-group.hbs +0 -15
  87. package/addon/templates/components/validated-input/types/-themes/uikit/checkbox.hbs +0 -11
  88. package/addon/templates/components/validated-input/types/-themes/uikit/radio-group.hbs +0 -17
  89. package/addon/templates/components/validated-input/types/-themes/uikit/select.hbs +0 -17
  90. package/addon/templates/components/validated-input/types/checkbox-group.hbs +0 -14
  91. package/addon/templates/components/validated-input/types/checkbox.hbs +0 -9
  92. package/addon/templates/components/validated-input/types/radio-group.hbs +0 -14
  93. package/addon/templates/components/validated-input/types/select.hbs +0 -16
@@ -1,8 +1,12 @@
1
- import Component from "@ember/component";
1
+ import { action } from "@ember/object";
2
+ import Component from "@glimmer/component";
2
3
 
3
- import layout from "../../../templates/components/validated-input/types/checkbox";
4
+ export default class CheckboxComponent extends Component {
5
+ @action
6
+ onUpdate(event) {
7
+ event.preventDefault();
4
8
 
5
- export default Component.extend({
6
- layout,
7
- tagName: "",
8
- });
9
+ this.args.update(event.target.checked);
10
+ this.args.setDirty();
11
+ }
12
+ }
@@ -0,0 +1,6 @@
1
+ <input
2
+ class={{this.class}}
3
+ ...attributes
4
+ {{on "input" this.onUpdate}}
5
+ {{on "blur" @setDirty}}
6
+ />
@@ -1,19 +1,11 @@
1
- import Component from "@ember/component";
1
+ import { action } from "@ember/object";
2
+ import Component from "@glimmer/component";
2
3
 
3
- export default Component.extend({
4
- tagName: "input",
5
- type: "text",
6
- attributeBindings: [
7
- "value",
8
- "placeholder",
9
- "type",
10
- "inputId:id",
11
- "name",
12
- "autofocus",
13
- "autocomplete",
14
- "disabled",
4
+ export default class InputComponent extends Component {
5
+ @action
6
+ onUpdate(event) {
7
+ event.preventDefault();
15
8
 
16
- "update:oninput",
17
- "setDirty:onblur",
18
- ],
19
- });
9
+ this.args.update(event.target.value);
10
+ }
11
+ }
@@ -0,0 +1,14 @@
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
+ disabled={{@disabled}}
10
+ {{on "input" (fn this.onUpdate option.key)}}
11
+ />
12
+ {{option.label}}
13
+ </label>
14
+ {{/each}}
@@ -1,8 +1,12 @@
1
- import Component from "@ember/component";
1
+ import { action } from "@ember/object";
2
+ import Component from "@glimmer/component";
2
3
 
3
- import layout from "../../../templates/components/validated-input/types/radio-group";
4
+ export default class RadioGroupComponent extends Component {
5
+ @action
6
+ onUpdate(value, event) {
7
+ event.preventDefault();
4
8
 
5
- export default Component.extend({
6
- layout,
7
- tagName: "",
8
- });
9
+ this.args.update(value);
10
+ this.args.setDirty();
11
+ }
12
+ }
@@ -0,0 +1,72 @@
1
+ <select
2
+ class={{this.class}}
3
+ ...attributes
4
+ name={{@name}}
5
+ id={{@inpudId}}
6
+ disabled={{@disabled}}
7
+ multiple={{@multiple}}
8
+ {{on "change" this.onUpdate}}
9
+ {{on "blur" this.onBlur}}
10
+ >
11
+ {{#if (or @prompt @includeBlank)}}
12
+ <option
13
+ value=""
14
+ disabled={{not @promptIsSelectable}}
15
+ selected={{not @value}}
16
+ >{{or @prompt @includeBlank}}</option>
17
+ {{/if}}
18
+
19
+ {{#if this.hasGrouping}}
20
+ {{#each this.optionGroups as |optionGroup|}}
21
+ <optgroup label={{optionGroup.groupName}}>
22
+ {{#each optionGroup.options as |opt|}}
23
+ {{#let
24
+ (if
25
+ (or @optionValuePath @optionTargetPath)
26
+ (get opt (or @optionValuePath @optionTargetPath))
27
+ opt
28
+ )
29
+ as |optionValue|
30
+ }}
31
+ <option
32
+ selected={{eq optionValue @value}}
33
+ value={{optionValue}}
34
+ >{{#if @optionLabelPath}}
35
+ {{get opt @optionLabelPath}}
36
+ {{else if @optionValuePath}}
37
+ {{get opt @optionValuePath}}
38
+ {{else if @optionTargetPath}}
39
+ {{get opt @optionTargetPath}}
40
+ {{else}}
41
+ {{opt}}
42
+ {{/if}}
43
+ </option>
44
+ {{/let}}
45
+ {{/each}}
46
+ </optgroup>
47
+ {{/each}}
48
+ {{else}}
49
+ {{#each @options as |opt|}}
50
+ {{#let
51
+ (if
52
+ (or @optionValuePath @optionTargetPath)
53
+ (get opt (or @optionValuePath @optionTargetPath))
54
+ opt
55
+ )
56
+ as |optionValue|
57
+ }}
58
+ <option selected={{eq optionValue @value}} value={{optionValue}}>{{#if
59
+ @optionLabelPath
60
+ }}
61
+ {{get opt @optionLabelPath}}
62
+ {{else if @optionValuePath}}
63
+ {{get opt @optionValuePath}}
64
+ {{else if @optionTargetPath}}
65
+ {{get opt @optionTargetPath}}
66
+ {{else}}
67
+ {{opt}}
68
+ {{/if}}</option>
69
+ {{/let}}
70
+ {{/each}}
71
+ {{/if}}
72
+ </select>
@@ -1,8 +1,120 @@
1
- import Component from "@ember/component";
1
+ import { A as emberArray, isArray } from "@ember/array";
2
+ import { deprecate } from "@ember/debug";
3
+ import EmberObject, { action, get } from "@ember/object";
4
+ import Component from "@glimmer/component";
2
5
 
3
- import layout from "../../../templates/components/validated-input/types/select";
6
+ /**
7
+ * This component is heavily inspired by the ember-one-way-select addon.
8
+ * https://github.com/DockYard/ember-one-way-select
9
+ * Our implementation is slightly simpler, since it does not support
10
+ * the block syntax for options.
11
+ */
4
12
 
5
- export default Component.extend({
6
- layout,
7
- tagName: "",
8
- });
13
+ export default class SelectComponent extends Component {
14
+ constructor(...args) {
15
+ super(...args);
16
+
17
+ if (this.args.includeBlank) {
18
+ deprecate(
19
+ "The `includeBlank` property is deprecated. Please use `prompt` instead.",
20
+ false,
21
+ {
22
+ id: "ember-validated-form:NoMoreincludeBlank",
23
+ until: "6.0.0",
24
+ since: "5.1.0",
25
+ url: "https://github.com/adfinis-sygroup/ember-validated-form/releases/tag/v5.1.0",
26
+ }
27
+ );
28
+ }
29
+ }
30
+
31
+ get hasPreGroupedOptions() {
32
+ return (
33
+ this.args.options[0]?.groupName && isArray(this.args.options[0]?.options)
34
+ );
35
+ }
36
+
37
+ get hasGrouping() {
38
+ return this.hasPreGroupedOptions || this.args.groupLabelPath;
39
+ }
40
+
41
+ get optionGroups() {
42
+ const groupLabelPath = this.args.groupLabelPath;
43
+ if (!groupLabelPath) {
44
+ return this.args.options;
45
+ }
46
+ const groups = emberArray();
47
+
48
+ this.args.options.forEach((item) => {
49
+ const label = get(item, groupLabelPath);
50
+
51
+ if (label) {
52
+ let group = groups.findBy("groupName", label);
53
+
54
+ if (!group) {
55
+ group = EmberObject.create({
56
+ groupName: label,
57
+ options: emberArray(),
58
+ });
59
+
60
+ groups.pushObject(group);
61
+ }
62
+
63
+ group.options.pushObject(item);
64
+ } else {
65
+ groups.pushObject(item);
66
+ }
67
+ });
68
+
69
+ return groups;
70
+ }
71
+
72
+ findOption(target) {
73
+ const targetPath = this.args.optionTargetPath;
74
+ const valuePath = this.args.optionValuePath || targetPath;
75
+ let options = this.args.options;
76
+
77
+ //flatten pre grouped options
78
+ if (this.hasPreGroupedOptions) {
79
+ options = options.flatMap((group) => group.options);
80
+ }
81
+
82
+ // multi select
83
+ if (this.args.multiple) {
84
+ const selectedValues = Array.prototype.filter
85
+ .call(target.options, (option) => option.selected)
86
+ .map((option) => option.value);
87
+
88
+ const foundOptions = options.filter((item) =>
89
+ selectedValues.includes(`${valuePath ? item[valuePath] : item}`)
90
+ );
91
+ if (targetPath) {
92
+ return foundOptions.map((item) => item[targetPath]);
93
+ }
94
+ return foundOptions;
95
+ }
96
+
97
+ //single select
98
+ const foundOption = options.find(
99
+ (item) => `${valuePath ? item[valuePath] : item.value}` === target.value
100
+ );
101
+ if (targetPath) {
102
+ return foundOption[targetPath];
103
+ }
104
+ return foundOption;
105
+ }
106
+
107
+ @action
108
+ onUpdate(event) {
109
+ if (this.args.update) {
110
+ this.args.update(this.findOption(event.target));
111
+ }
112
+ }
113
+
114
+ @action
115
+ onBlur(event) {
116
+ if (this.args.setDirty) {
117
+ this.args.setDirty(event.target.value);
118
+ }
119
+ }
120
+ }
@@ -0,0 +1,7 @@
1
+ <textarea
2
+ class={{this.class}}
3
+ ...attributes
4
+ {{on "input" this.onUpdate}}
5
+ {{on "blur" @setDirty}}
6
+ >
7
+ </textarea>
@@ -1,19 +1,11 @@
1
- import Component from "@ember/component";
1
+ import { action } from "@ember/object";
2
+ import Component from "@glimmer/component";
2
3
 
3
- export default Component.extend({
4
- tagName: "textarea",
5
- attributeBindings: [
6
- "value",
7
- "placeholder",
8
- "name",
9
- "inputId:id",
10
- "disabled",
11
- "autofocus",
12
- "rows",
13
- "cols",
14
- "autocomplete",
4
+ export default class TextareaComponent extends Component {
5
+ @action
6
+ onUpdate(event) {
7
+ event.preventDefault();
15
8
 
16
- "update:oninput",
17
- "setDirty:onblur",
18
- ],
19
- });
9
+ this.args.update(event.target.value);
10
+ }
11
+ }
@@ -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 ValidatedInput extends Component {
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
- import ValidatedForm from "ember-validated-form/components/validated-form";
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";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  module.exports = function (/* environment, appConfig */) {
4
- return { historySupportMiddleware: true };
4
+ return {};
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-validated-form",
3
- "version": "4.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Easily create forms with client-side validations",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -20,42 +20,46 @@
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:js": "eslint .",
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:* test:*",
30
+ "test": "npm-run-all lint test:*",
28
31
  "test:ember": "ember test",
29
- "test:ember-compatibility": "ember try:each"
30
- },
31
- "lint-staged": {
32
- "*.{js,json,css,md}": [
33
- "prettier --write",
34
- "git add"
35
- ]
32
+ "test:ember-compatibility": "ember try:each",
33
+ "prepare": "husky install"
36
34
  },
37
35
  "dependencies": {
38
- "ember-auto-import": "^1.11.2",
39
- "ember-cli-babel": "^7.26.3",
36
+ "ember-auto-import": "^2.4.0",
37
+ "ember-cli-babel": "^7.26.6",
40
38
  "ember-cli-htmlbars": "^5.7.1",
41
- "ember-one-way-select": "^4.0.1",
42
39
  "ember-truth-helpers": "^3.0.0"
43
40
  },
44
41
  "devDependencies": {
45
- "@adfinis-sygroup/eslint-config": "1.3.2",
46
- "@adfinis-sygroup/semantic-release-config": "3.1.0",
47
- "@babel/core": "7.14.8",
42
+ "@adfinis-sygroup/eslint-config": "1.5.0",
43
+ "@adfinis-sygroup/semantic-release-config": "3.4.0",
44
+ "@babel/core": "7.16.12",
45
+ "@babel/helper-create-regexp-features-plugin": "^7.16.7",
46
+ "@babel/helper-environment-visitor": "^7.16.7",
47
+ "@babel/plugin-proposal-decorators": "^7.16.7",
48
+ "@babel/plugin-transform-modules-amd": "^7.16.7",
49
+ "@babel/preset-env": "^7.16.11",
48
50
  "@ember/optional-features": "2.0.0",
51
+ "@ember/test-helpers": "2.6.0",
52
+ "@embroider/test-setup": "0.45.0",
49
53
  "@fortawesome/ember-fontawesome": "0.2.3",
50
- "@fortawesome/free-solid-svg-icons": "5.15.3",
54
+ "@fortawesome/free-solid-svg-icons": "5.15.4",
51
55
  "@glimmer/component": "1.0.4",
52
56
  "@glimmer/tracking": "1.0.4",
53
57
  "babel-eslint": "10.1.0",
54
58
  "broccoli-asset-rev": "3.0.0",
55
- "ember-changeset": "3.14.1",
56
- "ember-changeset-validations": "3.15.2",
57
- "ember-cli": "3.27.0",
58
- "ember-cli-addon-docs": "3.0.0",
59
+ "ember-changeset": "4.0.0-beta.2",
60
+ "ember-changeset-validations": "4.0.0-beta.2",
61
+ "ember-cli": "3.28.1",
62
+ "ember-cli-addon-docs": "4.2.1",
59
63
  "ember-cli-dependency-checker": "3.2.0",
60
64
  "ember-cli-deploy": "1.0.2",
61
65
  "ember-cli-deploy-build": "2.0.0",
@@ -66,36 +70,46 @@
66
70
  "ember-cli-sri": "2.1.1",
67
71
  "ember-cli-terser": "4.0.2",
68
72
  "ember-cli-test-loader": "3.0.0",
69
- "ember-concurrency": "2.1.2",
70
- "ember-data": "3.27.1",
73
+ "ember-concurrency": "2.2.0",
74
+ "ember-data": "3.28.3",
71
75
  "ember-disable-prototype-extensions": "1.1.3",
72
76
  "ember-load-initializers": "2.1.2",
73
- "ember-maybe-import-regenerator": "0.1.6",
74
- "ember-power-select": "4.1.6",
75
- "ember-qunit": "4.6.0",
76
- "ember-resolver": "8.0.2",
77
- "ember-source": "3.27.5",
77
+ "ember-maybe-import-regenerator": "1.0.0",
78
+ "ember-power-select": "5.0.3",
79
+ "ember-qunit": "5.1.5",
80
+ "ember-resolver": "8.0.3",
81
+ "ember-source": "3.28.1",
78
82
  "ember-source-channel-url": "3.0.0",
79
- "ember-template-lint": "2.21.0",
83
+ "ember-template-lint": "3.15.0",
84
+ "ember-template-lint-plugin-prettier": "2.0.1",
80
85
  "ember-try": "1.4.0",
81
86
  "eslint": "7.32.0",
82
87
  "eslint-config-prettier": "8.3.0",
83
- "eslint-plugin-ember": "9.6.0",
84
- "eslint-plugin-import": "2.23.4",
88
+ "eslint-plugin-ember": "10.5.8",
89
+ "eslint-plugin-import": "2.25.4",
85
90
  "eslint-plugin-node": "11.1.0",
86
- "eslint-plugin-prettier": "3.4.0",
87
- "husky": "7.0.1",
88
- "lint-staged": "11.1.1",
91
+ "eslint-plugin-prettier": "4.0.0",
92
+ "eslint-plugin-qunit": "6.2.0",
93
+ "husky": "7.0.4",
94
+ "lint-staged": "11.2.0",
89
95
  "loader.js": "4.7.0",
90
96
  "npm-run-all": "4.1.5",
91
- "prettier": "2.3.2",
92
- "qunit-dom": "1.6.0"
97
+ "prettier": "2.5.1",
98
+ "qunit": "2.17.2",
99
+ "qunit-dom": "2.0.0",
100
+ "webpack": "5.67.0"
93
101
  },
94
102
  "resolutions": {
95
- "graceful-fs": ">=4.2.0"
103
+ "graceful-fs": ">=4.2.0",
104
+ "@embroider/macros": "^1.0.0",
105
+ "@embroider/core": "^1.0.0",
106
+ "@embroider/util": "^1.0.0"
96
107
  },
97
108
  "engines": {
98
- "node": "14.* || >= 16"
109
+ "node": "12.* || 14.* || >= 16"
110
+ },
111
+ "ember": {
112
+ "edition": "octane"
99
113
  },
100
114
  "ember-addon": {
101
115
  "configPath": "tests/dummy/config",
@@ -104,6 +118,11 @@
104
118
  "release": {
105
119
  "extends": "@adfinis-sygroup/semantic-release-config"
106
120
  },
121
+ "lint-staged": {
122
+ "*.js": "eslint --cache --fix",
123
+ "*.hbs": "ember-template-lint --fix",
124
+ "*.{scss,graphql,json,md,yml}": "prettier --write"
125
+ },
107
126
  "commitlint": {
108
127
  "extends": [
109
128
  "@commitlint/config-conventional"
@@ -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/.husky/precommit DELETED
@@ -1 +0,0 @@
1
- yarn lint-staged
package/.prettierignore DELETED
@@ -1 +0,0 @@
1
- package.json
@@ -1 +0,0 @@
1
- {{#if hasBlock}}{{~yield~}}{{else}}{{~label~}}{{/if}}
@@ -1,7 +0,0 @@
1
- {{#with (component buttonComponent onclick=action disabled=disabled label=label type=type class=class) as |button|}}
2
- {{#if hasBlock}}
3
- {{#component button}}{{yield}}{{/component}}
4
- {{else}}
5
- {{component button}}
6
- {{/if}}
7
- {{/with}}
@@ -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
- )}}