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

ember-paper-selection-dialog

v0.0.5

Published

The default blueprint for ember-cli addons.

Downloads

3

Readme

ember-paper-selection-dialog Build Status Ember Observer Score

This is an ember-paper addon that provides dialogs for selections. Think of it as a select component, but using dialogs.

Usage

An example usage:

{{#paper-selection-dialog
  title="Select a country" class="flex-50" fullscreen=true
  options=options selected=singleSelected
  onSelect=(action (mut singleSelected)) onClose=(action (mut showSingle) false) as |option index selected|}}
  {{option}} {{if selected "Yay, I'm selected"}} #{{index}}
{{/paper-selection-dialog}}

The component is promise friendly, meaning that it accepts promises in options or selected properties and will display a {{paper-circular-progress}} until both are resolved.

You must specify how you want to render each item in the component's block. Each option is yielded to the block, along with its index. A boolean is also yielded to let you know if that option is currently selected or not.

Demo

You can see how this addon looks like at https://coachlogix.github.io/ember-paper-selection-dialog/

Installation

Run:

ember install ember-paper-selection-dialog

Don't forget to import your styles in your app.scss after importing ember paper styles:

@import "ember-paper";
@import "ember-paper-selection-dialog";

API

  • All the properties that paper-dialog supports.
  • multiple - defaults to false - set it to true to support multiple selections.
  • options - an array or promise that resolves to an array that contains the possible options to choose from.
  • selected - the currently selected items. Can also be a promise.
  • onSelect - an action sent when the user clicks the confirm button. Will contain an option on single mode and an array of options on multiple mode.
  • onClose - an action sent when the cancel or close button are pressed (also sent every time paper-dialog sends it)
  • cancelLabel - defaults to 'Cancel' - you can specify an alternate text for the cancel button
  • confirmLabel - defaults to 'Confirm' - you can specify an alternate text for the confirm button
  • title - the displayed title of the dialog
  • closeOnConfirm - defaults to true - by default the component will also send the onClose action when you click the confirm button
  • noOptionsMessage - defaults to 'No options.' - you can specify a message to show when options is or resolves to a falsy value

Contributing

Installation

  • git clone <repository-url>
  • cd my-addon
  • npm install

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.