Socket
Socket
Sign inDemoInstall

@vaadin/vaadin-dialog

Package Overview
Dependencies
Maintainers
16
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/vaadin-dialog - npm Package Compare versions

Comparing version 2.5.0-alpha1 to 2.5.0-alpha2

4

./@types/interfaces.d.ts

@@ -0,1 +1,5 @@

import { DialogElement } from '../src/vaadin-dialog.js';
export type DialogRenderer = (root: HTMLElement, dialog?: DialogElement) => void;
export type DialogResizableDirection = 'n' | 'e' | 's' | 'w' | 'nw' | 'ne' | 'se' | 'sw';

@@ -2,0 +6,0 @@

2

package.json

@@ -13,3 +13,3 @@ {

"name": "@vaadin/vaadin-dialog",
"version": "2.5.0-alpha1",
"version": "2.5.0-alpha2",
"main": "vaadin-dialog.js",

@@ -16,0 +16,0 @@ "author": "Vaadin Ltd",

@@ -39,2 +39,7 @@ const TOUCH_DEVICE = (() => {

_startDrag(e) {
// Don't initiate when there's more than 1 touch (pinch zoom)
if (e.type === 'touchstart' && e.touches.length > 1) {
return;
}
if (this.draggable && (e.button === 0 || e.touches)) {

@@ -47,4 +52,3 @@ const resizerContainer = this.$.overlay.$.resizerContainer;

if ((isResizerContainer && !isResizerContainerScrollbar) || isContentPart || isDraggable) {
// Is needed to prevent text selection in Safari
!this._touchDevice && !isDraggable && e.preventDefault();
!isDraggable && e.preventDefault();
this._originalBounds = this._getOverlayBounds();

@@ -67,4 +71,3 @@ const event = this.__getMouseOrFirstTouchEvent(e);

const event = this.__getMouseOrFirstTouchEvent(e);
if (this._eventInWindow(event) &&
(e.type !== 'touchmove' || e.type === 'touchmove' && e.touches.length < 2)) {
if (this._eventInWindow(event)) {
const top = this._originalBounds.top + (event.pageY - this._originalMouseCoords.top);

@@ -71,0 +74,0 @@ const left = this._originalBounds.left + (event.pageX - this._originalMouseCoords.left);

@@ -139,2 +139,7 @@ const $_documentContainer = document.createElement('template');

_startResize(e, direction) {
// Don't initiate when there's more than 1 touch (pinch zoom)
if (e.type === 'touchstart' && e.touches.length > 1) {
return;
}
if (e.button === 0 || e.touches) {

@@ -162,4 +167,3 @@ e.preventDefault();

const event = this.__getMouseOrFirstTouchEvent(e);
if (this._eventInWindow(event) &&
(e.type !== 'touchmove' || e.type === 'touchmove' && e.touches.length < 2)) {
if (this._eventInWindow(event)) {
const minimumSize = 40;

@@ -166,0 +170,0 @@ resizer.split('').forEach((direction) => {

@@ -125,3 +125,3 @@ /**

*/
renderer: OverlayRenderer|null|undefined;
renderer: DialogRenderer|null|undefined;

@@ -169,3 +169,3 @@ /**

import {OverlayRenderer} from '@vaadin/vaadin-overlay/@types/interfaces';
import {DialogRenderer} from '../@types/interfaces';

@@ -172,0 +172,0 @@ import {DialogOverlayBoundsParam} from '../@types/interfaces';

@@ -164,3 +164,3 @@ /**

static get version() {
return '2.5.0-alpha1';
return '2.5.0-alpha2';
}

@@ -220,3 +220,3 @@

* - `dialog` The reference to the `<vaadin-dialog>` element.
* @type {OverlayRenderer | undefined}
* @type {DialogRenderer | undefined}
*/

@@ -284,14 +284,4 @@ renderer: Function,

});
// We need to prevent dragging behind the non-draggable content of the dialog (i.e slotted text / button)
this.$.overlay.$.content.addEventListener('touchmove', this._preventMove, {passive: false});
}
/** @private */
_preventMove(e) {
if (e.touches.length < 2) {
e.preventDefault();
}
}
/**

@@ -298,0 +288,0 @@ * @param {!Array<!Node>} nodes

@@ -15,1 +15,2 @@ /**

export * from './src/vaadin-dialog.js';
export * from './@types/interfaces';
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc