diff --git a/CHANGELOG.md b/CHANGELOG.md
index d65a6bf9c..385679a4e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
# Change history for ui-inventory
+## [11.0.0] IN PROGRESS
+
+* *BREAKING* Replace imports from quick-marc with stripes-marc-components. Refs UIIN-2636.
## [10.1.0] IN PROGRESS
diff --git a/package.json b/package.json
index 4dc9374e4..1690b7162 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@folio/inventory",
- "version": "10.1.0",
+ "version": "11.0.0",
"description": "Inventory manager",
"repository": "folio-org/ui-inventory",
"publishConfig": {
@@ -862,6 +862,7 @@
"@folio/stripes-components": "^12.0.0",
"@folio/stripes-connect": "^9.0.0",
"@folio/stripes-core": "^10.0.0",
+ "@folio/stripes-marc-components": "^1.0.0",
"@folio/stripes-smart-components": "^9.0.0",
"@folio/stripes-testing": "^4.6.0",
"@folio/stripes-util": "^6.0.0",
@@ -882,7 +883,6 @@
"zustand": "^4.1.1"
},
"dependencies": {
- "@folio/quick-marc": "^7.0.0",
"@folio/stripes-acq-components": "^5.0.0",
"classnames": "^2.3.2",
"file-saver": "^2.0.0",
@@ -904,6 +904,7 @@
},
"peerDependencies": {
"@folio/stripes": "^9.0.0",
+ "@folio/stripes-marc-components": "^1.0.0",
"react": "^18.2.0",
"react-intl": "^6.4.4",
"react-query": "^3.6.0",
diff --git a/src/components/ViewSource/ViewSource.js b/src/components/ViewSource/ViewSource.js
index ce8fa5cae..57fab5307 100644
--- a/src/components/ViewSource/ViewSource.js
+++ b/src/components/ViewSource/ViewSource.js
@@ -10,9 +10,11 @@ import {
LoadingView,
} from '@folio/stripes/components';
import { useStripes } from '@folio/stripes/core';
-import MarcView from '@folio/quick-marc/src/QuickMarcView/QuickMarcView';
-import PrintPopup from '@folio/quick-marc/src/QuickMarcView/PrintPopup';
-import { getHeaders } from '@folio/quick-marc/src/QuickMarcEditor/utils';
+import {
+ MarcView,
+ PrintPopup,
+ getHeaders,
+} from '@folio/stripes-marc-components';
import { useGoBack } from '../../common/hooks';
diff --git a/src/components/ViewSource/ViewSource.test.js b/src/components/ViewSource/ViewSource.test.js
index a3777ab79..a719b9381 100644
--- a/src/components/ViewSource/ViewSource.test.js
+++ b/src/components/ViewSource/ViewSource.test.js
@@ -89,18 +89,18 @@ describe('ViewSource', () => {
});
});
- it('should render QuickMarcView', () => {
- expect(screen.getByText('QuickMarcView')).toBeInTheDocument();
+ it('should render MarcView', () => {
+ expect(screen.getByText('MarcView')).toBeInTheDocument();
});
it('should initiate useGoBack with correct path', () => {
expect(useGoBack).toBeCalledWith('/inventory/view/instance-id');
});
- describe('when QuickMarcView is closed', () => {
+ describe('when MarcView is closed', () => {
it('should call onClose with correct url', async () => {
- await waitFor(() => expect(screen.getByText('QuickMarcView')).toBeInTheDocument());
- act(() => fireEvent.click(screen.getByText('QuickMarcView')));
+ await waitFor(() => expect(screen.getByText('MarcView')).toBeInTheDocument());
+ act(() => fireEvent.click(screen.getByText('MarcView')));
expect(mockGoBack).toBeCalledTimes(1);
});
});
diff --git a/test/jest/__mock__/index.js b/test/jest/__mock__/index.js
index b75a3ae37..cb1422de0 100644
--- a/test/jest/__mock__/index.js
+++ b/test/jest/__mock__/index.js
@@ -6,7 +6,7 @@ import './stripesCore.mock';
import './stripesIcon.mock';
import './stripesSmartComponents.mock';
import './InstancePlugin.mock';
-import './quickMarc.mock';
+import './stripesMarcComponents.mock';
import './stripesComponents.mock';
import './reactBeautifulDnd.mock';
import './react-virtualized-auto-sizer';
diff --git a/test/jest/__mock__/quickMarc.mock.js b/test/jest/__mock__/quickMarc.mock.js
deleted file mode 100644
index d38605f94..000000000
--- a/test/jest/__mock__/quickMarc.mock.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import React from 'react';
-
-jest.mock('@folio/quick-marc/src/QuickMarcView/QuickMarcView', () => ({ onClose, marcTitle }) => (
- <>
- {marcTitle}
-
- >
-));
diff --git a/test/jest/__mock__/stripesMarcComponents.mock.js b/test/jest/__mock__/stripesMarcComponents.mock.js
new file mode 100644
index 000000000..ea3bf1551
--- /dev/null
+++ b/test/jest/__mock__/stripesMarcComponents.mock.js
@@ -0,0 +1,13 @@
+import React from 'react';
+
+jest.mock('@folio/stripes-marc-components', () => ({
+ ...jest.requireActual('@folio/stripes-marc-components'),
+ MarcView: jest.fn(({ onClose, marcTitle }) => (
+ <>
+ {marcTitle}
+
+ >
+ )),
+}));