@giteeteam/apps-team-components 1.0.19 → 1.0.21

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,7 +7,7 @@ import useAntdConfig from '../../../lib/hooks/useAntdConfig';
7
7
  import useI18n from '../../../lib/hooks/useI18n';
8
8
  import EmptyField from '../../common/EmptyField';
9
9
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
10
- import { cellBoxStyle, colorIconStyle, downIconStyle, emptyIconStyle, emptyStyle, emptyTextStyle } from './style';
10
+ import { cellBoxStyle, colorIconStyle, downIconStyle, emptyIconStyle, emptyStyle, emptyTextStyle, headerCellStyle, } from './style';
11
11
  const PriorityReadView = memo(({ value, options, readonly, apply }) => {
12
12
  const { t } = useI18n();
13
13
  const { antPrefix } = useAntdConfig();
@@ -18,7 +18,7 @@ const PriorityReadView = memo(({ value, options, readonly, apply }) => {
18
18
  });
19
19
  }, []);
20
20
  const showData = useMemo(() => { var _a; return (_a = filterData(options, value)) === null || _a === void 0 ? void 0 : _a[0]; }, [filterData, options, value]);
21
- return (_jsx(_Fragment, { children: showData ? (_jsxs("div", { css: css(cellBoxStyle(antPrefix)), children: [_jsx(HollowCircleIcon, { css: css(colorIconStyle), style: { color: showData.color } }), _jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name }), isFromHeader && _jsx(CaretDownOutlined, { css: css(downIconStyle) })] })) : !isFromHeader ? (_jsx("div", { css: css(emptyTextStyle), children: _jsx(EmptyField, { readonly: readonly }) })) : (_jsxs("div", { css: css(emptyStyle), children: [_jsx(DottedCircleIcon, { css: css(emptyIconStyle) }), t('pages.fields.view.noPriority')] })) }));
21
+ return (_jsx(_Fragment, { children: showData ? (_jsxs("div", { css: css(cellBoxStyle(antPrefix), headerCellStyle), children: [_jsx(HollowCircleIcon, { css: css(colorIconStyle), style: { color: showData.color } }), _jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name }), isFromHeader && _jsx(CaretDownOutlined, { css: css(downIconStyle) })] })) : !isFromHeader ? (_jsx("div", { css: css(emptyTextStyle), children: _jsx(EmptyField, { readonly: readonly }) })) : (_jsxs("div", { css: css(emptyStyle), children: [_jsx(DottedCircleIcon, { css: css(emptyIconStyle) }), t('pages.fields.view.noPriority')] })) }));
22
22
  });
23
23
  PriorityReadView.displayName = 'PriorityReadView';
24
24
  export default PriorityReadView;
@@ -1,6 +1,7 @@
1
1
  export declare const cellBoxStyle: (antPrefix: string) => string;
2
+ export declare const headerCellStyle = "\n max-width: 120px;\n height: 24px;\n padding: 0 8px;\n font-size: 12px;\n font-weight: 600;\n line-height: 24px;\n color: #213053;\n text-align: center;\n background-color: #f5f6f8;\n border-radius: 4px;\n";
2
3
  export declare const emptyTextStyle = "\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n";
3
- export declare const colorIconStyle = "\n margin-right: 5px;\n font-size: 12px;\n";
4
+ export declare const colorIconStyle = "\n margin-right: 5px;\n font-size: 10px;\n";
4
5
  export declare const emptyStyle = "\n color: #909aaa;\n";
5
- export declare const emptyIconStyle = "\n margin-right: 5px;\n font-size: 12px;\n";
6
+ export declare const emptyIconStyle = "\n margin-right: 5px;\n font-size: 12px!important;\n width: 12px!important;\n margin-left: 0!important;\n";
6
7
  export declare const downIconStyle = "\n margin-left: 2px;\n\n svg {\n vertical-align: inherit;\n }\n";
@@ -18,6 +18,18 @@ export const cellBoxStyle = (antPrefix) => `
18
18
  }
19
19
  }
20
20
  `;
21
+ export const headerCellStyle = `
22
+ max-width: 120px;
23
+ height: 24px;
24
+ padding: 0 8px;
25
+ font-size: 12px;
26
+ font-weight: 600;
27
+ line-height: 24px;
28
+ color: #213053;
29
+ text-align: center;
30
+ background-color: #f5f6f8;
31
+ border-radius: 4px;
32
+ `;
21
33
  export const emptyTextStyle = `
22
34
  display: flex;
23
35
  align-items: center;
@@ -26,14 +38,16 @@ export const emptyTextStyle = `
26
38
  `;
27
39
  export const colorIconStyle = `
28
40
  margin-right: 5px;
29
- font-size: 12px;
41
+ font-size: 10px;
30
42
  `;
31
43
  export const emptyStyle = `
32
44
  color: ${fieldLabelColor};
33
45
  `;
34
46
  export const emptyIconStyle = `
35
47
  margin-right: 5px;
36
- font-size: 12px;
48
+ font-size: 12px!important;
49
+ width: 12px!important;
50
+ margin-left: 0!important;
37
51
  `;
38
52
  export const downIconStyle = `
39
53
  margin-left: 2px;
@@ -56,6 +56,7 @@ export declare const FIELD_TYPE_KEY_MAPPINGS: {
56
56
  Actors: string;
57
57
  UserGroup: string;
58
58
  HyperLink: string;
59
+ Cascade: string;
59
60
  };
60
61
  export declare const DATE_TYPE: Record<Uppercase<DateType>, DateType>;
61
62
  export declare const DATE_FORMAT: {
@@ -55,6 +55,7 @@ export const FIELD_TYPE_KEY_MAPPINGS = {
55
55
  Actors: 'Actors',
56
56
  UserGroup: 'UserGroup',
57
57
  HyperLink: 'HyperLink',
58
+ Cascade: 'Cascade',
58
59
  };
59
60
  export const DATE_TYPE = {
60
61
  DATETIME: 'dateTime',
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
7
7
  "scripts": {
8
- "prepare": "husky install",
8
+ "prepare": "husky install && pnpm build",
9
9
  "build": "rm -rf dist && tsc && cp -r src/icons/svg dist/icons/svg",
10
10
  "publish:alpha": "pnpm prepublish && npm publish --tag alpha",
11
11
  "prepack": "pnpm build",
12
12
  "prepublish": "pnpm build",
13
+ "prepublishOnly": "pnpm build",
13
14
  "lint": "eslint . --ext ts --ext tsx --ext js --ext json",
14
15
  "pre-commit": "lint-staged",
15
16
  "husky": "husky"