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

@blueeast/bluerain-plugin-taskbar

v2.0.1

Published

A BlueRain Plugin to integrate taskbar into any app.

Downloads

28

Readme

Bluerain Plugin Taskbar

Adds Taskbar plugin .https://blueeast.gitbook.io/bluerain-plugin-taskbar

| 🌏 Web | 🖥 Electron | 📱 React Native | | :----------------: | :----------------: | :----------------: | | ✔️ | ✔️ |✔️|

|Type | Example 1 |Example 2 | | :----------------: | :----------------: |:----------------: | Web |taskbar|taskbar| | Electron |TBD |TBD | | Native |TBD |TBD |

Installation

Run the following command in the plugin directoy:

yarn add @blueeast/bluerain-plugin-taskbar

Hooks

This plugin provides flexibility of adding Internationalisation in App

bluerain.system.app.layout

This hook gives the ability to modify the main System App component that gets wrapped in react-router-redux's ConnectedRouter.

Parameters:

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | schema | React.Component | provides taskbar in schema|

Returns:

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | schema | React.Component |Adds the taskbar component in the system layout |

Example


ctx.Filters.add('bluerain.system.app.layout', function taskbar(schema) {
 schema.children.unshift({ component: withSystemNav(Taskbar) });
  return schema;
});

ctx.Filters.add('bluerain.redux.reducers.bluerain', function  
 AddSystemNavReducers(reducers) {
  return Object.assign({}, reducers, {
  systemNav: reducer
});
});

bluerain.redux.reducers.bluerain

This hook gives the ability to add redux reducer in App for handling taskbar true and false conditions

Parameters

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | reducer | object | takes bluerain reducer|

Returns

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | reducer | React.Component |Adds systemNav in reducer for toggling taskbar |

bluerain.intl.messages

This hook adds translations in App.

Parameters:

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | messages | object |It takes messages as param|

Returns:

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | messages | object | It adds and return messages |

Example

ctx.Filters.add('bluerain.intl.messages', function eng(messages) {
    const en = require('./lang/en.ts');
    const ur = require('./lang/ur.ts');
    messages.en =  Object.assign(messages.en ? messages.en : {}, en);
    messages.ur = Object.assign(messages.ur ? messages.ur : {}, ur);
  return messages;
 });

bluerain.redux.initialState

This hook provides initialstate of taskbar.

Parameters:

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | state | object |It takes messages as param|

Returns:

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | state | object | It adds taskbar state in the bluerain state |

Example :


ctx.Filters.add('bluerain.redux.initialState', function ActivateTaskbar(state) {
   const size = ctx.Plugins.get('window-info');
   const taskbarState = getResponsiveState(size);
 return Object.assign({}, state, {
   bluerain: {
     systemNav: taskbarState
     }
});
});

plugin.window_info.resize

This hook provides windows size of plugin.

Parameters:

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | state | object |It takes messages as param|

Returns:

| Name | Type | Description | | --------- | --------------- | ------------------------------ | | state | object | It adds taskbar state in the bluerain state |

Events

Make sure you have access to the BlueRain context. Then do this:

 ctx.Events.on('plugin.window_info.resize', (size, prevSize) => {
 const state = getResponsiveState(size);
  ctx.refs.store.dispatch(setStateSystemNav(state));
});

Components

This plugin registers following components in the Component registry, so they can be reused later by other apps and plugins:

NavHeader

Props

| Name | Default|Type |Description | | ------------- | ------------- |-------------|-------------| | to| '/' |string | This is used to pass redirection path | | logo| |string | This is used for adding logo in taskbar header | | style| |string | This is used for adding styles on AppBar Component in taskbar header| | width| |number | This is used for adding width of taskbar listItem in header|

NavItem

Props

| Name | Default|Type |Description | | ------------- | ------------- |-------------|-------------| | label| |string | This is used for adding label in items| | icon| null |string | Icon name specific to material design icons| | avatarUrl| null |string | This is used for adding image in Avatar| | button| |boolean | This is used for making ListItem in NavItem behave like button| | onClick| |function | Gets called when ListItem is pressed| | to| |string | This is used to pass redirection path| | mobile| |boolean | Used to decide either to show ListItemText or not|

NavUserInfoButton

Props

| Name | Default|Type |Description | | ------------- | ------------- |-------------|-------------| | items| |array of objects | Items for Menu | | onClick| |function | Executes function on any MenuItem click| | mobile| |boolean | Used to decide either to show ListItemText or not|

NavOpenCloseButton

Props

| Name | Default|Type |Description | | ------------- | ------------- |-------------|-------------| | mobile| |boolean | Used to decide either to show ListItemText or not|

HamburgerButton

Props

| Name | Default|Type |Description | | ------------- | ------------- |-------------|-------------| | style| |object | Button style|

API

TaskbarPluginConfigurations

Properties

Extends Plugin

A BlueRain Plugin built on materia-ui drawer to view taskbar in React apps.

Properties