Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration react 16 #9

Merged
merged 2 commits into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ npm-debug.log
node_modules
yarn.lock
.gh-pages-tmp
/package-lock.json
33 changes: 17 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opuscapita/react-navigation",
"version": "0.0.39",
"version": "0.1.0",
"description": "Start write new project with no effort.",
"scripts": {
"npm-build": "rimraf lib && webpack --config webpack.production.config.js",
Expand All @@ -24,29 +24,30 @@
"license": "Apache-2.0",
"repository": "OpusCapita/react-navigation",
"peerDependencies": {
"react": "0.14.8",
"react-dom": "0.14.8"
"react": "^15.6.2 || ^16.2.0",
"react-dom": "^15.6.2 || ^16.2.0"
},
"devDependencies": {
"@opuscapita/npm-scripts": "1.0.8",
"@opuscapita/react-showroom-client": "1.2.10",
"@opuscapita/react-showroom-client": "1.3.0-beta.4",
"@opuscapita/react-showroom-server": "1.3.0",
"@opuscapita/styles": "1.1.14",
"autoprefixer": "6.7.6",
"babel-cli": "6.23.0",
"babel-core": "6.23.1",
"babel-core": "6.26.0",
"babel-eslint": "7.1.1",
"babel-loader": "6.3.2",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-preset-es2015": "6.22.0",
"babel-preset-react": "6.23.0",
"babel-preset-stage-0": "6.22.0",
"babel-register": "6.23.0",
"chai": "3.5.0",
"chai-enzyme": "0.6.1",
"chai": "4.1.2",
"chai-enzyme": "1.0.0-beta.0",
"compression": "1.6.2",
"css-loader": "0.26.2",
"enzyme": "2.7.1",
"enzyme": "3.2.0",
"enzyme-adapter-react-15": "1.0.5",
"eslint": "3.17.0",
"eslint-config-opuscapita": "1.0.7",
"eslint-plugin-react": "6.10.0",
Expand All @@ -62,12 +63,12 @@
"postcss-loader": "1.3.3",
"postcss-modules": "0.6.4",
"raw-loader": "0.5.1",
"react": "0.14.8",
"react-addons-test-utils": "15.4.2",
"react-dom": "0.14.8",
"react": "15.6.2",
"react-dom": "15.6.2",
"react-test-renderer": "15.6.2",
"rimraf": "2.6.1",
"sinon": "2.1.0",
"sinon-chai": "2.9.0",
"sinon": "4.1.3",
"sinon-chai": "2.14.0",
"source-map-loader": "0.1.6",
"style-loader": "0.13.2",
"url-loader": "0.5.8",
Expand All @@ -76,12 +77,12 @@
"write-file-webpack-plugin": "3.4.2"
},
"dependencies": {
"@opuscapita/react-buttons": "2.0.3",
"@opuscapita/react-svg": "2.0.0",
"@opuscapita/react-buttons": "4.0.0",
"@opuscapita/react-svg": "4.0.0",
"@opuscapita/svg-icons": "1.1.1",
"lodash": "4.17.4",
"prop-types": "15.5.10",
"react-motion": "0.5.1"
"react-motion": "0.5.2"
},
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Menu/Menu.DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ TopMenu is
label: 'Log out',
onClick: () => console.log('Log out click')
},
(<button className="btn btn-primary">Custom Button</button>)
(<button key="custom.button" className="btn btn-primary">Custom Button</button>)
]}
bottomElement={(
<div>
Expand Down
6 changes: 4 additions & 2 deletions src/client/components/Menu/Menu.SCOPE.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';
import MenuIcon from '../MenuIcon';
import MenuDropdownGrid from '../MenuDropdownGrid';
Expand All @@ -13,7 +15,7 @@ import MenuAccount from '../MenuAccount';
import MenuSelect from '../MenuSelect';
import Notification from '../Notification';
import Notifications from '../Notifications';
import SVG from '@opuscapita/react-svg/lib/SVG';
import { SVG } from '@opuscapita/react-svg';
let circleSVG = require('!!raw-loader!./circle.svg');

window.MenuIcon = MenuIcon;
Expand Down
4 changes: 3 additions & 1 deletion src/client/components/MenuAccount/MenuAccount.SCOPE.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

@showroomScopeDecorator
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/MenuAccount/MenuAccount.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import Types from 'prop-types';
import './MenuAccount.less';
import MenuAccountIcon from '../MenuAccountIcon';
import Button from '@opuscapita/react-buttons/lib/Button';
import { Button } from '@opuscapita/react-buttons';

const propTypes = {
firstName: Types.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

@showroomScopeDecorator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

function requireAll(requireContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React, { Component } from 'react';
import Types from 'prop-types';
import './MenuDropdownGrid.less';
import SVG from '@opuscapita/react-svg/lib/SVG';
import { SVG } from '@opuscapita/react-svg';

const propTypes = {
activeItem: Types.number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

@showroomScopeDecorator
Expand Down
4 changes: 3 additions & 1 deletion src/client/components/MenuIcon/MenuIcon.SCOPE.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

function requireAll(requireContext) {
Expand Down
4 changes: 2 additions & 2 deletions src/client/components/MenuIcon/MenuIcon.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React, { Component } from 'react';
import Types from 'prop-types';
import './MenuIcon.less';
import { spring, presets, Motion } from 'react-motion';
import TitledButton from '@opuscapita/react-buttons/lib/TitledButton';
import SVG from '@opuscapita/react-svg/lib/SVG';
import { TitledButton } from '@opuscapita/react-buttons';
import { SVG } from '@opuscapita/react-svg';
const dropdownSVG = require('!!raw-loader!@opuscapita/svg-icons/lib/arrow_drop_down.svg');

const propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';
import MenuIcon from '../MenuIcon';

Expand Down
4 changes: 3 additions & 1 deletion src/client/components/MenuLogo/MenuLogo.SCOPE.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

@showroomScopeDecorator
Expand Down
4 changes: 3 additions & 1 deletion src/client/components/MenuSearch/MenuSearch.SCOPE.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

@showroomScopeDecorator
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/MenuSearch/MenuSearch.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { Component } from 'react';
import Types from 'prop-types';
import './MenuSearch.less';
import SVG from '@opuscapita/react-svg/lib/SVG';
import { SVG } from '@opuscapita/react-svg';
import { spring, Motion } from 'react-motion';

const searchSVG = require('!!raw-loader!@opuscapita/svg-icons/lib/search.svg');
Expand Down
4 changes: 3 additions & 1 deletion src/client/components/MenuSelect/MenuSelect.SCOPE.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

@showroomScopeDecorator
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/MenuSelect/MenuSelect.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { Component } from 'react';
import Types from 'prop-types';
import './MenuSelect.less';
import SVG from '@opuscapita/react-svg/lib/SVG';
import { SVG } from '@opuscapita/react-svg';
const dropdownSVG = require('!!raw-loader!@opuscapita/svg-icons/lib/arrow_drop_down.svg');

const propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

@showroomScopeDecorator
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/NavigationBar/NavigationBar.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { Component } from 'react';
import Types from 'prop-types';
import './NavigationBar.less';
import { spring, presets, Motion } from 'react-motion';
import SVG from '@opuscapita/react-svg/lib/SVG';
import { SVG } from '@opuscapita/react-svg';
const dropdownSVG = require('!!raw-loader!@opuscapita/svg-icons/lib/arrow_drop_down.svg');

const propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

function requireAll(requireContext) {
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Notification/Notification.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { Component } from 'react';
import Types from 'prop-types';
import './Notification.less';
import SVG from '@opuscapita/react-svg/lib/SVG';
import { SVG } from '@opuscapita/react-svg';

const propTypes = {
svg: Types.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
https://github.com/OpusCapita/react-showroom-client/blob/master/docs/scope-component.md
*/

import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';

import React, { Component } from 'react';
import { showroomScopeDecorator } from '@opuscapita/react-showroom-client';

@showroomScopeDecorator
Expand Down
3 changes: 3 additions & 0 deletions test/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { jsdom } from 'jsdom';
import chai from 'chai';
import sinonChai from 'sinon-chai';
import chaiEnzyme from 'chai-enzyme';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-15';

chai.use(sinonChai);
chai.use(chaiEnzyme());
Enzyme.configure({ adapter: new Adapter() });

global.document = jsdom('<!doctype html><html><body></body></html>');
global.window = document.defaultView;
Expand Down
4 changes: 2 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<body style="padding-bottom: 0; overflow-x: hidden;">
<div id="main"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.8/react-with-addons.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.8/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.2/react-with-addons.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/15.6.2/react-dom.js"></script>
<script type="application/javascript" src="index.js"></script>
</body>
</html>