@atlaskit/user-picker 8.7.2 → 8.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/user-picker
2
2
 
3
+ ## 8.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7f37f923832`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7f37f923832) - updated analytics event for org people picker in core invites
8
+
3
9
  ## 8.7.2
4
10
 
5
11
  ### Patch Changes
@@ -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
- // id's of email types are emails which is PII
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: results(state)
163
+ results: searchResults,
164
+ numberOfResults: searchResults.length
162
165
  }));
163
166
  };
164
167
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "8.7.2",
3
+ "version": "8.7.3",
4
4
  "sideEffects": false
5
5
  }
@@ -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
- // id's of email types are emails which is PII
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) => createEvent('operational', 'searched', 'userPicker', { ...createDefaultPickerAttributes(props, session, journeyId),
105
- sessionDuration: sessionDuration(session),
106
- durationSinceInputChange: durationSinceInputChange(session),
107
- queryLength: queryLength(state),
108
- isLoading: isLoading(props, state),
109
- results: results(state)
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
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "8.7.2",
3
+ "version": "8.7.3",
4
4
  "sideEffects": false
5
5
  }
@@ -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
- // id's of email types are emails which is PII
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: results(state)
131
+ results: searchResults,
132
+ numberOfResults: searchResults.length
130
133
  }));
131
134
  };
132
135
  export var failedEvent = function failedEvent(props, _, session, journeyId) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "8.7.2",
3
+ "version": "8.7.3",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "8.7.2",
3
+ "version": "8.7.3",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"