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

coins-jquery-ui-utilities

v2.0.6

Published

Common GUI actions and objects, standardized and simplified for constructing jQ UI widget instances

Downloads

15

Readme

coins-jquery-ui-utilities

Codeship Status for MRN-Code/coins-jquery-ui-utilities

Common GUI actions and objects, standardized and simplified for constructing jQ UI widget instances

why

So modals, buttons, datepickers, etc get created through a common interface to yield improved consistency through the FE app.

interface

button

All button functions, accessible via .button.FUNCNAME accept a common set of options to override the default behavior.

All button functions accept the options hash, and most provide some helpful defaults. Apply any button options usually fed the jQuery button API to the options hash. Additional actions supported are:

  • class ['string'] (default: 'default') - a button class to apply. see btnClasses
  • el [Element] - element to buttonize. If no element provided, the button config (see returnConfig) is returned by default
  • returnConfig [boolean] - return the button configuration object, vs the button instance
  • closeDialog [booean] (default: false) - If button is fed to a dialog, buttons: [] array, the button will close the dialog after any click function has executed, and after any action function(s) have executed. This will auto-enable click regardless if no click is defined.
  • destroyDialog [boolean] (default: false) - See closeDialog, but destroys widget instance
  • action [Function | [Function]] - additional action function(s) to be performed on button click. This will auto-enable click regardless if no click is defined. All actions are run synchronously.

btnClasses

String indexed hash of boostrap correllated classNames. Available classes are: 'default', 'danger', 'info', 'primary', 'success', 'warning'

See jquery bootstrap classes.

base

All button constructors below utilize base. Can be used directly with above configurations as needed.

close

Sugar for a button titled "Close" that will attempt to close a Dialog instance on click.

destroy

Sugar for a button titled "Close" that will attempt to destroy a Dialog instance on click.

delete

Sugar for a red button titled "Delete" that ensures that a click or action attr is defined.

dialog

All dialog functions accept the options hash, and most provide some helpful defaults. Apply any dialog options usually fed the jQuery dialog API to the options hash. Additional actions supported are:

base

All dialog constructors below utilize base. Can be used directly with above configurations as needed. Close buttons in the button pane destroy the dialog by default.

fail

Generates a dialog with a default title of "Operation Failed", a friendly error message, and a red close button.

api

[Deprecated] Passed an api error, builds a fail dialog with details from the failed API call. Not recommended for use.

This is a dated means of dependency management, however, until all COINS tools migrate to a FE DI system, it shall suffice.

demo

run npm run demo and open the posted url! demo/index.html should load with some helpful examples.

changelog

  • 2.0.1/2/3 - fulfill 2.0.0 claim
  • 2.0.0 - require jquery and lodash individually. only consumed lodash fns are required into bundle
  • 1.1.1 - Force close handlers before destroy
  • 1.1.0 - Added destroy button and default dialog closing to destroy

todo

  1. Formally deprecate ApiError