@ember-eui/flatpickr 5.12.6 → 5.14.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.
@@ -4,36 +4,47 @@
4
4
  (arg-or-default @id (unique-id))
5
5
  as |hasPrepend hasAppend inputId|
6
6
  }}
7
- <EuiFieldText
8
- aria-label={{@ariaLabel}}
9
- @icon={{if @icon @icon "calendar"}}
7
+ <EuiFormControlLayout
10
8
  @fullWidth={{@fullWidth}}
11
- @isLoading={{@isLoading}}
12
- @readOnly={{@readOnly}}
13
- @inputRef={{@inputRef}}
14
- @controlOnly={{@controlOnly}}
15
- @compressed={{@compressed}}
16
- @id={{inputId}}
17
- @isFakePrependBlock={{hasPrepend}}
18
- @isFakeAppendBlock={{hasAppend}}
19
9
  @disabled={{@disabled}}
20
- @isInvalid={{@isInvalid}}
21
- ...attributes
22
- {{did-insert this.onInsert}}
23
- {{will-destroy this.onWillDestroy}}
24
- {{did-update this.onAltFormatUpdated @altFormat}}
25
- {{did-update this.onAltInputClassUpdated @altInputClass}}
26
- {{did-update this.onDateUpdated @date}}
27
- {{did-update this.onDisabledUpdated @disabled}}
28
- {{did-update this.onLocaleUpdated @locale}}
29
- {{did-update this.onMaxDateUpdated @maxDate}}
30
- {{did-update this.onMinDateUpdated @minDate}}
10
+ @clear={{if
11
+ (and @clear @date (and (not @isDisabled) (not @disabled)))
12
+ this.onClear
13
+ }}
14
+ @compressed={{@compressed}}
15
+ @useGroup={{or hasPrepend hasAppend}}
31
16
  >
32
- <:prepend as |classes|>
33
- {{yield classes to="prepend"}}
34
- </:prepend>
35
- <:append as |classes|>
36
- {{yield classes to="append"}}
37
- </:append>
38
- </EuiFieldText>
17
+ <EuiFieldText
18
+ aria-label={{@ariaLabel}}
19
+ @icon={{if @icon @icon "calendar"}}
20
+ @fullWidth={{@fullWidth}}
21
+ @isLoading={{@isLoading}}
22
+ @readOnly={{@readOnly}}
23
+ @inputRef={{@inputRef}}
24
+ @controlOnly={{@controlOnly}}
25
+ @compressed={{@compressed}}
26
+ @id={{inputId}}
27
+ @isFakePrependBlock={{hasPrepend}}
28
+ @isFakeAppendBlock={{hasAppend}}
29
+ @disabled={{@disabled}}
30
+ @isInvalid={{@isInvalid}}
31
+ ...attributes
32
+ {{did-insert this.onInsert}}
33
+ {{will-destroy this.onWillDestroy}}
34
+ {{did-update this.onAltFormatUpdated @altFormat}}
35
+ {{did-update this.onAltInputClassUpdated @altInputClass}}
36
+ {{did-update this.onDateUpdated @date}}
37
+ {{did-update this.onDisabledUpdated @disabled}}
38
+ {{did-update this.onLocaleUpdated @locale}}
39
+ {{did-update this.onMaxDateUpdated @maxDate}}
40
+ {{did-update this.onMinDateUpdated @minDate}}
41
+ >
42
+ <:prepend as |classes finalId|>
43
+ {{yield classes finalId to="prepend"}}
44
+ </:prepend>
45
+ <:append as |classes finalId|>
46
+ {{yield classes finalId to="append"}}
47
+ </:append>
48
+ </EuiFieldText>
49
+ </EuiFormControlLayout>
39
50
  {{/let}}
@@ -1,3 +1,9 @@
1
1
  import EmberFlatpickr from 'ember-flatpickr/components/ember-flatpickr';
2
+ import { action } from '@ember/object';
2
3
 
3
- export default class EuiFlatpickrComponent extends EmberFlatpickr {}
4
+ export default class EuiFlatpickrComponent extends EmberFlatpickr {
5
+ @action
6
+ onClear() {
7
+ this.args.clear(null);
8
+ }
9
+ }
@@ -26,6 +26,7 @@
26
26
  @defaultDate={{this.date}}
27
27
  @defaultHour={{12}}
28
28
  @defaultMinute={{0}}
29
+ @clear={{set this "date"}}
29
30
  @disable={{this.datesToDisable}}
30
31
  @disableMobile={{false}}
31
32
  @enable={{this.datesToEnable}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/flatpickr",
3
- "version": "5.12.6",
3
+ "version": "5.14.0",
4
4
  "description": "ember-flatpickr integration with @ember-eui/core",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -30,7 +30,7 @@
30
30
  "postpack": "ember ts:clean"
31
31
  },
32
32
  "dependencies": {
33
- "@ember-eui/core": "^5.12.6",
33
+ "@ember-eui/core": "^5.14.0",
34
34
  "@types/ember": "^3.16.4",
35
35
  "ember-auto-import": "^2.4.0",
36
36
  "ember-cli-babel": "^7.26.11",
@@ -118,5 +118,5 @@
118
118
  "volta": {
119
119
  "extends": "../../package.json"
120
120
  },
121
- "gitHead": "5f9f20f5e0df1bacb65469314440bfa806767edd"
121
+ "gitHead": "edae1f225594be9f1ac0eafdb9c25e9409984d5c"
122
122
  }