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

group-analyse

v0.0.6

Published

考虑到数据安全性,增加业务方透传这层服务,整体组件架构: ![59acf1ba3acea43c.png](https://private-alipayobjects.alipay.com/alipay-rmsdeploy-image/skylark/png/10152/59acf1ba3acea43c.png) 具体输入,输出,引用相关: ``` GroupAnalyse 人群分析组件 输入: option { accessKey: , //圈人相关的key categoryId: ,

Downloads

11

Readme

考虑到数据安全性,增加业务方透传这层服务,整体组件架构: 59acf1ba3acea43c.png 具体输入,输出,引用相关:

GroupAnalyse
人群分析组件
输入:
  option
  {
    accessKey: , //圈人相关的key
	categoryId: , //分类id
	initialTags: [{tagId: , tagValue, ...tagProperty}, ...], //初始化选中的标签列表
    //圈人相关的服务地址配置
    urlConfig: {
      //初始化标签列表对应的服务地址
      'getAppTagList.json': //,
      //获取标签详情服务地址
      'getAppTagValue.json': //, 
      //计算人数
      'getCrowdCount.json': //
    },
    //设置筛选条件 || 查询到筛选结果 || 总计算结果变化 均会触发该事件
    onSelectedTagChange: function (params) {
        /** params
         * {
         *  selectedTags: [{tagId, selectTagValue, selectTagCrowdNum, .... }, {}],
         *  allTagsCrowdNum: xxx , // 所有标签综合筛选的结果 
         * } 
         */
    }
  }

//标签及其分类, 数据类型等动态配置 只要改变accessKey即可 整体逻辑都会重置

对外暴露的方法
  //传入tagId ,删除对应的选中状态,并更新相应的数据 tagId | [tagId, tagId, tagId]
  deleteTag: function (tagId) {
  
  }

引用例子:
import React, { Component } from 'react';
import GroupAnalyse from 'groupAnalyse';
class Test extends Component {
  render () {
    return (
      <div>
        <GroupAnalyse option={option} ref={ c => this.ga = c }></GroupAnalyse>
        <button onClick={this.onDelete.bind(this, tagId)}></button>
      </div>     
    ); 
  },
  //用于删除的例子
  onDelete (tagId) {
    this.ga.deleteTag(tagId); 
  }
}