Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pn-data-display-temp

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pn-data-display-temp

A Vue 3 component library for displaying and managing data in various formats.

  • 0.1.1
  • npm
  • Socket score

Version published
Weekly downloads
58
decreased by-71.98%
Maintainers
1
Weekly downloads
 
Created
Source

pn-data-display

A Vue 3 component library for displaying and managing data in various formats.

Table of Contents

  • Installation
  • Components
  • Usage
  • Props
  • Events
  • Styling
  • Development

Installation

npm install pn-data-display

Components

ComponentDescription
DataDisplayMain component for displaying data in different structures (Table, Kanban, List, Timeline)
TableComponent for displaying data in a tabular format
KanbanBoardComponent for displaying data in a Kanban board format
PaginationComponent for handling pagination

Usage

<template>
  <DataDisplay
    :data-source="dataSource"
    :data="data"
    :columns="columns"
    :table-url="tableUrl"
    :kanban-url="kanbanUrl"
    :show-search="true"
    :show-filters="true"
    :show-pagination="true"
  />
</template>

<script setup>
import { DataDisplay } from 'pn-data-display';
import 'pn-data-display/dist/style.css';

// ... your component logic
</script>

Props

DataDisplay Component

PropTypeDefaultDescription
dataSourceString'client'Data source type ('client' or 'remote')
showDisplayStructureSelectorBooleantrueShow/hide display structure selector
showSearchBooleanfalseShow/hide search functionality
showFiltersBooleantrueShow/hide filters
showPaginationBooleantrueShow/hide pagination
dataArray[]Data to be displayed (for client-side data source)
tableUrlString''URL for fetching table data (for remote data source)
kanbanUrlString''URL for fetching Kanban data (for remote data source)
searchQueryString''Initial search query
columnsArray[]Column definitions for table structure
pageSizeNumber50Number of items per page
currentPageNumber1Initial current page
sortOrderString'asc'Initial sort order ('asc' or 'desc')
sortByString''Initial sort field
filtersObject{}Initial filters
rowColorClassesObject{ odd: '', even: '' }CSS classes for odd and even rows
kanbanColumnKeyString'status'Key for Kanban column grouping
kanbanColumnsArray[]Kanban column definitions
kanbanKeyPropString''Key property for Kanban items
kanbanTitlePropString''Title property for Kanban items
kanbanSubtitlePropString''Subtitle property for Kanban items
kanbanBodyPropString''Body property for Kanban items

Table Component

PropTypeDefaultDescription
dataSourceString-Data source type ('client' or 'remote')
showSearchBoolean-Show/hide search functionality
showFiltersBoolean-Show/hide filters
showPaginationBoolean-Show/hide pagination
dataArray-Data to be displayed (for client-side data source)
tableUrlString-URL for fetching table data (for remote data source)
searchQueryString-Initial search query
columnsArray-Column definitions
pageSizeNumber-Number of items per page
currentPageNumber-Initial current page
sortOrderString-Initial sort order ('asc' or 'desc')
sortByString-Initial sort field
filtersObject-Initial filters
rowColorClassesObject-CSS classes for odd and even rows

KanbanBoard Component

PropTypeDefaultDescription
kanbanUrlString-URL for fetching Kanban data
tableUrlString-URL for fetching table data
showSearchBoolean-Show/hide search functionality
showFiltersBoolean-Show/hide filters
showPaginationBoolean-Show/hide pagination
pageSizeNumber-Number of items per page
columnKeyString'Status'Key for Kanban column grouping
columnsArray-Kanban column definitions
titlePropString-Title property for Kanban items
subtitlePropString-Subtitle property for Kanban items
bodyPropString-Body property for Kanban items
sortableFieldsArray['name', 'acquisitionDate', 'value']Fields that can be sorted

Pagination Component

PropTypeDefaultDescription
currentPageNumber1Current page number
pageSizeNumber10Number of items per page
totalItemsNumber-Total number of items
maxVisiblePagesNumber5Maximum number of visible page buttons

Events

DataDisplay Component

EventPayloadDescription
page-change{ currentPage, pageSize }Emitted when the current page changes
page-size-change{ currentPage, pageSize }Emitted when the page size changes
searchsearchQueryEmitted when the search query changes
filterfiltersEmitted when filters are applied
row-selectionselectedRowsEmitted when rows are selected/deselected
sort{ sortBy, sortOrder }Emitted when the sort field or order changes

Table Component

EventPayloadDescription
page-change{ currentPage, pageSize }Emitted when the current page changes
page-size-change{ currentPage, pageSize }Emitted when the page size changes
searchsearchQueryEmitted when the search query changes
filterfiltersEmitted when filters are applied
row-selectionselectedRowsEmitted when rows are selected/deselected
sort{ sortBy, sortOrder }Emitted when the sort field or order changes

KanbanBoard Component

EventPayloadDescription
page-change{ currentPage, pageSize }Emitted when the current page changes
page-size-change{ currentPage, pageSize }Emitted when the page size changes
searchsearchQueryEmitted when the search query changes
filterfiltersEmitted when filters are applied
sort{ sortBy, sortOrder }Emitted when the sort field or order changes

Pagination Component

EventPayloadDescription
page-changepageEmitted when the current page changes
page-size-changepageSizeEmitted when the page size changes

Styling

The component library uses Tailwind CSS for styling. Make sure to include Tailwind CSS in your project for proper styling.

Development

To build the component library:

npm run build

To generate LLM-related files:

npm run llm

License

LGPL v3

FAQs

Package last updated on 30 Oct 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc