@atlaskit/smart-user-picker 10.0.1 → 10.0.3

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,20 @@
1
1
  # @atlassian/smart-user-picker
2
2
 
3
+ ## 10.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c8f8aee4be6f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c8f8aee4be6f5) -
8
+ [PTC-16442]: add userbaseId as an optional prop
9
+
10
+ ## 10.0.2
11
+
12
+ ### Patch Changes
13
+
14
+ - [`a95470b46e97e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a95470b46e97e) -
15
+ Map `appType` field from the recommendation service response through `users-transformer` so that
16
+ agent principals correctly expose `appType` on the resulting `OptionData` object.
17
+
3
18
  ## 10.0.1
4
19
 
5
20
  ### Patch Changes
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "extends": "../../../../tsconfig.local-consumption.json",
3
3
  "compilerOptions": {
4
- "target": "es5",
5
4
  "outDir": "../../../../../confluence/tsDist/@atlaskit__smart-user-picker",
6
5
  "rootDir": "../",
7
6
  "composite": true,
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "extends": "../../../../tsconfig.local-consumption.json",
3
3
  "compilerOptions": {
4
- "target": "es5",
5
4
  "outDir": "../../../../../tsDist/@atlaskit__smart-user-picker/app",
6
5
  "rootDir": "../",
7
6
  "composite": true,
@@ -9,9 +9,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _analyticsNext = require("@atlaskit/analytics-next");
10
10
  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
- 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 @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
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
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
13
14
  var packageName = "@atlaskit/smart-user-picker";
14
- var packageVersion = "0.0.0-development";
15
+ var packageVersion = "10.0.2";
15
16
  var startSession = exports.startSession = function startSession() {
16
17
  return {
17
18
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
package/dist/cjs/i18n.js CHANGED
@@ -9,7 +9,7 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
9
9
  externalUserSourcesHeading: {
10
10
  id: 'fabric.elements.user-picker.external.sourced.from',
11
11
  defaultMessage: 'Found in:',
12
- description: 'From where the external user is coming'
12
+ description: 'The text is shown as a label in the user picker dropdown preceding the list of external organizations or directories where the external user account was found (e.g. a guest directory or external workspace).'
13
13
  },
14
14
  slackProvider: {
15
15
  id: 'fabric.elements.user-picker.slack.provider',
@@ -30,6 +30,7 @@ var getLozenzeProperties = function getLozenzeProperties(entity, intl) {
30
30
  var transformUser = function transformUser(item, intl) {
31
31
  var type = item.entityType;
32
32
  if (type === _types.EntityType.USER) {
33
+ var _user$attributes;
33
34
  var user = item;
34
35
  var lozenge = getLozenzeProperties(user, intl);
35
36
  return {
@@ -43,7 +44,8 @@ var transformUser = function transformUser(item, intl) {
43
44
  lozenge: lozenge,
44
45
  tooltip: user.name,
45
46
  isExternal: Boolean(user.nonLicensedUser),
46
- sources: user.nonLicensedUser ? ['other-atlassian'] : undefined
47
+ sources: user.nonLicensedUser ? ['other-atlassian'] : undefined,
48
+ appType: user.appType !== undefined ? user.appType : (_user$attributes = user.attributes) === null || _user$attributes === void 0 ? void 0 : _user$attributes.appType
47
49
  };
48
50
  }
49
51
  if (type === _types.EntityType.TEAM) {
@@ -1,8 +1,9 @@
1
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
1
2
  import { createAndFireEvent } from '@atlaskit/analytics-next';
2
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
4
  import { v4 as uuid } from 'uuid';
4
5
  const packageName = "@atlaskit/smart-user-picker";
5
- const packageVersion = "0.0.0-development";
6
+ const packageVersion = "10.0.2";
6
7
  export const startSession = () => ({
7
8
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
8
9
  id: uuid(),
@@ -3,7 +3,7 @@ export const messages = defineMessages({
3
3
  externalUserSourcesHeading: {
4
4
  id: 'fabric.elements.user-picker.external.sourced.from',
5
5
  defaultMessage: 'Found in:',
6
- description: 'From where the external user is coming'
6
+ description: 'The text is shown as a label in the user picker dropdown preceding the list of external organizations or directories where the external user account was found (e.g. a guest directory or external workspace).'
7
7
  },
8
8
  slackProvider: {
9
9
  id: 'fabric.elements.user-picker.slack.provider',
@@ -24,6 +24,7 @@ const getLozenzeProperties = (entity, intl) => {
24
24
  const transformUser = (item, intl) => {
25
25
  const type = item.entityType;
26
26
  if (type === EntityType.USER) {
27
+ var _user$attributes;
27
28
  const user = item;
28
29
  const lozenge = getLozenzeProperties(user, intl);
29
30
  return {
@@ -37,7 +38,8 @@ const transformUser = (item, intl) => {
37
38
  lozenge: lozenge,
38
39
  tooltip: user.name,
39
40
  isExternal: Boolean(user.nonLicensedUser),
40
- sources: user.nonLicensedUser ? ['other-atlassian'] : undefined
41
+ sources: user.nonLicensedUser ? ['other-atlassian'] : undefined,
42
+ appType: user.appType !== undefined ? user.appType : (_user$attributes = user.attributes) === null || _user$attributes === void 0 ? void 0 : _user$attributes.appType
41
43
  };
42
44
  }
43
45
  if (type === EntityType.TEAM) {
@@ -1,11 +1,12 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
4
5
  import { createAndFireEvent } from '@atlaskit/analytics-next';
5
6
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
6
7
  import { v4 as uuid } from 'uuid';
7
8
  var packageName = "@atlaskit/smart-user-picker";
8
- var packageVersion = "0.0.0-development";
9
+ var packageVersion = "10.0.2";
9
10
  export var startSession = function startSession() {
10
11
  return {
11
12
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
package/dist/esm/i18n.js CHANGED
@@ -3,7 +3,7 @@ export var messages = defineMessages({
3
3
  externalUserSourcesHeading: {
4
4
  id: 'fabric.elements.user-picker.external.sourced.from',
5
5
  defaultMessage: 'Found in:',
6
- description: 'From where the external user is coming'
6
+ description: 'The text is shown as a label in the user picker dropdown preceding the list of external organizations or directories where the external user account was found (e.g. a guest directory or external workspace).'
7
7
  },
8
8
  slackProvider: {
9
9
  id: 'fabric.elements.user-picker.slack.provider',
@@ -24,6 +24,7 @@ var getLozenzeProperties = function getLozenzeProperties(entity, intl) {
24
24
  var transformUser = function transformUser(item, intl) {
25
25
  var type = item.entityType;
26
26
  if (type === EntityType.USER) {
27
+ var _user$attributes;
27
28
  var user = item;
28
29
  var lozenge = getLozenzeProperties(user, intl);
29
30
  return {
@@ -37,7 +38,8 @@ var transformUser = function transformUser(item, intl) {
37
38
  lozenge: lozenge,
38
39
  tooltip: user.name,
39
40
  isExternal: Boolean(user.nonLicensedUser),
40
- sources: user.nonLicensedUser ? ['other-atlassian'] : undefined
41
+ sources: user.nonLicensedUser ? ['other-atlassian'] : undefined,
42
+ appType: user.appType !== undefined ? user.appType : (_user$attributes = user.attributes) === null || _user$attributes === void 0 ? void 0 : _user$attributes.appType
41
43
  };
42
44
  }
43
45
  if (type === EntityType.TEAM) {
@@ -1,4 +1,4 @@
1
- import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
1
+ import { UIAnalyticsEvent, type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import { type Props } from './types';
3
3
  export type UserPickerSession = {
4
4
  id: string;
@@ -9,7 +9,7 @@ export type UserPickerSession = {
9
9
  lastKey?: number;
10
10
  };
11
11
  export declare const startSession: () => UserPickerSession;
12
- export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
12
+ export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
13
13
  export interface SmartEventCreator {
14
14
  (props: Props, ...args: any[]): AnalyticsEventPayload;
15
15
  }
@@ -247,6 +247,10 @@ export interface SmartProps {
247
247
  * Identifier for the organization in which to search for teams.
248
248
  */
249
249
  orgId?: string;
250
+ /**
251
+ * Identifier for the userbase scope.
252
+ */
253
+ userbaseId?: string;
250
254
  /**
251
255
  * Optional callback to customize the options shown to the user.
252
256
  * Called after options are loaded.
@@ -1,4 +1,4 @@
1
- import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
1
+ import { UIAnalyticsEvent, type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import { type Props } from './types';
3
3
  export type UserPickerSession = {
4
4
  id: string;
@@ -9,7 +9,7 @@ export type UserPickerSession = {
9
9
  lastKey?: number;
10
10
  };
11
11
  export declare const startSession: () => UserPickerSession;
12
- export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
12
+ export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
13
13
  export interface SmartEventCreator {
14
14
  (props: Props, ...args: any[]): AnalyticsEventPayload;
15
15
  }
@@ -247,6 +247,10 @@ export interface SmartProps {
247
247
  * Identifier for the organization in which to search for teams.
248
248
  */
249
249
  orgId?: string;
250
+ /**
251
+ * Identifier for the userbase scope.
252
+ */
253
+ userbaseId?: string;
250
254
  /**
251
255
  * Optional callback to customize the options shown to the user.
252
256
  * Called after options are loaded.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-user-picker",
3
- "version": "10.0.1",
3
+ "version": "10.0.3",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,39 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.local-consumption.json",
3
- "compilerOptions": {
4
- "target": "es5",
5
- "outDir": "../../../../../jira/tsDist/@atlaskit__smart-user-picker/app",
6
- "rootDir": "../",
7
- "composite": true,
8
- "noCheck": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../data/ufo-external/afm-jira/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../elements/user-picker/afm-jira/tsconfig.json"
37
- }
38
- ]
39
- }