Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-popover-view

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-popover-view - npm Package Compare versions

Comparing version 4.0.3 to 4.1.0

.dccache

2

dist/Popover.d.ts

@@ -22,2 +22,3 @@ import { Component, RefObject, ReactNode, ReactElement } from 'react';

onCloseComplete?: () => void;
onPositionChange?: () => void;
debug?: boolean;

@@ -60,2 +61,3 @@ }

onCloseComplete: PropTypes.Requireable<(...args: any[]) => any>;
onPositionChange: PropTypes.Requireable<(...args: any[]) => any>;
debug: PropTypes.Requireable<boolean>;

@@ -62,0 +64,0 @@ };

36

dist/Popover.js

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

onCloseComplete: PropTypes.func,
onPositionChange: PropTypes.func,
debug: PropTypes.bool

@@ -321,4 +322,4 @@ };

__extends(AdaptivePopover, _super);
function AdaptivePopover() {
var _this = _super !== null && _super.apply(this, arguments) || this;
function AdaptivePopover(props) {
var _this = _super.call(this, props) || this;
_this.state = {

@@ -343,2 +344,6 @@ fromRect: null,

_this.keyboardDidShowSubscription = null;
_this.handleResizeEventSubscription = null;
_this.handleResizeEvent = _this.handleResizeEvent.bind(_this);
_this.keyboardDidHide = _this.keyboardDidHide.bind(_this);
_this.keyboardDidShow = _this.keyboardDidShow.bind(_this);
return _this;

@@ -362,6 +367,3 @@ }

AdaptivePopover.prototype.componentDidMount = function () {
this.handleResizeEvent = this.handleResizeEvent.bind(this);
this.keyboardDidHide = this.keyboardDidHide.bind(this);
this.keyboardDidShow = this.keyboardDidShow.bind(this);
Dimensions.addEventListener('change', this.handleResizeEvent);
this.handleResizeEventSubscription = Dimensions.addEventListener('change', this.handleResizeEvent);
if (this.props.fromRect)

@@ -374,12 +376,11 @@ this.setState({ fromRect: this.props.fromRect });

AdaptivePopover.prototype.componentWillUnmount = function () {
var _a, _b, _c, _d;
this._isMounted = false;
Dimensions.removeEventListener('change', this.handleResizeEvent);
if (this.keyboardDidShowSubscription !== null) {
this.keyboardDidShowSubscription.remove();
this.keyboardDidShowSubscription = null;
}
if (this.keyboardDidHideSubscription !== null) {
this.keyboardDidHideSubscription.remove();
this.keyboardDidHideSubscription = null;
}
if (typeof ((_a = this.handleResizeEventSubscription) === null || _a === void 0 ? void 0 : _a.remove) === 'function')
(_b = this.handleResizeEventSubscription) === null || _b === void 0 ? void 0 : _b.remove();
else
// Backward-compatibility with RN <= 0.63
Dimensions.removeEventListener('change', this.handleResizeEvent);
(_c = this.keyboardDidShowSubscription) === null || _c === void 0 ? void 0 : _c.remove();
(_d = this.keyboardDidHideSubscription) === null || _d === void 0 ? void 0 : _d.remove();
};

@@ -665,3 +666,3 @@ AdaptivePopover.prototype.componentDidUpdate = function (prevProps) {

var _a = _this.state, activeGeom = _a.activeGeom, animatedValues = _a.animatedValues, requestedContentSize = _a.requestedContentSize;
var _b = _this.props, arrowStyle = _b.arrowStyle, popoverStyle = _b.popoverStyle, fromRect = _b.fromRect, displayArea = _b.displayArea, placement = _b.placement, onOpenStart = _b.onOpenStart, arrowShift = _b.arrowShift;
var _b = _this.props, arrowStyle = _b.arrowStyle, popoverStyle = _b.popoverStyle, fromRect = _b.fromRect, displayArea = _b.displayArea, placement = _b.placement, onOpenStart = _b.onOpenStart, arrowShift = _b.arrowShift, onPositionChange = _b.onPositionChange;
if (requestedContentSize) {

@@ -708,3 +709,4 @@ _this.debug('handleChange - requestedContentSize', requestedContentSize);

easing: Easing.inOut(Easing.quad),
geom: geom_1
geom: geom_1,
callback: onPositionChange
});

@@ -711,0 +713,0 @@ }

{
"name": "react-native-popover-view",
"version": "4.0.3",
"version": "4.1.0",
"description": "A <Popover /> component for react-native iOS, Android, and Web",

@@ -46,3 +46,3 @@ "main": "dist/index.js",

"@types/react": "^17.0.3",
"@types/react-native": "^0.64.2",
"@types/react-native": "^0.65.1",
"@typescript-eslint/eslint-plugin": "^4.21.0",

@@ -49,0 +49,0 @@ "@typescript-eslint/parser": "^4.21.0",

@@ -318,2 +318,3 @@ ## react-native-popover-view

onCloseComplete | function | | Callback to be fired when the popover is finished closing (after animation)
onPositionChange | function | | Callback to be fired when the popover position finishes moving position (after animation)
debug | bool | false | Set this to `true` to turn on debug logging to the console. This is useful for figuring out why a Popover isn't showing.

@@ -320,0 +321,0 @@

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