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

sdk-coral-enterprise

v1.0.32

Published

企业服务组件,包括

Readme

SDK-Coral-Enterprise

企业服务组件,包括

  • 用户登录、用户注册
  • 团队 (机构、企业) 创建
  • 加入团队
  • 邀请加入
  • 团队详情
  • 团队列表
  • 团队成员管理
  • 账号/昵称设置指引
  • 解散团队
  • 移交团队

使用介绍

用户登录、用户注册

import React from 'react';
import { Button, message } from 'tdesign-react/esm';
import { ServiceLogin } from 'sdk-coral-account';

const Demo = () => {
    const [visible, setVisible] = React.useState(false);
    return (
        <>
            <Button onClick={() => setVisible(true)}>点击登录</Button>
            
            <ServiceLogin
                visible={visible}
                appid={''}          // 业务 ID
                onClose={() => {   // 点击取消按钮
                    setVisible(false)
                }}
                onSuccess={() => {  // 登录成功回调,此时业务域的用户 cookie 已种下
                    message.success(`账户登录成功`);
                    setVisible(false);
                }}     
            />
        </>
    )
}

团队 (机构、企业) 创建

import React from 'react';
import { Button, message } from 'tdesign-react/esm';
import { ServiceOrgCreate } from 'sdk-coral-account';

const Demo = () => {
    const [visible, setVisible] = React.useState(false);
    return (
        <>
            <Button onClick={() => setVisible(true)}>点击创建团队</Button>

            <ServiceOrgCreate
                visible={visible}
                width={800}
                appid={''}        // 业务 ID
                onCancel={() => { // 点击取消按钮
                    setVisible(false)
                }}
                onError={(msg) => { // 保存失败回调: msg 错误信息
                    message.error(msg)
                }}
                onSuccess={(orgInfo, addMemberMethod) => { 
                    // 保存成功回调: orgInfo 为团队相关信息 addMemberMethod: 已选择的添加成员的方式
                    message.success(`创建成功! 团队ID:${orgInfo.teamId}, 团队名称:${orgInfo.name}`);
                    setVisible(false)
                }}
            />
        </>
    )
}

加入团队

import React from 'react';
import { ServiceOrgInvitePage } from 'sdk-coral-account';

const Demo = () => {
    return (
        <>
            <ServiceOrgInvitePage
                mode='normal'
                visible={true}
                inviteToken=""
                appid=""
                onSuccess={() => message.success('加入成功')}
            />
        </>
    )
}

邀请加入(添加人员)

import React from 'react';
import { Button } from 'tdesign-react/esm';
import { ServiceOrgInviteLink } from 'sdk-coral-account';

const Demo = () => {
    const [visible, setVisible] = React.useState(false);
    return (
        <>
            <Button onClick={() => setVisible(true)}>添加人员</Button>
            <ServiceOrgInviteLink
                appid=""
                teamId=""
                visible={visible}
                onClose={() => setVisible(false)}
            />
        </>
    )
}

团队成员管理

import React from 'react';
import { Button } from 'tdesign-react/esm';
import { ServiceOrgMembers } from 'sdk-coral-account';

const Demo = () => {
    const [visible, setVisible] = React.useState(false);
    return (
        <>
            <Button onClick={() => setVisible(true)}>成员管理</Button>
            <ServiceOrgMembers
                appid=""
                teamId=""
                visible={visible}
                onClose={() => setVisible(false)}
            />
        </>
    )
}

查看团队详情

import React from 'react';
import { Button } from 'tdesign-react/esm';
import { ServiceOrgDetail } from 'sdk-coral-account';

const Demo = () => {
    const [visible, setVisible] = React.useState(false);
    return (
        <>
            <Button onClick={() => setVisible(true)}>查看团队详情</Button>
            <ServiceOrgDetail
                appid=''
                visible={visible}
                width={980}
                teamId=""
                onClose={() => setVisible(false)}
            />
        </>
    )
}

查看团队列表

import React from 'react';
import { Button } from 'tdesign-react/esm';
import { ServiceOrgList } from 'sdk-coral-account';

const Demo = () => {
    const [visible, setVisible] = React.useState(false);
    return (
        <>
            <Button onClick={() => setVisible(true)}>查看团队列表</Button>
            <ServiceOrgList
                visible={visible}
                appid=''
                onEnter={(teamId) => {
                    setTeamId(teamId); // 返回当前选中团队ID
                }}
            />
        </>
    )
}

账号设置指引

import React from 'react';
import { ServiceAccountSettingGuide } from 'sdk-coral-account';

const Demo = () => {
    return (
        <ServiceAccountSettingGuide
            visible={true}
            appid=''
            onConfirm={() => {
                // 点击「立即设置」
            }}
            onCancel={() => {
                // 点击「稍后设置」
            }}
            onClose={() => {
                // 点击关闭弹窗按钮
            }}
            onChangeRemind={(checked: boolean) => {
                // 「不再提醒」复选框 onChange 事件回调
            }}
        />
    )
}

解散团队

import React from 'react';
import { ServiceOrgRemove } from 'sdk-coral-account';

const Demo = () => {
    const [visible, setVisible] = React.useState(false);
    return (
        <ServiceOrgRemove
            appid=''
            visible={visible}
            teamId=""
            onClose={() => setVisible(false)}
            onSuccess={() => {
                // 解散成功
            }}
            onError={() => {
                // 解散失败
            }}
        />
    )
}

移交团队

import React from 'react';
import { ServiceOrgTransfer } from 'sdk-coral-account';

const Demo = () => {
    const [visible, setVisible] = React.useState(false);
    return (
        <ServiceOrgTransfer
            appid=''
            visible={visible}
            teamId=""
            onClose={() => setVisible(false)}
            onSuccess={() => {
                // 移交成功
            }}
            onError={() => {
                // 移交失败
            }}
        />
    )
}