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

teko-help-center

v1.4.6

Published

Help Center SDK

Downloads

97

Readme

Teko Help Center

A Javascript Library for integrating Guideline in Teko Help Center to Admin Web Application.

Table of Contents


Demo

https://design-help-center.dev.teko.vn

Installation

# With yarn
yarn add teko-help-center

# With npm
npm install teko-help-center

Install Antd if you have not already

# With yarn
yarn add antd

# With npm
npm install antd

Usage

Import stylesheets manually:

// Import antd stylesheets if you haven't already
import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'

// Import teko-help-center stylesheets
import 'teko-help-center/dist/esm/index.css';

Init TekoHelpCenter before using its components

import TekoHelpCenter from "teko-help-center";

const App = () => {
  useEffect(() => {
    const initTekoHelpCenter = async () => {
      // domain: HELP_CENTER_DOMAIN, example:
      await TekoHelpCenter.init({
        domain: "https://admin-help-center.dev.teko.vn",
      });
    };

    initTekoHelpCenter();
  }, []);

  return (
    ...
  )
}

Include Teko Help Center's components directly into your component using import

import { Guide } from 'teko-help-center';

const Home: React.FC = () => {
  return (
    <AppContainer title={t('WelcomeText')}>
      <Guide
        serviceCode="staff-bff"
        pageCode="products"
        userGuideCode="create-product"
        popupProps={{
          title: 'Default Popup Guide',
        }}
        type="popup"
      />

      <Guide
        serviceCode="staff-bff"
        pageCode="products"
        userGuideCode="create-product"
        popoverProps={{
          title: 'Popover Guide',
          trigger: 'click',
        }}
        type="popover"
      />
    </AppContainer>
  );
};

API

Function init()

TekoHelpCenter.init({
  domain,
  language,
});

| name | mandatory | description | type | default | | -------- | :-------: | ------------------------------------------------------------------------------------------------- | ------------ | ------- | | domain | x | Domain of Help Center Admin | string | | | language | | Display language of SDK. Will support language of guide post from Help Center Admin in the future | "vi" or "en" | vi |

Component Guide's Props

<Guide />

| name | mandatory | description | type | default | | ------------- | :-------: | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | --------------------------------------- | | serviceCode | x | keyMapping will be constructed by concatenating serviceCode, pageCode, and userGuideCode | string | | pageCode | | keyMapping will be constructed by concatenating serviceCode, pageCode, and userGuideCode | string | | userGuideCode | x | keyMapping will be constructed by concatenating serviceCode, pageCode, and userGuideCode | string | | type | | type of Guide component, it could be popup, popover, default | string | "default" | | popupProps | | props of Popup Guide component | AntdModalProps | - | | popoverProps | | props of Popover Guide component | AntdPopoverProps | - | | renderButton | | override Button trigger popup, popover | ReactNode | <QuestionOutlined /> (Antd Component) | | className | | | string | - |

Note:

  • keyMapping need to be discussed by Content Writers (PO, CS Team, ...) and Developers to determine which guide will be displayed
  • keyMapping will be constructed by concatenating serviceCode, pageCode, and userGuideCode:
    • Without pageCode: <serviceCode>:<userGuideCode>. Example: staff-bff:order-management
    • With pageCode: <serviceCode>:<pageCode>:<userGuideCode>. Example: staff-bff:products:create-product
  • type need to be discussed by Content Writers (PO, CS Team, ...) and Developers to determine which type of guide (popup, popover, default) will be displayed

Development

Installation

# With yarn
yarn

# With npm
npm install

Build with Rollup

# With yarn
yarn build

# With npm
npm run build