Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-popups

Package Overview
Dependencies
Maintainers
2
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-popups - npm Package Compare versions

Comparing version 15.4.21 to 15.4.22

CHANGELOG.md

4

package.json
{
"name": "@syncfusion/ej2-popups",
"version": "15.4.21",
"version": "15.4.22",
"description": "Essential JS 2 popup Component",

@@ -10,3 +10,3 @@ "author": "Syncfusion Inc.",

"@syncfusion/ej2-base": "^15.4.21",
"@syncfusion/ej2-buttons": "^15.4.21"
"@syncfusion/ej2-buttons": "^15.4.22"
},

@@ -13,0 +13,0 @@ "devDependencies": {

@@ -11,2 +11,2 @@ /**

export declare function isCollide(element: HTMLElement, viewPortElement?: HTMLElement, x?: number, y?: number): string[];
export declare function flip(element: HTMLElement, target: HTMLElement, offsetX: number, offsetY: number, positionX: string, positionY: string, viewPortElement?: HTMLElement, axis?: CollisionCoordinates): void;
export declare function flip(element: HTMLElement, target: HTMLElement, offsetX: number, offsetY: number, positionX: string, positionY: string, viewPortElement?: HTMLElement, axis?: CollisionCoordinates, fixedParent?: Boolean): void;

@@ -105,3 +105,3 @@ define(["require", "exports", "./position"], function (require, exports, position_1) {

exports.isCollide = isCollide;
function flip(element, target, offsetX, offsetY, positionX, positionY, viewPortElement, axis) {
function flip(element, target, offsetX, offsetY, positionX, positionY, viewPortElement, axis, fixedParent) {
if (viewPortElement === void 0) { viewPortElement = null; }

@@ -128,3 +128,3 @@ if (axis === void 0) { axis = { X: true, Y: true }; }

parentDocument = target.ownerDocument;
updateElementData(target, tEdge, pos);
updateElementData(target, tEdge, pos, fixedParent);
setPosition(eEdge, pos, elementRect);

@@ -153,8 +153,8 @@ if (axis.X) {

}
function updateElementData(target, edge, pos) {
pos.position = position_1.calculatePosition(target, pos.posX, pos.posY);
edge.TL = position_1.calculatePosition(target, 'left', 'top');
edge.TR = position_1.calculatePosition(target, 'right', 'top');
edge.BR = position_1.calculatePosition(target, 'left', 'bottom');
edge.BL = position_1.calculatePosition(target, 'right', 'bottom');
function updateElementData(target, edge, pos, fixedParent) {
pos.position = position_1.calculatePosition(target, pos.posX, pos.posY, fixedParent);
edge.TL = position_1.calculatePosition(target, 'left', 'top', fixedParent);
edge.TR = position_1.calculatePosition(target, 'right', 'top', fixedParent);
edge.BR = position_1.calculatePosition(target, 'left', 'bottom', fixedParent);
edge.BL = position_1.calculatePosition(target, 'right', 'bottom', fixedParent);
}

@@ -161,0 +161,0 @@ function setPosition(eStatus, pos, elementRect) {

export declare function calculateRelativeBasedPosition(anchor: HTMLElement, element: HTMLElement): OffsetPosition;
export declare function calculatePosition(currentElement: Element, positionX?: string, positionY?: string): OffsetPosition;
export declare function calculatePosition(currentElement: Element, positionX?: string, positionY?: string, parentElement?: Boolean): OffsetPosition;
export interface OffsetPosition {

@@ -4,0 +4,0 @@ left: number;

@@ -7,2 +7,3 @@ define(["require", "exports"], function (require, exports) {

var parentDocument;
var fixedParent = false;
function calculateRelativeBasedPosition(anchor, element) {

@@ -28,3 +29,4 @@ var anchorPos = { left: 0, top: 0 };

exports.calculateRelativeBasedPosition = calculateRelativeBasedPosition;
function calculatePosition(currentElement, positionX, positionY) {
function calculatePosition(currentElement, positionX, positionY, parentElement) {
fixedParent = parentElement ? true : false;
if (!currentElement) {

@@ -101,3 +103,3 @@ return { left: 0, top: 0 };

function getElementBottom() {
return elementRect.bottom + getBodyScrollTop();
return fixedParent ? elementRect.bottom : elementRect.bottom + getBodyScrollTop();
}

@@ -108,3 +110,3 @@ function getElementVCenter() {

function getElementTop() {
return elementRect.top + getBodyScrollTop();
return fixedParent ? elementRect.top : elementRect.top + getBodyScrollTop();
}

@@ -111,0 +113,0 @@ function getElementLeft() {

@@ -1,2 +0,2 @@

import { Component, Property, Event, CreateBuilder, Collection, L10n, Browser, EmitType } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, detach, attributes, prepend, setStyleAttribute } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit } from '@syncfusion/ej2-base';import { DialogHelper } from './dialog-builder';import { EventHandler } from '@syncfusion/ej2-base';import { Draggable } from '@syncfusion/ej2-base';import { Popup, PositionData } from '../popup/popup';import { Button, ButtonModel } from '@syncfusion/ej2-buttons';
import { Component, Property, Event, Collection, L10n, Browser, EmitType } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, detach, attributes, prepend, setStyleAttribute } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit } from '@syncfusion/ej2-base';import { EventHandler } from '@syncfusion/ej2-base';import { Draggable } from '@syncfusion/ej2-base';import { Popup, PositionData } from '../popup/popup';import { Button, ButtonModel } from '@syncfusion/ej2-buttons';
import {AnimationSettings} from "./dialog";

@@ -3,0 +3,0 @@ import {ComponentModel} from '@syncfusion/ej2-base';

import { Component, EmitType } from '@syncfusion/ej2-base';
import { INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';
import { ButtonPropsModel, DialogModel } from './dialog-model';
import { DialogHelper } from './dialog-builder';
import { PositionData } from '../popup/popup';

@@ -332,5 +331,1 @@ import { ButtonModel } from '@syncfusion/ej2-buttons';

}
/**
* builder for Dialog
*/
export declare let dialogBuilder: DialogHelper;

@@ -99,6 +99,4 @@ var __extends = (this && this.__extends) || (function () {

}
if ((event.keyCode === 13 && element.tagName.toLowerCase() === 'button' &&
element.classList.contains(DLG_PRIMARY_BUTTON) && !ej2_base_4.isNullOrUndefined(this.primaryButtonEle)) ||
(event.keyCode === 13 && !event.ctrlKey && element.tagName.toLowerCase() !== 'textarea' &&
isTagName && !ej2_base_4.isNullOrUndefined(this.primaryButtonEle)) ||
if ((event.keyCode === 13 && !event.ctrlKey && element.tagName.toLowerCase() !== 'textarea' &&
isTagName && !ej2_base_4.isNullOrUndefined(this.primaryButtonEle)) ||
(event.keyCode === 13 && event.ctrlKey && (element.tagName.toLowerCase() === 'textarea' ||

@@ -763,3 +761,2 @@ isContentEdit)) && !ej2_base_4.isNullOrUndefined(this.primaryButtonEle)) {

exports.Dialog = Dialog;
exports.dialogBuilder = ej2_base_1.CreateBuilder(Dialog);
});

@@ -57,2 +57,3 @@ import { AnimationModel, EmitType, Component } from '@syncfusion/ej2-base';

export declare class Popup extends Component<HTMLElement> implements INotifyPropertyChanged {
private fixedParent;
/**

@@ -204,3 +205,3 @@ * Specifies the height of the popup element.

*/
refreshPosition(): void;
refreshPosition(target?: HTMLElement): void;
private reposition();

@@ -227,2 +228,3 @@ private getAnchorPosition(anchorEle, ele, position, offsetX, offsetY);

getScrollableParent(element: HTMLElement): HTMLElement[];
private checkFixedParent(element);
}

@@ -234,2 +236,2 @@ /**

*/
export declare function getScrollableParent(element: HTMLElement): HTMLElement[];
export declare function getScrollableParent(element: HTMLElement, fixedParent?: Boolean): HTMLElement[];

@@ -29,3 +29,5 @@ var __extends = (this && this.__extends) || (function () {

function Popup(element, options) {
return _super.call(this, options, element) || this;
var _this = _super.call(this, options, element) || this;
_this.fixedParent = false;
return _this;
}

@@ -236,3 +238,6 @@ Popup.prototype.onPropertyChanged = function (newProp, oldProp) {

};
Popup.prototype.refreshPosition = function () {
Popup.prototype.refreshPosition = function (target) {
if (!ej2_base_2.isNullOrUndefined(target)) {
this.checkFixedParent(target);
}
this.reposition();

@@ -318,3 +323,3 @@ this.checkCollision();

var relateToElement = this.getRelateToElement();
collision_1.flip(this.element, relateToElement, this.offsetX, this.offsetY, this.position.X, this.position.Y, this.viewPortElement, param);
collision_1.flip(this.element, relateToElement, this.offsetX, this.offsetY, this.position.X, this.position.Y, this.viewPortElement, param, this.fixedParent);
};

@@ -407,4 +412,16 @@ Popup.prototype.callFit = function (param) {

Popup.prototype.getScrollableParent = function (element) {
return getScrollableParent(element);
this.checkFixedParent(element);
return getScrollableParent(element, this.fixedParent);
};
Popup.prototype.checkFixedParent = function (element) {
var parent = element.parentElement;
while (parent && parent.tagName !== 'HTML') {
var parentStyle = getComputedStyle(parent);
if (parentStyle.position === 'fixed' && this.element.offsetParent && this.element.offsetParent.tagName === 'BODY') {
this.element.style.position = 'fixed';
this.fixedParent = true;
}
parent = parent.parentElement;
}
};
__decorate([

@@ -470,3 +487,3 @@ ej2_base_4.Property('auto')

exports.Popup = Popup;
function getScrollableParent(element) {
function getScrollableParent(element, fixedParent) {
var eleStyle = getComputedStyle(element);

@@ -484,3 +501,5 @@ var scrollParents = [];

}
scrollParents.push(document);
if (!fixedParent) {
scrollParents.push(document);
}
return scrollParents;

@@ -487,0 +506,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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