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

@makeform/nest

v0.0.6

Published

a nested widget without UI meant to be extend by the actual widget designed by user.

Downloads

10

Readme

@makeform/nest

a nested widget without UI meant to be extend by the actual widget designed by user.

init with pubsub event init.nest with following fields:

  • mode: either list or object. default list.

  • view: object with following fields for different purpose view cfg object:

    • common: viewcfg for the whole widget
    • entry: viewcfg for each entry
  • fields: object containing fields of makeform definition. a sample fields object:

    { name: {type: "@makeform/input", meta: {isRequired: true}}, desc: {type: "@makeform/textarea", meta: {isRequired: false, title: "description"}}, }

  • onchange(o): called when there are changes from formmgr. o is an object with following fields:

    • formmgr: the formmgr from which the change event fires.
  • validate(opt,obj): customized validation function.

    • opt: options including init, force. see @plotdb/form for more information.
    • obj: additional object from nest widget. contains following fields:
      • entry: a hash for all entries. containing formmgr field for manipulation.
        • WIP this is only tested against list mode.
    • it should return either null (for no error), or:
      • a list of error messages.
      • an object with status field (0 ~ 3) and errors fields (a list of error messages)
  • instance: the block instance of your block. optional.

    • while @makeform/nest renders things for you, it doesn't have your instance object and thus it can't call your transform for i18n if needed. If you need post-i18n during view rendering, put your instance object (usually available in @_instance) here.

Usage

Create your own block and extend this widget:

div
  div(plug="widget"): //- your DOM here
  script(type="@plotdb/block"):lsc
    obj = { /* your options here */ };
    module.exports = {
      pkg: {extend: {name: "@makeform/nest", dom: "overwrite"}}
      init: ({pubsub, parent, i18n}) ->
        pubsub.fire("init.nest", obj)
    }

Where obj fired along with the init.nest event to @makeform/nest via pubsub is described as above.

Note that you should overwrite @makeform/nest's DOM and implement widget plug manually for ancestor @makeform/common.