New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ionic/react

Package Overview
Dependencies
Maintainers
19
Versions
2915
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ionic/react - npm Package Compare versions

Comparing version 5.0.0-dev.201911072022.7909b12 to 5.0.0-dev.201911072352.9dbef19

55

dist/index.esm.js

@@ -141,29 +141,32 @@ import React, { useContext } from 'react';

const attachProps = (node, newProps, oldProps = {}) => {
// add any classes in className to the class list
const className = getClassName(node.classList, newProps, oldProps);
if (className !== '') {
node.className = className;
}
Object.keys(newProps).forEach(name => {
if (name === 'children' || name === 'style' || name === 'ref' || name === 'class' || name === 'className' || name === 'forwardedRef') {
return;
// some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first
if (node instanceof Element) {
// add any classes in className to the class list
const className = getClassName(node.classList, newProps, oldProps);
if (className !== '') {
node.className = className;
}
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
const eventName = name.substring(2);
const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
if (!isCoveredByReact(eventNameLc)) {
syncEvent(node, eventNameLc, newProps[name]);
Object.keys(newProps).forEach(name => {
if (name === 'children' || name === 'style' || name === 'ref' || name === 'class' || name === 'className' || name === 'forwardedRef') {
return;
}
}
else {
node[name] = newProps[name];
const propType = typeof newProps[name];
if (propType === 'string') {
node.setAttribute(camelToDashCase(name), newProps[name]);
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
const eventName = name.substring(2);
const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
if (!isCoveredByReact(eventNameLc)) {
syncEvent(node, eventNameLc, newProps[name]);
}
}
else {
node[name] = newProps[name];
const propType = typeof newProps[name];
if (propType === 'string') {
node.setAttribute(camelToDashCase(name), newProps[name]);
}
else {
node[name] = newProps[name];
}
}
}
});
});
}
};

@@ -409,7 +412,13 @@ const getClassName = (classList, newProps, oldProps) => {

const _a = this.props, { isOpen, onDidDismiss } = _a, cProps = __rest(_a, ["isOpen", "onDidDismiss"]);
const overlay = this.overlay = await controller.create(Object.assign({}, cProps));
let overlay = this.overlay;
if (!overlay) {
overlay = this.overlay = await controller.create(Object.assign({}, cProps));
}
attachProps(overlay, {
[dismissEventName]: onDidDismiss
}, prevProps);
await overlay.present();
// Check isOpen again since the value could of changed during the async call to controller.create
if (this.props.isOpen === true) {
await overlay.present();
}
}

@@ -416,0 +425,0 @@ render() {

@@ -147,29 +147,32 @@ 'use strict';

const attachProps = (node, newProps, oldProps = {}) => {
// add any classes in className to the class list
const className = getClassName(node.classList, newProps, oldProps);
if (className !== '') {
node.className = className;
}
Object.keys(newProps).forEach(name => {
if (name === 'children' || name === 'style' || name === 'ref' || name === 'class' || name === 'className' || name === 'forwardedRef') {
return;
// some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first
if (node instanceof Element) {
// add any classes in className to the class list
const className = getClassName(node.classList, newProps, oldProps);
if (className !== '') {
node.className = className;
}
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
const eventName = name.substring(2);
const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
if (!isCoveredByReact(eventNameLc)) {
syncEvent(node, eventNameLc, newProps[name]);
Object.keys(newProps).forEach(name => {
if (name === 'children' || name === 'style' || name === 'ref' || name === 'class' || name === 'className' || name === 'forwardedRef') {
return;
}
}
else {
node[name] = newProps[name];
const propType = typeof newProps[name];
if (propType === 'string') {
node.setAttribute(camelToDashCase(name), newProps[name]);
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
const eventName = name.substring(2);
const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
if (!isCoveredByReact(eventNameLc)) {
syncEvent(node, eventNameLc, newProps[name]);
}
}
else {
node[name] = newProps[name];
const propType = typeof newProps[name];
if (propType === 'string') {
node.setAttribute(camelToDashCase(name), newProps[name]);
}
else {
node[name] = newProps[name];
}
}
}
});
});
}
};

@@ -415,7 +418,13 @@ const getClassName = (classList, newProps, oldProps) => {

const _a = this.props, { isOpen, onDidDismiss } = _a, cProps = tslib_1.__rest(_a, ["isOpen", "onDidDismiss"]);
const overlay = this.overlay = await controller.create(Object.assign({}, cProps));
let overlay = this.overlay;
if (!overlay) {
overlay = this.overlay = await controller.create(Object.assign({}, cProps));
}
attachProps(overlay, {
[dismissEventName]: onDidDismiss
}, prevProps);
await overlay.present();
// Check isOpen again since the value could of changed during the async call to controller.create
if (this.props.isOpen === true) {
await overlay.present();
}
}

@@ -422,0 +431,0 @@ render() {

{
"name": "@ionic/react",
"version": "5.0.0-dev.201911072022.7909b12",
"version": "5.0.0-dev.201911072352.9dbef19",
"description": "React specific wrapper for @ionic/core",

@@ -42,3 +42,3 @@ "keywords": [

"dependencies": {
"@ionic/core": "5.0.0-dev.201911072022.7909b12",
"@ionic/core": "5.0.0-dev.201911072352.9dbef19",
"tslib": "*"

@@ -45,0 +45,0 @@ },

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

## @ionic/react (beta)
## @ionic/react

@@ -30,5 +30,2 @@ These are React specific building blocks on top of [@ionic/core](https://www.npmjs.com/package/@ionic/core) components/services.

Open the './capacitor.config.json' file in your projects root.
Change `"webDir": "www"` to be `"webDir": "build"` (dependent on your config but Ionic React defaults with this as the build directory)
Then run the following command to get started with either `ios` or `android` platforms.

@@ -35,0 +32,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

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