@atlaskit/smart-user-picker 10.0.3 → 10.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 +7 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/SmartUserPicker.js +4 -3
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/SmartUserPicker.js +3 -1
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/SmartUserPicker.js +4 -3
- package/dist/types/types.d.ts +3 -0
- package/dist/types-ts4.5/types.d.ts +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/cjs/analytics.js
CHANGED
|
@@ -12,7 +12,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
12
12
|
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; } // eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
13
13
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
14
|
var packageName = "@atlaskit/smart-user-picker";
|
|
15
|
-
var packageVersion = "
|
|
15
|
+
var packageVersion = "0.0.0-development";
|
|
16
16
|
var startSession = exports.startSession = function startSession() {
|
|
17
17
|
return {
|
|
18
18
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
@@ -50,7 +50,7 @@ var ufoEndStateConfig = function ufoEndStateConfig(fieldId) {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
var hasContextChanged = function hasContextChanged(oldContext, newContext) {
|
|
53
|
-
return oldContext.siteId !== newContext.siteId || oldContext.orgId !== newContext.orgId || oldContext.productKey !== newContext.productKey || oldContext.principalId !== newContext.principalId || oldContext.containerId !== newContext.containerId || oldContext.objectId !== newContext.objectId || oldContext.childObjectId !== newContext.childObjectId;
|
|
53
|
+
return oldContext.siteId !== newContext.siteId || oldContext.orgId !== newContext.orgId || oldContext.userbaseId !== newContext.userbaseId || oldContext.productKey !== newContext.productKey || oldContext.principalId !== newContext.principalId || oldContext.containerId !== newContext.containerId || oldContext.objectId !== newContext.objectId || oldContext.childObjectId !== newContext.childObjectId;
|
|
54
54
|
};
|
|
55
55
|
var stringContains = function stringContains(str, substr) {
|
|
56
56
|
if (str === null || str === undefined) {
|
|
@@ -118,12 +118,12 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
|
|
|
118
118
|
});
|
|
119
119
|
(0, _defineProperty2.default)(_this, "memoizedFilterOptions", (0, _memoizeOne.default)(_this.filterOptions));
|
|
120
120
|
(0, _defineProperty2.default)(_this, "getUsers", (0, _debounce.default)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
121
|
-
var _this$state, query, sessionId, closed, _this$props, baseUrl, childObjectId, containerId, fieldId, includeGroups, includeTeams, includeTeamsUpdates, includeUsers, includeNonLicensedUsers, intl, fetchOptions, maxOptions, objectId, onEmpty, onError, overrideByline, displayEmailInByline, verifiedTeams, orgId, principalId, productAttributes, productKey, restrictTo, searchQueryFilter, siteId, isTeamSyncedToGroupDirectoryFilter, transformOptions, userResolvers, enableEmailSearch, maxNumberOfResults, startTime, isEmail, recommendationsRequest, _yield$onEmpty, _query, recommendedUsers, userRecommendationsPromise, userResolversPromises, _yield$Promise$all, _yield$Promise$all2, mainRecommendations, userResolverResults, _iterator, _step, option, _iterator2, _step2, _option, _iterator3, _step3, _option2, userMatches, elapsedTimeMilli, transformedOptions, displayedUsers, is5xxEvent, onErrorProducedError, defaultUsers, _elapsedTimeMilli;
|
|
121
|
+
var _this$state, query, sessionId, closed, _this$props, baseUrl, childObjectId, containerId, fieldId, includeGroups, includeTeams, includeTeamsUpdates, includeUsers, includeNonLicensedUsers, intl, fetchOptions, maxOptions, objectId, onEmpty, onError, overrideByline, displayEmailInByline, verifiedTeams, orgId, userbaseId, principalId, productAttributes, productKey, restrictTo, searchQueryFilter, siteId, isTeamSyncedToGroupDirectoryFilter, transformOptions, userResolvers, enableEmailSearch, maxNumberOfResults, startTime, isEmail, recommendationsRequest, _yield$onEmpty, _query, recommendedUsers, userRecommendationsPromise, userResolversPromises, _yield$Promise$all, _yield$Promise$all2, mainRecommendations, userResolverResults, _iterator, _step, option, _iterator2, _step2, _option, _iterator3, _step3, _option2, userMatches, elapsedTimeMilli, transformedOptions, displayedUsers, is5xxEvent, onErrorProducedError, defaultUsers, _elapsedTimeMilli;
|
|
122
122
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
123
123
|
while (1) switch (_context.prev = _context.next) {
|
|
124
124
|
case 0:
|
|
125
125
|
_this$state = _this.state, query = _this$state.query, sessionId = _this$state.sessionId, closed = _this$state.closed;
|
|
126
|
-
_this$props = _this.props, baseUrl = _this$props.baseUrl, childObjectId = _this$props.childObjectId, containerId = _this$props.containerId, fieldId = _this$props.fieldId, includeGroups = _this$props.includeGroups, includeTeams = _this$props.includeTeams, includeTeamsUpdates = _this$props.includeTeamsUpdates, includeUsers = _this$props.includeUsers, includeNonLicensedUsers = _this$props.includeNonLicensedUsers, intl = _this$props.intl, fetchOptions = _this$props.fetchOptions, maxOptions = _this$props.maxOptions, objectId = _this$props.objectId, onEmpty = _this$props.onEmpty, onError = _this$props.onError, overrideByline = _this$props.overrideByline, displayEmailInByline = _this$props.displayEmailInByline, verifiedTeams = _this$props.verifiedTeams, orgId = _this$props.orgId, principalId = _this$props.principalId, productAttributes = _this$props.productAttributes, productKey = _this$props.productKey, restrictTo = _this$props.restrictTo, searchQueryFilter = _this$props.searchQueryFilter, siteId = _this$props.siteId, isTeamSyncedToGroupDirectoryFilter = _this$props.isTeamSyncedToGroupDirectoryFilter, transformOptions = _this$props.transformOptions, userResolvers = _this$props.userResolvers, enableEmailSearch = _this$props.enableEmailSearch;
|
|
126
|
+
_this$props = _this.props, baseUrl = _this$props.baseUrl, childObjectId = _this$props.childObjectId, containerId = _this$props.containerId, fieldId = _this$props.fieldId, includeGroups = _this$props.includeGroups, includeTeams = _this$props.includeTeams, includeTeamsUpdates = _this$props.includeTeamsUpdates, includeUsers = _this$props.includeUsers, includeNonLicensedUsers = _this$props.includeNonLicensedUsers, intl = _this$props.intl, fetchOptions = _this$props.fetchOptions, maxOptions = _this$props.maxOptions, objectId = _this$props.objectId, onEmpty = _this$props.onEmpty, onError = _this$props.onError, overrideByline = _this$props.overrideByline, displayEmailInByline = _this$props.displayEmailInByline, verifiedTeams = _this$props.verifiedTeams, orgId = _this$props.orgId, userbaseId = _this$props.userbaseId, principalId = _this$props.principalId, productAttributes = _this$props.productAttributes, productKey = _this$props.productKey, restrictTo = _this$props.restrictTo, searchQueryFilter = _this$props.searchQueryFilter, siteId = _this$props.siteId, isTeamSyncedToGroupDirectoryFilter = _this$props.isTeamSyncedToGroupDirectoryFilter, transformOptions = _this$props.transformOptions, userResolvers = _this$props.userResolvers, enableEmailSearch = _this$props.enableEmailSearch;
|
|
127
127
|
maxNumberOfResults = maxOptions || 100;
|
|
128
128
|
startTime = window.performance.now(); // Check if this is an email search
|
|
129
129
|
isEmail = enableEmailSearch && isEmailQuery(query);
|
|
@@ -137,6 +137,7 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
|
|
|
137
137
|
productKey: productKey,
|
|
138
138
|
siteId: siteId,
|
|
139
139
|
organizationId: orgId,
|
|
140
|
+
userbaseId: userbaseId,
|
|
140
141
|
childObjectId: childObjectId,
|
|
141
142
|
sessionId: sessionId,
|
|
142
143
|
productAttributes: productAttributes
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
5
|
const packageName = "@atlaskit/smart-user-picker";
|
|
6
|
-
const packageVersion = "
|
|
6
|
+
const packageVersion = "0.0.0-development";
|
|
7
7
|
export const startSession = () => ({
|
|
8
8
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
9
9
|
id: uuid(),
|
|
@@ -23,7 +23,7 @@ const ufoEndStateConfig = fieldId => {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
const hasContextChanged = (oldContext, newContext) => oldContext.siteId !== newContext.siteId || oldContext.orgId !== newContext.orgId || oldContext.productKey !== newContext.productKey || oldContext.principalId !== newContext.principalId || oldContext.containerId !== newContext.containerId || oldContext.objectId !== newContext.objectId || oldContext.childObjectId !== newContext.childObjectId;
|
|
26
|
+
const hasContextChanged = (oldContext, newContext) => oldContext.siteId !== newContext.siteId || oldContext.orgId !== newContext.orgId || oldContext.userbaseId !== newContext.userbaseId || oldContext.productKey !== newContext.productKey || oldContext.principalId !== newContext.principalId || oldContext.containerId !== newContext.containerId || oldContext.objectId !== newContext.objectId || oldContext.childObjectId !== newContext.childObjectId;
|
|
27
27
|
const stringContains = (str, substr) => {
|
|
28
28
|
if (str === null || str === undefined) {
|
|
29
29
|
return false;
|
|
@@ -105,6 +105,7 @@ export class SmartUserPickerWithoutAnalytics extends React.Component {
|
|
|
105
105
|
displayEmailInByline,
|
|
106
106
|
verifiedTeams,
|
|
107
107
|
orgId,
|
|
108
|
+
userbaseId,
|
|
108
109
|
principalId,
|
|
109
110
|
productAttributes,
|
|
110
111
|
productKey,
|
|
@@ -131,6 +132,7 @@ export class SmartUserPickerWithoutAnalytics extends React.Component {
|
|
|
131
132
|
productKey,
|
|
132
133
|
siteId,
|
|
133
134
|
organizationId: orgId,
|
|
135
|
+
userbaseId,
|
|
134
136
|
childObjectId,
|
|
135
137
|
sessionId,
|
|
136
138
|
productAttributes
|
package/dist/esm/analytics.js
CHANGED
|
@@ -6,7 +6,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
7
7
|
import { v4 as uuid } from 'uuid';
|
|
8
8
|
var packageName = "@atlaskit/smart-user-picker";
|
|
9
|
-
var packageVersion = "
|
|
9
|
+
var packageVersion = "0.0.0-development";
|
|
10
10
|
export var startSession = function startSession() {
|
|
11
11
|
return {
|
|
12
12
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
@@ -42,7 +42,7 @@ var ufoEndStateConfig = function ufoEndStateConfig(fieldId) {
|
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
var hasContextChanged = function hasContextChanged(oldContext, newContext) {
|
|
45
|
-
return oldContext.siteId !== newContext.siteId || oldContext.orgId !== newContext.orgId || oldContext.productKey !== newContext.productKey || oldContext.principalId !== newContext.principalId || oldContext.containerId !== newContext.containerId || oldContext.objectId !== newContext.objectId || oldContext.childObjectId !== newContext.childObjectId;
|
|
45
|
+
return oldContext.siteId !== newContext.siteId || oldContext.orgId !== newContext.orgId || oldContext.userbaseId !== newContext.userbaseId || oldContext.productKey !== newContext.productKey || oldContext.principalId !== newContext.principalId || oldContext.containerId !== newContext.containerId || oldContext.objectId !== newContext.objectId || oldContext.childObjectId !== newContext.childObjectId;
|
|
46
46
|
};
|
|
47
47
|
var stringContains = function stringContains(str, substr) {
|
|
48
48
|
if (str === null || str === undefined) {
|
|
@@ -110,12 +110,12 @@ export var SmartUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
|
|
|
110
110
|
});
|
|
111
111
|
_defineProperty(_this, "memoizedFilterOptions", memoizeOne(_this.filterOptions));
|
|
112
112
|
_defineProperty(_this, "getUsers", debounce( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
113
|
-
var _this$state, query, sessionId, closed, _this$props, baseUrl, childObjectId, containerId, fieldId, includeGroups, includeTeams, includeTeamsUpdates, includeUsers, includeNonLicensedUsers, intl, fetchOptions, maxOptions, objectId, onEmpty, onError, overrideByline, displayEmailInByline, verifiedTeams, orgId, principalId, productAttributes, productKey, restrictTo, searchQueryFilter, siteId, isTeamSyncedToGroupDirectoryFilter, transformOptions, userResolvers, enableEmailSearch, maxNumberOfResults, startTime, isEmail, recommendationsRequest, _yield$onEmpty, _query, recommendedUsers, userRecommendationsPromise, userResolversPromises, _yield$Promise$all, _yield$Promise$all2, mainRecommendations, userResolverResults, _iterator, _step, option, _iterator2, _step2, _option, _iterator3, _step3, _option2, userMatches, elapsedTimeMilli, transformedOptions, displayedUsers, is5xxEvent, onErrorProducedError, defaultUsers, _elapsedTimeMilli;
|
|
113
|
+
var _this$state, query, sessionId, closed, _this$props, baseUrl, childObjectId, containerId, fieldId, includeGroups, includeTeams, includeTeamsUpdates, includeUsers, includeNonLicensedUsers, intl, fetchOptions, maxOptions, objectId, onEmpty, onError, overrideByline, displayEmailInByline, verifiedTeams, orgId, userbaseId, principalId, productAttributes, productKey, restrictTo, searchQueryFilter, siteId, isTeamSyncedToGroupDirectoryFilter, transformOptions, userResolvers, enableEmailSearch, maxNumberOfResults, startTime, isEmail, recommendationsRequest, _yield$onEmpty, _query, recommendedUsers, userRecommendationsPromise, userResolversPromises, _yield$Promise$all, _yield$Promise$all2, mainRecommendations, userResolverResults, _iterator, _step, option, _iterator2, _step2, _option, _iterator3, _step3, _option2, userMatches, elapsedTimeMilli, transformedOptions, displayedUsers, is5xxEvent, onErrorProducedError, defaultUsers, _elapsedTimeMilli;
|
|
114
114
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
115
115
|
while (1) switch (_context.prev = _context.next) {
|
|
116
116
|
case 0:
|
|
117
117
|
_this$state = _this.state, query = _this$state.query, sessionId = _this$state.sessionId, closed = _this$state.closed;
|
|
118
|
-
_this$props = _this.props, baseUrl = _this$props.baseUrl, childObjectId = _this$props.childObjectId, containerId = _this$props.containerId, fieldId = _this$props.fieldId, includeGroups = _this$props.includeGroups, includeTeams = _this$props.includeTeams, includeTeamsUpdates = _this$props.includeTeamsUpdates, includeUsers = _this$props.includeUsers, includeNonLicensedUsers = _this$props.includeNonLicensedUsers, intl = _this$props.intl, fetchOptions = _this$props.fetchOptions, maxOptions = _this$props.maxOptions, objectId = _this$props.objectId, onEmpty = _this$props.onEmpty, onError = _this$props.onError, overrideByline = _this$props.overrideByline, displayEmailInByline = _this$props.displayEmailInByline, verifiedTeams = _this$props.verifiedTeams, orgId = _this$props.orgId, principalId = _this$props.principalId, productAttributes = _this$props.productAttributes, productKey = _this$props.productKey, restrictTo = _this$props.restrictTo, searchQueryFilter = _this$props.searchQueryFilter, siteId = _this$props.siteId, isTeamSyncedToGroupDirectoryFilter = _this$props.isTeamSyncedToGroupDirectoryFilter, transformOptions = _this$props.transformOptions, userResolvers = _this$props.userResolvers, enableEmailSearch = _this$props.enableEmailSearch;
|
|
118
|
+
_this$props = _this.props, baseUrl = _this$props.baseUrl, childObjectId = _this$props.childObjectId, containerId = _this$props.containerId, fieldId = _this$props.fieldId, includeGroups = _this$props.includeGroups, includeTeams = _this$props.includeTeams, includeTeamsUpdates = _this$props.includeTeamsUpdates, includeUsers = _this$props.includeUsers, includeNonLicensedUsers = _this$props.includeNonLicensedUsers, intl = _this$props.intl, fetchOptions = _this$props.fetchOptions, maxOptions = _this$props.maxOptions, objectId = _this$props.objectId, onEmpty = _this$props.onEmpty, onError = _this$props.onError, overrideByline = _this$props.overrideByline, displayEmailInByline = _this$props.displayEmailInByline, verifiedTeams = _this$props.verifiedTeams, orgId = _this$props.orgId, userbaseId = _this$props.userbaseId, principalId = _this$props.principalId, productAttributes = _this$props.productAttributes, productKey = _this$props.productKey, restrictTo = _this$props.restrictTo, searchQueryFilter = _this$props.searchQueryFilter, siteId = _this$props.siteId, isTeamSyncedToGroupDirectoryFilter = _this$props.isTeamSyncedToGroupDirectoryFilter, transformOptions = _this$props.transformOptions, userResolvers = _this$props.userResolvers, enableEmailSearch = _this$props.enableEmailSearch;
|
|
119
119
|
maxNumberOfResults = maxOptions || 100;
|
|
120
120
|
startTime = window.performance.now(); // Check if this is an email search
|
|
121
121
|
isEmail = enableEmailSearch && isEmailQuery(query);
|
|
@@ -129,6 +129,7 @@ export var SmartUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
|
|
|
129
129
|
productKey: productKey,
|
|
130
130
|
siteId: siteId,
|
|
131
131
|
organizationId: orgId,
|
|
132
|
+
userbaseId: userbaseId,
|
|
132
133
|
childObjectId: childObjectId,
|
|
133
134
|
sessionId: sessionId,
|
|
134
135
|
productAttributes: productAttributes
|
package/dist/types/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface Context {
|
|
|
10
10
|
productKey: string;
|
|
11
11
|
siteId: string;
|
|
12
12
|
organizationId?: string;
|
|
13
|
+
userbaseId?: string;
|
|
13
14
|
productAttributes?: ProductAttributes;
|
|
14
15
|
}
|
|
15
16
|
export interface RestrictionFilter {
|
|
@@ -249,6 +250,8 @@ export interface SmartProps {
|
|
|
249
250
|
orgId?: string;
|
|
250
251
|
/**
|
|
251
252
|
* Identifier for the userbase scope.
|
|
253
|
+
* Currently, this is supported for team fetching only.
|
|
254
|
+
* When provided, team search uses this scope. Otherwise team search falls back to `orgId` and `siteId`.
|
|
252
255
|
*/
|
|
253
256
|
userbaseId?: string;
|
|
254
257
|
/**
|
|
@@ -10,6 +10,7 @@ export interface Context {
|
|
|
10
10
|
productKey: string;
|
|
11
11
|
siteId: string;
|
|
12
12
|
organizationId?: string;
|
|
13
|
+
userbaseId?: string;
|
|
13
14
|
productAttributes?: ProductAttributes;
|
|
14
15
|
}
|
|
15
16
|
export interface RestrictionFilter {
|
|
@@ -249,6 +250,8 @@ export interface SmartProps {
|
|
|
249
250
|
orgId?: string;
|
|
250
251
|
/**
|
|
251
252
|
* Identifier for the userbase scope.
|
|
253
|
+
* Currently, this is supported for team fetching only.
|
|
254
|
+
* When provided, team search uses this scope. Otherwise team search falls back to `orgId` and `siteId`.
|
|
252
255
|
*/
|
|
253
256
|
userbaseId?: string;
|
|
254
257
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-user-picker",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@atlaskit/select": "^21.
|
|
53
|
+
"@atlaskit/select": "^21.11.0",
|
|
54
54
|
"@atlaskit/util-data-test": "^18.5.0",
|
|
55
55
|
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
56
56
|
"@testing-library/dom": "^10.1.0",
|