Skip to content

enso-ui/documents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documents

License Stable Downloads Vue JavaScript SCSS npm Issues Merge Requests

Description

Documents provides reusable document-list widgets for Enso UI, including a standalone list component and a card wrapper with refresh and badge controls.

The package is backend-driven and is typically embedded in edit pages where users need to upload, filter, preview, and remove files attached to another resource.

Installation

Install the package:

yarn add @enso-ui/documents

This package is also available through the full enso-ui workspace bundle.

Features

  • exports Documents for inline document lists with upload and filter controls
  • exports DocumentsCard for dashboard-style card integration with count badges
  • supports custom toolbar rendering through the controls slot
  • delegates file preview and deletion to the shared files package

Usage

<script>
import { Documents, DocumentsCard } from '@enso-ui/documents/bulma';

export default {
    components: { Documents, DocumentsCard },
};
</script>

API

Documents

Inline document list widget.

Import: @enso-ui/documents/bulma

Props:

  • id: string | number required
  • type: string required
  • query: string default ''
  • compact: boolean default false
  • disableControls: boolean default false
  • disableUpload: boolean default false
  • fileSizeLimit: number default 20971520

Events:

  • update after fetches, uploads, and deletions

Slots:

  • controls with { id, type, uploadLink, fetch, internalQuery }

DocumentsCard

Card wrapper around Documents.

Import: @enso-ui/documents/bulma

Props:

  • icon: string | array | object
  • collapsed: boolean default false
  • id: string | number required
  • type: string required
  • title: string default ''

Events:

  • No public emits.

Companion Backend Package

The backend companion provides the core.documents.* routes and payloads used to list, upload, and destroy document records.

Depends On

Contributions

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors