ember-validated-form 6.0.2 → 6.1.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 CHANGED
@@ -1,3 +1,10 @@
1
+ # [6.1.0](https://github.com/adfinis/ember-validated-form/compare/v6.0.2...v6.1.0) (2022-09-16)
2
+
3
+
4
+ ### Features
5
+
6
+ * **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))
7
+
1
8
  ## [6.0.2](https://github.com/adfinis/ember-validated-form/compare/v6.0.1...v6.0.2) (2022-09-09)
2
9
 
3
10
 
@@ -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
  }
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.0",
4
4
  "description": "Easily create forms with client-side validations",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -68,6 +68,7 @@
68
68
  "ember-concurrency": "2.3.6",
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",