@atlaskit/user-picker 10.19.2 → 10.19.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 10.19.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#78018](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78018) [`036a9f353a72`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/036a9f353a72) - onFocus event added when openMenuOnClick is true
8
+
9
+ ## 10.19.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 10.19.2
4
16
 
5
17
  ### Patch Changes
@@ -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 = "10.19.2";
15
+ var packageVersion = "10.19.4";
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}$/;
@@ -232,18 +232,20 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
232
232
  }
233
233
  _this.startOptionsShownUfoExperience();
234
234
  (0, _utils.callCallback)(_this.props.onFocus, _this.getSessionId());
235
- _this.setState({
236
- menuIsOpen: true
237
- });
238
- if (!_this.props.isMulti && (0, _utils.isSingleValue)(value)) {
239
- var input = event.target;
235
+ if (!_this.isMenuOpenOnClickForSingleSelect) {
240
236
  _this.setState({
241
- inputValue: value.label
242
- }, function () {
243
- if (input instanceof HTMLInputElement) {
244
- input.select();
245
- }
237
+ menuIsOpen: true
246
238
  });
239
+ if (!_this.props.isMulti && (0, _utils.isSingleValue)(value)) {
240
+ var input = event.target;
241
+ _this.setState({
242
+ inputValue: value.label
243
+ }, function () {
244
+ if (input instanceof HTMLInputElement) {
245
+ input.select();
246
+ }
247
+ });
248
+ }
247
249
  }
248
250
  });
249
251
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "resetInputState", function () {
@@ -551,8 +553,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
551
553
  var menuOpenDeciderProps = _objectSpread({}, !this.isMenuOpenOnClickForSingleSelect && {
552
554
  menuIsOpen: menuIsOpen,
553
555
  blurInputOnSelect: !isMulti,
554
- openMenuOnFocus: true,
555
- onFocus: this.handleFocus
556
+ openMenuOnFocus: true
556
557
  });
557
558
  return /*#__PURE__*/_react.default.createElement(SelectComponent, (0, _extends2.default)({
558
559
  name: name,
@@ -600,6 +601,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
600
601
  inputId: inputId,
601
602
  onChange: this.handleChange,
602
603
  onMenuOpen: this.handleOpen,
604
+ onFocus: this.handleFocus,
603
605
  onBlur: this.handleBlur,
604
606
  onMenuClose: this.handleClose,
605
607
  onInputChange: this.handleInputChange,
@@ -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 = "10.19.2";
5
+ const packageVersion = "10.19.4";
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}$/;
@@ -221,18 +221,20 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
221
221
  }
222
222
  this.startOptionsShownUfoExperience();
223
223
  callCallback(this.props.onFocus, this.getSessionId());
224
- this.setState({
225
- menuIsOpen: true
226
- });
227
- if (!this.props.isMulti && isSingleValue(value)) {
228
- const input = event.target;
224
+ if (!this.isMenuOpenOnClickForSingleSelect) {
229
225
  this.setState({
230
- inputValue: value.label
231
- }, () => {
232
- if (input instanceof HTMLInputElement) {
233
- input.select();
234
- }
226
+ menuIsOpen: true
235
227
  });
228
+ if (!this.props.isMulti && isSingleValue(value)) {
229
+ const input = event.target;
230
+ this.setState({
231
+ inputValue: value.label
232
+ }, () => {
233
+ if (input instanceof HTMLInputElement) {
234
+ input.select();
235
+ }
236
+ });
237
+ }
236
238
  }
237
239
  });
238
240
  _defineProperty(this, "resetInputState", () => {
@@ -521,8 +523,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
521
523
  ...(!this.isMenuOpenOnClickForSingleSelect && {
522
524
  menuIsOpen,
523
525
  blurInputOnSelect: !isMulti,
524
- openMenuOnFocus: true,
525
- onFocus: this.handleFocus
526
+ openMenuOnFocus: true
526
527
  })
527
528
  };
528
529
  return /*#__PURE__*/React.createElement(SelectComponent, _extends({
@@ -569,6 +570,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
569
570
  inputId: inputId,
570
571
  onChange: this.handleChange,
571
572
  onMenuOpen: this.handleOpen,
573
+ onFocus: this.handleFocus,
572
574
  onBlur: this.handleBlur,
573
575
  onMenuClose: this.handleClose,
574
576
  onInputChange: this.handleInputChange,
@@ -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 = "10.19.2";
8
+ var packageVersion = "10.19.4";
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}$/;
@@ -225,18 +225,20 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
225
225
  }
226
226
  _this.startOptionsShownUfoExperience();
227
227
  callCallback(_this.props.onFocus, _this.getSessionId());
228
- _this.setState({
229
- menuIsOpen: true
230
- });
231
- if (!_this.props.isMulti && isSingleValue(value)) {
232
- var input = event.target;
228
+ if (!_this.isMenuOpenOnClickForSingleSelect) {
233
229
  _this.setState({
234
- inputValue: value.label
235
- }, function () {
236
- if (input instanceof HTMLInputElement) {
237
- input.select();
238
- }
230
+ menuIsOpen: true
239
231
  });
232
+ if (!_this.props.isMulti && isSingleValue(value)) {
233
+ var input = event.target;
234
+ _this.setState({
235
+ inputValue: value.label
236
+ }, function () {
237
+ if (input instanceof HTMLInputElement) {
238
+ input.select();
239
+ }
240
+ });
241
+ }
240
242
  }
241
243
  });
242
244
  _defineProperty(_assertThisInitialized(_this), "resetInputState", function () {
@@ -544,8 +546,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
544
546
  var menuOpenDeciderProps = _objectSpread({}, !this.isMenuOpenOnClickForSingleSelect && {
545
547
  menuIsOpen: menuIsOpen,
546
548
  blurInputOnSelect: !isMulti,
547
- openMenuOnFocus: true,
548
- onFocus: this.handleFocus
549
+ openMenuOnFocus: true
549
550
  });
550
551
  return /*#__PURE__*/React.createElement(SelectComponent, _extends({
551
552
  name: name,
@@ -593,6 +594,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
593
594
  inputId: inputId,
594
595
  onChange: this.handleChange,
595
596
  onMenuOpen: this.handleOpen,
597
+ onFocus: this.handleFocus,
596
598
  onBlur: this.handleBlur,
597
599
  onMenuClose: this.handleClose,
598
600
  onInputChange: this.handleInputChange,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "10.19.2",
3
+ "version": "10.19.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/"
@@ -49,12 +49,12 @@
49
49
  "@atlaskit/lozenge": "^11.6.0",
50
50
  "@atlaskit/platform-feature-flags": "^0.2.0",
51
51
  "@atlaskit/popper": "^5.5.0",
52
- "@atlaskit/primitives": "^3.0.0",
52
+ "@atlaskit/primitives": "^4.0.0",
53
53
  "@atlaskit/select": "^17.1.0",
54
54
  "@atlaskit/spinner": "^16.0.0",
55
55
  "@atlaskit/teams-avatar": "^1.0.0",
56
56
  "@atlaskit/theme": "^12.6.0",
57
- "@atlaskit/tokens": "^1.38.0",
57
+ "@atlaskit/tokens": "^1.39.0",
58
58
  "@atlaskit/tooltip": "^18.1.0",
59
59
  "@atlaskit/ufo": "^0.2.0",
60
60
  "@babel/runtime": "^7.0.0",