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

rc-trigger

Package Overview
Dependencies
Maintainers
5
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-trigger - npm Package Compare versions

Comparing version 4.3.1 to 4.3.2

4

es/Popup.d.ts

@@ -46,4 +46,2 @@ import React, { Component } from 'react';

alignClassName: string;
/** Record for CSSMotion is working or not */
inMotion: boolean;
}

@@ -59,3 +57,3 @@ interface AlignRefType {

private nextFrameId;
static getDerivedStateFromProps({ visible, ...props }: PopupProps, { prevVisible, status, inMotion }: PopupState): Partial<PopupState>;
static getDerivedStateFromProps({ visible, ...props }: PopupProps, { prevVisible, status }: PopupState): Partial<PopupState>;
componentDidMount(): void;

@@ -62,0 +60,0 @@ componentDidUpdate(): void;

@@ -48,4 +48,3 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";

prevVisible: null,
alignClassName: null,
inMotion: false
alignClassName: null
};

@@ -184,21 +183,5 @@ _this.popupRef = React.createRef();

mergedMotionVisible = false;
} // Update trigger to tell if is in motion
} // ================== Align ==================
['onEnterStart', 'onAppearStart', 'onLeaveStart'].forEach(function (event) {
mergedMotion[event] = function () {
var _mergedMotion$event;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
mergedMotion === null || mergedMotion === void 0 ? void 0 : (_mergedMotion$event = mergedMotion[event]) === null || _mergedMotion$event === void 0 ? void 0 : _mergedMotion$event.call.apply(_mergedMotion$event, [mergedMotion].concat(args));
_this.setState({
inMotion: true
});
};
}); // ================== Align ==================
var mergedAlignDisabled = !visible || status !== 'align' && status !== 'aligned' && status !== 'stable'; // ================== Popup ==================

@@ -386,4 +369,3 @@

var prevVisible = _ref4.prevVisible,
status = _ref4.status,
inMotion = _ref4.inMotion;
status = _ref4.status;
var newState = {

@@ -398,7 +380,4 @@ prevVisible: visible,

newState.status = 'stable';
newState.inMotion = false;
} else if (visible !== prevVisible) {
newState.inMotion = false;
if (visible || supportMotion(mergedMotion) && inMotion) {
if (visible || supportMotion(mergedMotion) && ['motion', 'AfterMotion', 'stable'].includes(status)) {
newState.status = null;

@@ -405,0 +384,0 @@ } else {

@@ -46,4 +46,2 @@ import React, { Component } from 'react';

alignClassName: string;
/** Record for CSSMotion is working or not */
inMotion: boolean;
}

@@ -59,3 +57,3 @@ interface AlignRefType {

private nextFrameId;
static getDerivedStateFromProps({ visible, ...props }: PopupProps, { prevVisible, status, inMotion }: PopupState): Partial<PopupState>;
static getDerivedStateFromProps({ visible, ...props }: PopupProps, { prevVisible, status }: PopupState): Partial<PopupState>;
componentDidMount(): void;

@@ -62,0 +60,0 @@ componentDidUpdate(): void;

@@ -71,4 +71,3 @@ "use strict";

prevVisible: null,
alignClassName: null,
inMotion: false
alignClassName: null
};

@@ -207,21 +206,5 @@ _this.popupRef = _react.default.createRef();

mergedMotionVisible = false;
} // Update trigger to tell if is in motion
} // ================== Align ==================
['onEnterStart', 'onAppearStart', 'onLeaveStart'].forEach(function (event) {
mergedMotion[event] = function () {
var _mergedMotion$event;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
mergedMotion === null || mergedMotion === void 0 ? void 0 : (_mergedMotion$event = mergedMotion[event]) === null || _mergedMotion$event === void 0 ? void 0 : _mergedMotion$event.call.apply(_mergedMotion$event, [mergedMotion].concat(args));
_this.setState({
inMotion: true
});
};
}); // ================== Align ==================
var mergedAlignDisabled = !visible || status !== 'align' && status !== 'aligned' && status !== 'stable'; // ================== Popup ==================

@@ -408,4 +391,3 @@

var prevVisible = _ref4.prevVisible,
status = _ref4.status,
inMotion = _ref4.inMotion;
status = _ref4.status;
var newState = {

@@ -420,7 +402,4 @@ prevVisible: visible,

newState.status = 'stable';
newState.inMotion = false;
} else if (visible !== prevVisible) {
newState.inMotion = false;
if (visible || supportMotion(mergedMotion) && inMotion) {
if (visible || supportMotion(mergedMotion) && ['motion', 'AfterMotion', 'stable'].includes(status)) {
newState.status = null;

@@ -427,0 +406,0 @@ } else {

{
"name": "rc-trigger",
"version": "4.3.1",
"version": "4.3.2",
"description": "base abstract trigger component for react",

@@ -5,0 +5,0 @@ "engines": {

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