A modern React component library for Invenio bulk import functionality, built with TypeScript, PandaCSS, and Semantic UI React.
This library provides a comprehensive set of React components for managing bulk imports in Invenio applications. It includes features for task management, file uploads, metadata processing, search functionality, and progress tracking with a modern, responsive interface.
- π¦ Bulk Import Management: Create, manage, and execute bulk import tasks
- π File Upload: Advanced file uploader with drag-and-drop support
- π Search & Filter: Powerful search with faceted filtering
- π Progress Tracking: Progress monitoring with visual feedback
- π Task Details: Comprehensive task management with detailed views
- βΏ Accessibility: Semantic HTML with proper ARIA support
# Using yarn (recommended)
yarn add @ubiquitypress/react-invenio-bulk-importer
# Using npm
npm install @ubiquitypress/react-invenio-bulk-importerMake sure you have the following peer dependencies installed:
yarn add react react-dom semantic-ui-react semantic-ui-css react-invenio-formsimport React from "react";
import ReactDOM from "react-dom";
import { BulkImporter } from "@ubiquitypress/react-invenio-bulk-importer";
import "@ubiquitypress/react-invenio-bulk-importer/style.css";
const BulkImporterSearchApp = () => {
return <BulkImporter.Search />;
};
const initializeBulkImporter = () => {
const domContainer = document.getElementById("invenio-search-config");
if (!domContainer) {
console.error("Could not find element with id 'invenio-search-config'");
return;
}
ReactDOM.render(<BulkImporterSearchApp />, domContainer);
};
initializeBulkImporter();import React from "react";
import ReactDOM from "react-dom";
import { BulkImporter } from "@ubiquitypress/react-invenio-bulk-importer";
import "@ubiquitypress/react-invenio-bulk-importer/style.css";
const BulkImporterDetailsApp = ({ taskId }) => {
return <BulkImporter.TaskDetails taskId={taskId} />;
};
const initializeBulkImporterDetails = () => {
const domContainer = document.getElementById("invenio-details-config");
if (!domContainer) {
console.error("Could not find element with id 'invenio-details-config'");
return;
}
// Extract data from DOM attributes
const taskId = JSON.parse(domContainer.dataset.pid);
ReactDOM.render(<BulkImporterDetailsApp taskId={taskId} />, domContainer);
};
initializeBulkImporterDetails();This library is designed to integrate with Invenio's template system.
The data-pid attribute should contain a task ID that will be parsed by the component.
The library exposes components through the BulkImporter namespace:
Complete search interface with task listing, filtering, and management capabilities.
import { BulkImporter } from '@ubiquitypress/react-invenio-bulk-importer';
<BulkImporter.Search />Detailed view component for individual import tasks with records, status, and management.
import { BulkImporter } from '@ubiquitypress/react-invenio-bulk-importer';
<BulkImporter.TaskDetails taskId="task-123" />Export a single Invenio record with the bulk CSV media type:
import { BulkImporter } from '@ubiquitypress/react-invenio-bulk-importer';
<BulkImporter.ExportRecordButton recordId="jvybz-9q277" />Task record rows also expose single-record export from the row Actions menu when the importer record has a generated or existing Invenio record ID.
For record search pages, enable the search export button:
<BulkImporter.Search
config={{
searchApi: {
axios: {
url: '/api/records',
withCredentials: true
}
},
showImportModal: false,
showExportButton: true
}}
/>By default the export request first tries
application/vnd.inveniordm.v1.bulk+csv. If the API returns 406 Not Acceptable, it falls back to InvenioRDM's built-in CSV formats:
application/vnd.inveniordm.v1.full+csv, then
application/vnd.inveniordm.v1.simple+csv.
This library uses PandaCSS for styling, which provides:
- Type-safe styling: Compile-time CSS validation
- Logical properties: Better internationalization support
- Responsive design: Mobile-first responsive utilities
- Design tokens: Consistent spacing, colors, and typography
- Node.js 18+
- Yarn 4.x (recommended)
# Clone the repository
git clone <repository-url>
cd invenio-bulk-importer-react
# Install dependencies
yarn install
# Generate PandaCSS styles
yarn prepare
# Start development server
yarn devyarn dev- Start development serveryarn build- Build for productionyarn type-check- Run TypeScript type checkingyarn check- Run linting, type checking, and dependency syncyarn preview- Preview production build
src/
βββ components/ # React components
β βββ core/ # Main feature components
β β βββ bulk-importer/
β β βββ file-uploader/
β β βββ search/
β β βββ task-details/
β βββ ui/ # Reusable UI components
βββ hooks/ # Custom React hooks
βββ services/ # API services
βββ types/ # TypeScript type definitions
βββ utils/ # Utility functions
βββ theme/ # Global styles
This project uses:
- Biome for linting and formatting
- TypeScript for type safety
- PandaCSS for styling
- Semantic UI React for base components