@atlaskit/user-picker 10.11.0 → 10.11.2
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/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/BaseUserPicker.js +40 -1
- package/dist/cjs/components/styles.js +2 -1
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/BaseUserPicker.js +31 -1
- package/dist/es2019/components/styles.js +2 -1
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/BaseUserPicker.js +40 -1
- package/dist/esm/components/styles.js +2 -1
- package/dist/types/components/BaseUserPicker.d.ts +2 -0
- package/dist/types-ts4.5/components/BaseUserPicker.d.ts +2 -0
- package/package.json +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 10.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41424) [`3a85e7b6eb1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a85e7b6eb1) - [ux] Added z-index of 400 to menu for user picker as per design system popup guidelines
|
|
8
|
+
|
|
9
|
+
## 10.11.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#41252](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41252) [`8aa48820027`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8aa48820027) - Support aria-activedescendant on select input
|
|
14
|
+
|
|
3
15
|
## 10.11.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
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 = "10.11.
|
|
15
|
+
var packageVersion = "10.11.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,7 @@ var _batch = require("./batch");
|
|
|
24
24
|
var _i18n = require("./i18n");
|
|
25
25
|
var _utils = require("./utils");
|
|
26
26
|
var _ufoExperiences = require("../util/ufoExperiences");
|
|
27
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
28
|
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; }
|
|
28
29
|
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; }
|
|
29
30
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
@@ -34,6 +35,13 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
34
35
|
var loadingMessage = function loadingMessage() {
|
|
35
36
|
return null;
|
|
36
37
|
};
|
|
38
|
+
var observerOptions = {
|
|
39
|
+
subtree: true,
|
|
40
|
+
attributes: true,
|
|
41
|
+
attributeFilter: ['class']
|
|
42
|
+
};
|
|
43
|
+
var classNamePrefix = 'fabric-user-picker';
|
|
44
|
+
var optionFocusedClass = "".concat(classNamePrefix, "__option--is-focused");
|
|
37
45
|
var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
38
46
|
(0, _inherits2.default)(BaseUserPickerWithoutAnalytics, _React$Component);
|
|
39
47
|
var _super = _createSuper(BaseUserPickerWithoutAnalytics);
|
|
@@ -295,6 +303,27 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
295
303
|
_this.journeyId = _this.getSessionId();
|
|
296
304
|
_this.fireEvent(_analytics.focusEvent);
|
|
297
305
|
});
|
|
306
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusedOptionObserverCallback", function (mutationList) {
|
|
307
|
+
var _iterator2 = _createForOfIteratorHelper(mutationList),
|
|
308
|
+
_step2;
|
|
309
|
+
try {
|
|
310
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
311
|
+
var mutation = _step2.value;
|
|
312
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
|
|
313
|
+
var target = mutation.target;
|
|
314
|
+
if (target.classList.contains(optionFocusedClass)) {
|
|
315
|
+
_this.selectRef.select.inputRef.setAttribute('aria-activedescendant', target.id);
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
} catch (err) {
|
|
321
|
+
_iterator2.e(err);
|
|
322
|
+
} finally {
|
|
323
|
+
_iterator2.f();
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusedOptionObserver", new MutationObserver(_this.focusedOptionObserverCallback));
|
|
298
327
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeyDown", function (event) {
|
|
299
328
|
// Escape
|
|
300
329
|
if (event.keyCode === 27) {
|
|
@@ -393,6 +422,12 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
393
422
|
count = _this$state2.count,
|
|
394
423
|
inputValue = _this$state2.inputValue;
|
|
395
424
|
if (menuIsOpen && !prevState.menuIsOpen) {
|
|
425
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
426
|
+
var _menuRef$children$;
|
|
427
|
+
var menuRef = this.selectRef.select.menuListRef;
|
|
428
|
+
((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && this.selectRef.select.inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
|
|
429
|
+
this.focusedOptionObserver.observe(menuRef, observerOptions);
|
|
430
|
+
}
|
|
396
431
|
if (!this.session) {
|
|
397
432
|
// session should have been created onFocus
|
|
398
433
|
this.startSession();
|
|
@@ -406,6 +441,10 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
406
441
|
if (!menuIsOpen && prevState.menuIsOpen && this.session) {
|
|
407
442
|
this.fireEvent(_analytics.cancelEvent, prevState);
|
|
408
443
|
this.session = undefined;
|
|
444
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
445
|
+
this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
|
|
446
|
+
this.focusedOptionObserver.disconnect();
|
|
447
|
+
}
|
|
409
448
|
}
|
|
410
449
|
if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
|
|
411
450
|
this.fireEvent(_analytics.searchedEvent);
|
|
@@ -490,7 +529,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
490
529
|
menuPlacement: "auto",
|
|
491
530
|
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _i18n.messages.placeholder),
|
|
492
531
|
addMoreMessage: addMoreMessage,
|
|
493
|
-
classNamePrefix:
|
|
532
|
+
classNamePrefix: classNamePrefix,
|
|
494
533
|
hoveringClearIndicator: hoveringClearIndicator,
|
|
495
534
|
appearance: appearance,
|
|
496
535
|
isClearable: isClearable,
|
|
@@ -22,7 +22,8 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
|
|
|
22
22
|
menu: function menu(css, state) {
|
|
23
23
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
24
24
|
width: width,
|
|
25
|
-
minWidth: state.selectProps.menuMinWidth
|
|
25
|
+
minWidth: state.selectProps.menuMinWidth,
|
|
26
|
+
zIndex: '400'
|
|
26
27
|
});
|
|
27
28
|
},
|
|
28
29
|
menuList: function menuList(css) {
|
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 = "10.11.
|
|
5
|
+
const packageVersion = "10.11.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}$/;
|
|
@@ -11,7 +11,15 @@ import { batchByKey } from './batch';
|
|
|
11
11
|
import { messages } from './i18n';
|
|
12
12
|
import { callCallback, extractOptionValue, getOptions, isIterable, isPopupUserPickerByComponent, isDefaultValuePopulated, isSingleValue, optionToSelectableOptions } from './utils';
|
|
13
13
|
import { userPickerOptionsShownUfoExperience } from '../util/ufoExperiences';
|
|
14
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
const loadingMessage = () => null;
|
|
16
|
+
const observerOptions = {
|
|
17
|
+
subtree: true,
|
|
18
|
+
attributes: true,
|
|
19
|
+
attributeFilter: ['class']
|
|
20
|
+
};
|
|
21
|
+
const classNamePrefix = 'fabric-user-picker';
|
|
22
|
+
const optionFocusedClass = `${classNamePrefix}__option--is-focused`;
|
|
15
23
|
export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
16
24
|
static getDerivedStateFromProps(nextProps, prevState) {
|
|
17
25
|
const derivedState = {};
|
|
@@ -284,6 +292,18 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
284
292
|
this.journeyId = this.getSessionId();
|
|
285
293
|
this.fireEvent(focusEvent);
|
|
286
294
|
});
|
|
295
|
+
_defineProperty(this, "focusedOptionObserverCallback", mutationList => {
|
|
296
|
+
for (const mutation of mutationList) {
|
|
297
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
|
|
298
|
+
const target = mutation.target;
|
|
299
|
+
if (target.classList.contains(optionFocusedClass)) {
|
|
300
|
+
this.selectRef.select.inputRef.setAttribute('aria-activedescendant', target.id);
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
_defineProperty(this, "focusedOptionObserver", new MutationObserver(this.focusedOptionObserverCallback));
|
|
287
307
|
_defineProperty(this, "handleKeyDown", event => {
|
|
288
308
|
// Escape
|
|
289
309
|
if (event.keyCode === 27) {
|
|
@@ -376,6 +396,12 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
376
396
|
inputValue
|
|
377
397
|
} = this.state;
|
|
378
398
|
if (menuIsOpen && !prevState.menuIsOpen) {
|
|
399
|
+
if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
400
|
+
var _menuRef$children$;
|
|
401
|
+
const menuRef = this.selectRef.select.menuListRef;
|
|
402
|
+
((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && this.selectRef.select.inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
|
|
403
|
+
this.focusedOptionObserver.observe(menuRef, observerOptions);
|
|
404
|
+
}
|
|
379
405
|
if (!this.session) {
|
|
380
406
|
// session should have been created onFocus
|
|
381
407
|
this.startSession();
|
|
@@ -389,6 +415,10 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
389
415
|
if (!menuIsOpen && prevState.menuIsOpen && this.session) {
|
|
390
416
|
this.fireEvent(cancelEvent, prevState);
|
|
391
417
|
this.session = undefined;
|
|
418
|
+
if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
419
|
+
this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
|
|
420
|
+
this.focusedOptionObserver.disconnect();
|
|
421
|
+
}
|
|
392
422
|
}
|
|
393
423
|
if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
|
|
394
424
|
this.fireEvent(searchedEvent);
|
|
@@ -472,7 +502,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
472
502
|
menuPlacement: "auto",
|
|
473
503
|
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : /*#__PURE__*/React.createElement(FormattedMessage, messages.placeholder),
|
|
474
504
|
addMoreMessage: addMoreMessage,
|
|
475
|
-
classNamePrefix:
|
|
505
|
+
classNamePrefix: classNamePrefix,
|
|
476
506
|
hoveringClearIndicator: hoveringClearIndicator,
|
|
477
507
|
appearance: appearance,
|
|
478
508
|
isClearable: isClearable,
|
|
@@ -9,7 +9,8 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles)
|
|
|
9
9
|
menu: (css, state) => ({
|
|
10
10
|
...css,
|
|
11
11
|
width,
|
|
12
|
-
minWidth: state.selectProps.menuMinWidth
|
|
12
|
+
minWidth: state.selectProps.menuMinWidth,
|
|
13
|
+
zIndex: '400'
|
|
13
14
|
}),
|
|
14
15
|
menuList: css => ({
|
|
15
16
|
...css,
|
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 = "10.11.
|
|
8
|
+
var packageVersion = "10.11.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,9 +24,17 @@ import { batchByKey } from './batch';
|
|
|
24
24
|
import { messages } from './i18n';
|
|
25
25
|
import { callCallback, extractOptionValue, getOptions, isIterable, isPopupUserPickerByComponent, isDefaultValuePopulated, isSingleValue, optionToSelectableOptions } from './utils';
|
|
26
26
|
import { userPickerOptionsShownUfoExperience } from '../util/ufoExperiences';
|
|
27
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
27
28
|
var loadingMessage = function loadingMessage() {
|
|
28
29
|
return null;
|
|
29
30
|
};
|
|
31
|
+
var observerOptions = {
|
|
32
|
+
subtree: true,
|
|
33
|
+
attributes: true,
|
|
34
|
+
attributeFilter: ['class']
|
|
35
|
+
};
|
|
36
|
+
var classNamePrefix = 'fabric-user-picker';
|
|
37
|
+
var optionFocusedClass = "".concat(classNamePrefix, "__option--is-focused");
|
|
30
38
|
export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
31
39
|
_inherits(BaseUserPickerWithoutAnalytics, _React$Component);
|
|
32
40
|
var _super = _createSuper(BaseUserPickerWithoutAnalytics);
|
|
@@ -288,6 +296,27 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
288
296
|
_this.journeyId = _this.getSessionId();
|
|
289
297
|
_this.fireEvent(focusEvent);
|
|
290
298
|
});
|
|
299
|
+
_defineProperty(_assertThisInitialized(_this), "focusedOptionObserverCallback", function (mutationList) {
|
|
300
|
+
var _iterator2 = _createForOfIteratorHelper(mutationList),
|
|
301
|
+
_step2;
|
|
302
|
+
try {
|
|
303
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
304
|
+
var mutation = _step2.value;
|
|
305
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
|
|
306
|
+
var target = mutation.target;
|
|
307
|
+
if (target.classList.contains(optionFocusedClass)) {
|
|
308
|
+
_this.selectRef.select.inputRef.setAttribute('aria-activedescendant', target.id);
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
} catch (err) {
|
|
314
|
+
_iterator2.e(err);
|
|
315
|
+
} finally {
|
|
316
|
+
_iterator2.f();
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
_defineProperty(_assertThisInitialized(_this), "focusedOptionObserver", new MutationObserver(_this.focusedOptionObserverCallback));
|
|
291
320
|
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
|
|
292
321
|
// Escape
|
|
293
322
|
if (event.keyCode === 27) {
|
|
@@ -386,6 +415,12 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
386
415
|
count = _this$state2.count,
|
|
387
416
|
inputValue = _this$state2.inputValue;
|
|
388
417
|
if (menuIsOpen && !prevState.menuIsOpen) {
|
|
418
|
+
if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
419
|
+
var _menuRef$children$;
|
|
420
|
+
var menuRef = this.selectRef.select.menuListRef;
|
|
421
|
+
((_menuRef$children$ = menuRef.children[0]) === null || _menuRef$children$ === void 0 ? void 0 : _menuRef$children$.classList.contains(optionFocusedClass)) && this.selectRef.select.inputRef.setAttribute('aria-activedescendant', menuRef.children[0].id);
|
|
422
|
+
this.focusedOptionObserver.observe(menuRef, observerOptions);
|
|
423
|
+
}
|
|
389
424
|
if (!this.session) {
|
|
390
425
|
// session should have been created onFocus
|
|
391
426
|
this.startSession();
|
|
@@ -399,6 +434,10 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
399
434
|
if (!menuIsOpen && prevState.menuIsOpen && this.session) {
|
|
400
435
|
this.fireEvent(cancelEvent, prevState);
|
|
401
436
|
this.session = undefined;
|
|
437
|
+
if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
438
|
+
this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
|
|
439
|
+
this.focusedOptionObserver.disconnect();
|
|
440
|
+
}
|
|
402
441
|
}
|
|
403
442
|
if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
|
|
404
443
|
this.fireEvent(searchedEvent);
|
|
@@ -483,7 +522,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
483
522
|
menuPlacement: "auto",
|
|
484
523
|
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : /*#__PURE__*/React.createElement(FormattedMessage, messages.placeholder),
|
|
485
524
|
addMoreMessage: addMoreMessage,
|
|
486
|
-
classNamePrefix:
|
|
525
|
+
classNamePrefix: classNamePrefix,
|
|
487
526
|
hoveringClearIndicator: hoveringClearIndicator,
|
|
488
527
|
appearance: appearance,
|
|
489
528
|
isClearable: isClearable,
|
|
@@ -15,7 +15,8 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
|
|
|
15
15
|
menu: function menu(css, state) {
|
|
16
16
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
17
17
|
width: width,
|
|
18
|
-
minWidth: state.selectProps.menuMinWidth
|
|
18
|
+
minWidth: state.selectProps.menuMinWidth,
|
|
19
|
+
zIndex: '400'
|
|
19
20
|
});
|
|
20
21
|
},
|
|
21
22
|
menuList: function menuList(css) {
|
|
@@ -47,6 +47,8 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
47
47
|
private fireEvent;
|
|
48
48
|
private startSession;
|
|
49
49
|
componentDidMount(): void;
|
|
50
|
+
private focusedOptionObserverCallback;
|
|
51
|
+
private focusedOptionObserver;
|
|
50
52
|
componentDidUpdate(_: UserPickerProps, prevState: UserPickerState): void;
|
|
51
53
|
private handleKeyDown;
|
|
52
54
|
handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
|
|
@@ -47,6 +47,8 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
47
47
|
private fireEvent;
|
|
48
48
|
private startSession;
|
|
49
49
|
componentDidMount(): void;
|
|
50
|
+
private focusedOptionObserverCallback;
|
|
51
|
+
private focusedOptionObserver;
|
|
50
52
|
componentDidUpdate(_: UserPickerProps, prevState: UserPickerState): void;
|
|
51
53
|
private handleKeyDown;
|
|
52
54
|
handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "10.11.
|
|
3
|
+
"version": "10.11.2",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,15 +35,16 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
38
|
-
"@atlaskit/avatar": "^21.
|
|
38
|
+
"@atlaskit/avatar": "^21.4.0",
|
|
39
39
|
"@atlaskit/icon": "^21.12.0",
|
|
40
40
|
"@atlaskit/logo": "^13.14.0",
|
|
41
41
|
"@atlaskit/lozenge": "^11.4.0",
|
|
42
|
+
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
42
43
|
"@atlaskit/popper": "^5.5.0",
|
|
43
44
|
"@atlaskit/select": "^16.7.0",
|
|
44
45
|
"@atlaskit/spinner": "^15.6.0",
|
|
45
46
|
"@atlaskit/theme": "^12.6.0",
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
47
|
+
"@atlaskit/tokens": "^1.26.0",
|
|
47
48
|
"@atlaskit/tooltip": "^17.8.0",
|
|
48
49
|
"@atlaskit/ufo": "^0.2.0",
|
|
49
50
|
"@babel/runtime": "^7.0.0",
|
|
@@ -87,5 +88,10 @@
|
|
|
87
88
|
"fabric",
|
|
88
89
|
"ui"
|
|
89
90
|
],
|
|
91
|
+
"platform-feature-flags": {
|
|
92
|
+
"platform.design-system-team.select-aria-activedescendant_psxzq": {
|
|
93
|
+
"type": "boolean"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
90
96
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
91
97
|
}
|