@atlaskit/user-picker 10.16.1 → 10.17.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
  # @atlaskit/user-picker
2
2
 
3
+ ## 10.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#73914](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/73914) [`ca85dd7a4109`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ca85dd7a4109) - Added ExternalUserType and exported it in the public API
8
+
3
9
  ## 10.16.1
4
10
 
5
11
  ### Patch Changes
@@ -12,7 +12,7 @@ var _utils = require("./components/utils");
12
12
  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; }
13
13
  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; }
14
14
  var packageName = "@atlaskit/user-picker";
15
- var packageVersion = "10.16.1";
15
+ var packageVersion = "10.17.0";
16
16
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
17
17
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
18
18
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -13,7 +13,7 @@ var _select = require("@atlaskit/select");
13
13
  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; }
14
14
  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; }
15
15
  var isExternalUser = exports.isExternalUser = function isExternalUser(option) {
16
- return isUser(option) && Boolean(option.isExternal);
16
+ return option.type === _types.ExternalUserType || Boolean(option.isExternal);
17
17
  };
18
18
  var isUser = exports.isUser = function isUser(option) {
19
19
  return option.type === undefined || option.type === _types.UserType;
package/dist/cjs/index.js CHANGED
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "EmailType", {
15
15
  return _types.EmailType;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "ExternalUserType", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _types.ExternalUserType;
22
+ }
23
+ });
18
24
  Object.defineProperty(exports, "GroupType", {
19
25
  enumerable: true,
20
26
  get: function get() {
package/dist/cjs/types.js CHANGED
@@ -3,8 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.UserType = exports.TeamType = exports.GroupType = exports.EmailType = exports.CustomType = void 0;
6
+ exports.UserType = exports.TeamType = exports.GroupType = exports.ExternalUserType = exports.EmailType = exports.CustomType = void 0;
7
7
  var UserType = exports.UserType = 'user';
8
+ var ExternalUserType = exports.ExternalUserType = 'external_user';
8
9
  var TeamType = exports.TeamType = 'team';
9
10
  var GroupType = exports.GroupType = 'group';
10
11
 
@@ -2,7 +2,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
2
2
  import { v4 as uuidv4 } from 'uuid';
3
3
  import { isCustom, isExternalUser } from './components/utils';
4
4
  const packageName = "@atlaskit/user-picker";
5
- const packageVersion = "10.16.1";
5
+ const packageVersion = "10.17.0";
6
6
  const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
7
7
  const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
8
8
  const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -1,7 +1,7 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { CustomType, EmailType, TeamType, GroupType, UserType } from '../types';
2
+ import { CustomType, EmailType, TeamType, GroupType, UserType, ExternalUserType } from '../types';
3
3
  import { PopupSelect } from '@atlaskit/select';
4
- export const isExternalUser = option => isUser(option) && Boolean(option.isExternal);
4
+ export const isExternalUser = option => option.type === ExternalUserType || Boolean(option.isExternal);
5
5
  export const isUser = option => option.type === undefined || option.type === UserType;
6
6
  export const isTeam = option => option.type === TeamType;
7
7
  export const isGroup = option => option.type === GroupType;
@@ -4,4 +4,4 @@ export { PopupUserPicker } from './components/PopupUserPicker';
4
4
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
5
5
  export {
6
6
  // Constants
7
- CustomType, EmailType, GroupType, TeamType, UserType } from './types';
7
+ CustomType, EmailType, GroupType, TeamType, UserType, ExternalUserType } from './types';
@@ -1,4 +1,5 @@
1
1
  export const UserType = 'user';
2
+ export const ExternalUserType = 'external_user';
2
3
  export const TeamType = 'team';
3
4
  export const GroupType = 'group';
4
5
 
@@ -5,7 +5,7 @@ import { createAndFireEvent } from '@atlaskit/analytics-next';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
  import { isCustom, isExternalUser } from './components/utils';
7
7
  var packageName = "@atlaskit/user-picker";
8
- var packageVersion = "10.16.1";
8
+ var packageVersion = "10.17.0";
9
9
  var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
10
10
  var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
11
11
  var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
@@ -3,10 +3,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  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; }
4
4
  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) { _defineProperty(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; }
5
5
  import memoizeOne from 'memoize-one';
6
- import { CustomType, EmailType, TeamType, GroupType, UserType } from '../types';
6
+ import { CustomType, EmailType, TeamType, GroupType, UserType, ExternalUserType } from '../types';
7
7
  import { PopupSelect } from '@atlaskit/select';
8
8
  export var isExternalUser = function isExternalUser(option) {
9
- return isUser(option) && Boolean(option.isExternal);
9
+ return option.type === ExternalUserType || Boolean(option.isExternal);
10
10
  };
11
11
  export var isUser = function isUser(option) {
12
12
  return option.type === undefined || option.type === UserType;
package/dist/esm/index.js CHANGED
@@ -4,4 +4,4 @@ export { PopupUserPicker } from './components/PopupUserPicker';
4
4
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
5
5
  export {
6
6
  // Constants
7
- CustomType, EmailType, GroupType, TeamType, UserType } from './types';
7
+ CustomType, EmailType, GroupType, TeamType, UserType, ExternalUserType } from './types';
package/dist/esm/types.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export var UserType = 'user';
2
+ export var ExternalUserType = 'external_user';
2
3
  export var TeamType = 'team';
3
4
  export var GroupType = 'group';
4
5
 
@@ -3,5 +3,5 @@ export type { EmailValidationResponse, EmailValidator, } from './components/emai
3
3
  export { UserPicker as default } from './components/UserPicker';
4
4
  export { PopupUserPicker } from './components/PopupUserPicker';
5
5
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
6
- export { CustomType, EmailType, GroupType, TeamType, UserType, } from './types';
6
+ export { CustomType, EmailType, GroupType, TeamType, UserType, ExternalUserType, } from './types';
7
7
  export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Custom, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
@@ -242,6 +242,7 @@ export interface OptionData {
242
242
  tooltip?: string;
243
243
  }
244
244
  export declare const UserType = "user";
245
+ export declare const ExternalUserType = "external_user";
245
246
  export type UserSource = 'google' | 'slack' | 'microsoft' | 'jira' | 'confluence' | 'other-atlassian';
246
247
  export interface ExternalUser extends User {
247
248
  externalUserType?: 'crossSite' | 'thirdParty';
@@ -3,5 +3,5 @@ export type { EmailValidationResponse, EmailValidator, } from './components/emai
3
3
  export { UserPicker as default } from './components/UserPicker';
4
4
  export { PopupUserPicker } from './components/PopupUserPicker';
5
5
  export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
6
- export { CustomType, EmailType, GroupType, TeamType, UserType, } from './types';
6
+ export { CustomType, EmailType, GroupType, TeamType, UserType, ExternalUserType, } from './types';
7
7
  export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Custom, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
@@ -245,6 +245,7 @@ export interface OptionData {
245
245
  tooltip?: string;
246
246
  }
247
247
  export declare const UserType = "user";
248
+ export declare const ExternalUserType = "external_user";
248
249
  export type UserSource = 'google' | 'slack' | 'microsoft' | 'jira' | 'confluence' | 'other-atlassian';
249
250
  export interface ExternalUser extends User {
250
251
  externalUserType?: 'crossSite' | 'thirdParty';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/user-picker",
3
- "version": "10.16.1",
3
+ "version": "10.17.0",
4
4
  "description": "Fabric component for display a dropdown to select a user from",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -50,10 +50,10 @@
50
50
  "@atlaskit/platform-feature-flags": "^0.2.0",
51
51
  "@atlaskit/popper": "^5.5.0",
52
52
  "@atlaskit/primitives": "^2.0.0",
53
- "@atlaskit/select": "^17.0.3",
53
+ "@atlaskit/select": "^17.1.0",
54
54
  "@atlaskit/spinner": "^16.0.0",
55
55
  "@atlaskit/theme": "^12.6.0",
56
- "@atlaskit/tokens": "^1.35.0",
56
+ "@atlaskit/tokens": "^1.37.0",
57
57
  "@atlaskit/tooltip": "^18.1.0",
58
58
  "@atlaskit/ufo": "^0.2.0",
59
59
  "@babel/runtime": "^7.0.0",