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

directus-extension-field-actions

v1.9.0

Published

Add advanced link & copy functionalities to your directus fields. Supports interfaces as well as displays.

Downloads

1,003

Readme

🐰 Directus extension: Text action display & interface

💡 Add link & copy to clipboard functionalities to your directus fields. Supports interfaces as well as displays.

The actions can be performed by a button next to the items or by clicking on the value. The settings allow customisations for a bunch of different use-cases.

✨ Supports

📋 Copy action

Each value can be copied by a custom button. It's also possible to copy a value by just clickung on it (setting: click-action)

➡️ Links

When using the link-option it supports ➡️ HTTP-, 📧 mail-, and 📞 phone- links. Each link can be opened by the custom button. If enabled it's also possible to open the link by just clicking on the value (setting: click-action).

🖱 Click-Action

The click action defines what should happen when you click on the value. This is supported for displays as well as readonly interfaces.Actions can be:

  • default action (does nothing custom)
  • Copy-action (copied the value)
  • Link-action (openes the link in a new tab)

⚙ Settings

Icon position

  • The icons can be placed before or after the content
  • The setting can be set for the interface and display, as well as the copy and link button indipendently
  • Example in the screenshots below

Custom prefix

  • You can set custom prefixes for copy-/ and link-actions.
  • Prefixes can be entered manually or use a defined variable (Project URL setting)
  • The setting can be set for the copy and link button indipendently, each for the interface and the display
  • Example in the screenshots below

Link target

  • Set the link-target to the same, or a new tab

Warn before following external links

  • Enabling this setting prompts users with a confirmation popup displaying the full link when clicking on external links
  • If disabled, external links open directly.

Hide field value (display only)

  • Hides the field value for a button only mode
  • Mostly to be used in combinaiton with button labels

Button labels (display only)

  • Add custom labels to the copy-/ and link icons for the display
  • Mostly to be used in combinaiton with the "Hide field value" option for a button only mode

⚙️ Installation (marketplace)

The extension can easily be installed through the in-build directus marketplace. Just go to settings -> marketplace and search for field-actions.

⚙️ Installation (npm)

npm i directus-extension-field-actions

or

pnpm i directus-extension-field-actions

⚙️ Installation (manually)

  1. Download the app.js, api.js and package.json from the latest release

  2. Create a folder named directus-extension-field-actions in your extension folder (e.g /extensions/directus-extension-field-actions) and a /dist folder inside.

  3. Move the package.json to the created extension folder and the app.js and api.js into the /dist folder.

  4. Restart directus

The result should look like this:

├── extensions
│   ├── directus-extension-field-actions
│   │   ├── dist
│   │   │   ├── app.js
│   │   │   ├── api.js
│   │   ├── package.json

🖼 Screenshots

↑ Copy values from table views directly by clicking on them or an icon (configurable)


↑ Copy field-values by clicking on it (only for readonly-fields and displays)


↑ Add link- and copy-to-clipboard buttons to each field


↑ Link preview and verification on external links (optionally)


↑ Interfaces settings


↑ Displays settings