@vaadin/avatar-group
Advanced tools
Comparing version 23.0.0-alpha2 to 23.0.0-alpha3
{ | ||
"name": "@vaadin/avatar-group", | ||
"version": "23.0.0-alpha2", | ||
"version": "23.0.0-alpha3", | ||
"publishConfig": { | ||
@@ -36,12 +36,11 @@ "access": "public" | ||
"dependencies": { | ||
"@polymer/iron-a11y-announcer": "^3.0.0", | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/avatar": "23.0.0-alpha2", | ||
"@vaadin/component-base": "23.0.0-alpha2", | ||
"@vaadin/item": "23.0.0-alpha2", | ||
"@vaadin/list-box": "23.0.0-alpha2", | ||
"@vaadin/vaadin-lumo-styles": "23.0.0-alpha2", | ||
"@vaadin/vaadin-material-styles": "23.0.0-alpha2", | ||
"@vaadin/vaadin-overlay": "23.0.0-alpha2", | ||
"@vaadin/vaadin-themable-mixin": "23.0.0-alpha2" | ||
"@vaadin/avatar": "23.0.0-alpha3", | ||
"@vaadin/component-base": "23.0.0-alpha3", | ||
"@vaadin/item": "23.0.0-alpha3", | ||
"@vaadin/list-box": "23.0.0-alpha3", | ||
"@vaadin/vaadin-lumo-styles": "23.0.0-alpha3", | ||
"@vaadin/vaadin-material-styles": "23.0.0-alpha3", | ||
"@vaadin/vaadin-overlay": "23.0.0-alpha3", | ||
"@vaadin/vaadin-themable-mixin": "23.0.0-alpha3" | ||
}, | ||
@@ -53,3 +52,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "070f586dead02ca41b66717820c647f48bf1665f" | ||
"gitHead": "490037919a9e054cc002c1b3be0c94a1603e1a44" | ||
} |
/** | ||
* @license | ||
* Copyright (c) 2021 Vaadin Ltd. | ||
* Copyright (c) 2020 - 2022 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2021 Vaadin Ltd. | ||
* Copyright (c) 2020 - 2022 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2021 Vaadin Ltd. | ||
* Copyright (c) 2020 - 2022 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -8,2 +8,3 @@ */ | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js'; | ||
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -66,3 +67,3 @@ | ||
*/ | ||
declare class AvatarGroup extends ElementMixin(ThemableMixin(HTMLElement)) { | ||
declare class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(HTMLElement))) { | ||
readonly _avatars: HTMLElement[]; | ||
@@ -69,0 +70,0 @@ |
/** | ||
* @license | ||
* Copyright (c) 2021 Vaadin Ltd. | ||
* Copyright (c) 2020 - 2022 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
import '@polymer/polymer/lib/elements/dom-repeat.js'; | ||
import '@vaadin/avatar/src/vaadin-avatar.js'; | ||
@@ -10,9 +11,8 @@ import '@vaadin/item/src/vaadin-item.js'; | ||
import './vaadin-avatar-group-overlay.js'; | ||
import { IronA11yAnnouncer } from '@polymer/iron-a11y-announcer/iron-a11y-announcer.js'; | ||
import { calculateSplices } from '@polymer/polymer/lib/utils/array-splice.js'; | ||
import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js'; | ||
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js'; | ||
import { timeOut } from '@vaadin/component-base/src/async.js'; | ||
import { Debouncer } from '@vaadin/component-base/src/debounce.js'; | ||
import { announce } from '@vaadin/component-base/src/a11y-announcer.js'; | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js'; | ||
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -62,4 +62,5 @@ | ||
* @mixes ThemableMixin | ||
* @mixes ResizeMixin | ||
*/ | ||
class AvatarGroup extends ElementMixin(ThemableMixin(PolymerElement)) { | ||
class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement))) { | ||
static get template() { | ||
@@ -283,9 +284,4 @@ return html` | ||
IronA11yAnnouncer.requestAvailability(); | ||
this.__boundSetPosition = this.__setPosition.bind(this); | ||
this.__resizeObserver = new ResizeObserver(() => this._onResize()); | ||
this.__resizeObserver.observe(this); | ||
this._overlayElement = this.shadowRoot.querySelector('vaadin-avatar-group-overlay'); | ||
@@ -320,15 +316,2 @@ | ||
/** @private */ | ||
__announce(text) { | ||
this.dispatchEvent( | ||
new CustomEvent('iron-announce', { | ||
bubbles: true, | ||
composed: true, | ||
detail: { | ||
text | ||
} | ||
}) | ||
); | ||
} | ||
/** @private */ | ||
__getMessage(user, action) { | ||
@@ -365,8 +348,9 @@ return action.replace('{user}', user.name || user.abbr || this.i18n.anonymous); | ||
/** @private */ | ||
/** | ||
* @protected | ||
* @override | ||
*/ | ||
_onResize() { | ||
this.__debounceResize = Debouncer.debounce(this.__debounceResize, timeOut.after(0), () => { | ||
this.__setItemsInView(); | ||
this.__setPosition(); | ||
}); | ||
this.__setItemsInView(); | ||
this.__setPosition(); | ||
} | ||
@@ -483,3 +467,3 @@ | ||
if (messages.length > 0) { | ||
this.__announce(messages.join(', ')); | ||
announce(messages.join(', ')); | ||
} | ||
@@ -602,12 +586,2 @@ } | ||
} | ||
/** | ||
* @deprecated Since Vaadin 23, `notifyResize()` is deprecated. The component uses a | ||
* ResizeObserver internally and doesn't need to be explicitly notified of resizes. | ||
*/ | ||
notifyResize() { | ||
console.warn( | ||
`WARNING: Since Vaadin 23, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.` | ||
); | ||
} | ||
} | ||
@@ -614,0 +588,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
9
44025
843
+ Added@vaadin/avatar@23.0.0-alpha3(transitive)
+ Added@vaadin/component-base@23.0.0-alpha3(transitive)
+ Added@vaadin/icon@23.0.0-alpha3(transitive)
+ Added@vaadin/item@23.0.0-alpha3(transitive)
+ Added@vaadin/list-box@23.0.0-alpha3(transitive)
+ Added@vaadin/vaadin-list-mixin@23.0.0-alpha3(transitive)
+ Added@vaadin/vaadin-lumo-styles@23.0.0-alpha3(transitive)
+ Added@vaadin/vaadin-material-styles@23.0.0-alpha3(transitive)
+ Added@vaadin/vaadin-overlay@23.0.0-alpha3(transitive)
+ Added@vaadin/vaadin-themable-mixin@23.0.0-alpha3(transitive)
- Removed@polymer/iron-a11y-announcer@^3.0.0
- Removed@polymer/iron-a11y-announcer@3.2.0(transitive)
- Removed@polymer/iron-resizable-behavior@3.0.1(transitive)
- Removed@vaadin/avatar@23.0.0-alpha2(transitive)
- Removed@vaadin/component-base@23.0.0-alpha2(transitive)
- Removed@vaadin/icon@23.0.0-alpha2(transitive)
- Removed@vaadin/item@23.0.0-alpha2(transitive)
- Removed@vaadin/list-box@23.0.0-alpha2(transitive)
- Removed@vaadin/vaadin-list-mixin@23.0.0-alpha2(transitive)
- Removed@vaadin/vaadin-lumo-styles@23.0.0-alpha2(transitive)
- Removed@vaadin/vaadin-material-styles@23.0.0-alpha2(transitive)
- Removed@vaadin/vaadin-overlay@23.0.0-alpha2(transitive)
- Removed@vaadin/vaadin-themable-mixin@23.0.0-alpha2(transitive)
Updated@vaadin/avatar@23.0.0-alpha3
Updated@vaadin/item@23.0.0-alpha3