@giteeteam/apps-team-components 1.0.27 → 1.0.28

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.
@@ -7,15 +7,15 @@ import EmptyField from '../../common/EmptyField';
7
7
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
8
8
  import { fieldValueOverlayStyle } from '../../common/style/global';
9
9
  import { dataQuoteInit } from './utils';
10
- const DataQuoteReadView = ({ value, userData, itemValues }) => {
10
+ const DataQuoteReadView = ({ value, userData }) => {
11
11
  const [dataList, setDataList] = useState(null);
12
12
  const dataQuoteList = useRecoilValue(dataQuoteState);
13
13
  const currentDeleteItem = useRecoilValue(currentDeleteState);
14
14
  useEffect(() => {
15
15
  if (dataQuoteList) {
16
- setDataList(dataQuoteInit(dataQuoteList, value, userData === null || userData === void 0 ? void 0 : userData.display, itemValues));
16
+ setDataList(dataQuoteInit(dataQuoteList, value, userData === null || userData === void 0 ? void 0 : userData.display));
17
17
  }
18
- }, [dataQuoteList, userData === null || userData === void 0 ? void 0 : userData.display, value, currentDeleteItem, itemValues]);
18
+ }, [dataQuoteList, userData === null || userData === void 0 ? void 0 : userData.display, value, currentDeleteItem]);
19
19
  const cellDisplay = (dataList === null || dataList === void 0 ? void 0 : dataList.length) ? (dataList.map((item, index) => (_jsxs("span", { children: [item.label, " ", index === dataList.length - 1 ? '' : '、'] }, item.value)))) : (_jsx(EmptyField, { readonly: true }));
20
20
  return (_jsx("div", { css: css(fieldValueOverlayStyle), children: _jsx(BaseOverflowTooltip, { maxline: 1, children: cellDisplay }) }));
21
21
  };
@@ -1,3 +1,3 @@
1
1
  import { Item } from '../../../lib/types/models';
2
2
  import { selectValue as selectValueProps } from '../dropdown/BaseField';
3
- export declare const dataQuoteInit: (dates: Item[], value: string[], display?: string, itemValues?: Record<string, any>) => selectValueProps[];
3
+ export declare const dataQuoteInit: (dates: Item[], value: string[], display?: string) => selectValueProps[];
@@ -1,4 +1,4 @@
1
- export const dataQuoteInit = (dates, value, display, itemValues) => {
1
+ export const dataQuoteInit = (dates, value, display) => {
2
2
  const regex = /({\S+?})/g;
3
3
  const existedDatas = dates === null || dates === void 0 ? void 0 : dates.filter(data => value === null || value === void 0 ? void 0 : value.includes(data.objectId));
4
4
  const dataInit = existedDatas === null || existedDatas === void 0 ? void 0 : existedDatas.map(existedData => {
@@ -8,11 +8,12 @@ export const dataQuoteInit = (dates, value, display, itemValues) => {
8
8
  status: (_a = existedData.status) === null || _a === void 0 ? void 0 : _a.name,
9
9
  itemType: (_b = existedData.itemType) === null || _b === void 0 ? void 0 : _b.name,
10
10
  };
11
+ const values = existedData.values || {};
11
12
  return {
12
13
  label: display
13
14
  ? display.replace(regex, function (itemKey) {
14
15
  const key = itemKey.slice(1, itemKey.length - 1);
15
- return dataCopy[key] || (itemValues && itemValues[key]);
16
+ return dataCopy[key] || values[key] || '';
16
17
  })
17
18
  : existedData.name,
18
19
  value: existedData.objectId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",