ember-validated-form 6.0.2 → 6.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [6.1.1](https://github.com/adfinis/ember-validated-form/compare/v6.1.0...v6.1.1) (2022-09-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **bootstrap:** make sure error feedback is always visible ([1722144](https://github.com/adfinis/ember-validated-form/commit/17221448567a4fb6dc53c39c3f42eb8eb66bdc3d))
7
+ * **checkbox-group:** fix multiple selection in checkbox group ([6bb902b](https://github.com/adfinis/ember-validated-form/commit/6bb902b0577c68671f09f9cda65b5f16ac1b8fcb))
8
+
9
+ # [6.1.0](https://github.com/adfinis/ember-validated-form/compare/v6.0.2...v6.1.0) (2022-09-16)
10
+
11
+
12
+ ### Features
13
+
14
+ * **input:** allow custom date component to be configured ([#861](https://github.com/adfinis/ember-validated-form/issues/861)) ([33bbafa](https://github.com/adfinis/ember-validated-form/commit/33bbafa4ac6a24d332ab4b1548abc4f2daef541f))
15
+
1
16
  ## [6.0.2](https://github.com/adfinis/ember-validated-form/compare/v6.0.1...v6.0.2) (2022-09-09)
2
17
 
3
18
 
@@ -6,7 +6,7 @@
6
6
  <span
7
7
  class={{if
8
8
  (macroCondition (macroGetOwnConfig "isBootstrap"))
9
- "invalid-feedback"
9
+ "d-block invalid-feedback"
10
10
  }}
11
11
  ...attributes
12
12
  >
@@ -86,6 +86,23 @@
86
86
  @update={{@update}}
87
87
  ...attributes
88
88
  />
89
+ {{else if (and
90
+ (eq @type "date") (not-eq this.dateComponent this.inputComponent)
91
+ )}}
92
+ <this.dateComponent
93
+ @autocomplete={{@autocomplete}}
94
+ @autofocus={{@autofocus}}
95
+ @disabled={{@disabled}}
96
+ @id={{@inputId}}
97
+ @name={{or @inputName @name}}
98
+ @placeholder={{@placeholder}}
99
+ @value={{@value}}
100
+ @isInvalid={{@isInvalid}}
101
+ @isValid={{@isValid}}
102
+ @setDirty={{@setDirty}}
103
+ @update={{@update}}
104
+ ...attributes
105
+ />
89
106
  {{else}}
90
107
  <this.inputComponent
91
108
  autocomplete={{@autocomplete}}
@@ -9,4 +9,5 @@ export default class RenderComponent extends Component {
9
9
  @passedOrDefault("types/radio-group") radioGroupComponent;
10
10
  @passedOrDefault("types/select") selectComponent;
11
11
  @passedOrDefault("types/textarea") textareaComponent;
12
+ @passedOrDefault("types/date") dateComponent;
12
13
  }
@@ -6,16 +6,11 @@ export default class CheckboxGroupComponent extends Component {
6
6
  onUpdate(key, event) {
7
7
  event.preventDefault();
8
8
 
9
- const value = this.value || [];
10
- const index = value.indexOf(key);
9
+ const value = new Set(this.args.value || []);
11
10
 
12
- if (index > -1) {
13
- value.splice(index, 1);
14
- } else {
15
- value.push(key);
16
- }
11
+ value.delete(key) || value.add(key);
17
12
 
18
- this.args.update(value);
13
+ this.args.update([...value]);
19
14
  this.args.setDirty();
20
15
  }
21
16
  }
package/index.js CHANGED
@@ -58,6 +58,9 @@ module.exports = {
58
58
  this.options["@embroider/macros"].setOwnConfig["types/textarea"] =
59
59
  defaults["types/textarea"] ??
60
60
  "ember-validated-form/components/validated-input/types/textarea";
61
+ this.options["@embroider/macros"].setOwnConfig["types/date"] =
62
+ defaults["types/date"] ??
63
+ "ember-validated-form/components/validated-input/types/input";
61
64
  },
62
65
 
63
66
  options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-validated-form",
3
- "version": "6.0.2",
3
+ "version": "6.1.1",
4
4
  "description": "Easily create forms with client-side validations",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -40,7 +40,7 @@
40
40
  "ember-changeset": "^4.1.1",
41
41
  "ember-changeset-validations": "^4.1.0",
42
42
  "ember-cli-babel": "^7.26.11",
43
- "ember-cli-htmlbars": "^6.1.0",
43
+ "ember-cli-htmlbars": "^6.1.1",
44
44
  "ember-truth-helpers": "^3.1.1"
45
45
  },
46
46
  "devDependencies": {
@@ -65,9 +65,10 @@
65
65
  "ember-cli-sri": "2.1.1",
66
66
  "ember-cli-terser": "4.0.2",
67
67
  "ember-cli-test-loader": "3.0.0",
68
- "ember-concurrency": "2.3.6",
68
+ "ember-concurrency": "2.3.7",
69
69
  "ember-data": "4.4.1",
70
70
  "ember-disable-prototype-extensions": "1.1.3",
71
+ "ember-flatpickr": "3.2.3",
71
72
  "ember-load-initializers": "2.1.2",
72
73
  "ember-qunit": "5.1.5",
73
74
  "ember-resolver": "8.0.3",