@atlaskit/smart-user-picker 8.3.0 → 8.4.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,19 @@
1
1
  # @atlassian/smart-user-picker
2
2
 
3
+ ## 8.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`f680d15e02105`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f680d15e02105) -
8
+ Move from customQuery to searchEmail argument in URS query
9
+
10
+ ## 8.3.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`56ac0cf74b37d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/56ac0cf74b37d) -
15
+ Migrated teams assets to new service
16
+
3
17
  ## 8.3.0
4
18
 
5
19
  ### Minor Changes
@@ -0,0 +1,38 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.products.json",
3
+ "compilerOptions": {
4
+ "target": "es5",
5
+ "outDir": "../../../../../tsDist/@atlaskit__smart-user-picker/app",
6
+ "rootDir": "../",
7
+ "composite": true
8
+ },
9
+ "include": [
10
+ "../src/**/*.ts",
11
+ "../src/**/*.tsx"
12
+ ],
13
+ "exclude": [
14
+ "../src/**/__tests__/*",
15
+ "../src/**/*.test.*",
16
+ "../src/**/test.*",
17
+ "../src/**/examples.*",
18
+ "../src/**/examples/*",
19
+ "../src/**/examples/**/*",
20
+ "../src/**/*.stories.*",
21
+ "../src/**/stories/*",
22
+ "../src/**/stories/**/*"
23
+ ],
24
+ "references": [
25
+ {
26
+ "path": "../../../analytics/analytics-next/afm-products/tsconfig.json"
27
+ },
28
+ {
29
+ "path": "../../../platform/feature-flags/afm-products/tsconfig.json"
30
+ },
31
+ {
32
+ "path": "../../../data/ufo-external/afm-products/tsconfig.json"
33
+ },
34
+ {
35
+ "path": "../../../elements/user-picker/afm-products/tsconfig.json"
36
+ }
37
+ ]
38
+ }
@@ -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 = "8.2.1";
14
+ var packageVersion = "0.0.0-development";
15
15
  var startSession = exports.startSession = function startSession() {
16
16
  return {
17
17
  id: (0, _uuid.v4)(),
@@ -143,13 +143,12 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
143
143
  },
144
144
  includeUsers: includeUsers,
145
145
  // For email searches, disable groups and teams
146
- includeGroups: isEmail ? false : includeGroups,
147
- includeTeams: isEmail ? false : includeTeams,
146
+ includeGroups: includeGroups,
147
+ includeTeams: includeTeams,
148
148
  includeNonLicensedUsers: includeNonLicensedUsers,
149
149
  maxNumberOfResults: maxNumberOfResults,
150
- // For email searches, leverage customQuery instead of queryString
151
- query: isEmail ? '' : query,
152
- customQuery: isEmail ? "(email:\"".concat(query.trim(), "\")") : '',
150
+ query: query,
151
+ searchEmail: isEmail,
153
152
  /*
154
153
  For email-based searches, we have decided to filter out apps.
155
154
  Also - because the other 2 filters ((NOT not_mentionable:true) AND (account_status:active)) are included
@@ -35,7 +35,7 @@ var getUserRecommendations = function getUserRecommendations(request, intl) {
35
35
  }, ((_request$context = request.context) === null || _request$context === void 0 || (_request$context = _request$context.productAttributes) === null || _request$context === void 0 ? void 0 : _request$context.isEntitledConfluenceExternalCollaborator) && {
36
36
  productAccessPermissionIds: ['write', 'external-collaborator-write']
37
37
  }), {}, {
38
- customQuery: request.customQuery || '',
38
+ customQuery: '',
39
39
  customerDirectoryId: '',
40
40
  filter: request.searchQueryFilter || '',
41
41
  minimumAccessLevel: 'APPLICATION',
@@ -44,7 +44,8 @@ var getUserRecommendations = function getUserRecommendations(request, intl) {
44
44
  userIds: [],
45
45
  groupIds: []
46
46
  },
47
- searchUserbase: false
47
+ searchUserbase: false,
48
+ searchEmail: request.searchEmail
48
49
  })
49
50
  })
50
51
  }).then(function (response) {
@@ -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 = "8.2.1";
4
+ const packageVersion = "0.0.0-development";
5
5
  export const startSession = () => ({
6
6
  id: uuid(),
7
7
  start: Date.now(),
@@ -131,13 +131,12 @@ export class SmartUserPickerWithoutAnalytics extends React.Component {
131
131
  },
132
132
  includeUsers,
133
133
  // For email searches, disable groups and teams
134
- includeGroups: isEmail ? false : includeGroups,
135
- includeTeams: isEmail ? false : includeTeams,
134
+ includeGroups,
135
+ includeTeams,
136
136
  includeNonLicensedUsers,
137
137
  maxNumberOfResults,
138
- // For email searches, leverage customQuery instead of queryString
139
- query: isEmail ? '' : query,
140
- customQuery: isEmail ? `(email:"${query.trim()}")` : '',
138
+ query,
139
+ searchEmail: isEmail,
141
140
  /*
142
141
  For email-based searches, we have decided to filter out apps.
143
142
  Also - because the other 2 filters ((NOT not_mentionable:true) AND (account_status:active)) are included
@@ -25,7 +25,7 @@ const getUserRecommendations = (request, intl) => {
25
25
  ...(((_request$context = request.context) === null || _request$context === void 0 ? void 0 : (_request$context$prod = _request$context.productAttributes) === null || _request$context$prod === void 0 ? void 0 : _request$context$prod.isEntitledConfluenceExternalCollaborator) && {
26
26
  productAccessPermissionIds: ['write', 'external-collaborator-write']
27
27
  }),
28
- customQuery: request.customQuery || '',
28
+ customQuery: '',
29
29
  customerDirectoryId: '',
30
30
  filter: request.searchQueryFilter || '',
31
31
  minimumAccessLevel: 'APPLICATION',
@@ -34,7 +34,8 @@ const getUserRecommendations = (request, intl) => {
34
34
  userIds: [],
35
35
  groupIds: []
36
36
  },
37
- searchUserbase: false
37
+ searchUserbase: false,
38
+ searchEmail: request.searchEmail
38
39
  }
39
40
  })
40
41
  }).then(response => {
@@ -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 = "8.2.1";
7
+ var packageVersion = "0.0.0-development";
8
8
  export var startSession = function startSession() {
9
9
  return {
10
10
  id: uuid(),
@@ -134,13 +134,12 @@ export var SmartUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
134
134
  },
135
135
  includeUsers: includeUsers,
136
136
  // For email searches, disable groups and teams
137
- includeGroups: isEmail ? false : includeGroups,
138
- includeTeams: isEmail ? false : includeTeams,
137
+ includeGroups: includeGroups,
138
+ includeTeams: includeTeams,
139
139
  includeNonLicensedUsers: includeNonLicensedUsers,
140
140
  maxNumberOfResults: maxNumberOfResults,
141
- // For email searches, leverage customQuery instead of queryString
142
- query: isEmail ? '' : query,
143
- customQuery: isEmail ? "(email:\"".concat(query.trim(), "\")") : '',
141
+ query: query,
142
+ searchEmail: isEmail,
144
143
  /*
145
144
  For email-based searches, we have decided to filter out apps.
146
145
  Also - because the other 2 filters ((NOT not_mentionable:true) AND (account_status:active)) are included
@@ -28,7 +28,7 @@ var getUserRecommendations = function getUserRecommendations(request, intl) {
28
28
  }, ((_request$context = request.context) === null || _request$context === void 0 || (_request$context = _request$context.productAttributes) === null || _request$context === void 0 ? void 0 : _request$context.isEntitledConfluenceExternalCollaborator) && {
29
29
  productAccessPermissionIds: ['write', 'external-collaborator-write']
30
30
  }), {}, {
31
- customQuery: request.customQuery || '',
31
+ customQuery: '',
32
32
  customerDirectoryId: '',
33
33
  filter: request.searchQueryFilter || '',
34
34
  minimumAccessLevel: 'APPLICATION',
@@ -37,7 +37,8 @@ var getUserRecommendations = function getUserRecommendations(request, intl) {
37
37
  userIds: [],
38
38
  groupIds: []
39
39
  },
40
- searchUserbase: false
40
+ searchUserbase: false,
41
+ searchEmail: request.searchEmail
41
42
  })
42
43
  })
43
44
  }).then(function (response) {
@@ -17,12 +17,12 @@ export interface RecommendationRequest {
17
17
  context: Context;
18
18
  maxNumberOfResults: number;
19
19
  query?: string;
20
- customQuery?: string;
21
20
  searchQueryFilter?: string;
22
21
  includeUsers?: boolean;
23
22
  includeGroups?: boolean;
24
23
  includeTeams?: boolean;
25
24
  includeNonLicensedUsers?: boolean;
25
+ searchEmail?: boolean;
26
26
  }
27
27
  type OnError = (error: any, request: RecommendationRequest) => Promise<OptionData[]> | void;
28
28
  type OnValueError = (error: any, defaultValue: DefaultValue) => Promise<OptionData[]> | void;
@@ -17,12 +17,12 @@ export interface RecommendationRequest {
17
17
  context: Context;
18
18
  maxNumberOfResults: number;
19
19
  query?: string;
20
- customQuery?: string;
21
20
  searchQueryFilter?: string;
22
21
  includeUsers?: boolean;
23
22
  includeGroups?: boolean;
24
23
  includeTeams?: boolean;
25
24
  includeNonLicensedUsers?: boolean;
25
+ searchEmail?: boolean;
26
26
  }
27
27
  type OnError = (error: any, request: RecommendationRequest) => Promise<OptionData[]> | void;
28
28
  type OnValueError = (error: any, defaultValue: DefaultValue) => Promise<OptionData[]> | void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-user-picker",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/analytics-next": "^11.1.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/ufo": "^0.4.0",
41
- "@atlaskit/user-picker": "^11.7.0",
41
+ "@atlaskit/user-picker": "^11.9.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "lodash": "^4.17.21",
44
44
  "memoize-one": "^6.0.0",