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

@blsq/blsq-report-components

v1.1.10

Published

blsq-report-components

Downloads

199

Readme

blsq-report-components

blsq-report-components

NPM JavaScript Style Guide Build Status

Install

yarn add "@blsq/blsq-report-components"

or if you are more extreme, living on the edge, use the github repo and yarn

yarn add https://github.com/BLSQ/blsq-report-components

Usage

Sorry we don't have yet documentation.

This is a skeleton app component where you can contribute custom routes, invoices & reports.

Sample invoice app

Your best chance is to look at the code and running the example app:

  • generic app : https://github.com/BLSQ/blsq-report-app/ and
  • specific plugin for a sandbox dhis2 : https://github.com/BLSQ/blsq-report-specific-sandox/

It's now "plugin" based.

a npm module can contain several plugins

  • invoices : orgunit selector and specific plugin can contribute "invoices" to it
  • incentives : a special data entry to fill in incentives for a pbf (seeing future and past values in the same screen)
  • contracts : dhis2 contract management (stored as event, allowing a kind of versionning of groups)
  • dataentry : can contribute custom data entry (optionally linked to hesabu)
  • browsedata : allow clients to access their data (through datavaluesets api, no analytics required)

then a specific plugins can "configure/define/wire" all these plugins into a working pbf manager. see https://github.com/BLSQ/blsq-report-specific-sandox

the plugin system allows theses plugins to contribute to each others

core plugin contributions

 "core.dhis2": [dhis2], // some dhis2 need extra config, enforce https, use categoryCombo for multipayer scheme,...
 "core.routes": [defaultRoute], // all plugins contributes to this, by adding their own routes
 "core.headerRoutes": [customHeader] // plugins can fill the header with custom components depending of their needs.
 "core.drawerLinks": [DrawerLinks], // left menu content in the app
 "core.config": [config],  // general config for date formatting,...
 "core.i18n": [i18n],   // translations, containing the default but can provide their own

invoices plugin contributions

"invoices.invoices": [Invoices] // specific code contributing invoices to orgunit based on their contracts or groups and invoice templates/components
"invoices.actions": [BackBtn, Contract]   //
"invoices.orgUnitsResolver" : [new ContractBasedResolver()] // specific code to lookup orgunits for  eg consolidated invoices
"invoices.selectionLinks" : [ContractLink, DataEntryLink]  // when in orgunit selection page, show extra content (not only invoices, eg contrat or data entry links, receive orgUnit and period as props)

contracts plugin contributions

"contracts.config": [
    {
    programId: "xxx",
    allEventsSqlViewId: "xxxyyyy"
    }
],
"contracts.validator":  // custom validator for contract, field cross validation see

see DefaultValidator

dataentry plugin contributions

"dataentry.dataEntries": [DataEntries]  // same role as for invoices but for data entry : which data entry is allowed per orgunit and which component, should be used.

Allowing contribution points or access contributed items

if it's code or config data you can access it

import { PluginRegistry } from "@blsq/blsq-report-components";

const i18n = PluginRegistry.extension("core.i18n");

const contractService = PluginRegistry.extension("contracts.service");

if its a component you can drop that in your jsx all the "core.drawerLinks" will be fetched

<ExtensionsComponent extensionKey="core.drawerLinks" {...props} />

Development

git clone [email protected]:BLSQ/blsq-report-components.git
cd blsq-report-components
yarn install
yarn test
yarn link
yarn start
cd example
yarn start
yarn link @blsq/blsq-report-components
yarn link ../node_modules/react

you might need to upgrade jest snapshots (assertion based on latest recorded data)

yarn test -- --updateSnapshot

Release

  1. Adapt the CHANGELOG.md
  2. Release the package on npm
yarn publish
  1. Update downstream application using it : https://bitbucket.org/bluesquare_org/report-inventory/src/master/

License

MIT © BLSQ