release: v4.0.0

This commit is contained in:
Łukasz Holeczek 2021-10-21 13:48:00 +02:00
parent 42d823d50c
commit 5df5ebea90
6 changed files with 55 additions and 149 deletions

View File

@ -4,7 +4,6 @@
[![@coreui react](https://img.shields.io/badge/@coreui%20-react-lightgrey.svg?style=flat-square)](https://github.com/coreui/react) [![@coreui react](https://img.shields.io/badge/@coreui%20-react-lightgrey.svg?style=flat-square)](https://github.com/coreui/react)
[![npm package][npm-coreui-react-badge]][npm-coreui-react] [![npm package][npm-coreui-react-badge]][npm-coreui-react]
[![NPM downloads][npm-coreui-react-download]][npm-coreui-react] [![NPM downloads][npm-coreui-react-download]][npm-coreui-react]
[![npm next][npm-next]][npm]
[npm-coreui]: https://www.npmjs.com/package/@coreui/coreui [npm-coreui]: https://www.npmjs.com/package/@coreui/coreui
[npm-coreui-badge]: https://img.shields.io/npm/v/@coreui/coreui.png?style=flat-square [npm-coreui-badge]: https://img.shields.io/npm/v/@coreui/coreui.png?style=flat-square
@ -12,7 +11,6 @@
[npm-coreui-react]: https://www.npmjs.com/package/@coreui/react [npm-coreui-react]: https://www.npmjs.com/package/@coreui/react
[npm-coreui-react-badge]: https://img.shields.io/npm/v/@coreui/react.png?style=flat-square [npm-coreui-react-badge]: https://img.shields.io/npm/v/@coreui/react.png?style=flat-square
[npm-coreui-react-download]: https://img.shields.io/npm/dm/@coreui/react.svg?style=flat-square [npm-coreui-react-download]: https://img.shields.io/npm/dm/@coreui/react.svg?style=flat-square
[npm-next]: https://img.shields.io/npm/v/@coreui/react/next.png?style=flat-square
[npm]: https://www.npmjs.com/package/@coreui/react [npm]: https://www.npmjs.com/package/@coreui/react
# CoreUI Free React Admin Template v4 # CoreUI Free React Admin Template v4
@ -42,8 +40,6 @@ CoreUI is meant to be the UX game changer. Pure & transparent code is devoid of
## CoreUI Pro ## CoreUI Pro
**Only customers with [Enterpise Membership Plan](https://coreui.io/pro/#buy) have access to private github CoreUI Pro repository.**
* 💪 [CoreUI Pro Bootstrap Admin Template](https://coreui.io/pro/) * 💪 [CoreUI Pro Bootstrap Admin Template](https://coreui.io/pro/)
* 💪 [CoreUI Pro Angular Admin Template](https://coreui.io/pro/angular) * 💪 [CoreUI Pro Angular Admin Template](https://coreui.io/pro/angular)
* 💪 [CoreUI Pro React Admin Template](https://coreui.io/pro/react) * 💪 [CoreUI Pro React Admin Template](https://coreui.io/pro/react)
@ -51,7 +47,7 @@ CoreUI is meant to be the UX game changer. Pure & transparent code is devoid of
## Quick Start ## Quick Start
- [Download the latest release](https://github.com/coreui/coreui-free-react-admin-template/archive/refs/heads/v4.zip) - [Download the latest release](https://github.com/coreui/coreui-free-react-admin-template/archive/refs/heads/main.zip)
- Clone the repo: `git clone https://github.com/coreui/coreui-free-react-admin-template.git` - Clone the repo: `git clone https://github.com/coreui/coreui-free-react-admin-template.git`
### Instalation ### Instalation

17
jest.config.js Normal file
View File

@ -0,0 +1,17 @@
/**
* Copyright (c) 2013-present, creativeLabs Lukasz Holeczek.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict'
module.exports = {
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!**/*index.js',
'!src/serviceWorker.js',
'!src/polyfill.js',
],
}

View File

@ -1,102 +1,3 @@
# Migration from version 3 # Migration from version 3
## CSS https://coreui.io/react/docs/4.0/migration/v4/
- `ml-*` to `ms-*`
- `mfs-*` to `ms-*`
- `mr-*` to `me-*`
- `mfe-*` to `me-*`
- `pl-*` to `ps-*`
- `pr-*` to `pe-*`
- `float-left` to `float-start`
- `float-right` to `float-end`
## Components
- Deprecated component `CEmbed`
- Deprecated component `CJumbotron`
### Badges
- variant="pill" => shape="rounded-pill"
- variant="square" => shape="rounded-0"
### Forms
- `CInput` => `CFormInput`
- `CInputCheckbox` => `CFormCheck`
- `CLabel` => `CFormLabel`
- `CSelect` => `CFormSelect`
- `CValidFeedback` => `CFormFeedback valid`
- `CInvalidFeedback` => `CFormFeedback invalid`
- Deprecated component `CFormGroup`
- Deprecated component `CInputGroupAppend`
- Deprecated component `CInputGroupPrepend`
- Depreacted component `CSwitch`, use `CFormCheck switch` instead of.
- Deprecated `.help-block`
### Header
- Deprecated pro `withSubheader`
- Deprecated component `CHeaderNavItem`, use `CNavItem` instead of.
- Deprecated component `CHeaderNavLink`, use `CNavLink` instead of.
### List Group
- Depracated prop `action` Use `component="a"` or `component="b"` instead of `action`.
### Modal
- Depracated prop `show` Use `visible` instead of.
### Popover
- Depracated prop `header` Use `title` instead of.
### Progress Bar
- Depracated prop `precision`
- Depracated prop `showLabel`
- Depracated prop `showPercentage`
- Depracated prop `showValue`
### Tabs
- Deprecated component `<CTabs>` use `<CNav variant="tabs">` without wrapper component `<CTabs>`
# Migration from version 2
Migration from version 2 must be performed manually because the components library `@coreui/coreui-react` has been completely rewritten.
The docs of the new components are available [here](https://coreui.io/react/docs/)
The good news is that most probably it will be sufficient to migrate layout components (Sidebar, Header, Footer, Aside) and `Switch` component
The best way to do a migration is:
1. Install `@coreui/coreui-react` v3
2. Make a copy of the current `containers` folder
2. Paste [containers](https://github.com/coreui/coreui-free-react-admin-template/tree/master/src/containers) folder from v3 template to project
3. Correct routing paths
4. Add previous content to new template layout components
5. Replace `Switch` components with `CSwitch`
Layout components/ corresponding components in version 3
- Aside -> CSidebar (with prop aside={true})
- AsideToggler -> CToggler
- Breadcrumb -> CBreadcrumbRouter
- Footer -> CFooter
- Header -> CHeader
- HeaderDropdown -> CDropdown
- NavbarBrand -> CSidebarBrand
- Sidebar -> CSidebar
- SidebarFooter -> CSidebarFooter
- SidebarForm -> CSidebarForm
- SidebarHeader -> CSidebarHeader
- SidebarMinimizer -> CSidebarMinimizer
- SidebarNav -> CSidebarNav + CSidebarNavDropdown + CSidebarNavItem
- SidebarToggler -> CSidebarToggler
- Switch -> CSwitch
After the migration is done, you can start using new components of `@coreui/coreui-react` v3 library.

View File

@ -1,6 +1,6 @@
{ {
"name": "@coreui/coreui-free-react-admin-template", "name": "@coreui/coreui-free-react-admin-template",
"version": "4.0.0-rc.4", "version": "4.0.0",
"description": "CoreUI Free React Admin Template", "description": "CoreUI Free React Admin Template",
"homepage": "https://coreui.io/react/", "homepage": "https://coreui.io/react/",
"bugs": { "bugs": {
@ -25,21 +25,13 @@
"config": { "config": {
"coreui_library_short_version": "4.0" "coreui_library_short_version": "4.0"
}, },
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx}",
"!**/*index.js",
"!src/serviceWorker.js",
"!src/polyfill.js"
]
},
"dependencies": { "dependencies": {
"@coreui/chartjs": "^3.0.0", "@coreui/chartjs": "^3.0.0",
"@coreui/coreui": "^4.0.5", "@coreui/coreui": "^4.0.5",
"@coreui/icons": "^2.1.0", "@coreui/icons": "^2.1.0",
"@coreui/icons-react": "2.0.0", "@coreui/icons-react": "2.0.0",
"@coreui/react": "4.0.0-rc.6", "@coreui/react": "4.0.0",
"@coreui/react-chartjs": "2.0.0-rc.3", "@coreui/react-chartjs": "2.0.0",
"@coreui/utils": "^1.3.1", "@coreui/utils": "^1.3.1",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.3", "@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",
"chart.js": "^3.5.1", "chart.js": "^3.5.1",

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- <!--
* CoreUI Free React.js Admin Template * CoreUI Free React.js Admin Template
* @version v4.0.0-rc.4 * @version v4.0.0
* @link https://coreui.io/react/ * @link https://coreui.io/react/
* Copyright (c) 2021 creativeLabs Łukasz Holeczek * Copyright (c) 2021 creativeLabs Łukasz Holeczek
* License MIT * License MIT

View File

@ -1237,18 +1237,18 @@
resolved "https://registry.yarnpkg.com/@coreui/icons/-/icons-2.1.0.tgz#b21641d3d034fdef308c87dc347c8684c408a753" resolved "https://registry.yarnpkg.com/@coreui/icons/-/icons-2.1.0.tgz#b21641d3d034fdef308c87dc347c8684c408a753"
integrity sha512-3yY9J0088TSY403jwJeP5YERH3RLOvxdhOa4VIQsGOX4fuQZiyVUM+vwlzyCSpgAv9NwKPkCor+gc+JJaYf0TA== integrity sha512-3yY9J0088TSY403jwJeP5YERH3RLOvxdhOa4VIQsGOX4fuQZiyVUM+vwlzyCSpgAv9NwKPkCor+gc+JJaYf0TA==
"@coreui/react-chartjs@2.0.0-rc.3": "@coreui/react-chartjs@2.0.0":
version "2.0.0-rc.3" version "2.0.0"
resolved "https://registry.yarnpkg.com/@coreui/react-chartjs/-/react-chartjs-2.0.0-rc.3.tgz#0735ec13e654a3ea8ba7007b831bf00bed777bb0" resolved "https://registry.yarnpkg.com/@coreui/react-chartjs/-/react-chartjs-2.0.0.tgz#e4076a8cce24595892b7cf85ae0b48ff85ab1209"
integrity sha512-v/AxdZvjBj2t/7i8Xmwf5GOMHLEkkRVKStv00uTWEd/rV9MyPjttGHcHLuXRLhGnSl+gJxKu7DMqeug9hQKaCA== integrity sha512-/GLJ0+hxmj1tyCrGsmlo+LTGeRNzZV8glZqZGRBiEr6jkV2W7/o56aMbnhOpW28SfZTJFI9YzA5PR5oiglxZmQ==
dependencies: dependencies:
"@coreui/chartjs" "^3.0.0" "@coreui/chartjs" "^3.0.0"
chart.js "^3.5.0" chart.js "^3.5.0"
"@coreui/react@4.0.0-rc.6": "@coreui/react@4.0.0":
version "4.0.0-rc.6" version "4.0.0"
resolved "https://registry.yarnpkg.com/@coreui/react/-/react-4.0.0-rc.6.tgz#61186c11b3fd82c1e00666ccaa795a1fd7ce2fb8" resolved "https://registry.yarnpkg.com/@coreui/react/-/react-4.0.0.tgz#fb6a955c881bad4c0f10e70656d2214eda69775b"
integrity sha512-vbWcPnN8UG2Eot1mXOTfcJBK3Sm09e7kQeIdoyEk+1vvFX3wDJemMH1x3t2AbHyrDOcCuBJEc/h4+nDTVoeNAQ== integrity sha512-FE5s9TE7MIFh1QZhlMUB5LnEqh/IiqVdmT3YQtCOLmiHzXmUH4+BdM9Xt1QaK4SI61HxIsAlXUi73F1OgTBmQw==
"@coreui/utils@^1.3.1": "@coreui/utils@^1.3.1":
version "1.3.1" version "1.3.1"
@ -1844,9 +1844,9 @@
integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==
"@types/node@*": "@types/node@*":
version "16.11.1" version "16.11.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.1.tgz#2e50a649a50fc403433a14f829eface1a3443e97" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.2.tgz#31c249c136c3f9b35d4b60fb8e50e01a1f0cc9a5"
integrity sha512-PYGcJHL9mwl1Ek3PLiYgyEKtwTMmkMw4vbiyz/ps3pfdRYLVv+SN7qHVAImrjdAXxgluDEw6Ph4lyv+m9UpRmA== integrity sha512-w34LtBB0OkDTs19FQHXy4Ig/TOXI4zqvXS2Kk1PAsRKZ0I+nik7LlMYxckW0tSNGtvWmzB+mrCTbuEjuB9DVsw==
"@types/normalize-package-data@^2.4.0": "@types/normalize-package-data@^2.4.0":
version "2.4.1" version "2.4.1"
@ -1874,9 +1874,9 @@
integrity sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ== integrity sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==
"@types/react-redux@^7.1.16": "@types/react-redux@^7.1.16":
version "7.1.19" version "7.1.20"
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.19.tgz#477bd0a9b01bae6d6bf809418cdfa7d3c16d4c62" resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.20.tgz#42f0e61ababb621e12c66c96dda94c58423bd7df"
integrity sha512-L37dSCT0aoJnCgpR8Iuginlbxoh7qhWOXiaDqEsxVMrER1CmVhFD+63NxgJeT4pkmEM28oX0NH4S4f+sXHTZjA== integrity sha512-q42es4c8iIeTgcnB+yJgRTTzftv3eYYvCZOh1Ckn2eX/3o5TdsQYKUWpLoLuGlcY/p+VAhV9IOEZJcWk/vfkXw==
dependencies: dependencies:
"@types/hoist-non-react-statics" "^3.3.0" "@types/hoist-non-react-statics" "^3.3.0"
"@types/react" "*" "@types/react" "*"
@ -1884,9 +1884,9 @@
redux "^4.0.0" redux "^4.0.0"
"@types/react@*": "@types/react@*":
version "17.0.30" version "17.0.31"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.30.tgz#2f8e6f5ab6415c091cc5e571942ee9064b17609e" resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.31.tgz#fe05ebf91ff3ae35bb6b13f6c1b461db8089dff8"
integrity sha512-3Dt/A8gd3TCXi2aRe84y7cK1K8G+N9CZRDG8kDGguOKa0kf/ZkSwTmVIDPsm/KbQOVMaDJXwhBtuOXxqwdpWVg== integrity sha512-MQSR5EL4JZtdWRvqDgz9kXhSDDoy2zMTYyg7UhP+FZ5ttUOocWyxiqFJiI57sUG0BtaEX7WDXYQlkCYkb3X9vQ==
dependencies: dependencies:
"@types/prop-types" "*" "@types/prop-types" "*"
"@types/scheduler" "*" "@types/scheduler" "*"
@ -3394,9 +3394,9 @@ classnames@^2.3.1:
integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==
clean-css@^4.2.3: clean-css@^4.2.3:
version "4.2.3" version "4.2.4"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.4.tgz#733bf46eba4e607c6891ea57c24a989356831178"
integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA== integrity sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==
dependencies: dependencies:
source-map "~0.6.0" source-map "~0.6.0"
@ -4369,9 +4369,9 @@ ejs@^2.6.1:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
electron-to-chromium@^1.3.564, electron-to-chromium@^1.3.867: electron-to-chromium@^1.3.564, electron-to-chromium@^1.3.867:
version "1.3.873" version "1.3.876"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.873.tgz#c238c9199e4951952fe815a65c1beab5db4826b8" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.876.tgz#fe6f65c9740406f4aa69f10faa8e1d79b81bdf34"
integrity sha512-TiHlCgl2uP26Z0c67u442c0a2MZCWZNCRnPTQDPhVJ4h9G6z2zU0lApD9H0K9R5yFL5SfdaiVsVD2izOY24xBQ== integrity sha512-a6LR4738psrubCtGx5HxM/gNlrIsh4eFTNnokgOqvQo81GWd07lLcOjITkAXn2y4lIp18vgS+DGnehj+/oEAxQ==
elliptic@^6.5.3: elliptic@^6.5.3:
version "6.5.4" version "6.5.4"
@ -7610,7 +7610,7 @@ nan@^2.12.1:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee"
integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==
nanoid@^3.1.28: nanoid@^3.1.30:
version "3.1.30" version "3.1.30"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362"
integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==
@ -7751,9 +7751,9 @@ node-releases@^1.1.61:
integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==
node-releases@^2.0.0: node-releases@^2.0.0:
version "2.0.0" version "2.0.1"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.0.tgz#67dc74903100a7deb044037b8a2e5f453bb05400" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5"
integrity sha512-aA87l0flFYMzCHpTM3DERFSYxc6lv/BltdbRTOMZuxZ0cwZCD3mejE5n9vLhSJCN++/eOqr77G1IO5uXxlQYWA== integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==
normalize-package-data@^2.5.0: normalize-package-data@^2.5.0:
version "2.5.0" version "2.5.0"
@ -9028,12 +9028,12 @@ postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, po
source-map "^0.6.1" source-map "^0.6.1"
postcss@^8.1.0: postcss@^8.1.0:
version "8.3.9" version "8.3.10"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.9.tgz#98754caa06c4ee9eb59cc48bd073bb6bd3437c31" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.10.tgz#4d614e108ccc69c65c2f6dc6cec23dd5c85b73af"
integrity sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw== integrity sha512-YYfvfUdWx+ECpr5Hgc6XRfsaux8LksL5ey8qTtWiuRXOpOF1YYMwAySdh0nSmwhZAFvvJ6rgiIkKVShu4x2T1Q==
dependencies: dependencies:
nanoid "^3.1.28" nanoid "^3.1.30"
picocolors "^0.2.1" picocolors "^1.0.0"
source-map-js "^0.6.2" source-map-js "^0.6.2"
prelude-ls@^1.2.1: prelude-ls@^1.2.1: