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

redux-spreadsheet

v0.5.59

Published

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/greylemon/redux-spreadsheet/blob/master/LICENSE) ![npm](https://img.shields.io/npm/v/redux-spreadsheet?color=blue) ![LGTM Grade](https://img.shields.io/lgtm/grade/java

Downloads

81

Readme

Redux Spreadsheet (Beta)

License: MIT npm LGTM Grade Build Status Coverage Status Maintainability

Excel/Google-like spreadsheet

Demos

Storybook

Setup

Installation

npm install redux-spreadsheet or yarn add redux-spreadsheet

Usage

Without Initial State

import { Excel } from 'redux-spreadsheet'
import 'redux-spreadsheet/dist/main.cjs.css'

const SomeComponent = () => {
  const handleSave = (excelState) => {
    // Do something with data
  }
  return <Excel handleSave={handleSave} />
}

Documentation

Excel

Props
  • initialState?: initial excel state (note that Undox wraps the excel state for redo and undo)
  • styles?: style of the Excel's root div
  • handleSave?: gets called with store data when save event triggers
  • isRouted?: determines whether react-router is used for active sheet

Focused Features

  • TypeScript support/type definitions (unsure how to generate)
  • Mobile
    • [ ] Detect double tap
  • History (Some actions have not been included yet)
    • [x] Redo
    • [x] Undo
  • Commands
    • [x] Save
    • [x] Arrow keys
    • [x] Delete Area
    • [x] Select all
    • [ ] Shift arrow keys
  • Selection
    • [x] Single selection
    • [x] Multi-selection
    • [x] Selection slicing
    • [ ] Select rows / columns
    • [ ] Inactive selection area borders
  • Inline-styles/rich-text
    • [x] Bold
    • [x] Italic
    • [x] Strikethrough
    • [x] Underline
  • Merged Cells
    • [x] Selection area
    • [x] Active cell
    • [ ] Update formula references
  • Router
    • [ ] Page router (not fully-working)
    • [x] No page router
    • [ ] Return link
  • Formulas
    • [x] Formula dependents map
    • [x] Formula independents map
    • [x] Formula results
    • [x] Clean up formula independent references
    • [ ] Column/row references (=SUM(A:A) or =SUM(1:1))
    • [ ] Variables
    • [x] Optimize range edit/delete
    • [x] Normalize dependents/independents
    • [ ] Error on cyclic reference
    • [ ] Update cell only when value change
  • Formula bar
    • [ ] Input
  • File upload
    • [x] Initial state
    • [x] Basic data
  • File Download
    • [ ] .xlsx
  • Block-styles
  • Sheet navigation
    • [x] Switch sheet name
    • [x] Delete sheet name
    • [x] Update sheet name
    • [ ] Update formula references for rename
  • Row / Column
    • [ ] Resize (Have been implemented before in non-canvas)
    • [ ] Resize Freeze
    • [ ] Set row / column count
  • Scroll
    • [ ] Selection area
    • [x] Arrow key press
    • [ ] Other key presses
  • ...many more to do

Main Libraries Used

| Link | Usage | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | React (specifically hooks) | used for building HTML components | | Redux | used for application state and state management | | Redux Toolkit | tools which make Redux setup straightforward | | React Redux | used to integrate Redux with React | | Redux Mock Store | mocks the Redux store for testing purpose. Fork of ananas7 branch for replace reducer function | | ExcelJs | parses Excel data and creates excel files | | fast-formula-parser | used to compute formula cells in excel format | | react-window | React components for efficiently rendering large lists and tabular data | | undox | Fork of JannieBeck with ignore history | | react-sortable-hoc | Draggable list for sheet navigation | | material-ui | Customized styled base components | | react-konva | Used for rendering canvas grid elements |

Issues

  • Adding keys on canvas elements causes lag
  • Build performance is slower than local
  • Page router URL has issues

Potential Optimizations

  • Formula mapping
  • Web workers
  • ? Refactor cell data structure - compress certain states (like styles?)
  • ? Refactor row heights/column width offsets to visible (edge case with millions of columns/rows)

Limitations

  • Extremely large files will cause lag since the state is stored in the client