@atlaskit/user-picker 9.3.1 → 9.3.4
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 +18 -0
- package/dist/cjs/components/BaseUserPicker.js +2 -2
- package/dist/cjs/components/ExternalUserSourcesContainer.js +8 -4
- package/dist/cjs/components/UserPicker.js +1 -1
- package/dist/cjs/components/styles.js +1 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/BaseUserPicker.js +2 -2
- package/dist/es2019/components/ExternalUserSourcesContainer.js +4 -1
- package/dist/es2019/components/UserPicker.js +1 -1
- package/dist/es2019/components/styles.js +1 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/BaseUserPicker.js +2 -2
- package/dist/esm/components/ExternalUserSourcesContainer.js +8 -4
- package/dist/esm/components/UserPicker.js +1 -1
- package/dist/esm/components/styles.js +1 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/components/styles.d.ts +1 -1
- package/package.json +3 -3
- package/report.api.md +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 9.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dbff164b600`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dbff164b600) - [ux] Fix for appearance=compact not being applied correctly to user pickers
|
|
8
|
+
|
|
9
|
+
## 9.3.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`2c7609cef36`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2c7609cef36) - onSelection prop is now also called for user pickers where isMulti=true. Previously onSelection was only called for user picker where isMulti was false
|
|
14
|
+
|
|
15
|
+
## 9.3.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
20
|
+
|
|
3
21
|
## 9.3.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -119,8 +119,8 @@ var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
|
119
119
|
|
|
120
120
|
switch (action) {
|
|
121
121
|
case 'select-option':
|
|
122
|
-
if (value
|
|
123
|
-
(0, _utils.callCallback)(onSelection, value
|
|
122
|
+
if (value) {
|
|
123
|
+
(0, _utils.callCallback)(onSelection, (0, _utils.extractOptionValue)(value), _this.getSessionId());
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
_this.fireEvent(_analytics.selectEvent, isMulti ? option : value);
|
|
@@ -29,10 +29,14 @@ var ExternalUserSourcesContainer = function ExternalUserSourcesContainer(_ref) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
return _react.default.Children.map(children, function (child) {
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
return (
|
|
33
|
+
/*#__PURE__*/
|
|
34
|
+
// @ts-expect-error
|
|
35
|
+
_react.default.cloneElement(child, {
|
|
36
|
+
sources: sources,
|
|
37
|
+
sourcesLoading: sourcesLoading
|
|
38
|
+
})
|
|
39
|
+
);
|
|
36
40
|
});
|
|
37
41
|
};
|
|
38
42
|
|
|
@@ -125,7 +125,7 @@ var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
|
125
125
|
}, /*#__PURE__*/_react.default.createElement(_BaseUserPicker.BaseUserPickerWithoutAnalytics, (0, _extends2.default)({}, this.props, {
|
|
126
126
|
width: width,
|
|
127
127
|
SelectComponent: SelectComponent,
|
|
128
|
-
styles: (0, _styles.getStyles)(width, isMulti, this.props.styles),
|
|
128
|
+
styles: (0, _styles.getStyles)(width, isMulti, this.props.appearance === 'compact', this.props.styles),
|
|
129
129
|
components: (0, _components.getComponents)(isMulti, anchor),
|
|
130
130
|
pickerProps: pickerProps
|
|
131
131
|
})))));
|
|
@@ -39,7 +39,7 @@ var INDICATOR_WIDTH = 39;
|
|
|
39
39
|
exports.INDICATOR_WIDTH = INDICATOR_WIDTH;
|
|
40
40
|
var TOTAL_PADDING_TAG_TO_CONTAINER = 10;
|
|
41
41
|
var TAG_MARGIN_WIDTH = 4;
|
|
42
|
-
var getStyles = (0, _memoizeOne.default)(function (width, isMulti, overrideStyles) {
|
|
42
|
+
var getStyles = (0, _memoizeOne.default)(function (width, isMulti, isCompact, overrideStyles) {
|
|
43
43
|
var styles = {
|
|
44
44
|
menu: function menu(css, state) {
|
|
45
45
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
@@ -48,7 +48,6 @@ var getStyles = (0, _memoizeOne.default)(function (width, isMulti, overrideStyle
|
|
|
48
48
|
});
|
|
49
49
|
},
|
|
50
50
|
control: function control(css, state) {
|
|
51
|
-
var isCompact = state.selectProps.appearance === 'compact';
|
|
52
51
|
var isMulti = state.selectProps.isMulti;
|
|
53
52
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
54
53
|
width: width,
|
|
@@ -96,7 +95,6 @@ var getStyles = (0, _memoizeOne.default)(function (width, isMulti, overrideStyle
|
|
|
96
95
|
paddingBottom = _ref2.paddingBottom,
|
|
97
96
|
position = _ref2.position,
|
|
98
97
|
css = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
99
|
-
var isCompact = state.selectProps.appearance === 'compact';
|
|
100
98
|
var isMulti = state.selectProps.isMulti;
|
|
101
99
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
102
100
|
paddingTop: isCompact ? 0 : TOTAL_PADDING_TAG_TO_CONTAINER - TAG_MARGIN_WIDTH,
|
package/dist/cjs/version.json
CHANGED
|
@@ -96,8 +96,8 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
96
96
|
|
|
97
97
|
switch (action) {
|
|
98
98
|
case 'select-option':
|
|
99
|
-
if (value
|
|
100
|
-
callCallback(onSelection, value
|
|
99
|
+
if (value) {
|
|
100
|
+
callCallback(onSelection, extractOptionValue(value), this.getSessionId());
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
this.fireEvent(selectEvent, isMulti ? option : value);
|
|
@@ -18,7 +18,10 @@ export const ExternalUserSourcesContainer = ({
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
return React.Children.map(children, child =>
|
|
21
|
+
return React.Children.map(children, child =>
|
|
22
|
+
/*#__PURE__*/
|
|
23
|
+
// @ts-expect-error
|
|
24
|
+
React.cloneElement(child, {
|
|
22
25
|
sources,
|
|
23
26
|
sourcesLoading
|
|
24
27
|
}));
|
|
@@ -66,7 +66,7 @@ export class UserPickerWithoutAnalytics extends React.Component {
|
|
|
66
66
|
}, /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
|
|
67
67
|
width: width,
|
|
68
68
|
SelectComponent: SelectComponent,
|
|
69
|
-
styles: getStyles(width, isMulti, this.props.styles),
|
|
69
|
+
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles),
|
|
70
70
|
components: getComponents(isMulti, anchor),
|
|
71
71
|
pickerProps: pickerProps
|
|
72
72
|
})))));
|
|
@@ -9,14 +9,13 @@ export const AVATAR_PADDING = 6;
|
|
|
9
9
|
export const INDICATOR_WIDTH = 39;
|
|
10
10
|
const TOTAL_PADDING_TAG_TO_CONTAINER = 10;
|
|
11
11
|
const TAG_MARGIN_WIDTH = 4;
|
|
12
|
-
export const getStyles = memoizeOne((width, isMulti, overrideStyles) => {
|
|
12
|
+
export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles) => {
|
|
13
13
|
let styles = {
|
|
14
14
|
menu: (css, state) => ({ ...css,
|
|
15
15
|
width,
|
|
16
16
|
minWidth: state.selectProps.menuMinWidth
|
|
17
17
|
}),
|
|
18
18
|
control: (css, state) => {
|
|
19
|
-
const isCompact = state.selectProps.appearance === 'compact';
|
|
20
19
|
const isMulti = state.selectProps.isMulti;
|
|
21
20
|
return { ...css,
|
|
22
21
|
width,
|
|
@@ -62,7 +61,6 @@ export const getStyles = memoizeOne((width, isMulti, overrideStyles) => {
|
|
|
62
61
|
position,
|
|
63
62
|
...css
|
|
64
63
|
}, state) => {
|
|
65
|
-
const isCompact = state.selectProps.appearance === 'compact';
|
|
66
64
|
const isMulti = state.selectProps.isMulti;
|
|
67
65
|
return { ...css,
|
|
68
66
|
paddingTop: isCompact ? 0 : TOTAL_PADDING_TAG_TO_CONTAINER - TAG_MARGIN_WIDTH,
|
package/dist/es2019/version.json
CHANGED
|
@@ -102,8 +102,8 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
102
102
|
|
|
103
103
|
switch (action) {
|
|
104
104
|
case 'select-option':
|
|
105
|
-
if (value
|
|
106
|
-
callCallback(onSelection, value
|
|
105
|
+
if (value) {
|
|
106
|
+
callCallback(onSelection, extractOptionValue(value), _this.getSessionId());
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
_this.fireEvent(selectEvent, isMulti ? option : value);
|
|
@@ -18,9 +18,13 @@ export var ExternalUserSourcesContainer = function ExternalUserSourcesContainer(
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
return React.Children.map(children, function (child) {
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
return (
|
|
22
|
+
/*#__PURE__*/
|
|
23
|
+
// @ts-expect-error
|
|
24
|
+
React.cloneElement(child, {
|
|
25
|
+
sources: sources,
|
|
26
|
+
sourcesLoading: sourcesLoading
|
|
27
|
+
})
|
|
28
|
+
);
|
|
25
29
|
});
|
|
26
30
|
};
|
|
@@ -89,7 +89,7 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
89
89
|
}, /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
|
|
90
90
|
width: width,
|
|
91
91
|
SelectComponent: SelectComponent,
|
|
92
|
-
styles: getStyles(width, isMulti, this.props.styles),
|
|
92
|
+
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles),
|
|
93
93
|
components: getComponents(isMulti, anchor),
|
|
94
94
|
pickerProps: pickerProps
|
|
95
95
|
})))));
|
|
@@ -19,7 +19,7 @@ export var AVATAR_PADDING = 6;
|
|
|
19
19
|
export var INDICATOR_WIDTH = 39;
|
|
20
20
|
var TOTAL_PADDING_TAG_TO_CONTAINER = 10;
|
|
21
21
|
var TAG_MARGIN_WIDTH = 4;
|
|
22
|
-
export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
22
|
+
export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideStyles) {
|
|
23
23
|
var styles = {
|
|
24
24
|
menu: function menu(css, state) {
|
|
25
25
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
@@ -28,7 +28,6 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
|
28
28
|
});
|
|
29
29
|
},
|
|
30
30
|
control: function control(css, state) {
|
|
31
|
-
var isCompact = state.selectProps.appearance === 'compact';
|
|
32
31
|
var isMulti = state.selectProps.isMulti;
|
|
33
32
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
34
33
|
width: width,
|
|
@@ -78,7 +77,6 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
|
78
77
|
position = _ref2.position,
|
|
79
78
|
css = _objectWithoutProperties(_ref2, _excluded2);
|
|
80
79
|
|
|
81
|
-
var isCompact = state.selectProps.appearance === 'compact';
|
|
82
80
|
var isMulti = state.selectProps.isMulti;
|
|
83
81
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
84
82
|
paddingTop: isCompact ? 0 : TOTAL_PADDING_TAG_TO_CONTAINER - TAG_MARGIN_WIDTH,
|
package/dist/esm/version.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const BORDER_PADDING = 6;
|
|
2
2
|
export declare const AVATAR_PADDING = 6;
|
|
3
3
|
export declare const INDICATOR_WIDTH = 39;
|
|
4
|
-
export declare const getStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean | undefined, overrideStyles?: Partial<import("react-select").Styles<import("@atlaskit/select").OptionType, false, import("@atlaskit/select").GroupType<import("@atlaskit/select").OptionType>>> | undefined) => Partial<import("react-select").Styles<import("@atlaskit/select").OptionType, false, import("@atlaskit/select").GroupType<import("@atlaskit/select").OptionType>>> | {
|
|
4
|
+
export declare const getStyles: import("memoize-one").MemoizedFn<(width: string | number, isMulti?: boolean | undefined, isCompact?: boolean | undefined, overrideStyles?: Partial<import("react-select").Styles<import("@atlaskit/select").OptionType, false, import("@atlaskit/select").GroupType<import("@atlaskit/select").OptionType>>> | undefined) => Partial<import("react-select").Styles<import("@atlaskit/select").OptionType, false, import("@atlaskit/select").GroupType<import("@atlaskit/select").OptionType>>> | {
|
|
5
5
|
menu: (css: any, state: any) => any;
|
|
6
6
|
control: (css: any, state: any) => any;
|
|
7
7
|
clearIndicator: ({ paddingTop, paddingBottom, paddingLeft, paddingRight, ...css }: any) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.4",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/logo": "^13.8.0",
|
|
33
33
|
"@atlaskit/lozenge": "^11.0.0",
|
|
34
34
|
"@atlaskit/popper": "^5.0.0",
|
|
35
|
-
"@atlaskit/select": "^15.
|
|
35
|
+
"@atlaskit/select": "^15.6.0",
|
|
36
36
|
"@atlaskit/spinner": "^15.1.4",
|
|
37
37
|
"@atlaskit/theme": "^12.1.0",
|
|
38
38
|
"@atlaskit/tokens": "^0.10.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"faker": "^4.1.0",
|
|
74
74
|
"mock-apollo-client": "^0.1.0",
|
|
75
75
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
76
|
-
"typescript": "4.
|
|
76
|
+
"typescript": "4.3.5"
|
|
77
77
|
},
|
|
78
78
|
"techstack": {
|
|
79
79
|
"@repo/internal": {
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/user-picker"
|
|
1
|
+
## API Report File for "@atlaskit/user-picker".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
8
|
import { Placement } from '@atlaskit/popper';
|