@atlaskit/user-picker 9.3.0 → 9.3.3

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 9.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`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
8
+
9
+ ## 9.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
14
+
15
+ ## 9.3.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [`fd025cbb820`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd025cbb820) - [ux] Fix input cursor position relative to the placeholder
20
+
3
21
  ## 9.3.0
4
22
 
5
23
  ### Minor 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 && !Array.isArray(value)) {
123
- (0, _utils.callCallback)(onSelection, value.data, _this.getSessionId());
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 /*#__PURE__*/_react.default.cloneElement(child, {
33
- sources: sources,
34
- sourcesLoading: sourcesLoading
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
 
@@ -39,7 +39,6 @@ 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 PLACEHOLDER_MARGIN = 2;
43
42
  var getStyles = (0, _memoizeOne.default)(function (width, isMulti, overrideStyles) {
44
43
  var styles = {
45
44
  menu: function menu(css, state) {
@@ -172,7 +171,6 @@ var getStyles = (0, _memoizeOne.default)(function (width, isMulti, overrideStyle
172
171
  /* Necessary to make input height and tag height the same. */
173
172
  marginBottom: TAG_MARGIN_WIDTH,
174
173
  marginTop: TAG_MARGIN_WIDTH,
175
- marginLeft: PLACEHOLDER_MARGIN,
176
174
 
177
175
  /* Padding top and bottom of 2 is set by default. */
178
176
  paddingTop: 0,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.3.0",
3
+ "version": "9.3.3",
4
4
  "sideEffects": false
5
5
  }
@@ -96,8 +96,8 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
96
96
 
97
97
  switch (action) {
98
98
  case 'select-option':
99
- if (value && !Array.isArray(value)) {
100
- callCallback(onSelection, value.data, this.getSessionId());
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 => /*#__PURE__*/React.cloneElement(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
  }));
@@ -9,7 +9,6 @@ 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
- const PLACEHOLDER_MARGIN = 2;
13
12
  export const getStyles = memoizeOne((width, isMulti, overrideStyles) => {
14
13
  let styles = {
15
14
  menu: (css, state) => ({ ...css,
@@ -130,7 +129,6 @@ export const getStyles = memoizeOne((width, isMulti, overrideStyles) => {
130
129
  /* Necessary to make input height and tag height the same. */
131
130
  marginBottom: TAG_MARGIN_WIDTH,
132
131
  marginTop: TAG_MARGIN_WIDTH,
133
- marginLeft: PLACEHOLDER_MARGIN,
134
132
 
135
133
  /* Padding top and bottom of 2 is set by default. */
136
134
  paddingTop: 0,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.3.0",
3
+ "version": "9.3.3",
4
4
  "sideEffects": false
5
5
  }
@@ -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 && !Array.isArray(value)) {
106
- callCallback(onSelection, value.data, _this.getSessionId());
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 /*#__PURE__*/React.cloneElement(child, {
22
- sources: sources,
23
- sourcesLoading: sourcesLoading
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
  };
@@ -19,7 +19,6 @@ 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
- var PLACEHOLDER_MARGIN = 2;
23
22
  export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
24
23
  var styles = {
25
24
  menu: function menu(css, state) {
@@ -155,7 +154,6 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
155
154
  /* Necessary to make input height and tag height the same. */
156
155
  marginBottom: TAG_MARGIN_WIDTH,
157
156
  marginTop: TAG_MARGIN_WIDTH,
158
- marginLeft: PLACEHOLDER_MARGIN,
159
157
 
160
158
  /* Padding top and bottom of 2 is set by default. */
161
159
  paddingTop: 0,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.3.0",
3
+ "version": "9.3.3",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "9.3.0",
3
+ "version": "9.3.3",
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.4.0",
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.2.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. It is a report generated by [API Extractor](https://api-extractor.com/).
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';