Skip to content

[pull] master from coreui:master #33

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

Merged
merged 6 commits into from
Dec 14, 2020
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

#### [3.2.0](https://github.com/coreui/coreui-free-react-admin-template/compare/3.1.1...3.2.0)

> 14 December 2020

- fix(BrandButtons): minor temp fixes with stylings [`f0c0585`](https://github.com/coreui/coreui-free-react-admin-template/commit/f0c05858329430c9487bdcfcf36d0aa98f60776d)
- refactor: polyfills cleanup [`9522ade`](https://github.com/coreui/coreui-free-react-admin-template/commit/9522ade1f1eb2c5a26d5208fe6e44be803123bd2)
- test: refactor, import temp update [`f3f91c5`](https://github.com/coreui/coreui-free-react-admin-template/commit/f3f91c5d721754a2dac26143f312415c94c7ed68)
- chore: React 17 and dependencies update [`f6a710f`](https://github.com/coreui/coreui-free-react-admin-template/commit/f6a710ffd6996c9b6b026b8eebed6ff390757fe1)
- fix(_nav): no anonymous default export [`ed83c9a`](https://github.com/coreui/coreui-free-react-admin-template/commit/ed83c9a3d4199b8c6566a6e01396cdcbca80cf42)

#### [3.1.1](https://github.com/coreui/coreui-free-react-admin-template/compare/3.1.0...3.1.1)

> 26 November 2020
Expand All @@ -10,6 +20,7 @@ All notable changes to this project will be documented in this file. Dates are d
- chore: add changelog [`de605cc`](https://github.com/coreui/coreui-free-react-admin-template/commit/de605cc1aadec9fb066625c6bc7b656590efc7bb)
- chore: limit changelog to version 3 [`6ac9a1d`](https://github.com/coreui/coreui-free-react-admin-template/commit/6ac9a1d094d4d293ddacb3f3562216a98be8e129)
- chore: add migration docs [`b661344`](https://github.com/coreui/coreui-free-react-admin-template/commit/b661344485a38404b8c2b1326e3a4258009b071c)
- chore: changelog update [`f9f1927`](https://github.com/coreui/coreui-free-react-admin-template/commit/f9f19274f046cf5f11f68d6c7eb7ae04c553f219)
- chore: .gitignore cleanup [`ba21e00`](https://github.com/coreui/coreui-free-react-admin-template/commit/ba21e001944322fb48e43264719b94368c589732)
- chore: 3.1.1 release [`081b957`](https://github.com/coreui/coreui-free-react-admin-template/commit/081b957291a8020e3d2e3b42c1f0a1455a49c524)

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coreui/coreui-free-react-admin-template",
"version": "3.1.1",
"version": "3.2.0",
"description": "CoreUI React Open Source Bootstrap 4 Admin Template",
"author": {
"name": "CoreUI",
Expand All @@ -27,25 +27,25 @@
"@coreui/coreui": "^3.4.0",
"@coreui/icons": "^2.0.0-rc.0",
"@coreui/icons-react": "^1.0.2",
"@coreui/react": "^3.3.4",
"@coreui/react": "^3.4.0",
"@coreui/react-chartjs": "^1.0.1",
"@coreui/utils": "^1.3.1",
"classnames": "^2.2.6",
"core-js": "^3.8.0",
"core-js": "^3.8.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"@wojtekmaj/enzyme-adapter-react-17": "^0.3.2",
"node-sass": "^4.14.1",
"prop-types": "^15.7.2",
"react": "^16.14.0",
"react": "^17.0.1",
"react-app-polyfill": "^2.0.0",
"react-dom": "^16.14.0",
"react-dom": "^17.0.1",
"react-redux": "^7.2.2",
"react-router-dom": "^5.2.0",
"redux": "4.0.5"
},
"devDependencies": {
"auto-changelog": "~2.2.1",
"react-scripts": "~4.0.1"
"react-scripts": "^4.0.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
* CoreUI Free - React.js Admin Template
* @version v3.0.0-beta.1
* @version v3.2.0
* @link https://coreui.io/pro/react/
* Copyright (c) 2020 creativeLabs Łukasz Holeczek
* License MIT
Expand Down
6 changes: 3 additions & 3 deletions src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import ChartLineSimple from './views/charts/ChartLineSimple'
import Dashboard from './views/dashboard/Dashboard.js'


it('mounts without crashing', () => {
it('mounts App without crashing', () => {
const wrapper = shallow(<App/>)
wrapper.unmount()
})

it('mounts dashboard without crashing', () => {
it('mounts Dashboard without crashing', () => {
const wrapper = shallow(<Dashboard/>)
wrapper.unmount()
})

it('mounts charts without crashing', () => {
it('mounts Charts without crashing', () => {
const wrapper = shallow(<ChartLineSimple/> )
wrapper.unmount()
})
16 changes: 8 additions & 8 deletions src/containers/TheHeaderDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ const TheHeaderDropdown = () => {
<strong>Account</strong>
</CDropdownItem>
<CDropdownItem>
<CIcon name="cil-bell" className="mfe-2" />
<CIcon name="cil-bell" className="mfe-2" />
Updates
<CBadge color="info" className="mfs-auto">42</CBadge>
</CDropdownItem>
<CDropdownItem>
<CIcon name="cil-envelope-open" className="mfe-2" />
<CIcon name="cil-envelope-open" className="mfe-2" />
Messages
<CBadge color="success" className="mfs-auto">42</CBadge>
</CDropdownItem>
<CDropdownItem>
<CIcon name="cil-task" className="mfe-2" />
<CIcon name="cil-task" className="mfe-2" />
Tasks
<CBadge color="danger" className="mfs-auto">42</CBadge>
</CDropdownItem>
<CDropdownItem>
<CIcon name="cil-comment-square" className="mfe-2" />
<CIcon name="cil-comment-square" className="mfe-2" />
Comments
<CBadge color="warning" className="mfs-auto">42</CBadge>
</CDropdownItem>
Expand All @@ -66,22 +66,22 @@ const TheHeaderDropdown = () => {
<CIcon name="cil-user" className="mfe-2" />Profile
</CDropdownItem>
<CDropdownItem>
<CIcon name="cil-settings" className="mfe-2" />
<CIcon name="cil-settings" className="mfe-2" />
Settings
</CDropdownItem>
<CDropdownItem>
<CIcon name="cil-credit-card" className="mfe-2" />
<CIcon name="cil-credit-card" className="mfe-2" />
Payments
<CBadge color="secondary" className="mfs-auto">42</CBadge>
</CDropdownItem>
<CDropdownItem>
<CIcon name="cil-file" className="mfe-2" />
<CIcon name="cil-file" className="mfe-2" />
Projects
<CBadge color="primary" className="mfs-auto">42</CBadge>
</CDropdownItem>
<CDropdownItem divider />
<CDropdownItem>
<CIcon name="cil-lock-locked" className="mfe-2" />
<CIcon name="cil-lock-locked" className="mfe-2" />
Lock Account
</CDropdownItem>
</CDropdownMenu>
Expand Down
3 changes: 2 additions & 1 deletion src/containers/_nav.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import CIcon from '@coreui/icons-react'

export default [
const _nav = [
{
_tag: 'CSidebarNavItem',
name: 'Dashboard',
Expand Down Expand Up @@ -309,3 +309,4 @@ export default [
}
]

export default _nav
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'react-app-polyfill/ie11'; // For IE 11 support
import 'react-app-polyfill/stable';
import 'core-js';
import './polyfill'
import React from 'react';
import ReactDOM from 'react-dom';
Expand All @@ -16,7 +17,7 @@ React.icons = icons
ReactDOM.render(
<Provider store={store}>
<App/>
</Provider>,
</Provider>,
document.getElementById('root')
);

Expand Down
56 changes: 36 additions & 20 deletions src/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
/*
* required polyfills
*/
import "core-js";
import 'core-js/features/set/map';
import 'core-js/features/map';

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol'
// import 'core-js/es6/object'
// import 'core-js/es6/function'
// import 'core-js/es6/parse-int'
// import 'core-js/es6/parse-float'
// import 'core-js/es6/number'
// import 'core-js/es6/math'
// import 'core-js/es6/string'
// import 'core-js/es6/date'
// import 'core-js/es6/array'
// import 'core-js/es6/regexp'
// import 'core-js/es6/map'
// import 'core-js/es6/weak-map'
// import 'core-js/es6/set'
// import 'core-js/es7/object'
// import "core-js";
// import 'core-js/features/symbol'
// import 'core-js/features/object'
// import 'core-js/features/function'
// import 'core-js/features/parse-int'
// import 'core-js/features/parse-float'
// import 'core-js/features/number'
// import 'core-js/features/math'
// import 'core-js/features/string'
// import 'core-js/features/date'
// import 'core-js/features/array'
// import 'core-js/features/regexp'
// import 'core-js/features/map'
// import 'core-js/features/weak-map'
// import 'core-js/features/set'
// import 'core-js/features/set/map';

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect'
// import 'core-js/features/reflect';

/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
// import 'core-js/es7/reflect'
// import 'core-js/features/reflect'

// CustomEvent() constructor functionality in IE9, IE10, IE11
(function () {
Expand All @@ -45,3 +43,21 @@ import 'core-js/features/map';

window.CustomEvent = CustomEvent
})()

if (!Element.prototype.matches) {
Element.prototype.matches =
Element.prototype.msMatchesSelector ||
Element.prototype.webkitMatchesSelector;
}

if (!Element.prototype.closest) {
Element.prototype.closest = function(s) {
var el = this;

do {
if (Element.prototype.matches.call(el, s)) return el;
el = el.parentElement || el.parentNode;
} while (el !== null && el.nodeType === 1);
return null;
};
}
16 changes: 16 additions & 0 deletions src/scss/_fixes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// todo: disabled button styles
button {
&:disabled {
cursor: default;
}
&.disabled {
cursor: default;
}
}

// todo: brand button icon margin
.btn-brand:not(:only-child) {
.c-icon {
margin-top: 0 !important;
}
}
3 changes: 3 additions & 0 deletions src/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
// Import CoreUI styles
@import "~@coreui/coreui/scss/coreui.scss";

// Some temp fixes
@import "fixes";

// If you want to add something do it here
@import "custom";
8 changes: 4 additions & 4 deletions src/setupTests.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import {configure} from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

configure({ adapter: new Adapter() });
configure({adapter: new Adapter()});

if (global.document) {
document.createRange = () => ( {
document.createRange = () => ({
setStart: () => {},
setEnd: () => {},
commonAncestorContainer: {
Expand Down
Loading