@atlaskit/smart-user-picker 6.5.0 → 6.6.0

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
  # @atlassian/smart-user-picker
2
2
 
3
+ ## 6.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#68110](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68110) [`8f8a81b663ca`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f8a81b663ca) - [ux] Introduced includeNonLicensedUsers prop to request including non licensed users from the recommendation API.
8
+
3
9
  ## 6.5.0
4
10
 
5
11
  ### Minor Changes
@@ -11,7 +11,7 @@ var _uuid = require("uuid");
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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; }
13
13
  var packageName = "@atlaskit/smart-user-picker";
14
- var packageVersion = "6.5.0";
14
+ var packageVersion = "6.6.0";
15
15
  var startSession = exports.startSession = function startSession() {
16
16
  return {
17
17
  id: (0, _uuid.v4)(),
@@ -105,12 +105,12 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
105
105
  });
106
106
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "memoizedFilterOptions", (0, _memoizeOne.default)(_this.filterOptions));
107
107
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getUsers", (0, _debounce.default)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
108
- var _this$state, query, sessionId, closed, _this$props, baseUrl, childObjectId, containerId, fieldId, includeGroups, includeTeams, includeUsers, intl, maxOptions, objectId, onEmpty, onError, orgId, principalId, productAttributes, productKey, searchQueryFilter, siteId, maxNumberOfResults, startTime, recommendationsRequest, _yield$onEmpty, recommendedUsers, elapsedTimeMilli, displayedUsers, is5xxEvent, onErrorProducedError, defaultUsers, _elapsedTimeMilli;
108
+ var _this$state, query, sessionId, closed, _this$props, baseUrl, childObjectId, containerId, fieldId, includeGroups, includeTeams, includeUsers, includeNonLicensedUsers, intl, maxOptions, objectId, onEmpty, onError, orgId, principalId, productAttributes, productKey, searchQueryFilter, siteId, maxNumberOfResults, startTime, recommendationsRequest, _yield$onEmpty, recommendedUsers, elapsedTimeMilli, displayedUsers, is5xxEvent, onErrorProducedError, defaultUsers, _elapsedTimeMilli;
109
109
  return _regenerator.default.wrap(function _callee$(_context) {
110
110
  while (1) switch (_context.prev = _context.next) {
111
111
  case 0:
112
112
  _this$state = _this.state, query = _this$state.query, sessionId = _this$state.sessionId, closed = _this$state.closed;
113
- _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, includeUsers = _this$props.includeUsers, intl = _this$props.intl, maxOptions = _this$props.maxOptions, objectId = _this$props.objectId, onEmpty = _this$props.onEmpty, onError = _this$props.onError, orgId = _this$props.orgId, principalId = _this$props.principalId, productAttributes = _this$props.productAttributes, productKey = _this$props.productKey, searchQueryFilter = _this$props.searchQueryFilter, siteId = _this$props.siteId;
113
+ _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, includeUsers = _this$props.includeUsers, includeNonLicensedUsers = _this$props.includeNonLicensedUsers, intl = _this$props.intl, maxOptions = _this$props.maxOptions, objectId = _this$props.objectId, onEmpty = _this$props.onEmpty, onError = _this$props.onError, orgId = _this$props.orgId, principalId = _this$props.principalId, productAttributes = _this$props.productAttributes, productKey = _this$props.productKey, searchQueryFilter = _this$props.searchQueryFilter, siteId = _this$props.siteId;
114
114
  maxNumberOfResults = maxOptions || 100;
115
115
  startTime = window.performance.now();
116
116
  recommendationsRequest = {
@@ -130,6 +130,7 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
130
130
  includeUsers: includeUsers,
131
131
  includeGroups: includeGroups,
132
132
  includeTeams: includeTeams,
133
+ includeNonLicensedUsers: includeNonLicensedUsers,
133
134
  maxNumberOfResults: maxNumberOfResults,
134
135
  query: query,
135
136
  searchQueryFilter: searchQueryFilter
@@ -438,6 +439,7 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
438
439
  includeUsers: true,
439
440
  includeGroups: false,
440
441
  includeTeams: false,
442
+ includeNonLicensedUsers: false,
441
443
  prefetch: false,
442
444
  principalId: 'Context',
443
445
  debounceTime: DEFAULT_DEBOUNCE_TIME_MS
@@ -24,6 +24,7 @@ var getUserRecommendations = function getUserRecommendations(request, intl) {
24
24
  includeUsers: request.includeUsers,
25
25
  includeGroups: request.includeGroups,
26
26
  includeTeams: request.includeTeams,
27
+ includeNonLicensedUsers: request.includeNonLicensedUsers,
27
28
  maxNumberOfResults: request.maxNumberOfResults,
28
29
  performSearchQueryOnly: false,
29
30
  searchQuery: _objectSpread(_objectSpread({
@@ -1,7 +1,7 @@
1
1
  import { createAndFireEvent } from '@atlaskit/analytics-next';
2
2
  import { v4 as uuid } from 'uuid';
3
3
  const packageName = "@atlaskit/smart-user-picker";
4
- const packageVersion = "6.5.0";
4
+ const packageVersion = "6.6.0";
5
5
  export const startSession = () => ({
6
6
  id: uuid(),
7
7
  start: Date.now(),
@@ -85,6 +85,7 @@ export class SmartUserPickerWithoutAnalytics extends React.Component {
85
85
  includeGroups,
86
86
  includeTeams,
87
87
  includeUsers,
88
+ includeNonLicensedUsers,
88
89
  intl,
89
90
  maxOptions,
90
91
  objectId,
@@ -116,6 +117,7 @@ export class SmartUserPickerWithoutAnalytics extends React.Component {
116
117
  includeUsers,
117
118
  includeGroups,
118
119
  includeTeams,
120
+ includeNonLicensedUsers,
119
121
  maxNumberOfResults,
120
122
  query,
121
123
  searchQueryFilter
@@ -331,6 +333,7 @@ _defineProperty(SmartUserPickerWithoutAnalytics, "defaultProps", {
331
333
  includeUsers: true,
332
334
  includeGroups: false,
333
335
  includeTeams: false,
336
+ includeNonLicensedUsers: false,
334
337
  prefetch: false,
335
338
  principalId: 'Context',
336
339
  debounceTime: DEFAULT_DEBOUNCE_TIME_MS
@@ -14,6 +14,7 @@ const getUserRecommendations = (request, intl) => {
14
14
  includeUsers: request.includeUsers,
15
15
  includeGroups: request.includeGroups,
16
16
  includeTeams: request.includeTeams,
17
+ includeNonLicensedUsers: request.includeNonLicensedUsers,
17
18
  maxNumberOfResults: request.maxNumberOfResults,
18
19
  performSearchQueryOnly: false,
19
20
  searchQuery: {
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { createAndFireEvent } from '@atlaskit/analytics-next';
5
5
  import { v4 as uuid } from 'uuid';
6
6
  var packageName = "@atlaskit/smart-user-picker";
7
- var packageVersion = "6.5.0";
7
+ var packageVersion = "6.6.0";
8
8
  export var startSession = function startSession() {
9
9
  return {
10
10
  id: uuid(),
@@ -98,12 +98,12 @@ export var SmartUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
98
98
  });
99
99
  _defineProperty(_assertThisInitialized(_this), "memoizedFilterOptions", memoizeOne(_this.filterOptions));
100
100
  _defineProperty(_assertThisInitialized(_this), "getUsers", debounce( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
101
- var _this$state, query, sessionId, closed, _this$props, baseUrl, childObjectId, containerId, fieldId, includeGroups, includeTeams, includeUsers, intl, maxOptions, objectId, onEmpty, onError, orgId, principalId, productAttributes, productKey, searchQueryFilter, siteId, maxNumberOfResults, startTime, recommendationsRequest, _yield$onEmpty, recommendedUsers, elapsedTimeMilli, displayedUsers, is5xxEvent, onErrorProducedError, defaultUsers, _elapsedTimeMilli;
101
+ var _this$state, query, sessionId, closed, _this$props, baseUrl, childObjectId, containerId, fieldId, includeGroups, includeTeams, includeUsers, includeNonLicensedUsers, intl, maxOptions, objectId, onEmpty, onError, orgId, principalId, productAttributes, productKey, searchQueryFilter, siteId, maxNumberOfResults, startTime, recommendationsRequest, _yield$onEmpty, recommendedUsers, elapsedTimeMilli, displayedUsers, is5xxEvent, onErrorProducedError, defaultUsers, _elapsedTimeMilli;
102
102
  return _regeneratorRuntime.wrap(function _callee$(_context) {
103
103
  while (1) switch (_context.prev = _context.next) {
104
104
  case 0:
105
105
  _this$state = _this.state, query = _this$state.query, sessionId = _this$state.sessionId, closed = _this$state.closed;
106
- _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, includeUsers = _this$props.includeUsers, intl = _this$props.intl, maxOptions = _this$props.maxOptions, objectId = _this$props.objectId, onEmpty = _this$props.onEmpty, onError = _this$props.onError, orgId = _this$props.orgId, principalId = _this$props.principalId, productAttributes = _this$props.productAttributes, productKey = _this$props.productKey, searchQueryFilter = _this$props.searchQueryFilter, siteId = _this$props.siteId;
106
+ _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, includeUsers = _this$props.includeUsers, includeNonLicensedUsers = _this$props.includeNonLicensedUsers, intl = _this$props.intl, maxOptions = _this$props.maxOptions, objectId = _this$props.objectId, onEmpty = _this$props.onEmpty, onError = _this$props.onError, orgId = _this$props.orgId, principalId = _this$props.principalId, productAttributes = _this$props.productAttributes, productKey = _this$props.productKey, searchQueryFilter = _this$props.searchQueryFilter, siteId = _this$props.siteId;
107
107
  maxNumberOfResults = maxOptions || 100;
108
108
  startTime = window.performance.now();
109
109
  recommendationsRequest = {
@@ -123,6 +123,7 @@ export var SmartUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
123
123
  includeUsers: includeUsers,
124
124
  includeGroups: includeGroups,
125
125
  includeTeams: includeTeams,
126
+ includeNonLicensedUsers: includeNonLicensedUsers,
126
127
  maxNumberOfResults: maxNumberOfResults,
127
128
  query: query,
128
129
  searchQueryFilter: searchQueryFilter
@@ -433,6 +434,7 @@ _defineProperty(SmartUserPickerWithoutAnalytics, "defaultProps", {
433
434
  includeUsers: true,
434
435
  includeGroups: false,
435
436
  includeTeams: false,
437
+ includeNonLicensedUsers: false,
436
438
  prefetch: false,
437
439
  principalId: 'Context',
438
440
  debounceTime: DEFAULT_DEBOUNCE_TIME_MS
@@ -17,6 +17,7 @@ var getUserRecommendations = function getUserRecommendations(request, intl) {
17
17
  includeUsers: request.includeUsers,
18
18
  includeGroups: request.includeGroups,
19
19
  includeTeams: request.includeTeams,
20
+ includeNonLicensedUsers: request.includeNonLicensedUsers,
20
21
  maxNumberOfResults: request.maxNumberOfResults,
21
22
  performSearchQueryOnly: false,
22
23
  searchQuery: _objectSpread(_objectSpread({
@@ -12,6 +12,7 @@ export declare class SmartUserPickerWithoutAnalytics extends React.Component<Pro
12
12
  includeUsers: boolean;
13
13
  includeGroups: boolean;
14
14
  includeTeams: boolean;
15
+ includeNonLicensedUsers: boolean;
15
16
  prefetch: boolean;
16
17
  principalId: string;
17
18
  debounceTime: number;
@@ -21,6 +21,7 @@ export interface RecommendationRequest {
21
21
  includeUsers?: boolean;
22
22
  includeGroups?: boolean;
23
23
  includeTeams?: boolean;
24
+ includeNonLicensedUsers?: boolean;
24
25
  }
25
26
  type OnError = (error: any, request: RecommendationRequest) => Promise<OptionData[]> | void;
26
27
  type OnValueError = (error: any, defaultValue: DefaultValue) => Promise<OptionData[]> | void;
@@ -117,6 +118,10 @@ export interface SmartProps {
117
118
  * Whether to include users in the resultset. @default true
118
119
  */
119
120
  includeUsers?: boolean;
121
+ /**
122
+ * Whether to include non licensed users in the resultset. @default false
123
+ */
124
+ includeNonLicensedUsers?: boolean;
120
125
  /**
121
126
  * An identifier of the closest context object, e.g. issueId, pageId, pullRequestId.
122
127
  * Used for analytics. Optional, but please include if available.
@@ -12,6 +12,7 @@ export declare class SmartUserPickerWithoutAnalytics extends React.Component<Pro
12
12
  includeUsers: boolean;
13
13
  includeGroups: boolean;
14
14
  includeTeams: boolean;
15
+ includeNonLicensedUsers: boolean;
15
16
  prefetch: boolean;
16
17
  principalId: string;
17
18
  debounceTime: number;
@@ -21,6 +21,7 @@ export interface RecommendationRequest {
21
21
  includeUsers?: boolean;
22
22
  includeGroups?: boolean;
23
23
  includeTeams?: boolean;
24
+ includeNonLicensedUsers?: boolean;
24
25
  }
25
26
  type OnError = (error: any, request: RecommendationRequest) => Promise<OptionData[]> | void;
26
27
  type OnValueError = (error: any, defaultValue: DefaultValue) => Promise<OptionData[]> | void;
@@ -117,6 +118,10 @@ export interface SmartProps {
117
118
  * Whether to include users in the resultset. @default true
118
119
  */
119
120
  includeUsers?: boolean;
121
+ /**
122
+ * Whether to include non licensed users in the resultset. @default false
123
+ */
124
+ includeNonLicensedUsers?: boolean;
120
125
  /**
121
126
  * An identifier of the closest context object, e.g. issueId, pageId, pullRequestId.
122
127
  * Used for analytics. Optional, but please include if available.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-user-picker",
3
- "version": "6.5.0",
3
+ "version": "6.6.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },