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

@verygoodplugins/wpfselect

v1.0.15

Published

A React component add-on that gives you the tools needed to add a dropdown with all the available tags and with conditions based on the active CRM

Downloads

1

Readme

WPF Select

A lightweight React component that allows easy integration with WP Fusion. It can be used in the block editor or any kind of React interface in WordPress

Functionalities

Available Tags

WPF Select retrieves the list of available tags of the CRM that WP Fusion is configured to use.

Tags Creation

If the CRM supports new tags to be created outside their application WPF Select will automatically create new tags on user input if the tags do not exist.

Tag List Update

If the CRM doesn't support new tags to be created outside their application, WPF Select will automatically add a refresh button within the element.

The button will pull all the available tags from the CRM and will update the list of tags.

Usage

Installation

WPF Select is an NPM package fully transpiled to be supported on modern browsers.

It can be installed by using the following command in your terminal:

npm install @verygoodplugins/wpfselect

Or by adding the following object property to the dependencies object in your package.json file.

"@verygoodplugins/wpfselect": "^1.0.8"

Implementation

To implement the component you need to make sure you import it to your current file by adding the following code snippet at the top of your file:

import WpfSelect from "@verygoodplugins/wpfselect";

Then you can simply add it to your component using the JSX syntax:

<WpfSelect />

Props

The component can be extended by adding a default value, a onChange function and other settings.

onChange

This prop allows you to add a custom function that will be called when the value of the select element will be changed in any way.

existingTags

This prop allows you to add an array of tags that will act as a default value. Usually it is used to add tags that were selected in a previous interaction and saved as an attribute of the block.

elementID

This prop allows you to define the id parameter of the main HTML element.

refreshButtonClass

This prop allows you to add extra HTML classes to the refresh button that gets added when the CRM doesn't support the creation of new tags.

Example

<WpfSelect
    existingTags = { my_existing_tags  }
    onChange = {
        ( tags ) => {
            props.setAttributes( {
                my_existing_tags: tags
            } );
        }
    }
    elementID = 'my-tags-select'
    refreshButtonClass="custom-refresh-btn"
/>