Socket
Book a DemoInstallSign in
Socket

@firecms/data_import

Package Overview
Dependencies
Maintainers
1
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firecms/data_import

3.0.0-beta.15
latest
npmnpm
Version published
Weekly downloads
217
42.76%
Maintainers
1
Weekly downloads
 
Created
Source

FireCMS Data Import Plugin

This plugin enables importing data into Firestore collections directly from your FireCMS interface. It adds an import button to collection views, providing a simple way to bulk add or update data from CSV or JSON files.

Installation

npm install @firecms/data_import
# or
yarn add @firecms/data_import

Features

  • Import data from CSV or JSON formats into Firestore collections
  • Validate data before importing to ensure integrity
  • Integration with FireCMS analytics events
  • Support for bulk data creation and updates

Basic Usage

import React from "react";
import { FireCMS } from "@firecms/core";
import { useImportPlugin } from "@firecms/data_import";


export default function App() {

    // Basic setup with default options
    const importPlugin = useImportPlugin();

    return <FireCMS
        name={"My Online Shop"}
        plugins={[importPlugin]}
        authentication={myAuthenticator}
        collections={myCollections}
        firebaseConfig={firebaseConfig}
    />;
}

Advanced Configuration

You can customize the import behavior with these options:

const importPlugin = useImportPlugin({
    // Track import events
    onAnalyticsEvent: (event, params) => {
        console.log("Import event:", event, params);
        // Example events: "import_started", "import_completed", "import_error"
    }
});

Configuration Options

OptionTypeDescription
onAnalyticsEvent(event: string, params?: any) => voidCallback for tracking import events

Integration with Export

For a complete data management solution, use both import and export plugins together:

import { useImportPlugin } from "@firecms/data_import";
import { useExportPlugin } from "@firecms/data_export";

// Set up both plugins
const importPlugin = useImportPlugin();
const exportPlugin = useExportPlugin();

// Add both to your FireCMS app
return (
    <FireCMS
        // ...other props
        plugins={[importPlugin, exportPlugin]}
    >
        {/* ... */}
    </FireCMS>
);

Additional Notes

  • The import functionality validates data against your collection schema before importing
  • Complex data types (maps, arrays, references) are supported when importing from JSON
  • When importing from CSV, type conversion is performed according to your schema
  • Large imports are processed in batches to avoid Firestore limitations

FAQs

Package last updated on 18 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.