@atlaskit/user-picker 11.8.2 → 11.9.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/CHANGELOG.md +11 -0
- package/afm-products/tsconfig.json +75 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/ExternalUserOption/main.js +11 -6
- package/dist/cjs/components/SizeableAvatar.js +9 -3
- package/dist/cjs/components/UserOption.js +6 -2
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/ExternalUserOption/main.js +6 -2
- package/dist/es2019/components/SizeableAvatar.js +6 -2
- package/dist/es2019/components/UserOption.js +5 -2
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/ExternalUserOption/main.js +11 -6
- package/dist/esm/components/SizeableAvatar.js +9 -3
- package/dist/esm/components/UserOption.js +6 -2
- package/dist/types/components/SizeableAvatar.d.ts +2 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/components/SizeableAvatar.d.ts +2 -0
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 11.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`f70c3197f7179`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f70c3197f7179) -
|
|
8
|
+
[ux] add hexagon appearanceShape to user-picker based on appType as agent
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 11.8.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.products.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__user-picker/app",
|
|
7
|
+
"rootDir": "../",
|
|
8
|
+
"composite": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
24
|
+
],
|
|
25
|
+
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "../../../analytics/analytics-next/afm-products/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/avatar/afm-products/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/icon/afm-products/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../design-system/logo/afm-products/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../design-system/lozenge/afm-products/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../people-and-teams/people-teams-ui-public/afm-products/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../platform/feature-flags/afm-products/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../../design-system/popper/afm-products/tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../../../design-system/primitives/afm-products/tsconfig.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../../design-system/select/afm-products/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../../../design-system/spinner/afm-products/tsconfig.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../../people-and-teams/teams-avatar/afm-products/tsconfig.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../../../design-system/theme/afm-products/tsconfig.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../../../design-system/tokens/afm-products/tsconfig.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../../../design-system/tooltip/afm-products/tsconfig.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../../data/ufo-external/afm-products/tsconfig.json"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
package/dist/cjs/analytics.js
CHANGED
|
@@ -12,7 +12,7 @@ var _utils = require("./components/utils");
|
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
14
|
var packageName = "@atlaskit/user-picker";
|
|
15
|
-
var packageVersion = "11.8.
|
|
15
|
+
var packageVersion = "11.8.2";
|
|
16
16
|
var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
17
17
|
var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
18
18
|
var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
|
|
@@ -24,6 +24,8 @@ var _ExternalUserSourcesContainer = require("../ExternalUserSourcesContainer");
|
|
|
24
24
|
var _InfoIcon = _interopRequireDefault(require("./InfoIcon"));
|
|
25
25
|
var _ExternalAvatarItemOption = require("./ExternalAvatarItemOption");
|
|
26
26
|
var _SourcesTooltipContent = require("./SourcesTooltipContent");
|
|
27
|
+
var _avatar = require("@atlaskit/avatar");
|
|
28
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
29
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
28
30
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
29
31
|
* @jsxRuntime classic
|
|
@@ -96,12 +98,15 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
96
98
|
});
|
|
97
99
|
(0, _defineProperty2.default)(_this, "renderAvatar", function () {
|
|
98
100
|
var _this$props = _this.props,
|
|
99
|
-
|
|
101
|
+
_this$props$user2 = _this$props.user,
|
|
102
|
+
avatarUrl = _this$props$user2.avatarUrl,
|
|
103
|
+
appType = _this$props$user2.appType,
|
|
100
104
|
status = _this$props.status;
|
|
101
105
|
return (0, _react2.jsx)(_SizeableAvatar.SizeableAvatar, {
|
|
102
106
|
appearance: "big",
|
|
103
107
|
src: avatarUrl,
|
|
104
|
-
presence: status
|
|
108
|
+
presence: status,
|
|
109
|
+
avatarAppearanceShape: (0, _platformFeatureFlags.fg)('jira_ai_agent_avatar_user_picker_user_option') ? (0, _avatar.getAppearanceForAppType)(appType) : undefined
|
|
105
110
|
});
|
|
106
111
|
});
|
|
107
112
|
(0, _defineProperty2.default)(_this, "fireEvent", function (eventCreator) {
|
|
@@ -141,10 +146,10 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
141
146
|
}, {
|
|
142
147
|
key: "formattedTooltipContent",
|
|
143
148
|
value: function formattedTooltipContent() {
|
|
144
|
-
var _this$props$
|
|
145
|
-
id = _this$props$
|
|
146
|
-
requiresSourceHydration = _this$props$
|
|
147
|
-
sources = _this$props$
|
|
149
|
+
var _this$props$user3 = this.props.user,
|
|
150
|
+
id = _this$props$user3.id,
|
|
151
|
+
requiresSourceHydration = _this$props$user3.requiresSourceHydration,
|
|
152
|
+
sources = _this$props$user3.sources;
|
|
148
153
|
return (0, _react2.jsx)(_ExternalUserSourcesContainer.ExternalUserSourcesContainer, {
|
|
149
154
|
accountId: id,
|
|
150
155
|
shouldFetchSources: Boolean(requiresSourceHydration),
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.SizeableAvatar = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -14,6 +15,8 @@ var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
|
14
15
|
var _teamsAvatar = _interopRequireDefault(require("@atlaskit/teams-avatar"));
|
|
15
16
|
var _react = _interopRequireDefault(require("react"));
|
|
16
17
|
var _utils = require("./utils");
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
20
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
18
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
22
|
var SizeableAvatar = exports.SizeableAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -30,13 +33,16 @@ var SizeableAvatar = exports.SizeableAvatar = /*#__PURE__*/function (_React$Pure
|
|
|
30
33
|
presence = _this$props.presence,
|
|
31
34
|
appearance = _this$props.appearance,
|
|
32
35
|
_this$props$type = _this$props.type,
|
|
33
|
-
type = _this$props$type === void 0 ? 'person' : _this$props$type
|
|
34
|
-
|
|
36
|
+
type = _this$props$type === void 0 ? 'person' : _this$props$type,
|
|
37
|
+
avatarAppearanceShape = _this$props.avatarAppearanceShape;
|
|
38
|
+
var props = _objectSpread({
|
|
35
39
|
size: (0, _utils.getAvatarSize)(appearance),
|
|
36
40
|
src: src,
|
|
37
41
|
borderColor: 'transparent',
|
|
38
42
|
presence: presence
|
|
39
|
-
}
|
|
43
|
+
}, avatarAppearanceShape && {
|
|
44
|
+
appearance: avatarAppearanceShape
|
|
45
|
+
});
|
|
40
46
|
return type === 'team' ? /*#__PURE__*/_react.default.createElement(_teamsAvatar.default, props) : /*#__PURE__*/_react.default.createElement(_avatar.default, props);
|
|
41
47
|
}
|
|
42
48
|
}]);
|
|
@@ -11,6 +11,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
11
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
var _avatar = require("@atlaskit/avatar");
|
|
14
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
16
|
var _react = require("@emotion/react");
|
|
16
17
|
var _react2 = _interopRequireDefault(require("react"));
|
|
@@ -65,12 +66,15 @@ var UserOption = exports.UserOption = /*#__PURE__*/function (_React$PureComponen
|
|
|
65
66
|
});
|
|
66
67
|
(0, _defineProperty2.default)(_this, "renderAvatar", function () {
|
|
67
68
|
var _this$props = _this.props,
|
|
68
|
-
|
|
69
|
+
_this$props$user2 = _this$props.user,
|
|
70
|
+
avatarUrl = _this$props$user2.avatarUrl,
|
|
71
|
+
appType = _this$props$user2.appType,
|
|
69
72
|
status = _this$props.status;
|
|
70
73
|
return (0, _react.jsx)(_SizeableAvatar.SizeableAvatar, {
|
|
71
74
|
appearance: (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? 'medium' : 'big',
|
|
72
75
|
src: avatarUrl,
|
|
73
|
-
presence: status
|
|
76
|
+
presence: status,
|
|
77
|
+
avatarAppearanceShape: (0, _platformFeatureFlags.fg)('jira_ai_agent_avatar_user_picker_user_option') ? (0, _avatar.getAppearanceForAppType)(appType) : undefined
|
|
74
78
|
});
|
|
75
79
|
});
|
|
76
80
|
(0, _defineProperty2.default)(_this, "getLozengeProps", function () {
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
3
|
import { isCustom, isExternalUser } from './components/utils';
|
|
4
4
|
const packageName = "@atlaskit/user-picker";
|
|
5
|
-
const packageVersion = "11.8.
|
|
5
|
+
const packageVersion = "11.8.2";
|
|
6
6
|
const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
7
7
|
const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
8
8
|
const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
|
|
@@ -16,6 +16,8 @@ import { ExternalUserSourcesContainer } from '../ExternalUserSourcesContainer';
|
|
|
16
16
|
import InfoIcon from './InfoIcon';
|
|
17
17
|
import { ExternalAvatarItemOption } from './ExternalAvatarItemOption';
|
|
18
18
|
import { SourcesTooltipContent } from './SourcesTooltipContent';
|
|
19
|
+
import { getAppearanceForAppType } from '@atlaskit/avatar';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
21
|
|
|
20
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
21
23
|
export const imageContainer = css({
|
|
@@ -82,14 +84,16 @@ class ExternalUserOptionImpl extends React.PureComponent {
|
|
|
82
84
|
_defineProperty(this, "renderAvatar", () => {
|
|
83
85
|
const {
|
|
84
86
|
user: {
|
|
85
|
-
avatarUrl
|
|
87
|
+
avatarUrl,
|
|
88
|
+
appType
|
|
86
89
|
},
|
|
87
90
|
status
|
|
88
91
|
} = this.props;
|
|
89
92
|
return jsx(SizeableAvatar, {
|
|
90
93
|
appearance: "big",
|
|
91
94
|
src: avatarUrl,
|
|
92
|
-
presence: status
|
|
95
|
+
presence: status,
|
|
96
|
+
avatarAppearanceShape: fg('jira_ai_agent_avatar_user_picker_user_option') ? getAppearanceForAppType(appType) : undefined
|
|
93
97
|
});
|
|
94
98
|
});
|
|
95
99
|
_defineProperty(this, "fireEvent", (eventCreator, ...args) => {
|
|
@@ -8,13 +8,17 @@ export class SizeableAvatar extends React.PureComponent {
|
|
|
8
8
|
src,
|
|
9
9
|
presence,
|
|
10
10
|
appearance,
|
|
11
|
-
type = 'person'
|
|
11
|
+
type = 'person',
|
|
12
|
+
avatarAppearanceShape
|
|
12
13
|
} = this.props;
|
|
13
14
|
const props = {
|
|
14
15
|
size: getAvatarSize(appearance),
|
|
15
16
|
src,
|
|
16
17
|
borderColor: 'transparent',
|
|
17
|
-
presence
|
|
18
|
+
presence,
|
|
19
|
+
...(avatarAppearanceShape && {
|
|
20
|
+
appearance: avatarAppearanceShape
|
|
21
|
+
})
|
|
18
22
|
};
|
|
19
23
|
return type === 'team' ? /*#__PURE__*/React.createElement(TeamAvatar, props) : /*#__PURE__*/React.createElement(Avatar, props);
|
|
20
24
|
}
|
|
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
+
import { getAppearanceForAppType } from '@atlaskit/avatar';
|
|
6
7
|
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
9
|
import { jsx } from '@emotion/react';
|
|
@@ -50,14 +51,16 @@ export class UserOption extends React.PureComponent {
|
|
|
50
51
|
_defineProperty(this, "renderAvatar", () => {
|
|
51
52
|
const {
|
|
52
53
|
user: {
|
|
53
|
-
avatarUrl
|
|
54
|
+
avatarUrl,
|
|
55
|
+
appType
|
|
54
56
|
},
|
|
55
57
|
status
|
|
56
58
|
} = this.props;
|
|
57
59
|
return jsx(SizeableAvatar, {
|
|
58
60
|
appearance: fg('platform-component-visual-refresh') ? 'medium' : 'big',
|
|
59
61
|
src: avatarUrl,
|
|
60
|
-
presence: status
|
|
62
|
+
presence: status,
|
|
63
|
+
avatarAppearanceShape: fg('jira_ai_agent_avatar_user_picker_user_option') ? getAppearanceForAppType(appType) : undefined
|
|
61
64
|
});
|
|
62
65
|
});
|
|
63
66
|
_defineProperty(this, "getLozengeProps", () => typeof this.props.user.lozenge === 'string' ? {
|
package/dist/esm/analytics.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
|
5
5
|
import { v4 as uuidv4 } from 'uuid';
|
|
6
6
|
import { isCustom, isExternalUser } from './components/utils';
|
|
7
7
|
var packageName = "@atlaskit/user-picker";
|
|
8
|
-
var packageVersion = "11.8.
|
|
8
|
+
var packageVersion = "11.8.2";
|
|
9
9
|
var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
10
10
|
var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
11
11
|
var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
|
|
@@ -24,6 +24,8 @@ import { ExternalUserSourcesContainer } from '../ExternalUserSourcesContainer';
|
|
|
24
24
|
import InfoIcon from './InfoIcon';
|
|
25
25
|
import { ExternalAvatarItemOption } from './ExternalAvatarItemOption';
|
|
26
26
|
import { SourcesTooltipContent } from './SourcesTooltipContent';
|
|
27
|
+
import { getAppearanceForAppType } from '@atlaskit/avatar';
|
|
28
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
27
29
|
|
|
28
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
29
31
|
export var imageContainer = css({
|
|
@@ -92,12 +94,15 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
92
94
|
});
|
|
93
95
|
_defineProperty(_this, "renderAvatar", function () {
|
|
94
96
|
var _this$props = _this.props,
|
|
95
|
-
|
|
97
|
+
_this$props$user2 = _this$props.user,
|
|
98
|
+
avatarUrl = _this$props$user2.avatarUrl,
|
|
99
|
+
appType = _this$props$user2.appType,
|
|
96
100
|
status = _this$props.status;
|
|
97
101
|
return jsx(SizeableAvatar, {
|
|
98
102
|
appearance: "big",
|
|
99
103
|
src: avatarUrl,
|
|
100
|
-
presence: status
|
|
104
|
+
presence: status,
|
|
105
|
+
avatarAppearanceShape: fg('jira_ai_agent_avatar_user_picker_user_option') ? getAppearanceForAppType(appType) : undefined
|
|
101
106
|
});
|
|
102
107
|
});
|
|
103
108
|
_defineProperty(_this, "fireEvent", function (eventCreator) {
|
|
@@ -137,10 +142,10 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
137
142
|
}, {
|
|
138
143
|
key: "formattedTooltipContent",
|
|
139
144
|
value: function formattedTooltipContent() {
|
|
140
|
-
var _this$props$
|
|
141
|
-
id = _this$props$
|
|
142
|
-
requiresSourceHydration = _this$props$
|
|
143
|
-
sources = _this$props$
|
|
145
|
+
var _this$props$user3 = this.props.user,
|
|
146
|
+
id = _this$props$user3.id,
|
|
147
|
+
requiresSourceHydration = _this$props$user3.requiresSourceHydration,
|
|
148
|
+
sources = _this$props$user3.sources;
|
|
144
149
|
return jsx(ExternalUserSourcesContainer, {
|
|
145
150
|
accountId: id,
|
|
146
151
|
shouldFetchSources: Boolean(requiresSourceHydration),
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
6
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
11
|
import Avatar from '@atlaskit/avatar';
|
|
@@ -23,13 +26,16 @@ export var SizeableAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
23
26
|
presence = _this$props.presence,
|
|
24
27
|
appearance = _this$props.appearance,
|
|
25
28
|
_this$props$type = _this$props.type,
|
|
26
|
-
type = _this$props$type === void 0 ? 'person' : _this$props$type
|
|
27
|
-
|
|
29
|
+
type = _this$props$type === void 0 ? 'person' : _this$props$type,
|
|
30
|
+
avatarAppearanceShape = _this$props.avatarAppearanceShape;
|
|
31
|
+
var props = _objectSpread({
|
|
28
32
|
size: getAvatarSize(appearance),
|
|
29
33
|
src: src,
|
|
30
34
|
borderColor: 'transparent',
|
|
31
35
|
presence: presence
|
|
32
|
-
}
|
|
36
|
+
}, avatarAppearanceShape && {
|
|
37
|
+
appearance: avatarAppearanceShape
|
|
38
|
+
});
|
|
33
39
|
return type === 'team' ? /*#__PURE__*/React.createElement(TeamAvatar, props) : /*#__PURE__*/React.createElement(Avatar, props);
|
|
34
40
|
}
|
|
35
41
|
}]);
|
|
@@ -10,6 +10,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
10
10
|
* @jsxRuntime classic
|
|
11
11
|
* @jsx jsx
|
|
12
12
|
*/
|
|
13
|
+
import { getAppearanceForAppType } from '@atlaskit/avatar';
|
|
13
14
|
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
14
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
16
|
import { jsx } from '@emotion/react';
|
|
@@ -60,12 +61,15 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
60
61
|
});
|
|
61
62
|
_defineProperty(_this, "renderAvatar", function () {
|
|
62
63
|
var _this$props = _this.props,
|
|
63
|
-
|
|
64
|
+
_this$props$user2 = _this$props.user,
|
|
65
|
+
avatarUrl = _this$props$user2.avatarUrl,
|
|
66
|
+
appType = _this$props$user2.appType,
|
|
64
67
|
status = _this$props.status;
|
|
65
68
|
return jsx(SizeableAvatar, {
|
|
66
69
|
appearance: fg('platform-component-visual-refresh') ? 'medium' : 'big',
|
|
67
70
|
src: avatarUrl,
|
|
68
|
-
presence: status
|
|
71
|
+
presence: status,
|
|
72
|
+
avatarAppearanceShape: fg('jira_ai_agent_avatar_user_picker_user_option') ? getAppearanceForAppType(appType) : undefined
|
|
69
73
|
});
|
|
70
74
|
});
|
|
71
75
|
_defineProperty(_this, "getLozengeProps", function () {
|
package/dist/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.9.0",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@atlaskit/afm-i18n-platform-elements-user-picker": "2.7.0",
|
|
46
46
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
47
|
-
"@atlaskit/avatar": "^25.
|
|
47
|
+
"@atlaskit/avatar": "^25.5.0",
|
|
48
48
|
"@atlaskit/icon": "^28.5.0",
|
|
49
49
|
"@atlaskit/logo": "^19.9.0",
|
|
50
50
|
"@atlaskit/lozenge": "^13.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/teams-avatar": "^2.3.0",
|
|
58
58
|
"@atlaskit/theme": "^21.0.0",
|
|
59
59
|
"@atlaskit/tokens": "^7.0.0",
|
|
60
|
-
"@atlaskit/tooltip": "^20.
|
|
60
|
+
"@atlaskit/tooltip": "^20.6.0",
|
|
61
61
|
"@atlaskit/ufo": "^0.4.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@compiled/react": "^0.18.6",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@atlaskit/elements-test-helpers": "workspace:^",
|
|
76
76
|
"@atlaskit/heading": "^5.2.0",
|
|
77
|
-
"@atlassian/feature-flags-test-utils": "^0.
|
|
77
|
+
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
78
78
|
"@emotion/styled": "^11.0.0",
|
|
79
79
|
"@testing-library/dom": "^10.1.0",
|
|
80
80
|
"@testing-library/jest-dom": "^6.4.5",
|
|
@@ -114,6 +114,9 @@
|
|
|
114
114
|
},
|
|
115
115
|
"user-picker-migrate-off-finddomnode": {
|
|
116
116
|
"type": "boolean"
|
|
117
|
+
},
|
|
118
|
+
"jira_ai_agent_avatar_user_picker_user_option": {
|
|
119
|
+
"type": "boolean"
|
|
117
120
|
}
|
|
118
121
|
}
|
|
119
122
|
}
|