diff --git a/babel.config.js b/babel.config.js index 794c86e1f..2e66c6bfd 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,35 +1,3 @@ -require.extensions['.css'] = () => undefined; -const path = require('path'); -const glob = require('glob'); - -const mapper = { - TextVariants: 'Text', - DropdownPosition: 'dropdownConstants', - EmptyStateVariant: 'EmptyState', - TextListItemVariants: 'TextListItem', - TextListVariants: 'TextList', - getDefaultOUIAId: 'ouia', - useOUIAProps: 'ouia', - PaginationVariant: 'Pagination', -}; - -const FECMapper = { - SkeletonSize: 'Skeleton', - PageHeaderTitle: 'PageHeader', -}; - -const NotificationMapper = { - REMOVE_NOTIFICATION: 'actionTypes', - ADD_NOTIFICATION: 'actionTypes', - NotificationsPortal: 'NotificationPortal/index', - addNotification: 'actions', -}; - -const IconMapper = { - AnsibeTowerIcon: 'ansibeTower-icon', - ChartSpikeIcon: 'chartSpike-icon', -}; - module.exports = { presets: [ [ @@ -51,57 +19,6 @@ module.exports = { '@babel/plugin-transform-runtime', '@babel/plugin-syntax-dynamic-import', '@babel/plugin-proposal-object-rest-spread', - [ - 'transform-imports', - { - '@redhat-cloud-services/frontend-components-notifications': { - transform: (importName) => - `@redhat-cloud-services/frontend-components-notifications/${ - NotificationMapper[importName] || importName - }.js`, - preventFullImport: true, - }, - '@redhat-cloud-services/frontend-components': { - transform: (importName) => - `@redhat-cloud-services/frontend-components/${ - FECMapper[importName] || importName - }`, - preventFullImport: true, - skipDefaultConversion: true, - }, - '@patternfly/react-icons': { - transform: (importName) => - `@patternfly/react-icons/dist/esm/icons/${ - IconMapper[importName] || - importName - .split(/(?=[A-Z])/) - .join('-') - .toLowerCase() - }.js`, - preventFullImport: true, - }, - '@patternfly/react-core': { - transform: (importName) => { - const files = glob.sync( - path.resolve( - __dirname, - `./node_modules/@patternfly/react-core/dist/esm/**/${ - mapper[importName] || importName - }.js` - ) - ); - if (files.length > 0) { - return files[0].replace(/.*(?=@patternfly)/, ''); - } else { - throw `File with importName ${importName} does not exist`; - } - }, - preventFullImport: false, - skipDefaultConversion: true, - }, - }, - 'frontend-notifications', - ], ], env: { componentTest: { diff --git a/src/components/GeneralInfo/GeneralInformation/__snapshots__/GeneralInformation.test.js.snap b/src/components/GeneralInfo/GeneralInformation/__snapshots__/GeneralInformation.test.js.snap index ddec3bafe..a1d4828fb 100644 --- a/src/components/GeneralInfo/GeneralInformation/__snapshots__/GeneralInformation.test.js.snap +++ b/src/components/GeneralInfo/GeneralInformation/__snapshots__/GeneralInformation.test.js.snap @@ -71,7 +71,7 @@ exports[`GeneralInformation should render correctly 1`] = ` aria-disabled="false" aria-label="Action for Host name" class="pf-v5-c-button pf-m-plain ins-active-general_information__popover-icon" - data-ouia-component-id="OUIA-Generated-Button-plain-4" + data-ouia-component-id="OUIA-Generated-Button-plain-6" data-ouia-component-type="PF5/Button" data-ouia-safe="true" type="button" @@ -114,7 +114,7 @@ exports[`GeneralInformation should render correctly 1`] = ` aria-disabled="false" aria-label="Action for Display name" class="pf-v5-c-button pf-m-plain ins-active-general_information__popover-icon" - data-ouia-component-id="OUIA-Generated-Button-plain-5" + data-ouia-component-id="OUIA-Generated-Button-plain-7" data-ouia-component-type="PF5/Button" data-ouia-safe="true" type="button" @@ -179,7 +179,7 @@ exports[`GeneralInformation should render correctly 1`] = ` aria-disabled="false" aria-label="Action for Ansible hostname" class="pf-v5-c-button pf-m-plain ins-active-general_information__popover-icon" - data-ouia-component-id="OUIA-Generated-Button-plain-6" + data-ouia-component-id="OUIA-Generated-Button-plain-8" data-ouia-component-type="PF5/Button" data-ouia-safe="true" type="button" @@ -707,7 +707,7 @@ exports[`GeneralInformation should render correctly 1`] = ` aria-label="Details" aria-labelledby="simple-node0 expand-toggle0" class="pf-v5-c-button pf-m-plain" - data-ouia-component-id="OUIA-Generated-Button-plain-3" + data-ouia-component-id="OUIA-Generated-Button-plain-9" data-ouia-component-type="PF5/Button" data-ouia-safe="true" id="expand-toggle0" @@ -812,7 +812,7 @@ exports[`GeneralInformation should render correctly 1`] = ` aria-label="Details" aria-labelledby="simple-node1 expand-toggle1" class="pf-v5-c-button pf-m-plain" - data-ouia-component-id="OUIA-Generated-Button-plain-4" + data-ouia-component-id="OUIA-Generated-Button-plain-10" data-ouia-component-type="PF5/Button" data-ouia-safe="true" id="expand-toggle1" diff --git a/src/components/InventoryGroups/Modals/ConfirmSystemsAddModal.js b/src/components/InventoryGroups/Modals/ConfirmSystemsAddModal.js index 253f5df87..0f60378e7 100644 --- a/src/components/InventoryGroups/Modals/ConfirmSystemsAddModal.js +++ b/src/components/InventoryGroups/Modals/ConfirmSystemsAddModal.js @@ -1,7 +1,7 @@ import { FormSpy, useFormApi } from '@data-driven-forms/react-form-renderer'; import { Button, Flex, Icon } from '@patternfly/react-core'; import ExclamationTriangleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon'; -import warningColor from '@patternfly/react-tokens/dist/esm/global_warning_color_100'; +import { warningColor } from '@patternfly/react-tokens'; import PropTypes from 'prop-types'; import React from 'react'; import Modal from './Modal';