Nocturnal Practitioners of Magic

    @magmalabs/spreadsheet

    0.3.5 • Public • Published

    Spreadsheet

    A spreadsheet view_component for your Rails app

    Installation

    Add this line to your application's Gemfile:

    gem 'spreadsheet', github: 'magma-labs/spreadsheet'

    And then execute:

    $ bundle

    Or install it yourself as:

    $ gem install spreadsheet

    Then run the installation task

    $ rake spreadsheet:install

    NOTE: Spreadsheet's ViewComponents use shoelace and tailwind in templates, but for now these packages aren't included with the installation task so you will need to install manually

    Usage

    After install you can use Spreadsheet's ViewComponents in your templates

      = render Spreadsheet::Cell.new(id: 'cell-id', value: 'A Spreadsheet Cell')

    Most components accept the following options:

    • classnames: For agregate css classes to use with your component
    • colspan: For define colspan to be applied in a component
    • component_controller: For use a custom stimulus controller with a component
    • extra_data: For extend default dataset added in the component template

    Development

    Setup project locally

    In development, when editing js files you will need to link your local repository and run webpack-dev-server script from webpacker in your rails application

    In brief, the process is 2 steps:

    • Run yarn link in this directory.
    • Run yarn link "spreadsheet" in the project that has the dependency.

    Contributing

    Bug reports and pull requests are welcome on GitHub at https://github.com/magma-labs/spreadsheet.

    License

    The gem is available as open source under the terms of the MIT License.

    Keywords

    none

    Install

    npm i @magmalabs/spreadsheet

    DownloadsWeekly Downloads

    11

    Version

    0.3.5

    License

    none

    Unpacked Size

    208 kB

    Total Files

    55

    Last publish

    Collaborators

    • ccarruitero