@lion/calendar
Advanced tools
Comparing version 0.12.6 to 0.12.7
# Change Log | ||
## 0.12.7 | ||
### Patch Changes | ||
- 69e38a76: Fix event handler bind so the events are cleaned up properly in disconnectedCallback | ||
## 0.12.6 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@lion/calendar", | ||
"version": "0.12.6", | ||
"version": "0.12.7", | ||
"description": "Standalone calendar", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -103,2 +103,6 @@ declare const LionCalendar_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("@lion/localize/types/LocalizeMixinTypes").LocalizeMixinHost> & typeof import("@lion/localize/types/LocalizeMixinTypes").LocalizeMixinHost; | ||
locale: string; | ||
__boundKeyboardNavigationEvent: (ev: KeyboardEvent) => void; | ||
__boundClickDateDelegation: (ev: Event) => void; | ||
__boundFocusDateDelegation: () => void; | ||
__boundBlurDateDelegation: () => void; | ||
get focusedDate(): Date | null; | ||
@@ -105,0 +109,0 @@ goToNextMonth(): void; |
@@ -167,2 +167,6 @@ import { html, LitElement } from '@lion/core'; | ||
this.locale = ''; | ||
this.__boundKeyboardNavigationEvent = this.__keyboardNavigationEvent.bind(this); | ||
this.__boundClickDateDelegation = this.__clickDateDelegation.bind(this); | ||
this.__boundFocusDateDelegation = this.__focusDateDelegation.bind(this); | ||
this.__boundBlurDateDelegation = this.__focusDateDelegation.bind(this); | ||
} | ||
@@ -258,9 +262,6 @@ | ||
)); | ||
this.__contentWrapperElement.addEventListener('click', this.__clickDateDelegation.bind(this)); | ||
this.__contentWrapperElement.addEventListener('focus', this.__focusDateDelegation.bind(this)); | ||
this.__contentWrapperElement.addEventListener('blur', this.__blurDateDelegation.bind(this)); | ||
this.__contentWrapperElement.addEventListener( | ||
'keydown', | ||
this.__keyboardNavigationEvent.bind(this), | ||
); | ||
this.__contentWrapperElement.addEventListener('click', this.__boundClickDateDelegation); | ||
this.__contentWrapperElement.addEventListener('focus', this.__boundFocusDateDelegation); | ||
this.__contentWrapperElement.addEventListener('blur', this.__boundBlurDateDelegation); | ||
this.__contentWrapperElement.addEventListener('keydown', this.__boundKeyboardNavigationEvent); | ||
this.__eventsAdded = true; | ||
@@ -273,20 +274,8 @@ } | ||
if (this.__contentWrapperElement) { | ||
this.__contentWrapperElement.removeEventListener('click', this.__boundClickDateDelegation); | ||
this.__contentWrapperElement.removeEventListener('focus', this.__boundFocusDateDelegation); | ||
this.__contentWrapperElement.removeEventListener('blur', this.__boundBlurDateDelegation); | ||
this.__contentWrapperElement.removeEventListener( | ||
'click', | ||
this.__clickDateDelegation.bind(this), | ||
); | ||
this.__contentWrapperElement.removeEventListener( | ||
'focus', | ||
this.__focusDateDelegation.bind(this), | ||
true, | ||
); | ||
this.__contentWrapperElement.removeEventListener( | ||
'blur', | ||
this.__blurDateDelegation.bind(this), | ||
true, | ||
); | ||
this.__contentWrapperElement.removeEventListener( | ||
'keydown', | ||
this.__keyboardNavigationEvent.bind(this), | ||
this.__boundKeyboardNavigationEvent, | ||
); | ||
@@ -293,0 +282,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183886
4049