@giteeteam/apps-team-components 1.0.37-alpha.1 → 1.0.37

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.
@@ -1,11 +1,8 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import SimpleOverflowToolTip from '../../common/overflow-tooltip/SimpleOverflowToolTip';
5
5
  import { handleValue } from './BaseField';
6
- const getFormattedLabel = ({ label, style = {}, }) => {
7
- return _jsx("span", { style: { color: style === null || style === void 0 ? void 0 : style.color, background: style === null || style === void 0 ? void 0 : style.background }, children: label });
8
- };
9
6
  const DropdownReadView = memo(props => {
10
7
  const { value, options, readonly: propsReadonly, userData } = props;
11
8
  const readonly = useMemo(() => {
@@ -16,21 +13,6 @@ const DropdownReadView = memo(props => {
16
13
  return propsReadonly;
17
14
  }
18
15
  }, [propsReadonly, userData]);
19
- const showValueTitle = useMemo(() => {
20
- var _a;
21
- if (!(value === null || value === void 0 ? void 0 : value.length))
22
- return '';
23
- if ((_a = value[0]) === null || _a === void 0 ? void 0 : _a.label) {
24
- return value.map(item => item.label).join(',');
25
- }
26
- if (!(options === null || options === void 0 ? void 0 : options.length))
27
- return '';
28
- const result = value
29
- .map(item => { var _a; return (item === null || item === void 0 ? void 0 : item.label) || ((_a = options.find(opt => opt.value === handleValue(item))) === null || _a === void 0 ? void 0 : _a.label); })
30
- .filter(Boolean)
31
- .join(',');
32
- return result;
33
- }, [options, value]);
34
16
  const showValue = useMemo(() => {
35
17
  var _a;
36
18
  if (!(value === null || value === void 0 ? void 0 : value.length))
@@ -40,17 +22,13 @@ const DropdownReadView = memo(props => {
40
22
  }
41
23
  if (!(options === null || options === void 0 ? void 0 : options.length))
42
24
  return '';
43
- const optionsMap = {};
44
- options === null || options === void 0 ? void 0 : options.forEach(item => {
45
- optionsMap[item.label] = item;
46
- });
47
25
  const result = value
48
26
  .map(item => { var _a; return (item === null || item === void 0 ? void 0 : item.label) || ((_a = options.find(opt => opt.value === handleValue(item))) === null || _a === void 0 ? void 0 : _a.label); })
49
27
  .filter(Boolean)
50
- .map((item, index) => index === value.length - 1 ? getFormattedLabel(optionsMap[item]) : _jsxs(_Fragment, { children: [getFormattedLabel(optionsMap[item]), ","] }));
28
+ .join(',');
51
29
  return result;
52
30
  }, [options, value]);
53
- return (_jsx(_Fragment, { children: showValue ? (_jsx(SimpleOverflowToolTip, { title: showValueTitle, children: showValue })) : (_jsx(EmptyField, { readonly: readonly })) }));
31
+ return (_jsx(_Fragment, { children: showValue ? (_jsx(SimpleOverflowToolTip, { title: showValue, children: showValue })) : (_jsx(EmptyField, { readonly: readonly })) }));
54
32
  });
55
33
  DropdownReadView.displayName = 'DropdownReadView';
56
34
  export default DropdownReadView;
@@ -17,7 +17,7 @@ export const workflowContentStyle = `
17
17
  text-align: left;
18
18
  `;
19
19
  export const statePopoverStyle = (antPrefix) => `
20
- z-index: 1000 !important;
20
+ z-index: 999 !important;
21
21
 
22
22
  div.${antPrefix}-popover-inner-content, div.${antPrefix}-popover-inner {
23
23
  padding: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.0.37-alpha.1",
3
+ "version": "1.0.37",
4
4
  "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",