npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@synerise/ds-column-manager

v0.13.3

Published

ColumnManager UI Component for the Synerise Design System

Downloads

1,059

Readme


id: column-manager title: ColumnManager

ColumnManager UI Component

Installation

npm i @synerise/ds-column-manager
or
yarn add @synerise/ds-column-manager

Usage

import ColumnManager from '@synerise/ds-column-manager'

<ColumnManager />

Demo

API

ColumnManager

| Property | Description | Type | Default | | ----------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------- | --------- | | hide | Specify a callback that will be called when a user clicks mask, close or cancel button. | Function | - | | visible | Whether the ColumnManager is visible or not. | boolean |false | | onSave | Specify a callback that will be called when a user saves new view | (savedView: SavedView) => void; | - | | onApply | Specify a callback that will be called when a user clicks on Apply button | (columns: Column[], groupSettings: GroupSettings) => void | - | | columns | Current columns configuration | Column[] | [] | | texts | Object contains texts for buttons, title, confirms etc. | Texts | - | | itemFilterConfig | ItemFilter config | ItemFilter | - | | savedViewsVisible | Whether the ItemFilter with saved views is visible | boolean | - | | hideSavedViews | Hide ItemFilter with saved views | ItemFilter | - | | groupSettings | Configuration of grouped data | GroupSettings or undefined | undefined |

Column

| Property | Description | Type | Default | | -------- | ---------------------------------------------------------- | ------------------------------------------- | ------- | | id | Id of column | string | - | | key | Key of data from dataSource | React.ReactText | - | | name | Name of column | string | - | | visible | Whether the column is visibile in table view | boolean | - | | type | Type of data in column | 'text', 'number', 'date', 'boolean', 'list' | - | | fixed | Whether the column has fixed position or not in table view | 'left' , 'right', undefined | - | | group | Whether the column has been grouped | boolean | - |

SavedView

| Property | Description | Type | Default | | ------------- | ---------------------------------- | ----------------------------------- | --------- | | meta | Name and description of saved view | {name: string; description: string} | {} | | groupSettings | Configuration of grouped data | GroupSettings | undefined | | columns | Current columns configuration | Column[] | [] |

GroupSettings

| Property | Description | Type | Default | | -------- | ---------------------- | -------- | ------- | | column | Column data | Column | - | | settings | Grouping configuration | Settings | - |

Settings

| Property | Description | Type | Default | | -------- | ------------------------------------------------------------------- | ---------------------------------------------------- | ------- | | type | Type of grouping | 'value', 'ranges', 'interval', 'disabled', undefined | - | | ranges | Array of ranges if grouping by ranges is selected | Range[] |false | | interval | Number of items in single group if grouping by interval is selected | number,false |false |

Range

| Property | Description | Type | Default | | -------- | ----------------------- | ---------------------------------------- | ------- | | from | Lower boundary of range | {value: React.ReactText, error: string } | - | | to | Upper boundary of range | {value: React.ReactText, error: string } | - |

Texts

| Property | Description | Type | Default | | -------------------------- | ------------------------------------------------ | ------------------------ | ------------------------------------------------------------ | | title | Manage columns title | string / React.ReactNode | 'Manage columns' | | searchPlaceholder | Search input placeholder | string | 'Search' | | searchClearTooltip | Clear label | string / React.ReactNode | 'Clear' | | noResults | No search results placeholder | string / React.ReactNode | 'No results' | | searchResults | Search results title | string / React.ReactNode | 'Search results' | | visible | Visible group label | string / React.ReactNode | 'Visible' | | hidden | Hidden group label | string / React.ReactNode | 'Hidden' | | saveView | Save button label | string / React.ReactNode | 'Save view' | | cancel | Cancel button label | string / React.ReactNode | 'Cancel' | | apply | Apply button label | string / React.ReactNode | 'Apply' | | fixedLeft | Fixed left label | string / React.ReactNode | 'Fixed left' | | fixedRight | Fixed right label | string / React.ReactNode | 'Fixed right' | | group | Group label | string / React.ReactNode | 'Group' | | clear | Clear label | string / React.ReactNode | 'Clear' | | viewName | Label of new view description input field | string / React.ReactNode | 'View name' | | viewDescription | Label of new view name input field | string / React.ReactNode | 'Description' | | viewNamePlaceholder | Placeholder of new name input field | string | 'Name' | | viewDescriptionPlaceholder | Placeholder of new description input field | string | 'Description' | | mustNotBeEmpty | Must not be empty error message | string / React.ReactNode | 'Must not be empty' | | switchOn | Switch on tooltip | string / React.ReactNode | 'Switch on' | | switchOff | Switch off tooltip | string / React.ReactNode | 'Switch off' | | groupByValue | Group by value option | string / React.ReactNode | 'Group by value' | | groupByRanges | Group by ranges option | string / React.ReactNode | 'Group by ranges' | | groupByIntervals | Group by intervals option | string / React.ReactNode | 'Group by intervals' | | groupDisabled | Disable grouping option | string / React.ReactNode | 'Group disabled' | | groupTitle | Title of gropu settings modal | string / React.ReactNode | 'Table content group' | | selectPlaceholder | Select grouping type placeholder | string | 'Select' | | intervalPlaceholder | Set interval input placeholder | string | 'Set interval' | | groupingType | Select grouping type label | string / React.ReactNode | 'Set grouping type' | | groupingTypeTooltip | Grouping type label tooltip | string / React.ReactNode | More details about grouping | | from | Range input label - from | string / React.ReactNode | 'From' | | to | Range input label - to | string / React.ReactNode | 'To' | | remove | Remove range tooltip | string / React.ReactNode | 'Remove' | | addRange | Label of add range button | string / React.ReactNode | 'Add more' | | errorEmptyRange | Error message for empty range row | string / React.ReactNode | 'You should fill one of these fields' | | errorEmptyFromField | Error message for empty 'From' field | string / React.ReactNode | 'Only the "From" field in the first range can be left blank' | | errorEmptyToField | Error message for empty 'To' field | string / React.ReactNode | 'Only the "To" field in the last range can be left blank' | | errorChooseGrouping | Error message for non selection type of grouping | string / React.ReactNode | 'Error - Choose type of grouping' | | errorInterval | Error message for invalid interval value | string / React.ReactNode | 'Error - Provide correct interval value' | | errorRange | Error message for invalid range value | string / React.ReactNode | 'Error - Provide correct value' |