Skip to content

Commit 5f05458

Browse files
author
kongshan
committed
feat: merge recent dev
2 parents ee4beff + 0bc8cae commit 5f05458

File tree

76 files changed

+6214
-35157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+6214
-35157
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
node_modules
22
storybook-static
33
lib
4-
dist
4+
dist
5+
.temporary_files
6+
coverage
7+
package-lock.json

.gitlab-ci.yml

Lines changed: 41 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,52 @@
1-
# Read more: https://docs.gitlab.com/12.7/ee/ci/yaml/README.html
2-
31
cache:
4-
paths:
5-
- node_modules/
2+
paths:
3+
- .yarn
4+
- node_modules/
65

7-
# 当 merge_requests, master, dev, test 分支时会执行依赖安装
86
before_script:
9-
- "npm cache verify"
10-
- "npm install --unsafe-perm=true --allow-root"
7+
- yarn install --cache-folder .yarn
118

129
stages:
13-
- lint
14-
- lintdoc
15-
- check-types
16-
- test
17-
- build_deploy
18-
19-
# 当 merge_requests 执行 eslint 检查
20-
code_quality:
21-
stage: lint
22-
script:
23-
- npm run lint
24-
only:
25-
- merge_requests
10+
- lint
11+
- lint_doc
12+
- check_types
13+
- test
14+
- build_deploy
15+
- code_analysis
16+
17+
code_quality:
18+
stage: lint
19+
script:
20+
- yarn lint
21+
only:
22+
- merge_requests
2623

27-
# 当 merge_requests 执行 tsc 类型检查
2824
check_types:
29-
stage: check-types
30-
script:
31-
- npm run check-types
32-
only:
33-
- merge_requests
25+
stage: check_types
26+
script:
27+
- yarn check-types
28+
only:
29+
- merge_requests
3430

35-
# 当 merge_requests 有更时会执行单元测试任务
3631
test:
37-
stage: test
38-
script:
39-
- npm run test
40-
only:
41-
- merge_requests
32+
stage: test
33+
script:
34+
- yarn test
35+
only:
36+
- merge_requests
37+
- dev
4238

43-
#执行 MD 文档校验, 为 doc 或者 master 命名当分支更新时才会触发
4439
doc_quality:
45-
stage: lintdoc
46-
script:
47-
- npm run lint-doc
48-
only:
49-
- /doc(s)|release/
50-
- master
51-
52-
# 更新部署
53-
build_deploy: # deploy environment
54-
stage: build_deploy
55-
script:
56-
- npm run deploy
57-
only:
58-
- /master/
40+
stage: lint_doc
41+
script:
42+
- yarn lint-doc
43+
only:
44+
- /doc(s)|release/
45+
- master
46+
47+
build_deploy:
48+
stage: build_deploy
49+
script:
50+
- yarn deploy
51+
only:
52+
- dev

.npmignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ setupTests.js
1616
storyshots.test.js
1717
tsconfig.build.json
1818
tsconfig.json
19-
dist
19+
dist
20+
gulpfile.js
21+
coverage
22+
css-plugin.js
23+
yarn.lock

CHANGELOG.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [2.0.2](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/compare/v2.0.1...v2.0.2) (2021-01-05)
6+
7+
8+
### Bug Fixes
9+
10+
* fix css demand load error due to styles name ([781691a](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/781691a))
11+
* fix ellipsisText style ([1dbe3ae](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/1dbe3ae))
12+
13+
14+
### Build System
15+
16+
* **package:** update some pkg version ([c41e1a2](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/c41e1a2))
17+
18+
19+
### Features
20+
21+
* codesanbox example add ([1d8125e](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/1d8125e))
22+
23+
24+
25+
### [2.0.1](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/compare/v2.0.0...v2.0.1) (2020-12-03)
26+
27+
28+
### Bug Fixes
29+
30+
* del useless easy-select files ([af9401f](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/af9401f))
31+
* fix command word ([3b4fed4](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/3b4fed4))
32+
* fix task exec order ([4171d11](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/4171d11))
33+
34+
35+
### Build System
36+
37+
* add gulpfile in npmignore ([5e412ef](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/5e412ef))
38+
* fix Load missing styles on demand ([bdbb319](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/bdbb319))
39+
40+
41+
### Features
42+
43+
* **gitlab-ci:** update config ([9736168](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/9736168))
44+
45+
46+
547
## [2.0.0](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/compare/v1.4.1...v2.0.0) (2020-10-30)
648

749

@@ -50,7 +92,7 @@ All notable changes to this project will be documented in this file. See [standa
5092

5193
### Tests
5294

53-
* **multiSearchInput:** 解决晨风提的键盘事件mockFunction无法触发的问题 ([b59fa20](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/b59fa20))
95+
* **multiSearchInput:** 解决晨风提的键盘事件 mockFunction 无法触发的问题 ([b59fa20](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/b59fa20))
5496
* add easySelect test ([4201cf4](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/4201cf4))
5597
* correct import form ([df20482](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/df20482))
5698
* update reference path ([b41e292](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/commit/b41e292))

README-zh_CN.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# dt-react-component
2+
3+
[![NPM version][npm-image]][npm-url] [![NPM downloads][download-img]][download-url]
4+
5+
[npm-image]: https://img.shields.io/npm/v/dt-react-component.svg?style=flat-square
6+
[npm-url]: https://www.npmjs.com/package/dt-react-component
7+
8+
[download-img]: https://img.shields.io/npm/dm/dt-react-component.svg?style=flat
9+
[download-url]: https://www.npmjs.com/package/dt-react-component
10+
11+
[English](./README.md) | 简体中文
12+
13+
基于 [ant-design](https://github.com/ant-design/ant-design) 的 React UI 组件库。 主要用于中,后台产品。我们的目标是**满足更具体的业务场景组件**。 当然,我们也有基于原生 javascript 实现的业务组件,例如**ContextMenu****KeyEventListener**等。
14+
15+
## 何时使用
16+
+ 当发现其他组件库提供的基本组件不符合当前的业务场景,并且需要基于这些基本组件实现功能时,可以考虑使用 dt-react-component 解决问题。
17+
+ 当业务复杂时,将沉淀越来越多的业务组件。 为了更好地管理组件并减少代码的冗余,可以使用 dt-react-component。 当然,我们欢迎 PR。 我们也将及时审查和合并常见的业务场景组件。
18+
19+
## 安装
20+
21+
```js
22+
// use npm
23+
npm install dt-react-component
24+
25+
// use yarn
26+
yarn add dt-react-component
27+
```
28+
29+
## 使用
30+
31+
```js
32+
import { Circle, GoBack } from 'dt-react-component'
33+
const App = () => (
34+
<>
35+
<Circle type='finished'/>
36+
<GoBack url='/api/manage' />
37+
</>
38+
);
39+
```
40+
并手动导入样式:
41+
42+
```js
43+
import 'dt-react-component/lib/style/index.css'
44+
45+
// or
46+
import 'dt-react-component/lib/style/index.scss'
47+
48+
```
49+
50+
### 按需加载
51+
52+
下面两种方式都可以只加载用到的组件。
53+
+ 我们强烈建议您使用 [babel-plugin-treasure](https://github.com/DTStack/babel-plugin-treasure) 完全适配 dt-react-component 的插件。
54+
55+
```js
56+
// .babelrc or babel-loader option
57+
"plugins": [
58+
[
59+
"treasure",
60+
{
61+
"libraryName": "dt-react-component",
62+
"libraryDirectory": "lib",
63+
"style": "css" // `style: true` Will load the scss file
64+
}
65+
]
66+
]
67+
68+
```
69+
70+
然后只需从 dt-react-component 引入模块即可,无需单独引入样式。等同于下面手动引入的方式。
71+
72+
```js
73+
// babel-plugin-treasure will help you load JS and CSS
74+
import { ContextMenu } from 'dt-react-component';
75+
```
76+
更多请见 [babel-plugin-treasure](https://github.com/DTStack/babel-plugin-treasure).
77+
78+
+ 手动引入
79+
80+
```js
81+
import MarkdownRender from 'dt-react-component/lib/markdownRender'; // Load JS
82+
import 'dt-react-component/lib/markdownRender/style/css'; // Load CSS
83+
// import 'dt-react-component/lib/markdownRender/style'; // Load SCSS
84+
```
85+
86+
### TypeScript
87+
dt-react-component 完全基于 TypeScript 编写,具有完整的类型定义,因此您将拥有更好的体验。
88+
89+
### 预览地址
90+
您可以在此地址查看最新的组件和文档。
91+
92+
[https://dtstack.github.io/dt-react-component/](https://dtstack.github.io/dt-react-component/)
93+
94+
95+
## 开发
96+
97+
本地克隆:
98+
99+
```js
100+
$ git clone ssh://git@gitlab.prod.dtstack.cn:10022/dt-insight-front/infrastructure/dt-react-component.git
101+
$ cd dt-react-component
102+
$ npm install
103+
$ npm run storybook
104+
```
105+
打开浏览器并访问 [http://127.0.0.1:9001](http://127.0.0.1:9001),我们基于 stroybook 管理组件。 更多信息请访问 [Storybook](https://storybook.js.org/).
106+
107+
## 路线图
108+
+ 支持和改进更多组件
109+
+ 国际化语言支持
110+
+ 支持主题定制
111+
112+
## 贡献
113+
114+
我们欢迎所有贡献。 您可以将任何想法提交为 [pull requests](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/merge_requests) 或者 [issues](http://gitlab.prod.dtstack.cn/dt-insight-front/infrastructure/dt-react-component/issues).
115+
116+
最后,感谢我们所有 [contributors](https://github.com/DTStack/dt-react-component/graphs/contributors)
117+
118+
## 许可证
119+
120+
ISC

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# dt-react-component
22

3-
React UI component library based on ant-design. Mainly used for middle and back-end products. Most importantly, its purpose is not to replace excellent component libraries such as ant-design and element-ui. Our goal is to **meet more specific and more specific business scenario components**. Of course, we also have excellent business components based on native javascript, such as **ContextMenu**, **KeyEventListener** and so on.
3+
[![NPM version][npm-image]][npm-url] [![NPM downloads][download-img]][download-url]
4+
5+
[npm-image]: https://img.shields.io/npm/v/dt-react-component.svg?style=flat-square
6+
[npm-url]: https://www.npmjs.com/package/dt-react-component
7+
8+
[download-img]: https://img.shields.io/npm/dm/dt-react-component.svg?style=flat
9+
[download-url]: https://www.npmjs.com/package/dt-react-component
10+
11+
English | [简体中文](./README-zh_CN.md)
12+
13+
React UI component library based on [ant-design](https://github.com/ant-design/ant-design). Mainly used for middle and back-end products. Our goal is to **meet more specific and more specific business scenario components**. Of course, we also have excellent business components based on native javascript, such as **ContextMenu**, **KeyEventListener** and so on.
414

515
## When to use
616
+ When you find that the basic components provided by other component libraries do not meet the current business scenario, and you need to implement functions based on the basic components, you can use dt-react-component to solve the problem.

0 commit comments

Comments
 (0)