This package exports common functions to be used in other packages.
With NPM
npm i -S @redhat-cloud-services/frontend-components-utilities
With yarn
yarn add @redhat-cloud-services/frontend-components-utilities
This package is dependent on @redhat-cloud-services/frontend-components it will automatically installed trough direct dependencies.
Assets are no longer under /files
directory but directly at the root of the build directory.
// v2
import { getRegistry } from '@redhat-cloud-services/frontend-components-utilities/Registry';
// v3
import { getRegistry } from '@redhat-cloud-services/frontend-components-utilities/Registry';
Utils package no longer provides UMD version of the build.
RowLoader component is no longer a part of helpers
file but is now a stand-alone component. Import path has changed.
// v2
import { RowLoader } from '@redhat-cloud-services/frontend-components-utilities/helpers'
// v3
import RowLoader from '@redhat-cloud-services/frontend-components-utilities/RowLoader'
SCSS files are now under styles
directory.
/** v2 */
@import '~@redhat-cloud-services/frontend-components-utilities/styles/all';
/** v3 */
@import '~@redhat-cloud-services/frontend-components-utilities/styles/all''
This module is now deprecated. Use a new Inventory component compatible with chrome 2.0.
Function parseCvssScore
has been moved to a stand-alone file. Import path has changed.
// v2
import { parseCvssScore } from '@redhat-cloud-services/frontend-components-utilities/helpers'
// v3
import parseCvssScore from '@redhat-cloud-services/frontend-components-utilities/parseCvssScore'
- Utils
Additionaly it exports these utilities
- AsyncComponent - class to load component via async calls
- helpers - custom helper functions
- MiddlewareListener - redux listener on actions, they can fire additional action or be cancelled
- Registry - reducer registry
- RouterParams - maps route to props
- interceptors - to be used with axios clients
- Styles - custom style functions in sass