@appsemble/react-utils
Advanced tools
Comparing version 0.0.0-alpha.1 to 0.0.0-alpha.2
@@ -16,2 +16,10 @@ 'use strict'; | ||
function createReactRoot() { | ||
var wrapper = document.createElement('div'); | ||
wrapper.classList.add('react-root'); | ||
// document.body.prepend doesn't exist in Cordova on Android. | ||
document.body.insertBefore(wrapper, document.body.firstChild); | ||
return wrapper; | ||
} | ||
/** | ||
@@ -21,5 +29,7 @@ * Render a React component after the Appsemble SDK is ready. | ||
* @param {React.Component} element The React component to attach to the DOM. | ||
* @param {HTMLElement} [wrapper=<div class="react-root"></div>] The DOM element to attach the React component to. | ||
* @param {HTMLElement} [wrapper=<div class="react-root"></div>] The DOM element to attach the React | ||
* component to. | ||
* | ||
* If no wrapper is specified, a `<div>` with the class `react-root` is created and attached to the DOM. | ||
* If no wrapper is specified, a `<div>` with the class `react-root` is created and attached to | ||
* the DOM. | ||
* @returns {Promise<Object>} The result from {@link appsemble.ready}. | ||
@@ -34,10 +44,2 @@ */ | ||
}); | ||
} | ||
function createReactRoot() { | ||
var wrapper = document.createElement('div'); | ||
wrapper.classList.add('react-root'); | ||
// document.body.prepend doesn't exist in Cordova on Android. | ||
document.body.insertBefore(wrapper, document.body.firstChild); | ||
return wrapper; | ||
} |
{ | ||
"name": "@appsemble/react-utils", | ||
"version": "0.0.0-alpha.1", | ||
"version": "0.0.0-alpha.2", | ||
"description": "The JavaScript SDK for communication with the Appsemble extension host.", | ||
@@ -11,3 +11,3 @@ "main": "lib/index.js", | ||
"esdoc:w": "watch 'esdoc -c esdoc.json' manual src", | ||
"eslint": "eslint --ext 'js,jsx' .", | ||
"eslint": "eslint --max-warnings 0 --ext 'js,jsx' .", | ||
"karma": "karma start --single-run", | ||
@@ -20,10 +20,11 @@ "karma:w": "karma start --color", | ||
"dependencies": { | ||
"base64-js": "^1.2.0" | ||
"base64-js": "^1.2.0", | ||
"prop-types": "^15.5.10" | ||
}, | ||
"peerDependencies": { | ||
"@appsemble/sdk": "0.0.0-alpha.3", | ||
"@appsemble/sdk": "0.0.0-alpha.4", | ||
"react": "*" | ||
}, | ||
"devDependencies": { | ||
"@appsemble/sdk": "0.0.0-alpha.3", | ||
"@appsemble/sdk": "0.0.0-alpha.4", | ||
"babel-cli": "^6.18.0", | ||
@@ -37,3 +38,3 @@ "babel-loader": "^6.2.7", | ||
"chai-dom": "^1.4.3", | ||
"chai-enzyme": "^0.6.1", | ||
"chai-enzyme": "^0.7.1", | ||
"chai-subset": "^1.3.0", | ||
@@ -45,10 +46,9 @@ "concurrently": "^3.1.0", | ||
"eslint": "^3.9.1", | ||
"eslint-config-d-centralize": "^0.2.1", | ||
"eslint-plugin-react": "^6.6.0", | ||
"isparta": "^4.0.0", | ||
"jasmine-core": "^2.5.2", | ||
"json-loader": "^0.5.4", | ||
"eslint-config-airbnb": "^15.0.1", | ||
"eslint-plugin-import": "^2.3.0", | ||
"eslint-plugin-jsx-a11y": "^5.0.3", | ||
"eslint-plugin-react": "^7.1.0", | ||
"karma": "^1.3.0", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^2.0.0", | ||
"karma-chrome-launcher": "^2.1.1", | ||
"karma-cli": "^1.0.1", | ||
@@ -60,8 +60,8 @@ "karma-coverage": "^1.1.1", | ||
"karma-webpack": "^2.0.1", | ||
"material-ui": "^0.16.1", | ||
"material-ui": "^0.18.3", | ||
"mocha": "^3.2.0", | ||
"react": "^15.3.2", | ||
"react-dom": "^15.3.2", | ||
"react": "^15.6.1", | ||
"react-dom": "^15.6.1", | ||
"react-tap-event-plugin": "^2.0.1", | ||
"react-test-renderer": "^15.5.4", | ||
"react-test-renderer": "^15.6.1", | ||
"rimraf": "^2.5.4", | ||
@@ -68,0 +68,0 @@ "sinon": "^1.17.6", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
40
4138
4
3
33
+ Addedprop-types@^15.5.10
+ Added@appsemble/sdk@0.0.0-alpha.4(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact-is@16.13.1(transitive)
- Removed@appsemble/sdk@0.0.0-alpha.3(transitive)