Socket
Book a DemoInstallSign in
Socket

@firecms/data_export

Package Overview
Dependencies
Maintainers
1
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firecms/data_export

latest
npmnpm
Version
3.0.0-rc.1
Version published
Weekly downloads
304
-33.19%
Maintainers
1
Weekly downloads
 
Created
Source

I'll enhance the README with more detailed documentation, configuration options, and better examples:

FireCMS Data Export Plugin

This plugin enables exporting Firestore collections to CSV or JSON formats directly from your FireCMS interface. It adds an export button to collection views, providing a simple way to back up data or share it with others.

Installation

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

Features

  • Export collection data to CSV or JSON formats
  • Configure export permissions based on collection size or custom logic
  • Integration with FireCMS analytics events
  • Custom UI for unsupported export scenarios

Basic Usage

import React from "react";
import { FireCMS } from "@firecms/core";
import { useExportPlugin } from "@firecms/data_export";


export default function App() {

    // Basic setup with default options
    const exportPlugin = useExportPlugin();
    
    const plugins = [exportPlugin];
    
    const navigationController = useBuildNavigationController({
        // ... rest of your config
        plugins
    }); 
    
    return <FireCMS
        name={"My Online Shop"}
        navigationController={navigationController}
        authentication={myAuthenticator}
        collections={myCollections}
        firebaseConfig={firebaseConfig}
    />;
}

Advanced Configuration

You can customize the export behavior with these options:

const exportPlugin = useExportPlugin({
    // Control when exports are allowed
    exportAllowed: ({ collectionEntitiesCount, path, collection }) => {
        // Prevent export of large collections
        if (collectionEntitiesCount > 5000) return false;
        
        // Only allow export for specific collections
        return ["products", "orders"].includes(path);
    },
    
    // Custom view when export is not allowed
    notAllowedView: <div>Export is not available for this collection</div>,
    
    // Track export events
    onAnalyticsEvent: (event, params) => {
        console.log("Export event:", event, params);
    }
});

Configuration Options

OptionTypeDescription
exportAllowed(params: ExportAllowedParams) => booleanFunction to determine if export is allowed for a collection
notAllowedViewReact.ReactNodeCustom component to display when export is not allowed
onAnalyticsEvent(event: string, params?: any) => voidCallback for tracking export events

Where ExportAllowedParams includes:

  • collectionEntitiesCount: Number of entities in the collection
  • path: Path of the collection
  • collection: Collection configuration object

Additional Notes

  • Exports are performed client-side and may be limited by browser capabilities for very large collections
  • CSV exports maintain data types where possible but complex objects may be simplified
  • JSON exports preserve the complete data structure

FAQs

Package last updated on 25 Sep 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