0.5.59 • Published 4 years ago

redux-spreadsheet v0.5.59

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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)
    • Redo
    • Undo
  • Commands
    • Save
    • Arrow keys
    • Delete Area
    • Select all
    • Shift arrow keys
  • Selection
    • Single selection
    • Multi-selection
    • Selection slicing
    • Select rows / columns
    • Inactive selection area borders
  • Inline-styles/rich-text
    • Bold
    • Italic
    • Strikethrough
    • Underline
  • Merged Cells
    • Selection area
    • Active cell
    • Update formula references
  • Router
    • Page router (not fully-working)
    • No page router
    • Return link
  • Formulas
    • Formula dependents map
    • Formula independents map
    • Formula results
    • Clean up formula independent references
    • Column/row references (=SUM(A:A) or =SUM(1:1))
    • Variables
    • Optimize range edit/delete
    • Normalize dependents/independents
    • Error on cyclic reference
    • Update cell only when value change
  • Formula bar
    • Input
  • File upload
    • Initial state
    • Basic data
  • File Download
    • .xlsx
  • Block-styles
  • Sheet navigation
    • Switch sheet name
    • Delete sheet name
    • 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
    • Arrow key press
    • Other key presses
  • ...many more to do

Main Libraries Used

LinkUsage
React (specifically hooks)used for building HTML components
Reduxused for application state and state management
Redux Toolkittools which make Redux setup straightforward
React Reduxused to integrate Redux with React
Redux Mock Storemocks the Redux store for testing purpose. Fork of ananas7 branch for replace reducer function
ExcelJsparses Excel data and creates excel files
fast-formula-parserused to compute formula cells in excel format
react-windowReact components for efficiently rendering large lists and tabular data
undoxFork of JannieBeck with ignore history
react-sortable-hocDraggable list for sheet navigation
material-uiCustomized styled base components
react-konvaUsed 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
0.5.59

4 years ago

0.5.58

4 years ago

0.5.55

4 years ago

0.5.56

4 years ago

0.5.57

4 years ago

0.5.54

4 years ago

0.5.53

4 years ago

0.5.52

4 years ago

0.5.51

4 years ago

0.5.5

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.0

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.9

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.7

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago