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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@cloudbusiness/mailbuilder

v1.0.50

Published

Mail templates creator developed by CloudBusiness

Readme

MailBuilder

by @cloudbusiness

About MailBuilder

Mailbuilder it's a library with UI components, with which you can create simple to understand and useful application for creating e-mails.

Technologies

Installation

npm i @cloudbusiness/mailbuilder

For update library

npm i @cloudbusiness/mailbuilder@latest

Getting started

1 First of all. Create your back-end with urls:

  1. Url: <your_API>/mailbuilder/templatesList
    Method: GET
    Description: return templatesList - array with templates(type of one template).

  2. Url: <your_API>/mailbuilder/delete/${id}
    Method: POST
    Body: -
    Description: remove template by id.

  3. Url: <your_API>/file/upload
    Method: POST
    Body: formData - data from window with selecting image file

  4. Url <your_API>/mailbuilder/template/${formId}
    Method: PUT
    Body:
    {
    id - personal id,
    commonPlaceStyles - settings with special common place styles type description - text with description of template; string
    name - name of template; string
    rows - array of data with special rows type stringHTML - HTML from edit place
    }

  5. Url: <your_API>/mailbuilder/template
    Method: POST
    Body:
    {
    id - personal id,
    commonPlaceStyles - settings with special common place styles type
    description - text with description of template; string
    name - name of template; string
    rows - array of data with special rows type stringHTML - HTML from edit place
    }

2 Next you can create page with MailBuilders simple ReactComponent.

EditMailTemplateSideBar
Component with Sidebar, which has settings to change view of email

Props:

| Name of props | Required| Type | Description | |:---------------|:-------:|:------:|:----------------------------------------------------| |setActiveLoader |true |Function|Function runs Loader which you create in your project | |setInactiveLoader|true |Function|Function stops Loader which you create in your project| |serverUrl |false |string |Url which uses to send requests for server | |jwtToken |false |string |Token to insert at params in fetch |

import {EditMailTemplateSideBar} from '@cloudbusiness/mailbuilder/lib';

<EditMailTemplateSideBar setActiveLoader={[Function]}
                         setInactiveLoader={[Function]}
                         serverUrl={[string]}
                         jwtToken={[string]}
/>

EditMailTemplateViewer
Component with Place, which has view of email

import {EditMailTemplateViewer} from '@cloudbusiness/mailbuilder/lib';

<EditMailTemplateViewer/>

MailTemplateList
Component with list of templates, which has cards of template with name and description

Props:

| Name of props | Required| Type | Description | |:---------------|:-------:|:------:|:----------------------------------------------------| |setActiveLoader |true |Function|Function runs Loader which you create in your project | |setInactiveLoader|true |Function|Function stops Loader which you create in your project| |clickOnTemplate |true |Function|Function run when user click on template | |serverUrl |false |string |Url which uses to send requests for server | |jwtToken |false |string |Token to insert at params in fetch |

import {EditMailTemplateSideBar} from '@cloudbusiness/mailbuilder/lib';

<MailTemplateList setActiveLoader={[Function]}
                  setInactiveLoader={[Function]}
                  clickOnTemplate={[Funciton]}
                  serverUrl={[string]}
                  jwtToken={[string]}
/>

MainTableTemplatesComponent
Analog of MailTemplateList with different view. Component with list of templates, which has cards of template with name and description

Props:

| Name of props | Required| Type | Description | |:---------------|:-------:|:------:|:----------------------------------------------------| |setActiveLoader |true |Function|Function runs Loader which you create in your project | |setInactiveLoader|true |Function|Function stops Loader which you create in your project| |clickOnTemplate |true |Function|Function run when user click on template | |serverUrl |false |string |Url which uses to send requests for server | |jwtToken |false |string |Token to insert at params in fetch |

import {EditMailTemplateSideBar} from '@cloudbusiness/mailbuilder/lib';

<MainTableTemplatesComponent setActiveLoader={[Function]}
                             setInactiveLoader={[Function]}
                             clickOnTemplate={[Funciton]}
                             serverUrl={[string]}
                             jwtToken={[string]}
/>

SidebarHeaderContent
Component with header, which has button for return to list templates and for return to main app(if you use routing - pathname should be '/editMailTemplate' ).

Props:

| Name of props | Required| Type | Description | |:-----------------|:-------:|:------:|:---------------------------------| |clickGoToApp |true |Function|Function for button 'Back to App' | |clickGoToTemplates|true |Function|Function for button 'Back to list'|

import {SidebarHeaderContent} from '@cloudbusiness/mailbuilder/lib';

<SidebarHeaderContent clickGoToApp={[Function]}
                      clickGoToTemplates={[Function]}
/>

3 Merge mailbuilder reducer to your app

Mailbuilder ruducer is:

| Name of field mailbuilder reducer|Description| |:---------------------------------|----| |templates|list of templates| |activeTab|name of active tab in sidebar with settings| |activeBlockForChangeSettings|controlling clicked block, has number of row and column by active block| |allViewerRowsByActiveTemplate|data by active template| |isOpenSidebarSettings|controlling sidebar with settings| |droppingBlockData|controlling dropped blocks from sidebar|

Example of merge:

import {mailbuilderReducer} from '@cloudbusiness/mailbuilder/lib';

export default combineReducers({
    ...your data,
    mailbuilderReducer
});

Types

Type of commonPlaceStyles - Object with params:

|Name of field|Type | |:------------|:--------------| |width |string | |borderColor |string | |borderSize |string | |borderStyle |backgroundColor|

Type of rows - Array of Object with params:

|Name of field|Type | |:------------|:--------------| |columns |Columns type |

Type of columns - Array of Object with params:

|Name of field |Type | |:----------------|:----------------| |text |string | |width |string | |height |string | |textColor |string | |textWidthAlign |string |
|textVerticalAlign|string | |backgroundColor |string | |fontSize |string | |fontFamily |string | |italic |boolean | |bold |boolean | |underline |boolean | |borderColor |string | |borderSize |string | |borderStyle |string | |imageWidth |string | |imageHeight |string | |img |string | |buttonColor |string | |sizeOfButton |string | |linkTo |string | |type |string | |isBasicButton |string or boolean| |editor |string |

Type of template - Object of Object with params:

|Name of field |Type | |:----------------|:---------------------| |name |string | |description |string | |id |number or string | |rows |rows type | |commonPlaceStyles|commonPlaceStyles type|

Demo