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
2
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 5.1.9 to 6.0.0

dist/_AdaptivePopover.d.ts

11

package.json
{
"name": "react-native-popover-view",
"version": "5.1.9",
"version": "6.0.0",
"description": "A <Popover /> component for react-native iOS, Android, and Web",

@@ -66,5 +66,6 @@ "main": "dist/index.js",

"dependencies": {
"prop-types": "^15.8.1",
"deprecated-react-native-prop-types": "^2.3.0"
}
}
"deprecated-react-native-prop-types": "^2.3.0",
"prop-types": "^15.8.1"
},
"packageManager": "yarn@4.5.3"
}

@@ -342,4 +342,3 @@ ## react-native-popover-view

displayAreaInsets | object | | Insets to apply to the display area. The Popover will not be allowed to go beyond the display area minus the insets.
statusBarTranslucent | bool | | For 'rn-modal' mode on Android only. Determines whether the background should go under the status bar. Passed through to RN `Modal` component, see [their docs](https://reactnative.dev/docs/modal#statusbartranslucent-1) as well.
verticalOffset | number | 0 | The amount to vertically shift the popover on the screen, for use in correcting an occasional issue on Android. In certain Android configurations, you may need to apply a `verticalOffset` of `-StatusBar.currentHeight` for the popover to originate from the correct place. For shifting the popover in other situations, the `offset` prop should be used.
statusBarTranslucent | bool | true | For 'rn-modal' mode on Android only. Determines whether the background should go under the status bar. Passed through to RN `Modal` component, see [their docs](https://reactnative.dev/docs/modal#statusbartranslucent-1) as well.
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.

@@ -413,16 +412,2 @@

#### Android vertical positioning incorrect
Depending on how your app is configured, you may need to use the following `verticalOffset` prop to correctly position the popover on Android:
```
import { Platform, StatusBar, ... } from 'react-native';
...
<Popover
{...otherProps}
verticalOffset={Platform.OS === 'android' ? -StatusBar.currentHeight : 0 }
/>
```
#### Error when passing a functional component to the `from` prop

@@ -485,2 +470,4 @@

There's a separate package, [react-native-popover-view-test-app](https://github.com/SteffeyDev/react-native-popover-view-test-app) that can be used during development. In the package, there's a script, (`./transfer`) that you can adapt to help copy the dist files from this project to the test app while watching for changes.
## <a name="credits"/>Credits

@@ -487,0 +474,0 @@

@@ -8,2 +8,3 @@ import { Dimensions, Platform, StyleSheet } from 'react-native';

export const DEFAULT_BORDER_RADIUS = 3;
export const DEFAULT_STATUS_BAR_TRANSLUCENT = true;
export const POPOVER_MARGIN = 10;

@@ -10,0 +11,0 @@

@@ -42,3 +42,2 @@ import { Animated, StyleProp, ViewStyle } from 'react-native';

offset?: number;
verticalOffset?: number;
displayArea?: Rect;

@@ -53,2 +52,3 @@ displayAreaInsets?: Insets;

arrowSize?: Size;
statusBarTranslucent?: boolean;

@@ -55,0 +55,0 @@ // lifecycle

@@ -1,9 +0,9 @@

import { RefObject, ComponentClass, Component } from 'react';
import { NativeModules, findNodeHandle, StyleProp, ViewStyle, StyleSheet } from 'react-native';
import { RefObject } from 'react';
import { MeasureInWindowOnSuccessCallback, StyleProp, ViewStyle, StyleSheet } from 'react-native';
import { Placement, Point, Rect, Size } from './Types';
import { DEFAULT_ARROW_SIZE, DEFAULT_BORDER_RADIUS } from './Constants';
// Need any here to match signature of findNodeHandle
// eslint-disable-next-line
type RefType = RefObject<number | Component<any, any, any> | ComponentClass<any, any> | null>;
type RefType = RefObject<{
measureInWindow: (callback: MeasureInWindowOnSuccessCallback) => void
}>;

@@ -13,5 +13,4 @@ export function getRectForRef(ref: RefType): Promise<Rect> {

if (ref.current) {
NativeModules.UIManager.measure(
findNodeHandle(ref.current),
(_1: unknown, _2: unknown, width: number, height: number, x: number, y: number) =>
ref.current.measureInWindow(
(x: number, y: number, width: number, height: number) =>
resolve(new Rect(x, y, width, height))

@@ -18,0 +17,0 @@ );

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