@atlaskit/user-picker 8.7.1 → 8.7.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 +12 -9
- package/dist/cjs/components/UserPicker.js +7 -2
- package/dist/cjs/components/i18n.js +1 -1
- package/dist/cjs/util/ufoExperiences.js +5 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics.js +19 -14
- package/dist/es2019/components/UserPicker.js +6 -2
- package/dist/es2019/components/i18n.js +1 -1
- package/dist/es2019/util/ufoExperiences.js +6 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics.js +12 -9
- package/dist/esm/components/UserPicker.js +6 -2
- package/dist/esm/components/i18n.js +1 -1
- package/dist/esm/util/ufoExperiences.js +6 -2
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 8.7.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`35be12dee47`](https://bitbucket.org/atlassian/atlassian-frontend/commits/35be12dee47) - updated content copies for Org People Picker in user-picker and invite-people
|
|
8
|
+
|
|
9
|
+
## 8.7.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`7f37f923832`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7f37f923832) - updated analytics event for org people picker in core invites
|
|
14
|
+
|
|
15
|
+
## 8.7.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`4d4d565e8ad`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4d4d565e8ad) - Skip sending UFO success if already failed
|
|
20
|
+
|
|
3
21
|
## 8.7.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/analytics.js
CHANGED
|
@@ -59,20 +59,21 @@ var checkValidId = function checkValidId(id) {
|
|
|
59
59
|
|
|
60
60
|
var optionData2Analytics = function optionData2Analytics(option) {
|
|
61
61
|
var id = option.id,
|
|
62
|
-
type = option.type;
|
|
62
|
+
type = option.type; // id's of email types are emails which is PII
|
|
63
|
+
|
|
64
|
+
var validatedData = {
|
|
65
|
+
id: checkValidId(id) ? id : null,
|
|
66
|
+
type: type || null
|
|
67
|
+
};
|
|
63
68
|
|
|
64
69
|
if ((0, _utils.isExternalUser)(option)) {
|
|
65
|
-
return {
|
|
70
|
+
return _objectSpread(_objectSpread({}, validatedData), {}, {
|
|
66
71
|
type: 'external_user',
|
|
67
72
|
sources: option.sources,
|
|
68
73
|
externalUserType: option.externalUserType
|
|
69
|
-
};
|
|
74
|
+
});
|
|
70
75
|
} else {
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
id: checkValidId(id) ? id : null,
|
|
74
|
-
type: type || null
|
|
75
|
-
};
|
|
76
|
+
return validatedData;
|
|
76
77
|
}
|
|
77
78
|
};
|
|
78
79
|
|
|
@@ -153,12 +154,14 @@ var selectEvent = function selectEvent(props, state, session, journeyId) {
|
|
|
153
154
|
exports.selectEvent = selectEvent;
|
|
154
155
|
|
|
155
156
|
var searchedEvent = function searchedEvent(props, state, session, journeyId) {
|
|
157
|
+
var searchResults = results(state);
|
|
156
158
|
return createEvent('operational', 'searched', 'userPicker', _objectSpread(_objectSpread({}, createDefaultPickerAttributes(props, session, journeyId)), {}, {
|
|
157
159
|
sessionDuration: sessionDuration(session),
|
|
158
160
|
durationSinceInputChange: durationSinceInputChange(session),
|
|
159
161
|
queryLength: queryLength(state),
|
|
160
162
|
isLoading: isLoading(props, state),
|
|
161
|
-
results:
|
|
163
|
+
results: searchResults,
|
|
164
|
+
numberOfResults: searchResults.length
|
|
162
165
|
}));
|
|
163
166
|
};
|
|
164
167
|
|
|
@@ -27,6 +27,8 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
27
27
|
|
|
28
28
|
var _select = _interopRequireWildcard(require("@atlaskit/select"));
|
|
29
29
|
|
|
30
|
+
var _ufo = require("@atlaskit/ufo");
|
|
31
|
+
|
|
30
32
|
var _react = _interopRequireDefault(require("react"));
|
|
31
33
|
|
|
32
34
|
var _BaseUserPicker = require("./BaseUserPicker");
|
|
@@ -80,9 +82,12 @@ var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
|
80
82
|
(0, _createClass2.default)(UserPickerWithoutAnalytics, [{
|
|
81
83
|
key: "componentDidMount",
|
|
82
84
|
value: function componentDidMount() {
|
|
83
|
-
var experienceForId = _ufoExperiences.userPickerRenderedUfoExperience.getInstance(this.ufoId);
|
|
85
|
+
var experienceForId = _ufoExperiences.userPickerRenderedUfoExperience.getInstance(this.ufoId); // Send UFO success if the experience is still in progress i.e. hasn't failed
|
|
86
|
+
|
|
84
87
|
|
|
85
|
-
experienceForId.
|
|
88
|
+
if ([_ufo.UFOExperienceState.IN_PROGRESS.id, _ufo.UFOExperienceState.STARTED.id].includes(experienceForId.state.id)) {
|
|
89
|
+
experienceForId.success();
|
|
90
|
+
}
|
|
86
91
|
}
|
|
87
92
|
}, {
|
|
88
93
|
key: "render",
|
|
@@ -55,7 +55,7 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
55
55
|
},
|
|
56
56
|
selectToAddEmail: {
|
|
57
57
|
id: 'fabric.elements.user-picker.email.select.to.add',
|
|
58
|
-
defaultMessage: 'Select
|
|
58
|
+
defaultMessage: 'Select then Invite',
|
|
59
59
|
description: 'Byline for valid email option.'
|
|
60
60
|
},
|
|
61
61
|
continueToAddEmail: {
|
|
@@ -47,7 +47,11 @@ var UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
47
47
|
(0, _createClass2.default)(UfoErrorBoundary, [{
|
|
48
48
|
key: "componentDidCatch",
|
|
49
49
|
value: function componentDidCatch() {
|
|
50
|
-
userPickerRenderedUfoExperience.getInstance(this.props.id)
|
|
50
|
+
var instance = userPickerRenderedUfoExperience.getInstance(this.props.id);
|
|
51
|
+
|
|
52
|
+
if (instance.state.id !== _ufo.UFOExperienceState.FAILED.id) {
|
|
53
|
+
instance.failure();
|
|
54
|
+
}
|
|
51
55
|
}
|
|
52
56
|
}, {
|
|
53
57
|
key: "render",
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/analytics.js
CHANGED
|
@@ -34,20 +34,21 @@ const optionData2Analytics = option => {
|
|
|
34
34
|
const {
|
|
35
35
|
id,
|
|
36
36
|
type
|
|
37
|
-
} = option;
|
|
37
|
+
} = option; // id's of email types are emails which is PII
|
|
38
|
+
|
|
39
|
+
const validatedData = {
|
|
40
|
+
id: checkValidId(id) ? id : null,
|
|
41
|
+
type: type || null
|
|
42
|
+
};
|
|
38
43
|
|
|
39
44
|
if (isExternalUser(option)) {
|
|
40
|
-
return {
|
|
45
|
+
return { ...validatedData,
|
|
41
46
|
type: 'external_user',
|
|
42
47
|
sources: option.sources,
|
|
43
48
|
externalUserType: option.externalUserType
|
|
44
49
|
};
|
|
45
50
|
} else {
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
id: checkValidId(id) ? id : null,
|
|
49
|
-
type: type || null
|
|
50
|
-
};
|
|
51
|
+
return validatedData;
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
54
|
|
|
@@ -101,13 +102,17 @@ export const selectEvent = (props, state, session, journeyId, ...args) => {
|
|
|
101
102
|
result: result(args[0])
|
|
102
103
|
});
|
|
103
104
|
};
|
|
104
|
-
export const searchedEvent = (props, state, session, journeyId) =>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
export const searchedEvent = (props, state, session, journeyId) => {
|
|
106
|
+
const searchResults = results(state);
|
|
107
|
+
return createEvent('operational', 'searched', 'userPicker', { ...createDefaultPickerAttributes(props, session, journeyId),
|
|
108
|
+
sessionDuration: sessionDuration(session),
|
|
109
|
+
durationSinceInputChange: durationSinceInputChange(session),
|
|
110
|
+
queryLength: queryLength(state),
|
|
111
|
+
isLoading: isLoading(props, state),
|
|
112
|
+
results: searchResults,
|
|
113
|
+
numberOfResults: searchResults.length
|
|
114
|
+
});
|
|
115
|
+
};
|
|
111
116
|
export const failedEvent = (props, _, session, journeyId) => createEvent('operational', 'failed', 'userPicker', { ...createDefaultPickerAttributes(props, session, journeyId)
|
|
112
117
|
});
|
|
113
118
|
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import Select, { CreatableSelect } from '@atlaskit/select';
|
|
5
|
+
import { UFOExperienceState } from '@atlaskit/ufo';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
import { BaseUserPickerWithoutAnalytics } from './BaseUserPicker';
|
|
7
8
|
import { getStyles } from './styles';
|
|
@@ -21,8 +22,11 @@ export class UserPickerWithoutAnalytics extends React.Component {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
componentDidMount() {
|
|
24
|
-
const experienceForId = experience.getInstance(this.ufoId);
|
|
25
|
-
|
|
25
|
+
const experienceForId = experience.getInstance(this.ufoId); // Send UFO success if the experience is still in progress i.e. hasn't failed
|
|
26
|
+
|
|
27
|
+
if ([UFOExperienceState.IN_PROGRESS.id, UFOExperienceState.STARTED.id].includes(experienceForId.state.id)) {
|
|
28
|
+
experienceForId.success();
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
render() {
|
|
@@ -47,7 +47,7 @@ export const messages = defineMessages({
|
|
|
47
47
|
},
|
|
48
48
|
selectToAddEmail: {
|
|
49
49
|
id: 'fabric.elements.user-picker.email.select.to.add',
|
|
50
|
-
defaultMessage: 'Select
|
|
50
|
+
defaultMessage: 'Select then Invite',
|
|
51
51
|
description: 'Byline for valid email option.'
|
|
52
52
|
},
|
|
53
53
|
continueToAddEmail: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ExperiencePerformanceTypes, ExperienceTypes, ConcurrentExperience } from '@atlaskit/ufo';
|
|
2
|
+
import { ExperiencePerformanceTypes, ExperienceTypes, ConcurrentExperience, UFOExperienceState } from '@atlaskit/ufo';
|
|
3
3
|
export const userPickerRenderedUfoExperience = new ConcurrentExperience('user-picker-rendered', {
|
|
4
4
|
platform: {
|
|
5
5
|
component: 'user-picker'
|
|
@@ -9,7 +9,11 @@ export const userPickerRenderedUfoExperience = new ConcurrentExperience('user-pi
|
|
|
9
9
|
});
|
|
10
10
|
export class UfoErrorBoundary extends React.Component {
|
|
11
11
|
componentDidCatch() {
|
|
12
|
-
userPickerRenderedUfoExperience.getInstance(this.props.id)
|
|
12
|
+
const instance = userPickerRenderedUfoExperience.getInstance(this.props.id);
|
|
13
|
+
|
|
14
|
+
if (instance.state.id !== UFOExperienceState.FAILED.id) {
|
|
15
|
+
instance.failure();
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
render() {
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/analytics.js
CHANGED
|
@@ -42,20 +42,21 @@ var checkValidId = function checkValidId(id) {
|
|
|
42
42
|
|
|
43
43
|
var optionData2Analytics = function optionData2Analytics(option) {
|
|
44
44
|
var id = option.id,
|
|
45
|
-
type = option.type;
|
|
45
|
+
type = option.type; // id's of email types are emails which is PII
|
|
46
|
+
|
|
47
|
+
var validatedData = {
|
|
48
|
+
id: checkValidId(id) ? id : null,
|
|
49
|
+
type: type || null
|
|
50
|
+
};
|
|
46
51
|
|
|
47
52
|
if (isExternalUser(option)) {
|
|
48
|
-
return {
|
|
53
|
+
return _objectSpread(_objectSpread({}, validatedData), {}, {
|
|
49
54
|
type: 'external_user',
|
|
50
55
|
sources: option.sources,
|
|
51
56
|
externalUserType: option.externalUserType
|
|
52
|
-
};
|
|
57
|
+
});
|
|
53
58
|
} else {
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
id: checkValidId(id) ? id : null,
|
|
57
|
-
type: type || null
|
|
58
|
-
};
|
|
59
|
+
return validatedData;
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
|
|
@@ -121,12 +122,14 @@ export var selectEvent = function selectEvent(props, state, session, journeyId)
|
|
|
121
122
|
}));
|
|
122
123
|
};
|
|
123
124
|
export var searchedEvent = function searchedEvent(props, state, session, journeyId) {
|
|
125
|
+
var searchResults = results(state);
|
|
124
126
|
return createEvent('operational', 'searched', 'userPicker', _objectSpread(_objectSpread({}, createDefaultPickerAttributes(props, session, journeyId)), {}, {
|
|
125
127
|
sessionDuration: sessionDuration(session),
|
|
126
128
|
durationSinceInputChange: durationSinceInputChange(session),
|
|
127
129
|
queryLength: queryLength(state),
|
|
128
130
|
isLoading: isLoading(props, state),
|
|
129
|
-
results:
|
|
131
|
+
results: searchResults,
|
|
132
|
+
numberOfResults: searchResults.length
|
|
130
133
|
}));
|
|
131
134
|
};
|
|
132
135
|
export var failedEvent = function failedEvent(props, _, session, journeyId) {
|
|
@@ -16,6 +16,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
16
16
|
|
|
17
17
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
18
18
|
import Select, { CreatableSelect } from '@atlaskit/select';
|
|
19
|
+
import { UFOExperienceState } from '@atlaskit/ufo';
|
|
19
20
|
import React from 'react';
|
|
20
21
|
import { BaseUserPickerWithoutAnalytics } from './BaseUserPicker';
|
|
21
22
|
import { getStyles } from './styles';
|
|
@@ -46,8 +47,11 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
46
47
|
_createClass(UserPickerWithoutAnalytics, [{
|
|
47
48
|
key: "componentDidMount",
|
|
48
49
|
value: function componentDidMount() {
|
|
49
|
-
var experienceForId = experience.getInstance(this.ufoId);
|
|
50
|
-
|
|
50
|
+
var experienceForId = experience.getInstance(this.ufoId); // Send UFO success if the experience is still in progress i.e. hasn't failed
|
|
51
|
+
|
|
52
|
+
if ([UFOExperienceState.IN_PROGRESS.id, UFOExperienceState.STARTED.id].includes(experienceForId.state.id)) {
|
|
53
|
+
experienceForId.success();
|
|
54
|
+
}
|
|
51
55
|
}
|
|
52
56
|
}, {
|
|
53
57
|
key: "render",
|
|
@@ -47,7 +47,7 @@ export var messages = defineMessages({
|
|
|
47
47
|
},
|
|
48
48
|
selectToAddEmail: {
|
|
49
49
|
id: 'fabric.elements.user-picker.email.select.to.add',
|
|
50
|
-
defaultMessage: 'Select
|
|
50
|
+
defaultMessage: 'Select then Invite',
|
|
51
51
|
description: 'Byline for valid email option.'
|
|
52
52
|
},
|
|
53
53
|
continueToAddEmail: {
|
|
@@ -9,7 +9,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import { ExperiencePerformanceTypes, ExperienceTypes, ConcurrentExperience } from '@atlaskit/ufo';
|
|
12
|
+
import { ExperiencePerformanceTypes, ExperienceTypes, ConcurrentExperience, UFOExperienceState } from '@atlaskit/ufo';
|
|
13
13
|
export var userPickerRenderedUfoExperience = new ConcurrentExperience('user-picker-rendered', {
|
|
14
14
|
platform: {
|
|
15
15
|
component: 'user-picker'
|
|
@@ -31,7 +31,11 @@ export var UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
31
31
|
_createClass(UfoErrorBoundary, [{
|
|
32
32
|
key: "componentDidCatch",
|
|
33
33
|
value: function componentDidCatch() {
|
|
34
|
-
userPickerRenderedUfoExperience.getInstance(this.props.id)
|
|
34
|
+
var instance = userPickerRenderedUfoExperience.getInstance(this.props.id);
|
|
35
|
+
|
|
36
|
+
if (instance.state.id !== UFOExperienceState.FAILED.id) {
|
|
37
|
+
instance.failure();
|
|
38
|
+
}
|
|
35
39
|
}
|
|
36
40
|
}, {
|
|
37
41
|
key: "render",
|
package/dist/esm/version.json
CHANGED