@gridkit/plugins
v1.0.0-alpha.1
Published
Official plugins for GridKit Enhanced
Readme
@gridkit/plugins
Official plugins for GridKit Enhanced — enterprise features out of the box
Installation
npm install @gridkit/plugins @gridkit/tanstack-adapterQuick Start
import { createEnhancedTable } from '@gridkit/tanstack-adapter'
import { auditLogPlugin, analyticsPlugin, exportPlugin } from '@gridkit/plugins'
const table = createEnhancedTable(tanstackTable, {
plugins: [
auditLogPlugin({ destination: '/api/audit' }),
analyticsPlugin({ provider: 'mixpanel', autoTrack: true }),
exportPlugin({ formats: ['csv', 'xlsx', 'pdf'] })
]
})Available Plugins
Audit Log 📝
GDPR/HIPAA/SOX compliant audit logging.
auditLogPlugin({
destination: '/api/audit',
events: ['row:create', 'row:update', 'row:delete'],
pii: { mask: ['email', 'ssn'] }
})Analytics 📊
Track interactions with Mixpanel, Amplitude, GA.
analyticsPlugin({
provider: 'mixpanel',
autoTrack: true,
customEvents: { 'row:select': 'Table Row Selected' }
})Export 📤
Export to CSV, Excel, PDF, JSON.
exportPlugin({
formats: ['csv', 'xlsx', 'pdf'],
includeFilteredOnly: true
})
// Usage: table.exportToCSV()Collaboration 👥
Real-time collaboration via WebSockets.
collaborationPlugin({
wsUrl: 'wss://api.example.com/collab',
showCursors: true
})Offline 📴
Offline-first with background sync.
offlinePlugin({
storage: 'indexeddb',
syncStrategy: 'background'
})Access Control 🔐
Role-based access control.
accessControlPlugin({
roles: ['admin', 'editor', 'viewer'],
permissions: {
admin: ['create', 'read', 'update', 'delete'],
viewer: ['read']
}
})Create Custom Plugin
const myPlugin = {
metadata: {
id: 'my-plugin',
name: 'My Plugin',
version: '1.0.0'
},
initialize: async (config, context) => {
context.eventBus.on('row:update', handleRowUpdate)
},
destroy: async () => {}
}
table.registerPlugin(myPlugin)Documentation
Related Packages
| Package | Description | |---------|-------------| | @gridkit/tanstack-adapter | Main adapter | | @gridkit/core | Core engine |
License
MIT — see LICENSE
GitHub: github.com/gridkit/gridkit
