@giteeteam/apps-team-components 1.11.18 → 1.12.0

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
@@ -44,6 +44,7 @@ pnpm storybook
44
44
 
45
45
  | 组件库版本 | team版本 |
46
46
  | --| -- |
47
+ | 1.12.x | >=4.44.0 |
47
48
  | 1.11.x | >=4.43.0 |
48
49
  | 1.10.x | >=4.40.0 |
49
50
  | 1.9.x | >=4.38.0 |
@@ -2,6 +2,7 @@ import { jsx } from '@emotion/react/jsx-runtime';
2
2
  import React__default, { useState, useMemo, useEffect } from 'react';
3
3
  import { ClassNames } from '@emotion/react';
4
4
  import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace.js';
5
+ import { buildOneUserLogoRelativeUrl } from '../../../lib/oneUserLogoUrl.js';
5
6
  import { getNameBadge, getBackgroundColor } from '../utils.js';
6
7
  import { avatarItemStyle, avatarStyle, defaultAvatarStyle } from './style/index.js';
7
8
 
@@ -23,7 +24,7 @@ const UserAvatar = React__default.memo(({ user, className }) => {
23
24
  const bosKey = (_d = (_c = (_b = user === null || user === void 0 ? void 0 : user.bosKey) === null || _b === void 0 ? void 0 : _b.trim) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : user === null || user === void 0 ? void 0 : user.bosKey;
24
25
  if (!workspaceKey || !bosKey)
25
26
  return undefined;
26
- return `/api/one/${workspaceKey}/rest/v1/companies/${workspaceKey}/users/logo/picture?url=${encodeURIComponent(bosKey)}`;
27
+ return buildOneUserLogoRelativeUrl(workspaceKey, bosKey);
27
28
  }, [user, workspaceKey]);
28
29
  useEffect(() => {
29
30
  setImageLoadFailed(false);
@@ -0,0 +1 @@
1
+ export declare function buildOneUserLogoRelativeUrl(workspaceKey: string, bosKey: string): string;
@@ -0,0 +1,5 @@
1
+ function buildOneUserLogoRelativeUrl(workspaceKey, bosKey) {
2
+ return `/api/one/${workspaceKey}/rest/v1/companies/${workspaceKey}/users/logo/picture?url=${encodeURIComponent(bosKey)}`;
3
+ }
4
+
5
+ export { buildOneUserLogoRelativeUrl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.11.18",
3
+ "version": "1.12.0",
4
4
  "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -9,7 +9,7 @@
9
9
  "dev": "rollup -c -w",
10
10
  "build": "rimraf dist && rollup -c",
11
11
  "publish:alpha": "npm publish --access public --tag alpha",
12
- "publish:legacy": "npm publish --tag legacy-1.11.x",
12
+ "publish:legacy": "npm publish --tag legacy-1.12.x",
13
13
  "lint": "eslint . --ext ts --ext tsx --ext js --ext json",
14
14
  "pre-commit": "lint-staged",
15
15
  "husky": "husky",