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 🙏

© 2026 – Pkg Stats / Ryan Hefner

targetprocess-mashup-helper

v1.0.3

Published

API wrapper for more convenient writing of Targetprocess mashups.

Readme

targetprocess-mashup-helper

API wrapper for more convenient writing of Targetprocess mashups.

Build Status

Installation

npm install targetprocess-mashup-helper

Usage

var helper = require('targetprocess-mashup-helper')

You can require separate modules to decrease package size

var customUnits = require('targetprocess-mashup-helper/lib/customUnits')

API

.addBusListener

Alias to .events.addBusListener.

.addBusListenerOnce

Alias to .events.addBusListenerOnce.

.getAppConfigurator

Alias to .configurator.getAppConfigurator.

.events

.addBusListener(busName, eventName, listener, isOnce)

Add listener to component bus by name.

helper.events.addBusListener('description', 'afterRender', function(e, renderData) {
    //...
});

.addBusListenerOnce(busName, eventName, callback)

Same as .addBusListener(busName, eventName, callback, true).

.configurator

.getAppConfigurator() => Promise<Configurator>

Get application configurator and returns its promise.

helper.configurator.getAppConfigurator().then(function(configurator) {
    // ...
});

.customUnits

.types

Hash of constants to configure entity types custom unit is applied to.

.sizes

Hash of constants to configure card sizes custom unit is applied to.

.add(config) => Promise

Add custom unit to registry, make it allowed to add to card.

Config:

  • id (string) unit unique id.
  • name (string) name in library.
  • outerClassName (string | function) class name of unit wrapper for best styling.
  • template (object | string) template config, will be used as template.markup if string.
    • markup (string) unit output in jqote format. Has access to unit data as this.data. E.g. <div class="tau-board-unit__value"><%= this.data.value %></div>. Wrap template with class to get quick output tau-board-unit__value.
    • customFunctions (object) map of functions, which will be accessible inside template as <%= fn.someCustomFunction() %>.
  • model (object | string) data config, maps result of select query to data. E.g: {title: "title"}, result data will be {title: <title of entity>}
  • sampleData (object | string) sample data will be passed to unit template when using in library
  • types (array) list of entity types of cards, where unit accessible, all types by default. Use customUnits.types as values.
  • sizes (array) list of card sizes where unit is accessible, all sizes by default. Use customUnits.sizes as values.
  • priority (number) order of custom unit in customize card tab (more is closer to an end, can use negative).
  • hideIf (function) check if unit will be hide entirely from card, e.g. if there is no data.
  • isEditable (boolean | function) check if unit is editable
  • editorComponentName (string | function) name of editor component
  • editorData (object | function) transform unit data to editor data, by default pass unit data as is.
Examples
Simple static unit

helper.customUnits.add({
    id: 'good_field',
    name: 'Good Field',
    template: '<div class="tau-board-unit__value"><%= this.data.value %></div>',
    model: {
        value: '"Hello there"'
    },
    sampleData: {
        value: '"Hello from library"'    
    }
});
Unit outputs entity state name on small cards for bugs and user stories
helper.customUnits.add({
    id: 'my_entity_state',
    name: 'My Entity State',
    template: '<div class="tau-board-unit__value"><%= this.data.entityState.id %> <%= this.data.entityState.name %></div>',
    model: {
        entityState: 'entityState'
    },
    sampleData: {
        entityState: {
            id: 12,
            name: 'In Progress'
        }
    },
    sizes: [cu.sizes.S],
    types: [cu.types.STORY, cu.types.BUG]

});
Unit outputs and allow to edit custom field with name 'ESPN'
helper.customUnits.add({
    id: 'espn_custom_field',
    name: 'ESPN',
    template: '<div class="tau-board-unit__value">ESPN: <%= this.data.customField.value %></div>',
    hideIf: function(data) {
        return !data.customField;
    },
    model: {
        customField: 'CustomValues.Get("ESPN")'
    },
    sampleData: {
        customField: {
            value: '231231224'
        }
    },
    isEditable: true,
    editorComponentName: 'customField.text.editor',
    editorData: function(data) {
        return {
            cf: data.customField
        };
    }
});

.debug

.showComponentsNames()

Add attribute data-component-name to component top DOM element for better debugging or using inside .addBusListener function.

.logBus(predicate, logger)

Output events and data of particular buses. predicate can be a string -- name or id of bus (can be found after call of debug.showComponentsNames()), function (bus, eventName, data) or if is ommitted, all events of all buses will be logged. logger is a function of (busName, eventName, data), it writes to console.log. by default.

License

MIT (http://www.opensource.org/licenses/mit-license.php)