@vaadin/component-base
Advanced tools
Comparing version 23.3.0-alpha3 to 24.0.0-alpha1
{ | ||
"name": "@vaadin/component-base", | ||
"version": "23.3.0-alpha3", | ||
"version": "24.0.0-alpha1", | ||
"publishConfig": { | ||
@@ -45,3 +45,3 @@ "access": "public" | ||
}, | ||
"gitHead": "e86cd2abf3e28bade37711291331415d92c454ec" | ||
"gitHead": "427527c27c4b27822d61fd41d38d7b170134770b" | ||
} |
@@ -6,6 +6,5 @@ /** | ||
*/ | ||
import { animationFrame } from './async.js'; | ||
import { Debouncer } from './debounce.js'; | ||
import { animationFrame } from '@vaadin/component-base/src/async.js'; | ||
import { Debouncer } from '@vaadin/component-base/src/debounce.js'; | ||
const region = document.createElement('div'); | ||
@@ -12,0 +11,0 @@ |
@@ -6,4 +6,4 @@ /** | ||
*/ | ||
import { addListener } from '@vaadin/component-base/src/gestures.js'; | ||
import { DisabledMixin } from './disabled-mixin.js'; | ||
import { addListener } from './gestures.js'; | ||
import { KeyboardMixin } from './keyboard-mixin.js'; | ||
@@ -10,0 +10,0 @@ |
@@ -12,2 +12,3 @@ /** | ||
const directionSubscribers = []; | ||
function directionUpdater() { | ||
@@ -78,3 +79,3 @@ const documentDir = getDocumentDir(); | ||
if (!this.hasAttribute('dir')) { | ||
if (!this.hasAttribute('dir') || this.__restoreSubscription) { | ||
this.__subscribe(); | ||
@@ -105,3 +106,3 @@ alignDirs(this, getDocumentDir(), null); | ||
} else if (newDiffValue) { | ||
this.__subscribe(false); | ||
this.__unsubscribe(); | ||
} | ||
@@ -113,4 +114,4 @@ } | ||
super.disconnectedCallback(); | ||
this.__subscribe(false); | ||
this.removeAttribute('dir'); | ||
this.__restoreSubscription = directionSubscribers.includes(this); | ||
this.__unsubscribe(); | ||
} | ||
@@ -140,8 +141,11 @@ | ||
/** @private */ | ||
__subscribe(push = true) { | ||
if (push) { | ||
if (!directionSubscribers.includes(this)) { | ||
directionSubscribers.push(this); | ||
} | ||
} else if (directionSubscribers.includes(this)) { | ||
__subscribe() { | ||
if (!directionSubscribers.includes(this)) { | ||
directionSubscribers.push(this); | ||
} | ||
} | ||
/** @private */ | ||
__unsubscribe() { | ||
if (directionSubscribers.includes(this)) { | ||
directionSubscribers.splice(directionSubscribers.indexOf(this), 1); | ||
@@ -148,0 +152,0 @@ } |
@@ -42,3 +42,3 @@ /** | ||
static get version() { | ||
return '23.3.0-alpha3'; | ||
return '24.0.0-alpha1'; | ||
} | ||
@@ -45,0 +45,0 @@ |
@@ -158,2 +158,6 @@ /** | ||
el.style.paddingTop = `${this.__placeholderHeight}px`; | ||
// Manually schedule the resize handler to make sure the placeholder padding is | ||
// cleared in case the resize observer never triggers. | ||
requestAnimationFrame(() => this._resizeHandler()); | ||
} else { | ||
@@ -160,0 +164,0 @@ // Add element height to the queue |
194247
5656