@giteeteam/apps-team-components 1.6.0 → 1.7.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -14,10 +14,19 @@ pnpm i
|
|
|
14
14
|
pnpm storybook
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
## 本地调试
|
|
18
|
+
1. proxima 主库中将 package.json 中 @giteeteam/apps-team-components 改为本地路径,并执行 `pnpm install`
|
|
19
|
+
```
|
|
20
|
+
- "@giteeteam/apps-team-components": "1.6.0",
|
|
21
|
+
+ "@giteeteam/apps-team-components": "file:../giteeteam-components",
|
|
22
|
+
```
|
|
23
|
+
2. 在本代码库执行 `pnpm dev`
|
|
24
|
+
|
|
17
25
|
# 版本对应
|
|
18
26
|
|
|
19
27
|
| 组件库版本 | team版本 |
|
|
20
28
|
| --| -- |
|
|
29
|
+
| 1.7.x | >=4.30.0 |
|
|
21
30
|
| 1.6.x | >=4.29.0 |
|
|
22
31
|
| 1.5.x | >=4.27.0 |
|
|
23
32
|
| 1.4.x | >=4.24.0 |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
4
|
+
import { useAtom } from 'jotai';
|
|
5
5
|
import { dataQuoteState, currentDeleteState } from '../../../lib/store/dataQuoteStore.js';
|
|
6
6
|
import EmptyField from '../../common/EmptyField.js';
|
|
7
7
|
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
@@ -10,8 +10,8 @@ import { dataQuoteInit } from './utils.js';
|
|
|
10
10
|
|
|
11
11
|
const DataQuoteReadView = ({ value, userData }) => {
|
|
12
12
|
const [dataList, setDataList] = useState(null);
|
|
13
|
-
const dataQuoteList =
|
|
14
|
-
const currentDeleteItem =
|
|
13
|
+
const [dataQuoteList] = useAtom(dataQuoteState);
|
|
14
|
+
const [currentDeleteItem] = useAtom(currentDeleteState);
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
if (dataQuoteList) {
|
|
17
17
|
setDataList(dataQuoteInit(dataQuoteList, value, userData === null || userData === void 0 ? void 0 : userData.display));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useMemo, useEffect } from 'react';
|
|
2
|
+
import { useAtom } from 'jotai';
|
|
2
3
|
import { isEmpty, clone } from 'lodash-es';
|
|
3
|
-
import { useRecoilState } from 'recoil';
|
|
4
4
|
import { REG_EN_NUMBER } from '../regExp.js';
|
|
5
5
|
import { dataQuoteState, currentDeleteState } from '../store/dataQuoteStore.js';
|
|
6
6
|
|
|
7
7
|
const OBJECT_ID_LENGTH = 10;
|
|
8
8
|
const useDataQuoteStore = (dataSources, getOptionsByValues) => {
|
|
9
|
-
const [dataQuoteList, setDataQuoteList] =
|
|
10
|
-
const [currentDeleteItem, setCurrentDeleteItem] =
|
|
9
|
+
const [dataQuoteList, setDataQuoteList] = useAtom(dataQuoteState);
|
|
10
|
+
const [currentDeleteItem, setCurrentDeleteItem] = useAtom(currentDeleteState);
|
|
11
11
|
const dataSourcesDep = useMemo(() => {
|
|
12
12
|
return (dataSources === null || dataSources === void 0 ? void 0 : dataSources.__hash) ? dataSources === null || dataSources === void 0 ? void 0 : dataSources.__hash : dataSources;
|
|
13
13
|
}, [dataSources]);
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { type Item } from '../types/models';
|
|
2
|
+
export declare const dataQuoteState: import("jotai").PrimitiveAtom<Item[]> & {
|
|
3
|
+
init: Item[];
|
|
4
|
+
};
|
|
5
|
+
export declare const currentDeleteState: import("jotai").PrimitiveAtom<string> & {
|
|
6
|
+
init: string;
|
|
7
|
+
};
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { atom } from '
|
|
1
|
+
import { atom } from 'jotai';
|
|
2
2
|
|
|
3
|
-
const dataQuoteState = atom(
|
|
4
|
-
|
|
5
|
-
default: [],
|
|
6
|
-
});
|
|
7
|
-
const currentDeleteState = atom({
|
|
8
|
-
key: 'currentDeleteState',
|
|
9
|
-
default: '',
|
|
10
|
-
});
|
|
3
|
+
const dataQuoteState = atom([]);
|
|
4
|
+
const currentDeleteState = atom('');
|
|
11
5
|
|
|
12
6
|
export { currentDeleteState, dataQuoteState };
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giteeteam/apps-team-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-alpha.1",
|
|
4
4
|
"description": "Gitee team components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"prepare": "husky install && pnpm build",
|
|
9
|
+
"dev": "rollup -c -w",
|
|
9
10
|
"build": "rimraf dist && rollup -c",
|
|
10
11
|
"publish:alpha": "npm publish --tag alpha",
|
|
11
12
|
"prepublishOnly": "pnpm build",
|
|
@@ -84,9 +85,9 @@
|
|
|
84
85
|
"antd": "^5.7.3",
|
|
85
86
|
"axios": "^1.7.3",
|
|
86
87
|
"dayjs": "^1.11.10",
|
|
88
|
+
"jotai": "^2.0.0",
|
|
87
89
|
"react": "^17.0.2 || ^18.2.0",
|
|
88
90
|
"react-dom": "^17.0.2 || ^18.2.0",
|
|
89
|
-
"recoil": "^0.7.7",
|
|
90
91
|
"swr": "^1.1.0"
|
|
91
92
|
},
|
|
92
93
|
"dependencies": {
|
|
@@ -99,8 +100,7 @@
|
|
|
99
100
|
"js-cookie": "^3.0.5",
|
|
100
101
|
"lodash-es": "^4.17.21",
|
|
101
102
|
"query-string": "7.1.3",
|
|
102
|
-
"react-overlays": "^5.2.1"
|
|
103
|
-
"react-window": "^1.8.10"
|
|
103
|
+
"react-overlays": "^5.2.1"
|
|
104
104
|
},
|
|
105
105
|
"msw": {
|
|
106
106
|
"workerDirectory": [
|