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

@hammerstone/refine-stimulus

Package Overview
Dependencies
Maintainers
4
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hammerstone/refine-stimulus

Refine is a flexible query builder for your apps. It lets your users filter down to exactly what they're looking for. Completely configured on the backend.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
78
increased by358.82%
Maintainers
4
Weekly downloads
 
Created
Source

Refine::Rails

Short description and motivation.

Usage

How to use my plugin.

Installation

Add this line to your application's Gemfile:

gem "refine-rails"

And then execute:

$ bundle

Or install it yourself as:

$ gem install refine-rails

Installing the JavaScript package:

$ yarn add @hammerstone/refine-stimulus

Also, make sure that your project uses jquery and binds it as window.$. Required for catching events dispatched by select2 dropdowns.

Also note that there's currently a bug with esbuild and stimulus 3.0 compatibility.

Importing and Registering the Stimulus Controllers

Where you normally import your Stimulus controllers, add the following lines:

// import { Application } from "stimulus"
import { controllerDefinitions as refineControllers } from "@hammerstone/refine-stimulus"
// window.Stimulus = Application.start()
Stimulus.load(refineControllers)

To manually register (or extend or provide your own replacement for) each Stimulus controller:

// import { Application } from "stimulus"
import {
  AddController,
  DefaultsController,
  DeleteController,
  FormController,
  StateController,
  StoredFilterController,
  UpdateController
} from "@hammerstone/refine-stimulus"
// window.Stimulus = Application.start()
Stimulus.register('refine--add', AddController)
Stimulus.register('refine--defaults', DefaultsController)
Stimulus.register('refine--delete', DeleteController)
Stimulus.register('refine--form', FormController)
Stimulus.register('refine--state', StateController)
Stimulus.register('refine--stored-filter', StoredFilterController)
Stimulus.register('refine--update', UpdateController)

Contributing

Contribution directions go here.

Local JavaScript Development

From this repo's directory:

# install dependencies
$ yarn

# prepare for having a symbolic link to this directory
$ yarn link 

# build and update as you work on the javascript
$ yarn build --watch

From the directory of the project including this package:

# create a symbolic link in node_modules/ to this package
yarn link @hammerstone/refine-stimulus

Running yarn again from your project's directory will revert back to the published version of the package on npm.

Note: Because of a weird behavior in how yarn link works, you might have to make sure the project including this package includes a few of this package's dependencies (e.g. lodash, stimulus, etc)

Release

  1. Publish the gem with a new version number
  2. Copy the version number in package.json
  3. run yarn release

License

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

FAQs

Package last updated on 19 Apr 2022

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