Code Monkey home page Code Monkey logo

drip-table's Introduction

Drip Table

English | 简体中文 | Documentation | DiscussionsGitter | Official Wechat group

GitHub license npm version node yarn document PRs Welcome All Contributors

📖 Introduction

Drip Tableis a dynamic table solution for enterprise level middle and background launched by JD retail. The project is based on React and JSON Schema . It aims to reduce the difficulty of developing table and improve work efficiency by simple configuration to quickly generate page dynamic table.

Drip Table contains serval sub projects: drip-table, drip-table-generator.

The introduction of each sub-project are as follows:

  • drip-table: the core library of the solution for building dynamic tables. It's main ability is to render a dynamic table automatically when received data which conforms to the JSON Schema standard.

  • drip-table-generator: a visual tool for producing configuration data that meets the JSON Schema standard in order to sent to DripTable for rendering a table and columns.

Features

  • Basic table
  • Compound table
  • Toolbar
  • Renderer
  • Text component
  • Number component
  • Image component
  • Link component
  • Tag component
  • Button component
  • Select component
  • DataPicker component
  • PopUpPage component
  • RichText component
  • Group component
  • Custom component
  • Header slot
  • Footer slot
  • Pagination
  • Virtual list
  • Sticky
  • Sub table
  • Row selection
  • Row draggable
  • Fixed column
  • Show/Hide column
  • Edit data
  • Stripe
  • Table with border
  • Column resizing
  • Size
  • Global styles
  • Empty table prompt
  • Loading
  • Card layout
  • Filter

⬆️ Getting Start

Drip table is divided into two application scenarios: configuration end and application end. The configuration side is mainly responsible for generating JSON Schema standard data through visualization and low-code. The function of the application side is to render the JSON Schema standard configuration data into a dynamic table.

The configuration side

  1. Install dependencies

    The configuration side depend on the application side, please make sure that drip-table has been installed before installing dependencies.

    yarn

    yarn add drip-table-generator

    npm

    npm install --save drip-table-generator
  2. Import at the entrance of a file

    import DripTableGenerator from "drip-table-generator";
    import "drip-table-generator/dist/index.min.css";
  3. Use components in pages

    return <DripTableGenerator />;

    Then the configuration side can be rendered normally, as the sample screenshot below:

    drip-table-generator

The application side

  1. Install dependencies

    Install the drip-table:

    yarn

    yarn add drip-table

    npm

    npm install --save drip-table
  2. Import at the entrance of a file

    // import drip-table
    import DripTable from "drip-table";
    // import drip-table css
    import "drip-table/dist/index.min.css";
  3. Use components in pages

    const schema = {
      size: "middle",
      columns: [
        {
          key: "columnKey",
          title: "Column Title",
          dataIndex: "dataIndexName",
          component: "text",
          options: {
            mode: "single",
          },
        },
      ],
    };
    return (
      <DripTable
        schema={schema}
        dataSource={[]}
      />
    );

    Then the application side can be rendered normally, as the sample screenshot below:

    drip-table-demo

🤝 Contribution

If you're interested in this project, you're welcome to create ✨issue. We are appreciated for your ❤️star.

development

  1. Clone

    git clone https://github.com/JDFED/drip-table.git
  2. Install dependencies

    lerna bootstrap
  3. build independecies

    yarn

    yarn run build

    npm

    npm run build
  4. Run project

    yarn start
  • visit http://localhost:8000
  • drip-table demo page: /drip-table/guide/basic-demo
  • drip-table-generator demo page: /drip-table-generator/demo

For more commands, see DEVELOP . Please visit the official website address drip-table

Communication

Official Wechat group

License

MIT License

drip-table's People

Contributors

estherjing avatar esthersun522 avatar helloqian12138 avatar raoenhui avatar renwenci avatar skyunboss avatar tinymins avatar too-tao avatar untitled-coder avatar xpf-821 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drip-table's Issues

希望增加 ajv 对 Schema 进行校验

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

添加本地的筛选和筛选相关的api

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.
能够有api是关于本地筛选字段或者远程筛选字段的相关内容

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
添加本地的筛选和筛选相关的api

希望有固定列功能

Is your feature request related to a problem? Please describe.
需要有固定列功能

Describe the solution you'd like
可以选择哪列固定

官网内容丰富

Is your feature request related to a problem? Please describe.
官网需要添加github地址

Describe the solution you'd like
建议在左上角添加一个github的图标

Additional context

image

首页菜单栏快捷方式过少

Is your feature request related to a problem? Please describe.
首页菜单栏快捷方式过少

Describe the solution you'd like
希望和文档的菜单栏尽量保持一致

Describe alternatives you've considered
首页为
image

文档为
image

希望新增table单元格列头拖拽能力

Is your feature request related to a problem? Please describe.
我需要有一个列表列头更改顺序的功能

Describe the solution you'd like
可以在基础功能的基础上拖拽表头从而实现顺序替换

建议有antd ProTable头部查询功能

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
建议有antdProTable头部查询功能
Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

希望有介绍和安装视频

Is your feature request related to a problem? Please describe.
直接看视频方便新手快速了解项目。希望在首页可以有一个介绍和安装视频,方便用户学习

建议添加表格分页器showTotal能力,用于自定义显示数据总数

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

feat: table支持内部组件默认展示数据

希望支持配置组件的默认兜底数据,同时提供一个API来确认是否使用这个默认兜底数据。
实际案例如下:
当table dataSource中对应组件的值还未存在的情况下,在开启了走默认兜底数据的API,读取配置的默认兜底数据进行展示,防止整行数据不展示

自定义组件名字长,样式错乱

Describe the bug
自定义组件名字长,样式错乱

To Reproduce
open http://betah5.m.jd.com/dripworks/index.html#/pageGenerator?appId=206&appName=3D407FC0&appZhName=%E6%81%A9%E6%85%A7%E7%9A%84CMS&moduleType=tableV1_2_0&pageId=845&pageName=%E6%81%A9%E6%85%A7%E7%9A%84%E6%B5%8B%E8%AF%95%E9%A1%B5%E9%9D%A2&pageType=normal&moduleOrder=2&paginationIn=front

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Desktop (please complete the following information):

  • Drip-table version:latest
  • Drip-table-generator version (optional): latest

自定义组件代码编辑器一直loading无法展示

Describe the bug
选择自定义组件后,编辑自定义组件代码无法展示编辑器,一直在loading状态

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'http://drip-table.jd.com/demo'
  2. 断开网络
  3. Click on '自定义组件',check '自定义组件' table cell
  4. 属性配置 Scroll down to '代码编辑'
  5. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

希望新增组合组件

Is your feature request related to a problem? Please describe.
想要一个组件,即有文本又有图片

Describe the solution you'd like
新增组合组件功能,完成图片与文本组件自由结合,满足商业定制业务场景。

Describe alternatives you've considered
No

Additional context
No

生成器自定义代码组件初始化后在预览模式下报校验错误

Describe the bug
生成器自定义代码组件初始化后在预览模式下报校验错误

To Reproduce
Steps to reproduce the behavior:

  1. 在生成器中新增一个自定义代码组件
  2. 切换到预览模式
  3. 表格列展示校验异常

Expected behavior
校验通过

Desktop (please complete the following information):

  • Drip-table version: 1.3.14
  • Drip-table-generator version (optional): 1.3.5
  • React version: 17.0.2

feat: 支持左侧组件区自定义排序和分类

Is your feature request related to a problem? Please describe.
我需要自定义左侧组件区组件的分类和排序(包括内置的组件)

  1. 目前只能对组件进行分类,但无法设置组件在分类中顺序。
  2. 内置的组件无法设置分类名

Describe the solution you'd like
N

Describe alternatives you've considered
N

Additional context
N

希望drip table 支持 渲染 children

希望 table 支持 渲染 children(数据的子数据)
父级能展开收起

hope that drip-table support rendering children dom (with children data)
and parent can be fold or unfold

表格列显示数据支持嵌套路径

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

antd V5 引入报错

antd V5 引入报错?
devScripts.js:6523 [@umijs/runtime] load component failed Error: Module "./drip-table" does not exist in container.
while loading "./drip-table" from webpack/container/reference/mf
at mf-va_remoteEntry.js:720

【drip-table】未知组件被渲染为整个record

Describe the bug
如果schema中有一个column的类型对应组件没有导入,则该列将渲染为整行数据

Expected behavior
希望能展示空白或者接受自定义的处理方式

Screenshots
image

Additional context
{
"$schema": "http://json-schema.org/draft/2019-09/schema#",
"pagination": false,
"columns": [
{
"key": "custom::xxxxx_17fd4f5d116-11cf",
"dataIndex": "",
"title": "",
"group": "",
"description": "",
"ui:type": "custom::xxxxx",
"ui:props": {
"render": "return ''"
},
"type": "string",
"render": "return ''",
"align": "center"
}
]
}

生成器选中列展示列类型名称或标识

Is your feature request related to a problem? Please describe.
在生成器使用过程中,如果有多个连续列没有表头或表头一样,当他们的配置面板类似时,难以区分每个列是什么组件

Describe the solution you'd like
选中列时,配置面板展示列的组件类型名或标识

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.