@atlaskit/user-picker 10.12.3 → 10.12.5
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 +61 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/BaseUserPicker.js +6 -3
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/BaseUserPicker.js +6 -3
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/BaseUserPicker.js +6 -3
- package/package.json +3 -3
- package/tmp/api-report-tmp.d.ts +0 -450
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 10.12.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147) [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) - Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
|
|
8
|
+
|
|
9
|
+
## 10.12.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#58426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58426) [`24ada9dfb10d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/24ada9dfb10d) - Add defensive code for MutationObserver in node to avoid ssr error
|
|
14
|
+
|
|
3
15
|
## 10.12.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.confluence.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"composite": true,
|
|
7
|
+
"outDir": "../dist",
|
|
8
|
+
"rootDir": "../",
|
|
9
|
+
"baseUrl": "../"
|
|
10
|
+
},
|
|
11
|
+
"include": [
|
|
12
|
+
"../src/**/*.ts",
|
|
13
|
+
"../src/**/*.tsx"
|
|
14
|
+
],
|
|
15
|
+
"exclude": [
|
|
16
|
+
"../src/**/__tests__/*",
|
|
17
|
+
"../src/**/*.test.*",
|
|
18
|
+
"../src/**/test.*"
|
|
19
|
+
],
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"path": "../../../analytics/analytics-next/afm-cc/tsconfig.json"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"path": "../../../design-system/avatar/afm-cc/tsconfig.json"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "../../../design-system/icon/afm-cc/tsconfig.json"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "../../../design-system/logo/afm-cc/tsconfig.json"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "../../../design-system/lozenge/afm-cc/tsconfig.json"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"path": "../../../design-system/popper/afm-cc/tsconfig.json"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "../../../design-system/select/afm-cc/tsconfig.json"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "../../../design-system/spinner/afm-cc/tsconfig.json"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"path": "../../../design-system/theme/afm-cc/tsconfig.json"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"path": "../../../design-system/tokens/afm-cc/tsconfig.json"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "../../../data/ufo-external/afm-cc/tsconfig.json"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
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.12.
|
|
15
|
+
var packageVersion = "10.12.5";
|
|
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}$/;
|
|
@@ -323,7 +323,10 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
323
323
|
_iterator2.f();
|
|
324
324
|
}
|
|
325
325
|
});
|
|
326
|
-
|
|
326
|
+
// for SSR, MutationObserver not existed in node, need to check its existence first
|
|
327
|
+
// using typeof MutationObserver to check if MutationObserver is function, it is undefined in node
|
|
328
|
+
// if it is node environment, focusedOptionObserver will be falsy value.
|
|
329
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusedOptionObserver", typeof MutationObserver === 'function' && new MutationObserver(_this.focusedOptionObserverCallback));
|
|
327
330
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeyDown", function (event) {
|
|
328
331
|
// Escape
|
|
329
332
|
if (event.keyCode === 27) {
|
|
@@ -426,7 +429,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
426
429
|
var _menuRef$children$;
|
|
427
430
|
var menuRef = this.selectRef.select.menuListRef;
|
|
428
431
|
((_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);
|
|
432
|
+
this.focusedOptionObserver && this.focusedOptionObserver.observe(menuRef, observerOptions);
|
|
430
433
|
}
|
|
431
434
|
if (!this.session) {
|
|
432
435
|
// session should have been created onFocus
|
|
@@ -443,7 +446,7 @@ var BaseUserPickerWithoutAnalytics = exports.BaseUserPickerWithoutAnalytics = /*
|
|
|
443
446
|
this.session = undefined;
|
|
444
447
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
445
448
|
this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
|
|
446
|
-
this.focusedOptionObserver.disconnect();
|
|
449
|
+
this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
452
|
if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
|
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.12.
|
|
5
|
+
const packageVersion = "10.12.5";
|
|
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}$/;
|
|
@@ -303,7 +303,10 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
|
-
|
|
306
|
+
// for SSR, MutationObserver not existed in node, need to check its existence first
|
|
307
|
+
// using typeof MutationObserver to check if MutationObserver is function, it is undefined in node
|
|
308
|
+
// if it is node environment, focusedOptionObserver will be falsy value.
|
|
309
|
+
_defineProperty(this, "focusedOptionObserver", typeof MutationObserver === 'function' && new MutationObserver(this.focusedOptionObserverCallback));
|
|
307
310
|
_defineProperty(this, "handleKeyDown", event => {
|
|
308
311
|
// Escape
|
|
309
312
|
if (event.keyCode === 27) {
|
|
@@ -400,7 +403,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
400
403
|
var _menuRef$children$;
|
|
401
404
|
const menuRef = this.selectRef.select.menuListRef;
|
|
402
405
|
((_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);
|
|
406
|
+
this.focusedOptionObserver && this.focusedOptionObserver.observe(menuRef, observerOptions);
|
|
404
407
|
}
|
|
405
408
|
if (!this.session) {
|
|
406
409
|
// session should have been created onFocus
|
|
@@ -417,7 +420,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
417
420
|
this.session = undefined;
|
|
418
421
|
if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
419
422
|
this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
|
|
420
|
-
this.focusedOptionObserver.disconnect();
|
|
423
|
+
this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
|
|
421
424
|
}
|
|
422
425
|
}
|
|
423
426
|
if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
|
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.12.
|
|
8
|
+
var packageVersion = "10.12.5";
|
|
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}$/;
|
|
@@ -316,7 +316,10 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
316
316
|
_iterator2.f();
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
|
-
|
|
319
|
+
// for SSR, MutationObserver not existed in node, need to check its existence first
|
|
320
|
+
// using typeof MutationObserver to check if MutationObserver is function, it is undefined in node
|
|
321
|
+
// if it is node environment, focusedOptionObserver will be falsy value.
|
|
322
|
+
_defineProperty(_assertThisInitialized(_this), "focusedOptionObserver", typeof MutationObserver === 'function' && new MutationObserver(_this.focusedOptionObserverCallback));
|
|
320
323
|
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
|
|
321
324
|
// Escape
|
|
322
325
|
if (event.keyCode === 27) {
|
|
@@ -419,7 +422,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
419
422
|
var _menuRef$children$;
|
|
420
423
|
var menuRef = this.selectRef.select.menuListRef;
|
|
421
424
|
((_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);
|
|
425
|
+
this.focusedOptionObserver && this.focusedOptionObserver.observe(menuRef, observerOptions);
|
|
423
426
|
}
|
|
424
427
|
if (!this.session) {
|
|
425
428
|
// session should have been created onFocus
|
|
@@ -436,7 +439,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
436
439
|
this.session = undefined;
|
|
437
440
|
if (getBooleanFF('platform.design-system-team.select-aria-activedescendant_psxzq')) {
|
|
438
441
|
this.selectRef.select.inputRef.removeAttribute('aria-activedescendant');
|
|
439
|
-
this.focusedOptionObserver.disconnect();
|
|
442
|
+
this.focusedOptionObserver && this.focusedOptionObserver.disconnect();
|
|
440
443
|
}
|
|
441
444
|
}
|
|
442
445
|
if (menuIsOpen && (!prevState.menuIsOpen && options.length > 0 || options.length !== prevState.options.length)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "10.12.
|
|
3
|
+
"version": "10.12.5",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"@atlaskit/avatar": "^21.4.0",
|
|
39
39
|
"@atlaskit/icon": "^22.0.0",
|
|
40
40
|
"@atlaskit/logo": "^13.14.0",
|
|
41
|
-
"@atlaskit/lozenge": "^11.
|
|
41
|
+
"@atlaskit/lozenge": "^11.5.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
43
43
|
"@atlaskit/popper": "^5.5.0",
|
|
44
44
|
"@atlaskit/select": "^17.0.0",
|
|
45
45
|
"@atlaskit/spinner": "^16.0.0",
|
|
46
46
|
"@atlaskit/theme": "^12.6.0",
|
|
47
|
-
"@atlaskit/tokens": "^1.
|
|
47
|
+
"@atlaskit/tokens": "^1.29.0",
|
|
48
48
|
"@atlaskit/tooltip": "^18.0.0",
|
|
49
49
|
"@atlaskit/ufo": "^0.2.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,450 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/user-picker"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { Placement } from '@atlaskit/popper';
|
|
8
|
-
import { default as React_2 } from 'react';
|
|
9
|
-
import { ReactNode } from 'react';
|
|
10
|
-
import { StylesConfig } from '@atlaskit/select';
|
|
11
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
12
|
-
|
|
13
|
-
// @public (undocumented)
|
|
14
|
-
export type ActionTypes = 'clear' | 'create-option' | 'deselect-option' | 'pop-value' | 'remove-value' | 'select-option' | 'set-value';
|
|
15
|
-
|
|
16
|
-
// @public (undocumented)
|
|
17
|
-
export type Appearance = 'compact' | 'normal';
|
|
18
|
-
|
|
19
|
-
// @public (undocumented)
|
|
20
|
-
export type AtlasKitSelectChange = (value: AtlaskitSelectValue, extraInfo: {
|
|
21
|
-
removedValue?: Option_2;
|
|
22
|
-
option?: Option_2;
|
|
23
|
-
action: ActionTypes;
|
|
24
|
-
}) => void;
|
|
25
|
-
|
|
26
|
-
// @public (undocumented)
|
|
27
|
-
export type AtlaskitSelectValue = Array<Option_2> | Option_2 | null | undefined;
|
|
28
|
-
|
|
29
|
-
// @public (undocumented)
|
|
30
|
-
type BaseUserPickerProps = UserPickerProps & {
|
|
31
|
-
SelectComponent: React_2.ComponentClass<any>;
|
|
32
|
-
pickerProps?: any;
|
|
33
|
-
styles: any;
|
|
34
|
-
components: any;
|
|
35
|
-
width: number | string;
|
|
36
|
-
name?: string;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// @public (undocumented)
|
|
40
|
-
class BaseUserPickerWithoutAnalytics extends React_2.Component<BaseUserPickerProps, UserPickerState> {
|
|
41
|
-
constructor(props: BaseUserPickerProps);
|
|
42
|
-
// (undocumented)
|
|
43
|
-
abortOptionsShownUfoExperience: () => void;
|
|
44
|
-
// (undocumented)
|
|
45
|
-
get ariaProps(): {};
|
|
46
|
-
// (undocumented)
|
|
47
|
-
blur: () => void;
|
|
48
|
-
// (undocumented)
|
|
49
|
-
componentDidMount(): void;
|
|
50
|
-
// (undocumented)
|
|
51
|
-
componentDidUpdate(_: UserPickerProps, prevState: UserPickerState): void;
|
|
52
|
-
// (undocumented)
|
|
53
|
-
static defaultProps: {
|
|
54
|
-
isMulti: boolean;
|
|
55
|
-
subtle: boolean;
|
|
56
|
-
noBorder: boolean;
|
|
57
|
-
textFieldBackgroundColor: boolean;
|
|
58
|
-
isClearable: boolean;
|
|
59
|
-
loadOptionsErrorMessage: () => JSX.Element;
|
|
60
|
-
};
|
|
61
|
-
// (undocumented)
|
|
62
|
-
focus: () => void;
|
|
63
|
-
// (undocumented)
|
|
64
|
-
static getDerivedStateFromProps(nextProps: Partial<UserPickerProps>, prevState: UserPickerState): Partial<UserPickerState>;
|
|
65
|
-
// (undocumented)
|
|
66
|
-
handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
|
|
67
|
-
// (undocumented)
|
|
68
|
-
nextOption: () => void;
|
|
69
|
-
// (undocumented)
|
|
70
|
-
previousOption: () => void;
|
|
71
|
-
// (undocumented)
|
|
72
|
-
render(): JSX.Element;
|
|
73
|
-
// (undocumented)
|
|
74
|
-
selectOption: () => void;
|
|
75
|
-
// (undocumented)
|
|
76
|
-
startOptionsShownUfoExperience: () => void;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// @public (undocumented)
|
|
80
|
-
type BoundariesElement = 'scrollParent' | 'viewport' | 'window' | HTMLElement;
|
|
81
|
-
|
|
82
|
-
// @public (undocumented)
|
|
83
|
-
export interface Custom extends OptionData {
|
|
84
|
-
// (undocumented)
|
|
85
|
-
analyticsType?: string;
|
|
86
|
-
// (undocumented)
|
|
87
|
-
avatarUrl?: string;
|
|
88
|
-
// (undocumented)
|
|
89
|
-
byline?: string;
|
|
90
|
-
// (undocumented)
|
|
91
|
-
highlight?: CustomHighlight;
|
|
92
|
-
// (undocumented)
|
|
93
|
-
type: 'custom';
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// @public (undocumented)
|
|
97
|
-
interface CustomHighlight {
|
|
98
|
-
// (undocumented)
|
|
99
|
-
name: HighlightRange[];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// @public (undocumented)
|
|
103
|
-
export const CustomType = "custom";
|
|
104
|
-
|
|
105
|
-
// @public (undocumented)
|
|
106
|
-
export type DefaultValue = OptionIdentifier | OptionIdentifier[] | Value;
|
|
107
|
-
|
|
108
|
-
// @public (undocumented)
|
|
109
|
-
export interface Email extends OptionData {
|
|
110
|
-
// (undocumented)
|
|
111
|
-
suggestion?: boolean;
|
|
112
|
-
// (undocumented)
|
|
113
|
-
type: 'email';
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// @public (undocumented)
|
|
117
|
-
export const EmailType = "email";
|
|
118
|
-
|
|
119
|
-
// @public (undocumented)
|
|
120
|
-
export type EmailValidationResponse = 'INVALID' | 'POTENTIAL' | 'VALID';
|
|
121
|
-
|
|
122
|
-
// @public (undocumented)
|
|
123
|
-
export type EmailValidator = (inputText: string) => EmailValidationResponse;
|
|
124
|
-
|
|
125
|
-
// @public (undocumented)
|
|
126
|
-
export interface ExternalUser extends User {
|
|
127
|
-
// (undocumented)
|
|
128
|
-
externalUserType?: 'crossSite' | 'thirdParty';
|
|
129
|
-
// (undocumented)
|
|
130
|
-
hasProductAccess?: boolean;
|
|
131
|
-
// (undocumented)
|
|
132
|
-
requiresSourceHydration?: boolean;
|
|
133
|
-
// (undocumented)
|
|
134
|
-
sources: UserSource[];
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// @public (undocumented)
|
|
138
|
-
export interface Group extends OptionData {
|
|
139
|
-
// (undocumented)
|
|
140
|
-
highlight?: GroupHighlight;
|
|
141
|
-
// (undocumented)
|
|
142
|
-
type: 'group';
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// @public (undocumented)
|
|
146
|
-
export interface GroupHighlight {
|
|
147
|
-
// (undocumented)
|
|
148
|
-
name: HighlightRange[];
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// @public (undocumented)
|
|
152
|
-
export const GroupType = "group";
|
|
153
|
-
|
|
154
|
-
// @public (undocumented)
|
|
155
|
-
export interface HighlightRange {
|
|
156
|
-
// (undocumented)
|
|
157
|
-
end: number;
|
|
158
|
-
// (undocumented)
|
|
159
|
-
start: number;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// @public (undocumented)
|
|
163
|
-
export type InputActionTypes = 'input-blur' | 'input-change' | 'menu-close' | 'set-value';
|
|
164
|
-
|
|
165
|
-
// @public (undocumented)
|
|
166
|
-
export const isEmail: (option: OptionData) => option is Email;
|
|
167
|
-
|
|
168
|
-
// @public (undocumented)
|
|
169
|
-
export const isExternalUser: (option: OptionData) => option is ExternalUser;
|
|
170
|
-
|
|
171
|
-
// @public (undocumented)
|
|
172
|
-
export const isTeam: (option: OptionData) => option is Team;
|
|
173
|
-
|
|
174
|
-
// @public (undocumented)
|
|
175
|
-
export const isUser: (option: OptionData) => option is User;
|
|
176
|
-
|
|
177
|
-
// @public (undocumented)
|
|
178
|
-
export const isValidEmail: EmailValidator;
|
|
179
|
-
|
|
180
|
-
// @public (undocumented)
|
|
181
|
-
export interface LoadOptions {
|
|
182
|
-
// (undocumented)
|
|
183
|
-
(searchText?: string, sessionId?: string): Iterable<OptionData | OptionData[] | Promisable<OptionData | OptionData[]>> | Promisable<OptionData | OptionData[]>;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// @public (undocumented)
|
|
187
|
-
interface LoadUserSource {
|
|
188
|
-
// (undocumented)
|
|
189
|
-
(accountId: string, signal?: AbortSignal): Promise<UserSourceResult[]>;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// @public (undocumented)
|
|
193
|
-
type LozengeColor = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
194
|
-
|
|
195
|
-
// @public (undocumented)
|
|
196
|
-
export interface LozengeProps {
|
|
197
|
-
// (undocumented)
|
|
198
|
-
appearance?: LozengeColor;
|
|
199
|
-
// (undocumented)
|
|
200
|
-
isBold?: boolean;
|
|
201
|
-
// (undocumented)
|
|
202
|
-
text: string;
|
|
203
|
-
// (undocumented)
|
|
204
|
-
tooltip?: string;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// @public (undocumented)
|
|
208
|
-
export type OnChange = (value: Value, action: ActionTypes) => void;
|
|
209
|
-
|
|
210
|
-
// @public (undocumented)
|
|
211
|
-
export type OnInputChange = (query?: string, sessionId?: string) => void;
|
|
212
|
-
|
|
213
|
-
// @public (undocumented)
|
|
214
|
-
export type OnOption = (value: Value, sessionId?: string, baseUserPicker?: BaseUserPickerWithoutAnalytics) => void;
|
|
215
|
-
|
|
216
|
-
// @public (undocumented)
|
|
217
|
-
export type OnPicker = (sessionId?: string) => void;
|
|
218
|
-
|
|
219
|
-
// @public (undocumented)
|
|
220
|
-
type Option_2<Data = OptionData> = {
|
|
221
|
-
data: Data;
|
|
222
|
-
isDisabled?: boolean;
|
|
223
|
-
label: string;
|
|
224
|
-
value: string;
|
|
225
|
-
};
|
|
226
|
-
export { Option_2 as Option }
|
|
227
|
-
|
|
228
|
-
// @public (undocumented)
|
|
229
|
-
export interface OptionData {
|
|
230
|
-
// (undocumented)
|
|
231
|
-
avatarUrl?: any;
|
|
232
|
-
// (undocumented)
|
|
233
|
-
fixed?: boolean;
|
|
234
|
-
// (undocumented)
|
|
235
|
-
id: string;
|
|
236
|
-
// (undocumented)
|
|
237
|
-
isDisabled?: boolean;
|
|
238
|
-
// (undocumented)
|
|
239
|
-
lozenge?: LozengeProps | ReactNode | string;
|
|
240
|
-
// (undocumented)
|
|
241
|
-
name: string;
|
|
242
|
-
// (undocumented)
|
|
243
|
-
type?: 'custom' | 'email' | 'group' | 'team' | 'user';
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
// @public (undocumented)
|
|
247
|
-
export type OptionIdentifier = Pick<OptionData, 'id' | 'isDisabled' | 'type'>;
|
|
248
|
-
|
|
249
|
-
// @public (undocumented)
|
|
250
|
-
export const PopupUserPicker: React_2.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof WithAnalyticsEventsProps>, "addMoreMessage" | "allowEmail" | "anchor" | "appearance" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "autoFocus" | "captureMenuScroll" | "clearValueLabel" | "closeMenuOnScroll" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "header" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "menuPortalTarget" | "menuPosition" | "menuShouldBlockScroll" | "name" | "noBorder" | "noOptionsMessage" | "onBlur" | "onChange" | "onClear" | "onClose" | "onFocus" | "onInputChange" | "onKeyDown" | "onOpen" | "onSelection" | "open" | "options" | "placeholder" | "popupTitle" | "search" | "styles" | "subtle" | "suggestEmailsForDomain" | "target" | "textFieldBackgroundColor" | "value"> & Partial<Pick<Omit<PopupUserPickerProps, keyof WithAnalyticsEventsProps>, "boundariesElement" | "isMulti" | "offset" | "placement" | "rootBoundary" | "shouldFlip" | "width">> & Partial<Pick<{
|
|
251
|
-
boundariesElement: string;
|
|
252
|
-
width: number;
|
|
253
|
-
isMulti: boolean;
|
|
254
|
-
offset: number[];
|
|
255
|
-
placement: string;
|
|
256
|
-
rootBoundary: string;
|
|
257
|
-
shouldFlip: boolean;
|
|
258
|
-
}, never>> & React_2.RefAttributes<any>>;
|
|
259
|
-
|
|
260
|
-
// @public (undocumented)
|
|
261
|
-
export type PopupUserPickerProps = UserPickerProps & {
|
|
262
|
-
target: Target;
|
|
263
|
-
popupTitle?: string;
|
|
264
|
-
boundariesElement?: BoundariesElement;
|
|
265
|
-
offset?: [number, number];
|
|
266
|
-
placement?: Placement;
|
|
267
|
-
rootBoundary?: RootBoundary;
|
|
268
|
-
shouldFlip?: boolean;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
// @public (undocumented)
|
|
272
|
-
export type Promisable<T> = PromiseLike<T> | T;
|
|
273
|
-
|
|
274
|
-
// @public (undocumented)
|
|
275
|
-
type RootBoundary = 'document' | 'viewport';
|
|
276
|
-
|
|
277
|
-
// @public (undocumented)
|
|
278
|
-
export type Target = (options: {
|
|
279
|
-
ref: any;
|
|
280
|
-
isOpen: boolean;
|
|
281
|
-
}) => ReactNode;
|
|
282
|
-
|
|
283
|
-
// @public (undocumented)
|
|
284
|
-
export interface Team extends OptionData {
|
|
285
|
-
// (undocumented)
|
|
286
|
-
avatarUrl?: string;
|
|
287
|
-
// (undocumented)
|
|
288
|
-
byline?: string;
|
|
289
|
-
// (undocumented)
|
|
290
|
-
description?: string;
|
|
291
|
-
// (undocumented)
|
|
292
|
-
highlight?: TeamHighlight;
|
|
293
|
-
// (undocumented)
|
|
294
|
-
includesYou?: boolean;
|
|
295
|
-
// (undocumented)
|
|
296
|
-
memberCount?: number;
|
|
297
|
-
// (undocumented)
|
|
298
|
-
members?: TeamMember[];
|
|
299
|
-
// (undocumented)
|
|
300
|
-
type: 'team';
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// @public (undocumented)
|
|
304
|
-
export interface TeamHighlight {
|
|
305
|
-
// (undocumented)
|
|
306
|
-
description?: HighlightRange[];
|
|
307
|
-
// (undocumented)
|
|
308
|
-
name: HighlightRange[];
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// @public (undocumented)
|
|
312
|
-
export interface TeamMember {
|
|
313
|
-
// (undocumented)
|
|
314
|
-
id: string;
|
|
315
|
-
// (undocumented)
|
|
316
|
-
name: string;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// @public (undocumented)
|
|
320
|
-
export const TeamType = "team";
|
|
321
|
-
|
|
322
|
-
// @public (undocumented)
|
|
323
|
-
export interface User extends OptionData {
|
|
324
|
-
// (undocumented)
|
|
325
|
-
avatarUrl?: string;
|
|
326
|
-
// (undocumented)
|
|
327
|
-
byline?: string;
|
|
328
|
-
// (undocumented)
|
|
329
|
-
email?: string;
|
|
330
|
-
// (undocumented)
|
|
331
|
-
highlight?: UserHighlight;
|
|
332
|
-
// (undocumented)
|
|
333
|
-
isExternal?: boolean;
|
|
334
|
-
// (undocumented)
|
|
335
|
-
publicName?: string;
|
|
336
|
-
// (undocumented)
|
|
337
|
-
type?: 'user';
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// @public (undocumented)
|
|
341
|
-
export interface UserHighlight {
|
|
342
|
-
// (undocumented)
|
|
343
|
-
name: HighlightRange[];
|
|
344
|
-
// (undocumented)
|
|
345
|
-
publicName: HighlightRange[];
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// @public (undocumented)
|
|
349
|
-
const UserPicker: React_2.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof WithAnalyticsEventsProps>, "addMoreMessage" | "allowEmail" | "anchor" | "appearance" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "autoFocus" | "captureMenuScroll" | "clearValueLabel" | "closeMenuOnScroll" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "header" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "menuPortalTarget" | "menuPosition" | "menuShouldBlockScroll" | "name" | "noBorder" | "noOptionsMessage" | "onBlur" | "onChange" | "onClear" | "onClose" | "onFocus" | "onInputChange" | "onKeyDown" | "onOpen" | "onSelection" | "open" | "options" | "placeholder" | "search" | "styles" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "value"> & Partial<Pick<Omit<UserPickerProps, keyof WithAnalyticsEventsProps>, "isMulti" | "width">> & Partial<Pick<{
|
|
350
|
-
width: number;
|
|
351
|
-
isMulti: boolean;
|
|
352
|
-
}, never>> & React_2.RefAttributes<any>>;
|
|
353
|
-
export default UserPicker;
|
|
354
|
-
|
|
355
|
-
// @public (undocumented)
|
|
356
|
-
export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
357
|
-
fieldId: null | string;
|
|
358
|
-
options?: OptionData[];
|
|
359
|
-
width?: number | string;
|
|
360
|
-
menuMinWidth?: number;
|
|
361
|
-
maxPickerHeight?: number;
|
|
362
|
-
textFieldBackgroundColor?: boolean;
|
|
363
|
-
loadOptions?: LoadOptions;
|
|
364
|
-
loadOptionsErrorMessage?: (value: {
|
|
365
|
-
inputValue: string;
|
|
366
|
-
}) => string;
|
|
367
|
-
loadUserSource?: LoadUserSource;
|
|
368
|
-
onChange?: OnChange;
|
|
369
|
-
isMulti?: boolean;
|
|
370
|
-
search?: string;
|
|
371
|
-
anchor?: React_2.ComponentType<any>;
|
|
372
|
-
open?: boolean;
|
|
373
|
-
isLoading?: boolean;
|
|
374
|
-
onInputChange?: OnInputChange;
|
|
375
|
-
onSelection?: OnOption;
|
|
376
|
-
onFocus?: OnPicker;
|
|
377
|
-
onBlur?: OnPicker;
|
|
378
|
-
onClear?: OnPicker;
|
|
379
|
-
onOpen?: OnPicker;
|
|
380
|
-
onClose?: OnPicker;
|
|
381
|
-
onKeyDown?: (event: React_2.KeyboardEvent) => void;
|
|
382
|
-
appearance?: Appearance;
|
|
383
|
-
subtle?: boolean;
|
|
384
|
-
noBorder?: boolean;
|
|
385
|
-
styles?: StylesConfig;
|
|
386
|
-
defaultValue?: DefaultValue;
|
|
387
|
-
placeholder?: React_2.ReactNode;
|
|
388
|
-
addMoreMessage?: string;
|
|
389
|
-
noOptionsMessage?: ((value: {
|
|
390
|
-
inputValue: string;
|
|
391
|
-
}) => React_2.ReactNode | null | string) | React_2.ReactNode | null;
|
|
392
|
-
footer?: React_2.ReactNode;
|
|
393
|
-
value?: Value;
|
|
394
|
-
isDisabled?: boolean;
|
|
395
|
-
isClearable?: boolean;
|
|
396
|
-
clearValueLabel?: string;
|
|
397
|
-
menuPosition?: 'absolute' | 'fixed';
|
|
398
|
-
captureMenuScroll?: boolean;
|
|
399
|
-
menuPortalTarget?: HTMLElement;
|
|
400
|
-
allowEmail?: boolean;
|
|
401
|
-
suggestEmailsForDomain?: string;
|
|
402
|
-
emailLabel?: string;
|
|
403
|
-
disableInput?: boolean;
|
|
404
|
-
isValidEmail?: EmailValidator;
|
|
405
|
-
autoFocus?: boolean;
|
|
406
|
-
maxOptions?: number;
|
|
407
|
-
inputId?: string;
|
|
408
|
-
closeMenuOnScroll?: EventListener | boolean;
|
|
409
|
-
menuShouldBlockScroll?: boolean;
|
|
410
|
-
ariaLabel?: string;
|
|
411
|
-
ariaLabelledBy?: string;
|
|
412
|
-
ariaLive?: 'assertive' | 'off' | 'polite';
|
|
413
|
-
name?: string;
|
|
414
|
-
header?: React_2.ReactNode;
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
// @public (undocumented)
|
|
418
|
-
export type UserPickerState = {
|
|
419
|
-
options: OptionData[];
|
|
420
|
-
value?: AtlaskitSelectValue;
|
|
421
|
-
isDefaultSet: boolean;
|
|
422
|
-
inflightRequest: number;
|
|
423
|
-
count: number;
|
|
424
|
-
hoveringClearIndicator: boolean;
|
|
425
|
-
menuIsOpen: boolean;
|
|
426
|
-
inputValue: string;
|
|
427
|
-
resolving: boolean;
|
|
428
|
-
showError: boolean;
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
// @public (undocumented)
|
|
432
|
-
export type UserSource = 'confluence' | 'github' | 'google' | 'jira' | 'microsoft' | 'other-atlassian' | 'slack';
|
|
433
|
-
|
|
434
|
-
// @public (undocumented)
|
|
435
|
-
interface UserSourceResult {
|
|
436
|
-
// (undocumented)
|
|
437
|
-
sourceId: string;
|
|
438
|
-
// (undocumented)
|
|
439
|
-
sourceType: UserSource;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
// @public (undocumented)
|
|
443
|
-
export const UserType = "user";
|
|
444
|
-
|
|
445
|
-
// @public (undocumented)
|
|
446
|
-
export type Value = OptionData | OptionData[] | null | undefined;
|
|
447
|
-
|
|
448
|
-
// (No @packageDocumentation comment for this package)
|
|
449
|
-
|
|
450
|
-
```
|