@atlaskit/smart-user-picker 9.1.0 → 9.2.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,12 @@
1
1
  # @atlassian/smart-user-picker
2
2
 
3
+ ## 9.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`bdbcc02f31ffe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bdbcc02f31ffe) -
8
+ [ux] Block viewers adding followers that don't have access to private projects
9
+
3
10
  ## 9.1.0
4
11
 
5
12
  ### Minor Changes
@@ -261,15 +261,11 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
261
261
 
262
262
  // Track if email search found matches for conditional allowEmail logic
263
263
  if (isEmail) {
264
- if ((0, _platformFeatureFlags.fg)('smart_user_picker_allow_email_if_team_is_found')) {
265
- // Only count user/external user matches, not teams or groups
266
- userMatches = recommendedUsers.filter(function (user) {
267
- return (0, _userPicker.isUser)(user) || (0, _userPicker.isExternalUser)(user);
268
- });
269
- _this.lastEmailSearchFoundMatches = userMatches.length > 0;
270
- } else {
271
- _this.lastEmailSearchFoundMatches = recommendedUsers.length > 0;
272
- }
264
+ // Only count user/external user matches, not teams or groups
265
+ userMatches = recommendedUsers.filter(function (user) {
266
+ return (0, _userPicker.isUser)(user) || (0, _userPicker.isExternalUser)(user);
267
+ });
268
+ _this.lastEmailSearchFoundMatches = userMatches.length > 0;
273
269
  } else {
274
270
  _this.lastEmailSearchFoundMatches = false;
275
271
  }
@@ -586,15 +582,10 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
586
582
  var shouldAllowEmail = allowEmail;
587
583
  if (allowEmail && enableEmailSearch && !allowEmailSelectionWhenEmailMatched) {
588
584
  var isCurrentQueryEmail = isEmailQuery(this.state.query);
589
- if ((0, _platformFeatureFlags.fg)('smart_user_picker_allow_email_if_team_is_found')) {
590
- // Only allow email selection when:
591
- // 1. The query matches email format (validated by regex)
592
- // 2. No user/external user matches were found (only teams/groups suggested)
593
- shouldAllowEmail = isCurrentQueryEmail && !this.lastEmailSearchFoundMatches;
594
- } else {
595
- // Only allow email selection if we're in an email search that found no matches
596
- shouldAllowEmail = !isCurrentQueryEmail || !this.lastEmailSearchFoundMatches;
597
- }
585
+ // Only allow email selection when:
586
+ // 1. The query matches email format (validated by regex)
587
+ // 2. No user/external user matches were found (only teams/groups suggested)
588
+ shouldAllowEmail = isCurrentQueryEmail && !this.lastEmailSearchFoundMatches;
598
589
  }
599
590
  return /*#__PURE__*/_react.default.createElement(_MessagesIntlProvider.default, null, /*#__PURE__*/_react.default.createElement(_userPicker.default, (0, _extends2.default)({}, restProps, {
600
591
  allowEmail: shouldAllowEmail,
@@ -212,13 +212,9 @@ export class SmartUserPickerWithoutAnalytics extends React.Component {
212
212
 
213
213
  // Track if email search found matches for conditional allowEmail logic
214
214
  if (isEmail) {
215
- if (fg('smart_user_picker_allow_email_if_team_is_found')) {
216
- // Only count user/external user matches, not teams or groups
217
- const userMatches = recommendedUsers.filter(user => isUser(user) || isExternalUser(user));
218
- this.lastEmailSearchFoundMatches = userMatches.length > 0;
219
- } else {
220
- this.lastEmailSearchFoundMatches = recommendedUsers.length > 0;
221
- }
215
+ // Only count user/external user matches, not teams or groups
216
+ const userMatches = recommendedUsers.filter(user => isUser(user) || isExternalUser(user));
217
+ this.lastEmailSearchFoundMatches = userMatches.length > 0;
222
218
  } else {
223
219
  this.lastEmailSearchFoundMatches = false;
224
220
  }
@@ -430,15 +426,10 @@ export class SmartUserPickerWithoutAnalytics extends React.Component {
430
426
  let shouldAllowEmail = allowEmail;
431
427
  if (allowEmail && enableEmailSearch && !allowEmailSelectionWhenEmailMatched) {
432
428
  const isCurrentQueryEmail = isEmailQuery(this.state.query);
433
- if (fg('smart_user_picker_allow_email_if_team_is_found')) {
434
- // Only allow email selection when:
435
- // 1. The query matches email format (validated by regex)
436
- // 2. No user/external user matches were found (only teams/groups suggested)
437
- shouldAllowEmail = isCurrentQueryEmail && !this.lastEmailSearchFoundMatches;
438
- } else {
439
- // Only allow email selection if we're in an email search that found no matches
440
- shouldAllowEmail = !isCurrentQueryEmail || !this.lastEmailSearchFoundMatches;
441
- }
429
+ // Only allow email selection when:
430
+ // 1. The query matches email format (validated by regex)
431
+ // 2. No user/external user matches were found (only teams/groups suggested)
432
+ shouldAllowEmail = isCurrentQueryEmail && !this.lastEmailSearchFoundMatches;
442
433
  }
443
434
  return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(UserPicker, _extends({}, restProps, {
444
435
  allowEmail: shouldAllowEmail,
@@ -253,15 +253,11 @@ export var SmartUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
253
253
 
254
254
  // Track if email search found matches for conditional allowEmail logic
255
255
  if (isEmail) {
256
- if (fg('smart_user_picker_allow_email_if_team_is_found')) {
257
- // Only count user/external user matches, not teams or groups
258
- userMatches = recommendedUsers.filter(function (user) {
259
- return isUser(user) || isExternalUser(user);
260
- });
261
- _this.lastEmailSearchFoundMatches = userMatches.length > 0;
262
- } else {
263
- _this.lastEmailSearchFoundMatches = recommendedUsers.length > 0;
264
- }
256
+ // Only count user/external user matches, not teams or groups
257
+ userMatches = recommendedUsers.filter(function (user) {
258
+ return isUser(user) || isExternalUser(user);
259
+ });
260
+ _this.lastEmailSearchFoundMatches = userMatches.length > 0;
265
261
  } else {
266
262
  _this.lastEmailSearchFoundMatches = false;
267
263
  }
@@ -578,15 +574,10 @@ export var SmartUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
578
574
  var shouldAllowEmail = allowEmail;
579
575
  if (allowEmail && enableEmailSearch && !allowEmailSelectionWhenEmailMatched) {
580
576
  var isCurrentQueryEmail = isEmailQuery(this.state.query);
581
- if (fg('smart_user_picker_allow_email_if_team_is_found')) {
582
- // Only allow email selection when:
583
- // 1. The query matches email format (validated by regex)
584
- // 2. No user/external user matches were found (only teams/groups suggested)
585
- shouldAllowEmail = isCurrentQueryEmail && !this.lastEmailSearchFoundMatches;
586
- } else {
587
- // Only allow email selection if we're in an email search that found no matches
588
- shouldAllowEmail = !isCurrentQueryEmail || !this.lastEmailSearchFoundMatches;
589
- }
577
+ // Only allow email selection when:
578
+ // 1. The query matches email format (validated by regex)
579
+ // 2. No user/external user matches were found (only teams/groups suggested)
580
+ shouldAllowEmail = isCurrentQueryEmail && !this.lastEmailSearchFoundMatches;
590
581
  }
591
582
  return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(UserPicker, _extends({}, restProps, {
592
583
  allowEmail: shouldAllowEmail,
@@ -1,5 +1,5 @@
1
1
  export { default } from './components';
2
2
  export { getUserRecommendations, hydrateDefaultValues } from './service';
3
- export type { RecommendationRequest, Props, State } from './types';
3
+ export type { RecommendationRequest, Props, State, RestrictionFilter } from './types';
4
4
  export { isEmail, isTeam, isUser, isExternalUser, isValidEmail, isGroup, EmailType, GroupType, TeamType, UserType, } from '@atlaskit/user-picker';
5
5
  export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, EmailValidationResponse, EmailValidator, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamHighlight, TeamMember, User, UserHighlight, ExternalUser, UserSource, } from '@atlaskit/user-picker';
@@ -1,5 +1,5 @@
1
1
  export { default } from './components';
2
2
  export { getUserRecommendations, hydrateDefaultValues } from './service';
3
- export type { RecommendationRequest, Props, State } from './types';
3
+ export type { RecommendationRequest, Props, State, RestrictionFilter } from './types';
4
4
  export { isEmail, isTeam, isUser, isExternalUser, isValidEmail, isGroup, EmailType, GroupType, TeamType, UserType, } from '@atlaskit/user-picker';
5
5
  export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, EmailValidationResponse, EmailValidator, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamHighlight, TeamMember, User, UserHighlight, ExternalUser, UserSource, } from '@atlaskit/user-picker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-user-picker",
3
- "version": "9.1.0",
3
+ "version": "9.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,7 +52,7 @@
52
52
  "devDependencies": {
53
53
  "@atlaskit/select": "^21.7.0",
54
54
  "@atlaskit/util-data-test": "^18.5.0",
55
- "@atlassian/a11y-jest-testing": "^0.10.0",
55
+ "@atlassian/a11y-jest-testing": "^0.11.0",
56
56
  "@testing-library/dom": "^10.1.0",
57
57
  "@testing-library/react": "^16.3.0",
58
58
  "@testing-library/user-event": "^14.4.3",
@@ -71,9 +71,6 @@
71
71
  "smart-user-picker-restrict-to-gate": {
72
72
  "type": "boolean"
73
73
  },
74
- "smart_user_picker_allow_email_if_team_is_found": {
75
- "type": "boolean"
76
- },
77
74
  "smart-user-picker-attribution-header": {
78
75
  "type": "boolean"
79
76
  },