@atlaskit/user-picker 9.0.1 → 9.0.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/analytics.js +10 -1
- package/dist/cjs/components/ExternalUserOption/main.js +33 -11
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics.js +4 -0
- package/dist/es2019/components/ExternalUserOption/main.js +28 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics.js +6 -0
- package/dist/esm/components/ExternalUserOption/main.js +36 -12
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics.d.ts +2 -1
- package/dist/types/components/BaseUserPicker.d.ts +1 -1
- package/dist/types/components/ExternalUserOption/index.d.ts +1 -1
- package/dist/types/components/ExternalUserOption/main.d.ts +3 -9
- package/dist/types/components/PopupUserPicker.d.ts +1 -1
- package/dist/types/components/UserPicker.d.ts +1 -1
- package/dist/types/components/components.d.ts +1 -1
- package/dist/types/components/popup.d.ts +4 -4
- package/dist/types/components/utils.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 9.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
8
|
+
|
|
9
|
+
## 9.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 9.0.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`85c0dcfe911`](https://bitbucket.org/atlassian/atlassian-frontend/commits/85c0dcfe911) - Added analytics event when the sources tooltip is displayed for an external user
|
|
20
|
+
|
|
3
21
|
## 9.0.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/analytics.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.startSession = exports.selectEvent = exports.searchedEvent = exports.focusEvent = exports.failedEvent = exports.deleteEvent = exports.createAndFireEventInElementsChannel = exports.clearEvent = exports.cancelEvent = void 0;
|
|
8
|
+
exports.userInfoEvent = exports.startSession = exports.selectEvent = exports.searchedEvent = exports.focusEvent = exports.failedEvent = exports.deleteEvent = exports.createAndFireEventInElementsChannel = exports.clearEvent = exports.cancelEvent = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -173,6 +173,15 @@ var failedEvent = function failedEvent(props, _, session, journeyId) {
|
|
|
173
173
|
|
|
174
174
|
exports.failedEvent = failedEvent;
|
|
175
175
|
|
|
176
|
+
var userInfoEvent = function userInfoEvent(sources, accountId) {
|
|
177
|
+
return createEvent('ui', 'displayed', 'userInfo', {
|
|
178
|
+
sources: sources,
|
|
179
|
+
accountId: accountId
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
exports.userInfoEvent = userInfoEvent;
|
|
184
|
+
|
|
176
185
|
function queryLength(state) {
|
|
177
186
|
return state.inputValue.length;
|
|
178
187
|
}
|
|
@@ -33,6 +33,10 @@ var _tokens = require("@atlaskit/tokens");
|
|
|
33
33
|
|
|
34
34
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
35
35
|
|
|
36
|
+
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
37
|
+
|
|
38
|
+
var _analytics = require("../../analytics");
|
|
39
|
+
|
|
36
40
|
var _AvatarItemOption = require("../AvatarItemOption");
|
|
37
41
|
|
|
38
42
|
var _SizeableAvatar = require("../SizeableAvatar");
|
|
@@ -63,21 +67,21 @@ var emailDomainWrapper = (0, _core.css)({
|
|
|
63
67
|
});
|
|
64
68
|
exports.emailDomainWrapper = emailDomainWrapper;
|
|
65
69
|
|
|
66
|
-
var
|
|
67
|
-
(0, _inherits2.default)(
|
|
70
|
+
var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
71
|
+
(0, _inherits2.default)(ExternalUserOptionImpl, _React$PureComponent);
|
|
68
72
|
|
|
69
|
-
var _super = _createSuper(
|
|
73
|
+
var _super = _createSuper(ExternalUserOptionImpl);
|
|
70
74
|
|
|
71
|
-
function
|
|
75
|
+
function ExternalUserOptionImpl() {
|
|
72
76
|
var _this;
|
|
73
77
|
|
|
74
|
-
(0, _classCallCheck2.default)(this,
|
|
78
|
+
(0, _classCallCheck2.default)(this, ExternalUserOptionImpl);
|
|
75
79
|
|
|
76
|
-
for (var _len = arguments.length,
|
|
77
|
-
|
|
80
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
81
|
+
_args[_key] = arguments[_key];
|
|
78
82
|
}
|
|
79
83
|
|
|
80
|
-
_this = _super.call.apply(_super, [this].concat(
|
|
84
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
81
85
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getPrimaryText", function () {
|
|
82
86
|
var name = _this.props.user.name;
|
|
83
87
|
return (0, _core.jsx)("span", {
|
|
@@ -117,16 +121,33 @@ var ExternalUserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
117
121
|
name: name
|
|
118
122
|
});
|
|
119
123
|
});
|
|
124
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fireEvent", function (eventCreator) {
|
|
125
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
126
|
+
args[_key2 - 1] = arguments[_key2];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
var createAnalyticsEvent = _this.props.createAnalyticsEvent;
|
|
130
|
+
|
|
131
|
+
if (createAnalyticsEvent) {
|
|
132
|
+
(0, _analytics.createAndFireEventInElementsChannel)(eventCreator.apply(void 0, args))(createAnalyticsEvent);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onShow", function () {
|
|
136
|
+
var user = _this.props.user;
|
|
137
|
+
|
|
138
|
+
_this.fireEvent(_analytics.userInfoEvent, user.sources, user.id);
|
|
139
|
+
});
|
|
120
140
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getSourcesInfoTooltip", function () {
|
|
121
141
|
return _this.props.user.isExternal ? (0, _core.jsx)(_tooltip.default, {
|
|
122
142
|
content: _this.formattedTooltipContent(),
|
|
123
|
-
position: 'right-start'
|
|
143
|
+
position: 'right-start',
|
|
144
|
+
onShow: _this.onShow
|
|
124
145
|
}, (0, _core.jsx)(_InfoIcon.default, null)) : undefined;
|
|
125
146
|
});
|
|
126
147
|
return _this;
|
|
127
148
|
}
|
|
128
149
|
|
|
129
|
-
(0, _createClass2.default)(
|
|
150
|
+
(0, _createClass2.default)(ExternalUserOptionImpl, [{
|
|
130
151
|
key: "render",
|
|
131
152
|
value: function render() {
|
|
132
153
|
return (0, _core.jsx)(_ExternalAvatarItemOption.ExternalAvatarItemOption, {
|
|
@@ -152,7 +173,8 @@ var ExternalUserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
152
173
|
});
|
|
153
174
|
}
|
|
154
175
|
}]);
|
|
155
|
-
return
|
|
176
|
+
return ExternalUserOptionImpl;
|
|
156
177
|
}(_react.default.PureComponent);
|
|
157
178
|
|
|
179
|
+
var ExternalUserOption = (0, _analyticsNext.withAnalyticsEvents)()(ExternalUserOptionImpl);
|
|
158
180
|
exports.ExternalUserOption = ExternalUserOption;
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/analytics.js
CHANGED
|
@@ -115,6 +115,10 @@ export const searchedEvent = (props, state, session, journeyId) => {
|
|
|
115
115
|
};
|
|
116
116
|
export const failedEvent = (props, _, session, journeyId) => createEvent('operational', 'failed', 'userPicker', { ...createDefaultPickerAttributes(props, session, journeyId)
|
|
117
117
|
});
|
|
118
|
+
export const userInfoEvent = (sources, accountId) => createEvent('ui', 'displayed', 'userInfo', {
|
|
119
|
+
sources,
|
|
120
|
+
accountId
|
|
121
|
+
});
|
|
118
122
|
|
|
119
123
|
function queryLength(state) {
|
|
120
124
|
return state.inputValue.length;
|
|
@@ -6,6 +6,8 @@ import { css, jsx } from '@emotion/core';
|
|
|
6
6
|
import { B400, N200, N800 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { token } from '@atlaskit/tokens';
|
|
8
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
+
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
|
+
import { createAndFireEventInElementsChannel, userInfoEvent } from '../../analytics';
|
|
9
11
|
import { textWrapper } from '../AvatarItemOption';
|
|
10
12
|
import { SizeableAvatar } from '../SizeableAvatar';
|
|
11
13
|
import { ExternalUserSourcesContainer } from '../ExternalUserSourcesContainer';
|
|
@@ -23,9 +25,10 @@ export const imageContainer = css({
|
|
|
23
25
|
export const emailDomainWrapper = css({
|
|
24
26
|
fontWeight: 'bold'
|
|
25
27
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
class ExternalUserOptionImpl extends React.PureComponent {
|
|
30
|
+
constructor(..._args) {
|
|
31
|
+
super(..._args);
|
|
29
32
|
|
|
30
33
|
_defineProperty(this, "getPrimaryText", () => {
|
|
31
34
|
const {
|
|
@@ -73,9 +76,27 @@ export class ExternalUserOption extends React.PureComponent {
|
|
|
73
76
|
});
|
|
74
77
|
});
|
|
75
78
|
|
|
79
|
+
_defineProperty(this, "fireEvent", (eventCreator, ...args) => {
|
|
80
|
+
const {
|
|
81
|
+
createAnalyticsEvent
|
|
82
|
+
} = this.props;
|
|
83
|
+
|
|
84
|
+
if (createAnalyticsEvent) {
|
|
85
|
+
createAndFireEventInElementsChannel(eventCreator(...args))(createAnalyticsEvent);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
_defineProperty(this, "onShow", () => {
|
|
90
|
+
const {
|
|
91
|
+
user
|
|
92
|
+
} = this.props;
|
|
93
|
+
this.fireEvent(userInfoEvent, user.sources, user.id);
|
|
94
|
+
});
|
|
95
|
+
|
|
76
96
|
_defineProperty(this, "getSourcesInfoTooltip", () => this.props.user.isExternal ? jsx(Tooltip, {
|
|
77
97
|
content: this.formattedTooltipContent(),
|
|
78
|
-
position: 'right-start'
|
|
98
|
+
position: 'right-start',
|
|
99
|
+
onShow: this.onShow
|
|
79
100
|
}, jsx(InfoIcon, null)) : undefined);
|
|
80
101
|
}
|
|
81
102
|
|
|
@@ -103,4 +124,6 @@ export class ExternalUserOption extends React.PureComponent {
|
|
|
103
124
|
}, sourceData => jsx(SourcesTooltipContent, sourceData));
|
|
104
125
|
}
|
|
105
126
|
|
|
106
|
-
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export const ExternalUserOption = withAnalyticsEvents()(ExternalUserOptionImpl);
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/analytics.js
CHANGED
|
@@ -135,6 +135,12 @@ export var searchedEvent = function searchedEvent(props, state, session, journey
|
|
|
135
135
|
export var failedEvent = function failedEvent(props, _, session, journeyId) {
|
|
136
136
|
return createEvent('operational', 'failed', 'userPicker', _objectSpread({}, createDefaultPickerAttributes(props, session, journeyId)));
|
|
137
137
|
};
|
|
138
|
+
export var userInfoEvent = function userInfoEvent(sources, accountId) {
|
|
139
|
+
return createEvent('ui', 'displayed', 'userInfo', {
|
|
140
|
+
sources: sources,
|
|
141
|
+
accountId: accountId
|
|
142
|
+
});
|
|
143
|
+
};
|
|
138
144
|
|
|
139
145
|
function queryLength(state) {
|
|
140
146
|
return state.inputValue.length;
|
|
@@ -17,6 +17,8 @@ import { css, jsx } from '@emotion/core';
|
|
|
17
17
|
import { B400, N200, N800 } from '@atlaskit/theme/colors';
|
|
18
18
|
import { token } from '@atlaskit/tokens';
|
|
19
19
|
import Tooltip from '@atlaskit/tooltip';
|
|
20
|
+
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
21
|
+
import { createAndFireEventInElementsChannel, userInfoEvent } from '../../analytics';
|
|
20
22
|
import { textWrapper } from '../AvatarItemOption';
|
|
21
23
|
import { SizeableAvatar } from '../SizeableAvatar';
|
|
22
24
|
import { ExternalUserSourcesContainer } from '../ExternalUserSourcesContainer';
|
|
@@ -34,21 +36,22 @@ export var imageContainer = css({
|
|
|
34
36
|
export var emailDomainWrapper = css({
|
|
35
37
|
fontWeight: 'bold'
|
|
36
38
|
});
|
|
37
|
-
export var ExternalUserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
38
|
-
_inherits(ExternalUserOption, _React$PureComponent);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
41
|
+
_inherits(ExternalUserOptionImpl, _React$PureComponent);
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
var _super = _createSuper(ExternalUserOptionImpl);
|
|
44
|
+
|
|
45
|
+
function ExternalUserOptionImpl() {
|
|
43
46
|
var _this;
|
|
44
47
|
|
|
45
|
-
_classCallCheck(this,
|
|
48
|
+
_classCallCheck(this, ExternalUserOptionImpl);
|
|
46
49
|
|
|
47
|
-
for (var _len = arguments.length,
|
|
48
|
-
|
|
50
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
|
+
_args[_key] = arguments[_key];
|
|
49
52
|
}
|
|
50
53
|
|
|
51
|
-
_this = _super.call.apply(_super, [this].concat(
|
|
54
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
52
55
|
|
|
53
56
|
_defineProperty(_assertThisInitialized(_this), "getPrimaryText", function () {
|
|
54
57
|
var name = _this.props.user.name;
|
|
@@ -92,17 +95,36 @@ export var ExternalUserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
92
95
|
});
|
|
93
96
|
});
|
|
94
97
|
|
|
98
|
+
_defineProperty(_assertThisInitialized(_this), "fireEvent", function (eventCreator) {
|
|
99
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
100
|
+
args[_key2 - 1] = arguments[_key2];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var createAnalyticsEvent = _this.props.createAnalyticsEvent;
|
|
104
|
+
|
|
105
|
+
if (createAnalyticsEvent) {
|
|
106
|
+
createAndFireEventInElementsChannel(eventCreator.apply(void 0, args))(createAnalyticsEvent);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
_defineProperty(_assertThisInitialized(_this), "onShow", function () {
|
|
111
|
+
var user = _this.props.user;
|
|
112
|
+
|
|
113
|
+
_this.fireEvent(userInfoEvent, user.sources, user.id);
|
|
114
|
+
});
|
|
115
|
+
|
|
95
116
|
_defineProperty(_assertThisInitialized(_this), "getSourcesInfoTooltip", function () {
|
|
96
117
|
return _this.props.user.isExternal ? jsx(Tooltip, {
|
|
97
118
|
content: _this.formattedTooltipContent(),
|
|
98
|
-
position: 'right-start'
|
|
119
|
+
position: 'right-start',
|
|
120
|
+
onShow: _this.onShow
|
|
99
121
|
}, jsx(InfoIcon, null)) : undefined;
|
|
100
122
|
});
|
|
101
123
|
|
|
102
124
|
return _this;
|
|
103
125
|
}
|
|
104
126
|
|
|
105
|
-
_createClass(
|
|
127
|
+
_createClass(ExternalUserOptionImpl, [{
|
|
106
128
|
key: "render",
|
|
107
129
|
value: function render() {
|
|
108
130
|
return jsx(ExternalAvatarItemOption, {
|
|
@@ -129,5 +151,7 @@ export var ExternalUserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
129
151
|
}
|
|
130
152
|
}]);
|
|
131
153
|
|
|
132
|
-
return
|
|
133
|
-
}(React.PureComponent);
|
|
154
|
+
return ExternalUserOptionImpl;
|
|
155
|
+
}(React.PureComponent);
|
|
156
|
+
|
|
157
|
+
export var ExternalUserOption = withAnalyticsEvents()(ExternalUserOptionImpl);
|
package/dist/esm/version.json
CHANGED
|
@@ -9,7 +9,7 @@ export declare type UserPickerSession = {
|
|
|
9
9
|
lastKey?: number;
|
|
10
10
|
};
|
|
11
11
|
export declare const startSession: () => UserPickerSession;
|
|
12
|
-
export declare const createAndFireEventInElementsChannel: (payload:
|
|
12
|
+
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
13
13
|
export interface EventCreator {
|
|
14
14
|
(props: UserPickerProps, state: UserPickerState, session?: UserPickerSession): AnalyticsEventPayload;
|
|
15
15
|
(props: UserPickerProps, state: UserPickerState, session?: UserPickerSession, ...args: any[]): AnalyticsEventPayload;
|
|
@@ -21,3 +21,4 @@ export declare const cancelEvent: EventCreator;
|
|
|
21
21
|
export declare const selectEvent: EventCreator;
|
|
22
22
|
export declare const searchedEvent: EventCreator;
|
|
23
23
|
export declare const failedEvent: EventCreator;
|
|
24
|
+
export declare const userInfoEvent: (sources: string[], accountId: string) => AnalyticsEventPayload;
|
|
@@ -51,7 +51,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
51
51
|
private getAppearance;
|
|
52
52
|
render(): JSX.Element;
|
|
53
53
|
}
|
|
54
|
-
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<
|
|
54
|
+
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps"> & Partial<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
55
55
|
isMulti: boolean;
|
|
56
56
|
subtle: boolean;
|
|
57
57
|
noBorder: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const AsyncExternalUserOption: React.LazyExoticComponent<
|
|
2
|
+
declare const AsyncExternalUserOption: React.LazyExoticComponent<React.ForwardRefExoticComponent<Omit<import("./main").ExternalUserOptionProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>>;
|
|
3
3
|
export default AsyncExternalUserOption;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
4
|
import { ExternalUser } from '../../types';
|
|
4
5
|
export declare const imageContainer: import("@emotion/utils").SerializedStyles;
|
|
5
6
|
export declare const emailDomainWrapper: import("@emotion/utils").SerializedStyles;
|
|
6
|
-
export declare type ExternalUserOptionProps = {
|
|
7
|
+
export declare type ExternalUserOptionProps = WithAnalyticsEventsProps & {
|
|
7
8
|
user: ExternalUser;
|
|
8
9
|
status?: string;
|
|
9
10
|
isSelected: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare
|
|
12
|
-
render(): JSX.Element;
|
|
13
|
-
private getPrimaryText;
|
|
14
|
-
private renderSecondaryText;
|
|
15
|
-
private renderAvatar;
|
|
16
|
-
private getSourcesInfoTooltip;
|
|
17
|
-
private formattedTooltipContent;
|
|
18
|
-
}
|
|
12
|
+
export declare const ExternalUserOption: React.ForwardRefExoticComponent<Omit<ExternalUserOptionProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -27,7 +27,7 @@ export declare class PopupUserPickerWithoutAnalytics extends React.Component<Pop
|
|
|
27
27
|
};
|
|
28
28
|
render(): JSX.Element;
|
|
29
29
|
}
|
|
30
|
-
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<
|
|
30
|
+
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle"> & Partial<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isMulti" | "width" | "offset" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">> & Partial<Pick<{
|
|
31
31
|
boundariesElement: string;
|
|
32
32
|
width: number;
|
|
33
33
|
isMulti: boolean;
|
|
@@ -10,7 +10,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
|
|
|
10
10
|
componentDidMount(): void;
|
|
11
11
|
render(): JSX.Element;
|
|
12
12
|
}
|
|
13
|
-
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<
|
|
13
|
+
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions"> & Partial<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isMulti" | "width">> & Partial<Pick<{
|
|
14
14
|
width: number;
|
|
15
15
|
isMulti: boolean;
|
|
16
16
|
}, never>> & React.RefAttributes<any>>;
|
|
@@ -9,7 +9,7 @@ import { PopupControl } from './PopupControl';
|
|
|
9
9
|
/**
|
|
10
10
|
* Memoize getComponents to avoid rerenders.
|
|
11
11
|
*/
|
|
12
|
-
export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean | undefined, anchor?: import("react").
|
|
12
|
+
export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean | undefined, anchor?: import("react").ComponentType<any> | undefined) => {
|
|
13
13
|
Control: import("react").ComponentType<any>;
|
|
14
14
|
Option: import("react").FC<import("./Option").OptionProps>;
|
|
15
15
|
MultiValue?: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Placement } from '@atlaskit/popper';
|
|
2
|
-
import { Target } from '../types';
|
|
3
|
-
export declare const getPopupProps: import("memoize-one").MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?:
|
|
2
|
+
import { Target, BoundariesElement, RootBoundary } from '../types';
|
|
3
|
+
export declare const getPopupProps: import("memoize-one").MemoizedFn<(width: string | number, target: Target, onFlip: (data: any) => any, boundariesElement?: BoundariesElement | undefined, offset?: number[] | undefined, placement?: Placement | undefined, rootBoundary?: RootBoundary | undefined, shouldFlip?: boolean | undefined, popupTitle?: string | undefined) => {
|
|
4
4
|
searchThreshold: number;
|
|
5
5
|
controlShouldRenderValue: boolean;
|
|
6
6
|
minMenuWidth: string | number;
|
|
@@ -30,8 +30,8 @@ export declare const getPopupProps: import("memoize-one").MemoizedFn<(width: str
|
|
|
30
30
|
} | {
|
|
31
31
|
name: string;
|
|
32
32
|
options: {
|
|
33
|
-
rootBoundary:
|
|
34
|
-
boundary:
|
|
33
|
+
rootBoundary: RootBoundary | undefined;
|
|
34
|
+
boundary: BoundariesElement | undefined;
|
|
35
35
|
offset?: undefined;
|
|
36
36
|
};
|
|
37
37
|
enabled?: undefined;
|
|
@@ -18,7 +18,7 @@ export interface OptionToSelectableOptions {
|
|
|
18
18
|
}
|
|
19
19
|
export declare const optionToSelectableOptions: OptionToSelectableOptions;
|
|
20
20
|
export declare const getAvatarSize: (appearance: string) => 'xsmall' | 'small' | 'medium';
|
|
21
|
-
export declare const isChildInput: (child: ReactChild) => child is ReactElement<any, string |
|
|
21
|
+
export declare const isChildInput: (child: ReactChild) => child is ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
22
22
|
export declare const isSingleValue: (value?: AtlaskitSelectValue) => value is Option<OptionData>;
|
|
23
23
|
export declare const hasValue: (value?: string | undefined) => value is string;
|
|
24
24
|
export declare const callCallback: <U extends any[], R>(callback: ((...U: U) => R) | undefined, ...args: U) => R | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.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/"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/select": "^15.2.0",
|
|
36
36
|
"@atlaskit/spinner": "^15.1.4",
|
|
37
37
|
"@atlaskit/theme": "^12.1.0",
|
|
38
|
-
"@atlaskit/tokens": "^0.
|
|
38
|
+
"@atlaskit/tokens": "^0.9.0",
|
|
39
39
|
"@atlaskit/tooltip": "^17.5.0",
|
|
40
40
|
"@atlaskit/ufo": "^0.1.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@atlaskit/analytics-viewer": "^0.4.0",
|
|
54
|
-
"@atlaskit/button": "^16.
|
|
54
|
+
"@atlaskit/button": "^16.3.0",
|
|
55
55
|
"@atlaskit/docs": "*",
|
|
56
56
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
57
57
|
"@atlaskit/modal-dialog": "^12.2.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": "
|
|
76
|
+
"typescript": "4.2.4"
|
|
77
77
|
},
|
|
78
78
|
"techstack": {
|
|
79
79
|
"@repo/internal": {
|