@ember-eui/pikaday 4.0.7 → 4.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.
@@ -21,12 +21,12 @@
21
21
  @isInvalid={{@isInvalid}}
22
22
  ...attributes
23
23
  {{pikaday
24
- @options
24
+ this.options
25
25
  value=this.value
26
26
  onSelect=this.onSelect
27
27
  setDefaultDate=true
28
28
  defaultDate=@defaultDate
29
- onOpen=@onOpen
29
+ onOpen=this.onOpen
30
30
  onDraw=this.onDraw
31
31
  onClose=this.onClose
32
32
  format=this.format
@@ -38,8 +38,11 @@
38
38
  firstDay=this.firstDay
39
39
  container=@container
40
40
  bound=@bound
41
+ register=this.registerPikaday
42
+ moment=@moment
41
43
  }}
42
- {{on 'change' this.didChange}}
44
+ {{on "change" this.didChange}}
45
+ {{did-insert this.registerField}}
43
46
  >
44
47
  <:prepend as |classes|>
45
48
  {{yield classes to="prepend"}}
@@ -2,6 +2,8 @@ import Component from '@glimmer/component';
2
2
  import { action } from '@ember/object';
3
3
 
4
4
  export default class EuiPikadayComponent extends Component {
5
+ field = null;
6
+
5
7
  get format() {
6
8
  return this.args.format || 'DD.MM.YYYY';
7
9
  }
@@ -47,6 +49,17 @@ export default class EuiPikadayComponent extends Component {
47
49
  return this.args.firstDay == null ? 1 : parseInt(this.args.firstDay, 10);
48
50
  }
49
51
 
52
+ @action
53
+ registerField(field) {
54
+ this.field = field;
55
+ }
56
+
57
+ @action
58
+ registerPikaday(pikaday) {
59
+ this.pikaday = pikaday;
60
+ this.args.register?.(pikaday);
61
+ }
62
+
50
63
  @action
51
64
  onClose() {
52
65
  if (this.isDestroying) {
@@ -58,6 +71,14 @@ export default class EuiPikadayComponent extends Component {
58
71
  this.args.onClose?.();
59
72
  }
60
73
 
74
+ @action
75
+ onOpen() {
76
+ if (this.isDestroying) {
77
+ return;
78
+ }
79
+ this.args.onOpen?.();
80
+ }
81
+
61
82
  #heardValue;
62
83
 
63
84
  @action
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/pikaday",
3
- "version": "4.0.7",
3
+ "version": "4.1.0",
4
4
  "description": "ember-pikaday integration with @ember-eui/core",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -31,14 +31,14 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@ember-decorators/component": "^6.1.0",
34
- "@ember-eui/core": "^4.0.7",
34
+ "@ember-eui/core": "^4.1.0",
35
35
  "@types/ember": "^3.16.4",
36
36
  "ember-auto-import": "^2.4.0",
37
37
  "ember-cli-babel": "^7.26.11",
38
38
  "ember-cli-htmlbars": "^6.0.1",
39
39
  "ember-cli-typescript": "4.2.1",
40
40
  "ember-named-blocks-polyfill": "^0.2.3",
41
- "ember-pikaday": "^4.0.0",
41
+ "ember-pikaday-prysmex": "~4.3.0",
42
42
  "ember-svg-jar": "^2.3.4"
43
43
  },
44
44
  "devDependencies": {
@@ -117,5 +117,5 @@
117
117
  "volta": {
118
118
  "extends": "../../package.json"
119
119
  },
120
- "gitHead": "349379d003ad8ef2cefea0a992f85e408a15f0de"
120
+ "gitHead": "ce506cfece96738979e6bd9bcec919330df77115"
121
121
  }