@atlaskit/user-picker 11.4.3 → 11.5.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 +12 -0
- package/afm-cc/tsconfig.json +1 -1
- package/afm-dev-agents/tsconfig.json +75 -0
- package/afm-passionfruit/tsconfig.json +75 -0
- package/afm-volt/tsconfig.json +7 -1
- package/analytics/package.json +1 -1
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/AddOptionAvatar.js +9 -5
- package/dist/cjs/components/MultiValue.js +2 -1
- package/dist/cjs/components/UserPicker.js +1 -1
- package/dist/cjs/components/styles.js +4 -3
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/AddOptionAvatar.js +10 -6
- package/dist/es2019/components/MultiValue.js +2 -1
- package/dist/es2019/components/UserPicker.js +1 -1
- package/dist/es2019/components/styles.js +4 -3
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/AddOptionAvatar.js +9 -5
- package/dist/esm/components/MultiValue.js +2 -1
- package/dist/esm/components/UserPicker.js +1 -1
- package/dist/esm/components/styles.js +4 -3
- package/dist/types/components/AddOptionAvatar.d.ts +1 -0
- package/dist/types/components/BaseUserPicker.d.ts +65 -64
- package/dist/types/components/Control.d.ts +0 -1
- package/dist/types/components/ExternalUserOption/index.d.ts +1 -1
- package/dist/types/components/ExternalUserOption/main.d.ts +1 -1
- package/dist/types/components/PopupUserPicker.d.ts +77 -75
- package/dist/types/components/SingleValue.d.ts +0 -1
- package/dist/types/components/UserPicker.d.ts +64 -63
- package/dist/types/components/components.d.ts +1 -72
- package/dist/types/components/creatable.d.ts +2 -2
- package/dist/types/components/popup.d.ts +1 -1
- package/dist/types/components/styles.d.ts +1 -1
- package/dist/types/components/utils.d.ts +2 -2
- package/dist/types/types.d.ts +3 -0
- package/dist/types/util/group-options-by-type/index.d.ts +1 -1
- package/dist/types-ts4.5/components/AddOptionAvatar.d.ts +1 -0
- package/dist/types-ts4.5/components/BaseUserPicker.d.ts +65 -64
- package/dist/types-ts4.5/components/Control.d.ts +0 -1
- package/dist/types-ts4.5/components/ExternalUserOption/index.d.ts +1 -1
- package/dist/types-ts4.5/components/ExternalUserOption/main.d.ts +1 -1
- package/dist/types-ts4.5/components/PopupUserPicker.d.ts +77 -75
- package/dist/types-ts4.5/components/SingleValue.d.ts +0 -1
- package/dist/types-ts4.5/components/UserPicker.d.ts +64 -63
- package/dist/types-ts4.5/components/components.d.ts +1 -72
- package/dist/types-ts4.5/components/creatable.d.ts +2 -2
- package/dist/types-ts4.5/components/popup.d.ts +1 -1
- package/dist/types-ts4.5/components/styles.d.ts +1 -1
- package/dist/types-ts4.5/components/utils.d.ts +2 -2
- package/dist/types-ts4.5/types.d.ts +3 -0
- package/dist/types-ts4.5/util/group-options-by-type/index.d.ts +1 -1
- package/option/package.json +1 -1
- package/package.json +10 -5
- package/types/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 11.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`67cac32256ce7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/67cac32256ce7) -
|
|
8
|
+
[ux] Adding support to customise the email icon colours to indicate an action can be taken for the
|
|
9
|
+
user.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 11.4.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.dev-agents.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../dev-agents/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-dev-agents/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/avatar/afm-dev-agents/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/icon/afm-dev-agents/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../design-system/logo/afm-dev-agents/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../design-system/lozenge/afm-dev-agents/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../people-and-teams/people-teams-ui-public/afm-dev-agents/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../platform/feature-flags/afm-dev-agents/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../../design-system/popper/afm-dev-agents/tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../../../design-system/primitives/afm-dev-agents/tsconfig.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../../design-system/select/afm-dev-agents/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../../../design-system/spinner/afm-dev-agents/tsconfig.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../../people-and-teams/teams-avatar/afm-dev-agents/tsconfig.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../../../design-system/theme/afm-dev-agents/tsconfig.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../../../design-system/tokens/afm-dev-agents/tsconfig.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../../../design-system/tooltip/afm-dev-agents/tsconfig.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../../data/ufo-external/afm-dev-agents/tsconfig.json"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.passionfruit.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../passionfruit/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-passionfruit/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/avatar/afm-passionfruit/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/icon/afm-passionfruit/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../design-system/logo/afm-passionfruit/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../design-system/lozenge/afm-passionfruit/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../people-and-teams/people-teams-ui-public/afm-passionfruit/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../platform/feature-flags/afm-passionfruit/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../../design-system/popper/afm-passionfruit/tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../../../design-system/primitives/afm-passionfruit/tsconfig.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../../design-system/select/afm-passionfruit/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../../../design-system/spinner/afm-passionfruit/tsconfig.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../../people-and-teams/teams-avatar/afm-passionfruit/tsconfig.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../../../design-system/theme/afm-passionfruit/tsconfig.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../../../design-system/tokens/afm-passionfruit/tsconfig.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../../../design-system/tooltip/afm-passionfruit/tsconfig.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../../data/ufo-external/afm-passionfruit/tsconfig.json"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
package/afm-volt/tsconfig.json
CHANGED
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"exclude": [
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*"
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
18
24
|
],
|
|
19
25
|
"references": [
|
|
20
26
|
{
|
package/analytics/package.json
CHANGED
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.4.
|
|
15
|
+
var packageVersion = "11.4.3";
|
|
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}$/;
|
|
@@ -9,6 +9,7 @@ var _email = _interopRequireDefault(require("@atlaskit/icon/core/migration/email
|
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _react2 = _interopRequireDefault(require("react"));
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
/**
|
|
13
14
|
* @jsxRuntime classic
|
|
14
15
|
* @jsx jsx
|
|
@@ -16,12 +17,14 @@ var _react2 = _interopRequireDefault(require("react"));
|
|
|
16
17
|
|
|
17
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
19
|
|
|
19
|
-
var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge) {
|
|
20
|
+
var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge, isPendingAction) {
|
|
20
21
|
var padding = isLozenge ? "var(--ds-space-0, 0px)" : "var(--ds-space-050, 4px)";
|
|
22
|
+
var backgroundColor = isPendingAction && (0, _platformFeatureFlags.fg)('twcg-444-invite-usd-improvements-m2-gate') ? "var(--ds-background-warning, #FFF7D6)" : "var(--ds-background-neutral, ".concat(_colors.N40, ")");
|
|
21
23
|
return (0, _react.css)({
|
|
22
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
25
|
padding: padding,
|
|
24
|
-
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
27
|
+
backgroundColor: backgroundColor,
|
|
25
28
|
borderRadius: '50%',
|
|
26
29
|
display: 'flex',
|
|
27
30
|
alignItems: 'center',
|
|
@@ -30,17 +33,18 @@ var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge)
|
|
|
30
33
|
};
|
|
31
34
|
var AddOptionAvatar = exports.AddOptionAvatar = function AddOptionAvatar(_ref) {
|
|
32
35
|
var isLozenge = _ref.isLozenge,
|
|
33
|
-
label = _ref.label
|
|
36
|
+
label = _ref.label,
|
|
37
|
+
isPendingAction = _ref.isPendingAction;
|
|
34
38
|
return (
|
|
35
39
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
36
40
|
(0, _react.jsx)("div", {
|
|
37
|
-
css: getEmailAvatarWrapperStyle(isLozenge)
|
|
41
|
+
css: getEmailAvatarWrapperStyle(isLozenge, isPendingAction)
|
|
38
42
|
}, (0, _react.jsx)(_email.default, {
|
|
39
43
|
testId: "add-option-avatar-email-icon",
|
|
40
44
|
label: label || '',
|
|
41
45
|
LEGACY_size: isLozenge ? 'small' : 'medium',
|
|
42
46
|
LEGACY_margin: "0 0 0 -2px",
|
|
43
|
-
color: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
|
|
47
|
+
color: isPendingAction && (0, _platformFeatureFlags.fg)('twcg-444-invite-usd-improvements-m2-gate') ? "var(--ds-text-warning, #A54800)" : "var(--ds-text-subtle, ".concat(_colors.N500, ")")
|
|
44
48
|
}))
|
|
45
49
|
);
|
|
46
50
|
};
|
|
@@ -60,7 +60,8 @@ var MultiValue = exports.MultiValue = /*#__PURE__*/function (_React$Component) {
|
|
|
60
60
|
if ((0, _utils.isEmail)(data)) {
|
|
61
61
|
// This element is a decorative icon and does not require a label
|
|
62
62
|
return (0, _react2.jsx)(_AddOptionAvatar.AddOptionAvatar, {
|
|
63
|
-
isLozenge: true
|
|
63
|
+
isLozenge: true,
|
|
64
|
+
isPendingAction: data.isPendingAction
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
if ((0, _utils.isGroup)(data)) {
|
|
@@ -104,7 +104,7 @@ var UserPickerWithoutAnalytics = exports.UserPickerWithoutAnalytics = /*#__PURE_
|
|
|
104
104
|
,
|
|
105
105
|
styles: (0, _styles.getStyles)(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid,
|
|
106
106
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
107
|
-
(0, _platformFeatureFlags.fg)('platform-component-visual-refresh')),
|
|
107
|
+
(0, _platformFeatureFlags.fg)('platform-component-visual-refresh'), false, (0, _platformFeatureFlags.fg)('jifjam_bulk_operations') ? this.props.height : undefined),
|
|
108
108
|
components: (0, _components.getComponents)(isMulti, anchor, showClearIndicator, (_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.components ? this.props.components : {}),
|
|
109
109
|
pickerProps: pickerProps
|
|
110
110
|
})))));
|
|
@@ -10,6 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
12
12
|
var _select = require("@atlaskit/select");
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _excluded = ["paddingTop", "paddingBottom", "paddingLeft", "paddingRight"],
|
|
14
15
|
_excluded2 = ["paddingTop", "paddingBottom", "position"];
|
|
15
16
|
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; }
|
|
@@ -17,7 +18,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
17
18
|
var BORDER_PADDING = exports.BORDER_PADDING = "var(--ds-space-075, 6px)";
|
|
18
19
|
var AVATAR_PADDING = exports.AVATAR_PADDING = 6;
|
|
19
20
|
var INDICATOR_WIDTH = exports.INDICATOR_WIDTH = 39;
|
|
20
|
-
var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles) {
|
|
21
|
+
var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles, height) {
|
|
21
22
|
var styles = {
|
|
22
23
|
menu: function menu(css, state) {
|
|
23
24
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
@@ -45,9 +46,9 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
|
|
|
45
46
|
backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? "var(--ds-background-danger, ".concat(_colors.R50, ")") : state.isFocused ? css[':hover'] ? "var(--ds-background-input, ".concat(css[':hover'].backgroundColor, ")") : "var(--ds-background-input, ".concat(_colors.N0, ")") : state.isDisabled ? "var(--ds-background-disabled, ".concat(_colors.N10, ")") : "var(--ds-background-input-hovered, ".concat(_colors.N30, ")")
|
|
46
47
|
}),
|
|
47
48
|
padding: 0,
|
|
48
|
-
minHeight: isCompact ? 'none' : 44,
|
|
49
|
+
minHeight: height && (0, _platformFeatureFlags.fg)('jifjam_bulk_operations') || isCompact ? 'none' : 44,
|
|
49
50
|
/* IE 11 needs to set height explicitly to be vertical align when being in not compact mode */
|
|
50
|
-
height: isCompact || isMulti ? '100%' : 44,
|
|
51
|
+
height: height && (0, _platformFeatureFlags.fg)('jifjam_bulk_operations') ? height : isCompact || isMulti ? '100%' : 44,
|
|
51
52
|
maxWidth: '100%'
|
|
52
53
|
});
|
|
53
54
|
},
|
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.4.
|
|
5
|
+
const packageVersion = "11.4.3";
|
|
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}$/;
|
|
@@ -7,12 +7,15 @@ import { N40, N500 } from '@atlaskit/theme/colors';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import React from 'react';
|
|
10
|
-
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
const getEmailAvatarWrapperStyle = (isLozenge, isPendingAction) => {
|
|
11
12
|
const padding = isLozenge ? `${"var(--ds-space-0, 0px)"}` : `${"var(--ds-space-050, 4px)"}`;
|
|
13
|
+
const backgroundColor = isPendingAction && fg('twcg-444-invite-usd-improvements-m2-gate') ? "var(--ds-background-warning, #FFF7D6)" : `var(--ds-background-neutral, ${N40})`;
|
|
12
14
|
return css({
|
|
13
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
|
-
padding
|
|
15
|
-
|
|
16
|
+
padding,
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
|
+
backgroundColor,
|
|
16
19
|
borderRadius: '50%',
|
|
17
20
|
display: 'flex',
|
|
18
21
|
alignItems: 'center',
|
|
@@ -21,18 +24,19 @@ const getEmailAvatarWrapperStyle = isLozenge => {
|
|
|
21
24
|
};
|
|
22
25
|
export const AddOptionAvatar = ({
|
|
23
26
|
isLozenge,
|
|
24
|
-
label
|
|
27
|
+
label,
|
|
28
|
+
isPendingAction
|
|
25
29
|
}) => {
|
|
26
30
|
return (
|
|
27
31
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
28
32
|
jsx("div", {
|
|
29
|
-
css: getEmailAvatarWrapperStyle(isLozenge)
|
|
33
|
+
css: getEmailAvatarWrapperStyle(isLozenge, isPendingAction)
|
|
30
34
|
}, jsx(EmailIcon, {
|
|
31
35
|
testId: "add-option-avatar-email-icon",
|
|
32
36
|
label: label || '',
|
|
33
37
|
LEGACY_size: isLozenge ? 'small' : 'medium',
|
|
34
38
|
LEGACY_margin: "0 0 0 -2px",
|
|
35
|
-
color: `var(--ds-text-subtle, ${N500})`
|
|
39
|
+
color: isPendingAction && fg('twcg-444-invite-usd-improvements-m2-gate') ? "var(--ds-text-warning, #A54800)" : `var(--ds-text-subtle, ${N500})`
|
|
36
40
|
}))
|
|
37
41
|
);
|
|
38
42
|
};
|
|
@@ -50,7 +50,8 @@ export class MultiValue extends React.Component {
|
|
|
50
50
|
if (isEmail(data)) {
|
|
51
51
|
// This element is a decorative icon and does not require a label
|
|
52
52
|
return jsx(AddOptionAvatar, {
|
|
53
|
-
isLozenge: true
|
|
53
|
+
isLozenge: true,
|
|
54
|
+
isPendingAction: data.isPendingAction
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
if (isGroup(data)) {
|
|
@@ -81,7 +81,7 @@ export class UserPickerWithoutAnalytics extends React.Component {
|
|
|
81
81
|
,
|
|
82
82
|
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid,
|
|
83
83
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
84
|
-
fg('platform-component-visual-refresh')),
|
|
84
|
+
fg('platform-component-visual-refresh'), false, fg('jifjam_bulk_operations') ? this.props.height : undefined),
|
|
85
85
|
components: getComponents(isMulti, anchor, showClearIndicator, (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.components ? this.props.components : {}),
|
|
86
86
|
pickerProps: pickerProps
|
|
87
87
|
})))));
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { B100, N0, N10, N20, N30, N100, R50, R400, N90 } from '@atlaskit/theme/colors';
|
|
2
2
|
import memoizeOne from 'memoize-one';
|
|
3
3
|
import { mergeStyles } from '@atlaskit/select';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
export const BORDER_PADDING = "var(--ds-space-075, 6px)";
|
|
5
6
|
export const AVATAR_PADDING = 6;
|
|
6
7
|
export const INDICATOR_WIDTH = 39;
|
|
7
|
-
export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles) => {
|
|
8
|
+
export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles, height) => {
|
|
8
9
|
let styles = {
|
|
9
10
|
menu: (css, state) => ({
|
|
10
11
|
...css,
|
|
@@ -32,9 +33,9 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles,
|
|
|
32
33
|
backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? `var(--ds-background-danger, ${R50})` : state.isFocused ? css[':hover'] ? `var(--ds-background-input, ${css[':hover'].backgroundColor})` : `var(--ds-background-input, ${N0})` : state.isDisabled ? `var(--ds-background-disabled, ${N10})` : `var(--ds-background-input-hovered, ${N30})`
|
|
33
34
|
},
|
|
34
35
|
padding: 0,
|
|
35
|
-
minHeight: isCompact ? 'none' : 44,
|
|
36
|
+
minHeight: height && fg('jifjam_bulk_operations') || isCompact ? 'none' : 44,
|
|
36
37
|
/* IE 11 needs to set height explicitly to be vertical align when being in not compact mode */
|
|
37
|
-
height: isCompact || isMulti ? '100%' : 44,
|
|
38
|
+
height: height && fg('jifjam_bulk_operations') ? height : isCompact || isMulti ? '100%' : 44,
|
|
38
39
|
maxWidth: '100%'
|
|
39
40
|
};
|
|
40
41
|
},
|
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.4.
|
|
8
|
+
var packageVersion = "11.4.3";
|
|
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}$/;
|
|
@@ -7,12 +7,15 @@ import { N40, N500 } from '@atlaskit/theme/colors';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import React from 'react';
|
|
10
|
-
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge, isPendingAction) {
|
|
11
12
|
var padding = isLozenge ? "var(--ds-space-0, 0px)" : "var(--ds-space-050, 4px)";
|
|
13
|
+
var backgroundColor = isPendingAction && fg('twcg-444-invite-usd-improvements-m2-gate') ? "var(--ds-background-warning, #FFF7D6)" : "var(--ds-background-neutral, ".concat(N40, ")");
|
|
12
14
|
return css({
|
|
13
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
16
|
padding: padding,
|
|
15
|
-
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
|
+
backgroundColor: backgroundColor,
|
|
16
19
|
borderRadius: '50%',
|
|
17
20
|
display: 'flex',
|
|
18
21
|
alignItems: 'center',
|
|
@@ -21,17 +24,18 @@ var getEmailAvatarWrapperStyle = function getEmailAvatarWrapperStyle(isLozenge)
|
|
|
21
24
|
};
|
|
22
25
|
export var AddOptionAvatar = function AddOptionAvatar(_ref) {
|
|
23
26
|
var isLozenge = _ref.isLozenge,
|
|
24
|
-
label = _ref.label
|
|
27
|
+
label = _ref.label,
|
|
28
|
+
isPendingAction = _ref.isPendingAction;
|
|
25
29
|
return (
|
|
26
30
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
27
31
|
jsx("div", {
|
|
28
|
-
css: getEmailAvatarWrapperStyle(isLozenge)
|
|
32
|
+
css: getEmailAvatarWrapperStyle(isLozenge, isPendingAction)
|
|
29
33
|
}, jsx(EmailIcon, {
|
|
30
34
|
testId: "add-option-avatar-email-icon",
|
|
31
35
|
label: label || '',
|
|
32
36
|
LEGACY_size: isLozenge ? 'small' : 'medium',
|
|
33
37
|
LEGACY_margin: "0 0 0 -2px",
|
|
34
|
-
color: "var(--ds-text-subtle, ".concat(N500, ")")
|
|
38
|
+
color: isPendingAction && fg('twcg-444-invite-usd-improvements-m2-gate') ? "var(--ds-text-warning, #A54800)" : "var(--ds-text-subtle, ".concat(N500, ")")
|
|
35
39
|
}))
|
|
36
40
|
);
|
|
37
41
|
};
|
|
@@ -55,7 +55,8 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
|
|
|
55
55
|
if (isEmail(data)) {
|
|
56
56
|
// This element is a decorative icon and does not require a label
|
|
57
57
|
return jsx(AddOptionAvatar, {
|
|
58
|
-
isLozenge: true
|
|
58
|
+
isLozenge: true,
|
|
59
|
+
isPendingAction: data.isPendingAction
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
if (isGroup(data)) {
|
|
@@ -95,7 +95,7 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
95
95
|
,
|
|
96
96
|
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, this.props.isInvalid,
|
|
97
97
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
98
|
-
fg('platform-component-visual-refresh')),
|
|
98
|
+
fg('platform-component-visual-refresh'), false, fg('jifjam_bulk_operations') ? this.props.height : undefined),
|
|
99
99
|
components: getComponents(isMulti, anchor, showClearIndicator, (_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.components ? this.props.components : {}),
|
|
100
100
|
pickerProps: pickerProps
|
|
101
101
|
})))));
|
|
@@ -7,10 +7,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { B100, N0, N10, N20, N30, N100, R50, R400, N90 } from '@atlaskit/theme/colors';
|
|
8
8
|
import memoizeOne from 'memoize-one';
|
|
9
9
|
import { mergeStyles } from '@atlaskit/select';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
export var BORDER_PADDING = "var(--ds-space-075, 6px)";
|
|
11
12
|
export var AVATAR_PADDING = 6;
|
|
12
13
|
export var INDICATOR_WIDTH = 39;
|
|
13
|
-
export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles) {
|
|
14
|
+
export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideStyles, isInvalid, isVisualRefresh, isPopupStyles, height) {
|
|
14
15
|
var styles = {
|
|
15
16
|
menu: function menu(css, state) {
|
|
16
17
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
@@ -38,9 +39,9 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
|
|
|
38
39
|
backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? "var(--ds-background-danger, ".concat(R50, ")") : state.isFocused ? css[':hover'] ? "var(--ds-background-input, ".concat(css[':hover'].backgroundColor, ")") : "var(--ds-background-input, ".concat(N0, ")") : state.isDisabled ? "var(--ds-background-disabled, ".concat(N10, ")") : "var(--ds-background-input-hovered, ".concat(N30, ")")
|
|
39
40
|
}),
|
|
40
41
|
padding: 0,
|
|
41
|
-
minHeight: isCompact ? 'none' : 44,
|
|
42
|
+
minHeight: height && fg('jifjam_bulk_operations') || isCompact ? 'none' : 44,
|
|
42
43
|
/* IE 11 needs to set height explicitly to be vertical align when being in not compact mode */
|
|
43
|
-
height: isCompact || isMulti ? '100%' : 44,
|
|
44
|
+
height: height && fg('jifjam_bulk_operations') ? height : isCompact || isMulti ? '100%' : 44,
|
|
44
45
|
maxWidth: '100%'
|
|
45
46
|
});
|
|
46
47
|
},
|