ember-validated-form 6.0.1 → 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,17 @@
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
+
8
+ ## [6.0.2](https://github.com/adfinis/ember-validated-form/compare/v6.0.1...v6.0.2) (2022-09-09)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** remove unnecessary dependency to tracked-toolbox ([605c001](https://github.com/adfinis/ember-validated-form/commit/605c0018c44dcfd99685c35b3ba656cfab420a35))
14
+
1
15
  ## [6.0.1](https://github.com/adfinis/ember-validated-form/compare/v6.0.0...v6.0.1) (2022-09-08)
2
16
 
3
17
 
@@ -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
  }
@@ -1,10 +1,9 @@
1
1
  import { importSync, getOwnConfig } from "@embroider/macros";
2
2
  import { ensureSafeComponent } from "@embroider/util";
3
- import { cached } from "tracked-toolbox";
4
3
 
5
4
  export default function passedOrDefault(componentName) {
6
5
  return function (target, property) {
7
- return cached(target, property, {
6
+ return {
8
7
  get() {
9
8
  return ensureSafeComponent(
10
9
  this.args[property] ??
@@ -12,6 +11,6 @@ export default function passedOrDefault(componentName) {
12
11
  this
13
12
  );
14
13
  },
15
- });
14
+ };
16
15
  };
17
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.1",
3
+ "version": "6.1.0",
4
4
  "description": "Easily create forms with client-side validations",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -41,8 +41,7 @@
41
41
  "ember-changeset-validations": "^4.1.0",
42
42
  "ember-cli-babel": "^7.26.11",
43
43
  "ember-cli-htmlbars": "^6.1.0",
44
- "ember-truth-helpers": "^3.1.1",
45
- "tracked-toolbox": "^2.0.0"
44
+ "ember-truth-helpers": "^3.1.1"
46
45
  },
47
46
  "devDependencies": {
48
47
  "@adfinis-sygroup/eslint-config": "1.5.0",
@@ -69,6 +68,7 @@
69
68
  "ember-concurrency": "2.3.6",
70
69
  "ember-data": "4.4.1",
71
70
  "ember-disable-prototype-extensions": "1.1.3",
71
+ "ember-flatpickr": "3.2.3",
72
72
  "ember-load-initializers": "2.1.2",
73
73
  "ember-qunit": "5.1.5",
74
74
  "ember-resolver": "8.0.3",