@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 +6 -0
- package/dist/cjs/analytics.js +12 -9
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics.js +19 -14
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics.js +12 -9
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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
|
|
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
|
|
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) {
|
package/dist/esm/version.json
CHANGED