@vaadin/component-base
Advanced tools
Comparing version 22.0.0-beta2 to 22.0.0-rc1
export { ActiveMixin } from './src/active-mixin.js'; | ||
export { ControllerMixin } from './src/controller-mixin.js'; | ||
export { DirMixin } from './src/dir-mixin.js'; | ||
@@ -3,0 +4,0 @@ export { DisabledMixin } from './src/disabled-mixin.js'; |
export { ActiveMixin } from './src/active-mixin.js'; | ||
export { ControllerMixin } from './src/controller-mixin.js'; | ||
export { DirMixin } from './src/dir-mixin.js'; | ||
@@ -3,0 +4,0 @@ export { DisabledMixin } from './src/disabled-mixin.js'; |
{ | ||
"name": "@vaadin/component-base", | ||
"version": "22.0.0-beta2", | ||
"version": "22.0.0-rc1", | ||
"publishConfig": { | ||
@@ -41,6 +41,6 @@ "access": "public" | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/testing-helpers": "^0.3.0", | ||
"@vaadin/testing-helpers": "^0.3.2", | ||
"sinon": "^9.2.4" | ||
}, | ||
"gitHead": "f13833683e6667f6ca6678452db14aa6b7eac4a4" | ||
"gitHead": "7b6f44bcd2c0fd415028ace666feeb0fedb1d540" | ||
} |
@@ -9,14 +9,10 @@ /** | ||
import { Constructor } from '@open-wc/dedupe-mixin'; | ||
import { ReactiveControllerHost } from 'lit'; | ||
import { DirMixinClass } from './dir-mixin.js'; | ||
/** | ||
* A mixin to provide common logic for Vaadin components. | ||
* A mixin providing common logic for Vaadin components. | ||
*/ | ||
export declare function ElementMixin<T extends Constructor<HTMLElement>>( | ||
superclass: T | ||
): T & | ||
Constructor<DirMixinClass> & | ||
Constructor<ElementMixinClass> & | ||
Pick<ReactiveControllerHost, 'addController' | 'removeController'>; | ||
): T & Constructor<DirMixinClass> & Constructor<ElementMixinClass>; | ||
@@ -23,0 +19,0 @@ export declare class ElementMixinClass { |
@@ -35,3 +35,3 @@ /** | ||
static get version() { | ||
return '22.0.0-beta2'; | ||
return '22.0.0-rc1'; | ||
} | ||
@@ -62,4 +62,2 @@ | ||
this.__controllers = new Set(); | ||
if (document.doctype === null) { | ||
@@ -71,40 +69,2 @@ console.warn( | ||
} | ||
/** @protected */ | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
this.__controllers.forEach((c) => { | ||
c.hostConnected && c.hostConnected(); | ||
}); | ||
} | ||
/** @protected */ | ||
disconnectedCallback() { | ||
super.disconnectedCallback(); | ||
this.__controllers.forEach((c) => { | ||
c.hostDisconnected && c.hostDisconnected(); | ||
}); | ||
} | ||
/** | ||
* Registers a controller to participate in the element update cycle. | ||
* @protected | ||
*/ | ||
addController(controller) { | ||
this.__controllers.add(controller); | ||
// Call hostConnected if a controller is added after the element is attached. | ||
if (this.$ !== undefined && this.isConnected && controller.hostConnected) { | ||
controller.hostConnected(); | ||
} | ||
} | ||
/** | ||
* Removes a controller from the element. | ||
* @protected | ||
*/ | ||
removeController(controller) { | ||
this.__controllers.delete(controller); | ||
} | ||
}; |
@@ -10,4 +10,4 @@ /** | ||
*/ | ||
import { animationFrame, idlePeriod, microTask } from '@vaadin/component-base/src/async.js'; | ||
import { Debouncer, enqueueDebouncer, flush } from '@vaadin/component-base/src/debounce.js'; | ||
import { animationFrame, idlePeriod, microTask } from './async.js'; | ||
import { Debouncer, enqueueDebouncer, flush } from './debounce.js'; | ||
@@ -14,0 +14,0 @@ const IOS = navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/); |
@@ -1,3 +0,9 @@ | ||
import { animationFrame, timeOut } from '@vaadin/component-base/src/async.js'; | ||
import { Debouncer, flush } from '@vaadin/component-base/src/debounce.js'; | ||
/** | ||
* @license | ||
* Copyright (c) 2021 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
import { animationFrame, timeOut } from './async.js'; | ||
import { isSafari } from './browser-utils.js'; | ||
import { Debouncer, flush } from './debounce.js'; | ||
import { ironList } from './iron-list-core.js'; | ||
@@ -23,4 +29,2 @@ | ||
this.__safari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); | ||
this.timeouts = { | ||
@@ -272,2 +276,4 @@ SCROLL_REORDER: 500, | ||
this.__updateElement(el, el.__virtualIndex); | ||
} else { | ||
delete el.__lastUpdatedIndex; | ||
} | ||
@@ -452,3 +458,3 @@ }, itemSet); | ||
// This issue manifests with grid (the header can disappear if grid is used inside a flexbox) | ||
if (this.__safari) { | ||
if (isSafari) { | ||
const { transform } = this.scrollTarget.style; | ||
@@ -455,0 +461,0 @@ this.scrollTarget.style.transform = 'translateZ(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
108443
34
2815