@atlaskit/smart-user-picker 11.5.1 → 11.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 +11 -0
- package/dist/cjs/analytics.js +3 -3
- package/dist/cjs/components/SmartUserPicker.js +9 -9
- package/dist/cjs/service/users-transformer.js +2 -2
- package/dist/cjs/ufoExperiences.js +8 -7
- package/dist/cjs/useUFOConcurrentExperience.js +3 -3
- package/dist/es2019/analytics.js +2 -2
- package/dist/es2019/components/SmartUserPicker.js +3 -3
- package/dist/es2019/service/users-transformer.js +1 -1
- package/dist/es2019/ufoExperiences.js +2 -1
- package/dist/es2019/useUFOConcurrentExperience.js +1 -1
- package/dist/esm/analytics.js +2 -2
- package/dist/esm/components/SmartUserPicker.js +3 -3
- package/dist/esm/service/users-transformer.js +1 -1
- package/dist/esm/ufoExperiences.js +2 -1
- package/dist/esm/useUFOConcurrentExperience.js +1 -1
- package/dist/types/analytics.d.ts +3 -1
- package/dist/types/components/SmartUserPicker.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/ufoExperiences.d.ts +1 -1
- package/dist/types/useUFOConcurrentExperience.d.ts +1 -1
- package/package.json +12 -8
- package/report.api.md +0 -301
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlassian/smart-user-picker
|
|
2
2
|
|
|
3
|
+
## 11.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) -
|
|
8
|
+
Remove stale API report artifacts from published Platform packages.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 11.5.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/cjs/analytics.js
CHANGED
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.successfulRequestUsersEvent = exports.startSession = exports.requestUsersEvent = exports.preparedUsersLoadedEvent = exports.mountedWithPrefetchEvent = exports.filterUsersEvent = exports.failedUserResolversEvent = exports.failedRequestUsersEvent = exports.createAndFireEventInElementsChannel = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var
|
|
9
|
+
var _createAndFireEvents = _interopRequireDefault(require("@atlaskit/analytics-next/createAndFireEvents"));
|
|
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
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
13
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
14
|
var packageName = "@atlaskit/smart-user-picker";
|
|
15
|
-
var packageVersion = "11.5.
|
|
15
|
+
var packageVersion = "11.5.1";
|
|
16
16
|
var startSession = exports.startSession = function startSession() {
|
|
17
17
|
return {
|
|
18
18
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
@@ -24,7 +24,7 @@ var startSession = exports.startSession = function startSession() {
|
|
|
24
24
|
lastKey: undefined
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
var createAndFireEventInElementsChannel = exports.createAndFireEventInElementsChannel = (0,
|
|
27
|
+
var createAndFireEventInElementsChannel = exports.createAndFireEventInElementsChannel = (0, _createAndFireEvents.default)('fabric-elements');
|
|
28
28
|
var createEvent = function createEvent(eventType, action, actionSubject) {
|
|
29
29
|
var attributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
30
30
|
return {
|
|
@@ -21,12 +21,12 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
21
21
|
var _react = _interopRequireDefault(require("react"));
|
|
22
22
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
23
23
|
var _uuid = require("uuid");
|
|
24
|
-
var
|
|
24
|
+
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
25
25
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
26
26
|
var _reactIntl = require("react-intl");
|
|
27
|
-
var
|
|
27
|
+
var _experienceState = require("@atlaskit/ufo/experience-state");
|
|
28
28
|
var _userPicker = _interopRequireWildcard(require("@atlaskit/user-picker"));
|
|
29
|
-
var
|
|
29
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
30
30
|
var _analytics = require("../analytics");
|
|
31
31
|
var _MessagesIntlProvider = _interopRequireDefault(require("./MessagesIntlProvider"));
|
|
32
32
|
var _types = require("../types");
|
|
@@ -97,7 +97,7 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
|
|
|
97
97
|
// query already belongs to a returned user, in which case the suggestion is redundant
|
|
98
98
|
(0, _defineProperty2.default)(_this, "lastDomainSuggestionMatchedUser", false);
|
|
99
99
|
(0, _defineProperty2.default)(_this, "abortOptionsShownUfoExperience", function () {
|
|
100
|
-
if (_this.optionsShownUfoExperienceInstance.state.id ===
|
|
100
|
+
if (_this.optionsShownUfoExperienceInstance.state.id === _experienceState.UFOExperienceState.STARTED.id) {
|
|
101
101
|
// There may be an existing UFO timing running from previous key entry or focus,
|
|
102
102
|
// so abort it and restart it just in case.
|
|
103
103
|
_this.optionsShownUfoExperienceInstance.abort();
|
|
@@ -171,7 +171,7 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
|
|
|
171
171
|
_context.prev = 1;
|
|
172
172
|
_query = _this.state.query;
|
|
173
173
|
_this.fireEvent(_analytics.requestUsersEvent);
|
|
174
|
-
if (!(fetchOptions && (0,
|
|
174
|
+
if (!(fetchOptions && (0, _fg.fg)('smart-user-picker-load-options-gate'))) {
|
|
175
175
|
_context.next = 3;
|
|
176
176
|
break;
|
|
177
177
|
}
|
|
@@ -348,7 +348,7 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
|
|
|
348
348
|
case 15:
|
|
349
349
|
_context.prev = 15;
|
|
350
350
|
_t6 = _context["catch"](1);
|
|
351
|
-
if (!(_this.state.query !== query && (0,
|
|
351
|
+
if (!(_this.state.query !== query && (0, _fg.fg)('smart-user-picker-fetch-error-fix'))) {
|
|
352
352
|
_context.next = 16;
|
|
353
353
|
break;
|
|
354
354
|
}
|
|
@@ -584,7 +584,7 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
|
|
|
584
584
|
} else if (!this.state.closed && !this.state.loading) {
|
|
585
585
|
// If the component has rendered (including its dropdown list) and it
|
|
586
586
|
// is not loading anything further, send the success UFO event
|
|
587
|
-
if (![
|
|
587
|
+
if (![_experienceState.UFOExperienceState.FAILED.id, _experienceState.UFOExperienceState.SUCCEEDED.id, _experienceState.UFOExperienceState.ABORTED.id].includes(this.optionsShownUfoExperienceInstance.state.id)) {
|
|
588
588
|
this.optionsShownUfoExperienceInstance.success(ufoEndStateConfig(this.props.fieldId));
|
|
589
589
|
}
|
|
590
590
|
}
|
|
@@ -605,7 +605,7 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
|
|
|
605
605
|
// When suggestEmailsForDomain is active, partial (non-email) input must still reach the base
|
|
606
606
|
// picker's domain-suggestion creatable logic, so the isEmailQuery restriction is relaxed for
|
|
607
607
|
// those queries only. Full email queries that matched an existing user remain suppressed.
|
|
608
|
-
var isDomainSuggestionEnabled = (0,
|
|
608
|
+
var isDomainSuggestionEnabled = (0, _fg.fg)('smart_user_picker_suggest_emails_for_domain') && !!suggestEmailsForDomain;
|
|
609
609
|
if (allowEmail && enableEmailSearch && !allowEmailSelectionWhenEmailMatched) {
|
|
610
610
|
var isCurrentQueryEmail = isEmailQuery(this.state.query);
|
|
611
611
|
if (isDomainSuggestionEnabled) {
|
|
@@ -651,4 +651,4 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
|
|
|
651
651
|
allowEmailSelectionWhenEmailMatched: true,
|
|
652
652
|
verifiedTeams: false
|
|
653
653
|
});
|
|
654
|
-
var SmartUserPicker = exports.SmartUserPicker = (0,
|
|
654
|
+
var SmartUserPicker = exports.SmartUserPicker = (0, _withAnalyticsEvents.default)()((0, _reactIntl.injectIntl)(SmartUserPickerWithoutAnalytics));
|
|
@@ -7,7 +7,7 @@ exports.transformUsers = void 0;
|
|
|
7
7
|
var _userPicker = require("@atlaskit/user-picker");
|
|
8
8
|
var _i18n = require("../i18n");
|
|
9
9
|
var _types = require("../types");
|
|
10
|
-
var
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
11
|
var getLozenzeProperties = function getLozenzeProperties(entity, intl) {
|
|
12
12
|
var _entity$attributes, _entity$attributes2, _entity$attributes3;
|
|
13
13
|
if ((_entity$attributes = entity.attributes) !== null && _entity$attributes !== void 0 && _entity$attributes.workspaceMember) {
|
|
@@ -21,7 +21,7 @@ var getLozenzeProperties = function getLozenzeProperties(entity, intl) {
|
|
|
21
21
|
appearance: 'default'
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
var isJiraGuestUser = (0,
|
|
24
|
+
var isJiraGuestUser = (0, _fg.fg)('user_picker_guest_lozenges') && ((_entity$attributes3 = entity.attributes) === null || _entity$attributes3 === void 0 ? void 0 : _entity$attributes3.isJiraGuest);
|
|
25
25
|
if (isJiraGuestUser) {
|
|
26
26
|
return intl.formatMessage(_i18n.messages.guestLozengeText);
|
|
27
27
|
}
|
|
@@ -4,19 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.smartUserPickerRenderedUfoExperience = exports.smartUserPickerOptionsShownUfoExperience = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _experienceTypes = require("@atlaskit/ufo/experience-types");
|
|
8
|
+
var _concurrentExperience = require("@atlaskit/ufo/concurrent-experience");
|
|
8
9
|
var COMPONENT_NAME = 'smart-user-picker';
|
|
9
|
-
var smartUserPickerRenderedUfoExperience = exports.smartUserPickerRenderedUfoExperience = new
|
|
10
|
+
var smartUserPickerRenderedUfoExperience = exports.smartUserPickerRenderedUfoExperience = new _concurrentExperience.ConcurrentExperience('smart-user-picker-rendered', {
|
|
10
11
|
platform: {
|
|
11
12
|
component: COMPONENT_NAME
|
|
12
13
|
},
|
|
13
|
-
type:
|
|
14
|
-
performanceType:
|
|
14
|
+
type: _experienceTypes.ExperienceTypes.Load,
|
|
15
|
+
performanceType: _experienceTypes.ExperiencePerformanceTypes.PageSegmentLoad
|
|
15
16
|
});
|
|
16
|
-
var smartUserPickerOptionsShownUfoExperience = exports.smartUserPickerOptionsShownUfoExperience = new
|
|
17
|
+
var smartUserPickerOptionsShownUfoExperience = exports.smartUserPickerOptionsShownUfoExperience = new _concurrentExperience.ConcurrentExperience('smart-user-picker-options-shown', {
|
|
17
18
|
platform: {
|
|
18
19
|
component: COMPONENT_NAME
|
|
19
20
|
},
|
|
20
|
-
type:
|
|
21
|
-
performanceType:
|
|
21
|
+
type: _experienceTypes.ExperienceTypes.Operation,
|
|
22
|
+
performanceType: _experienceTypes.ExperiencePerformanceTypes.InlineResult
|
|
22
23
|
});
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useUFOConcurrentExperience = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _experienceState = require("@atlaskit/ufo/experience-state");
|
|
9
9
|
var useUFOConcurrentExperience = exports.useUFOConcurrentExperience = function useUFOConcurrentExperience(experience, id) {
|
|
10
10
|
var experienceForId = experience.getInstance(id);
|
|
11
11
|
|
|
@@ -17,11 +17,11 @@ var useUFOConcurrentExperience = exports.useUFOConcurrentExperience = function u
|
|
|
17
17
|
|
|
18
18
|
// Replace with @atlaskit/ufo's <ExperienceSuccess> when it supports ConcurrentExperience
|
|
19
19
|
(0, _react.useEffect)(function () {
|
|
20
|
-
if (experienceForId.state !==
|
|
20
|
+
if (experienceForId.state !== _experienceState.UFOExperienceState['FAILED']) {
|
|
21
21
|
experienceForId.success();
|
|
22
22
|
}
|
|
23
23
|
return function () {
|
|
24
|
-
if ([
|
|
24
|
+
if ([_experienceState.UFOExperienceState['STARTED'], _experienceState.UFOExperienceState['IN_PROGRESS']].includes(experienceForId.state)) {
|
|
25
25
|
experienceForId.abort();
|
|
26
26
|
}
|
|
27
27
|
};
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
2
|
-
import
|
|
2
|
+
import createAndFireEvent from '@atlaskit/analytics-next/createAndFireEvents';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
5
|
const packageName = "@atlaskit/smart-user-picker";
|
|
6
|
-
const packageVersion = "11.5.
|
|
6
|
+
const packageVersion = "11.5.1";
|
|
7
7
|
export const startSession = () => ({
|
|
8
8
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
9
9
|
id: uuid(),
|
|
@@ -4,12 +4,12 @@ import React from 'react';
|
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
6
6
|
import { v4 as uuidV4 } from 'uuid';
|
|
7
|
-
import
|
|
7
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
8
8
|
import memoizeOne from 'memoize-one';
|
|
9
9
|
import { injectIntl } from 'react-intl';
|
|
10
|
-
import { UFOExperienceState } from '@atlaskit/ufo';
|
|
10
|
+
import { UFOExperienceState } from '@atlaskit/ufo/experience-state';
|
|
11
11
|
import UserPicker, { isExternalUser, isTeam, isGroup, isUser, isValidEmail } from '@atlaskit/user-picker';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
13
|
import { requestUsersEvent, filterUsersEvent, preparedUsersLoadedEvent, successfulRequestUsersEvent, failedRequestUsersEvent, mountedWithPrefetchEvent, createAndFireEventInElementsChannel, failedUserResolversEvent } from '../analytics';
|
|
14
14
|
import MessagesIntlProvider from './MessagesIntlProvider';
|
|
15
15
|
import { UserEntityType } from '../types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExternalUserType, GroupType, TeamType, UserType } from '@atlaskit/user-picker';
|
|
2
2
|
import { messages } from '../i18n';
|
|
3
3
|
import { EntityType } from '../types';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
const getLozenzeProperties = (entity, intl) => {
|
|
6
6
|
var _entity$attributes, _entity$attributes2, _entity$attributes3;
|
|
7
7
|
if ((_entity$attributes = entity.attributes) !== null && _entity$attributes !== void 0 && _entity$attributes.workspaceMember) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ExperiencePerformanceTypes, ExperienceTypes
|
|
1
|
+
import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
|
|
2
|
+
import { ConcurrentExperience } from '@atlaskit/ufo/concurrent-experience';
|
|
2
3
|
const COMPONENT_NAME = 'smart-user-picker';
|
|
3
4
|
export const smartUserPickerRenderedUfoExperience = new ConcurrentExperience('smart-user-picker-rendered', {
|
|
4
5
|
platform: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { UFOExperienceState } from '@atlaskit/ufo';
|
|
2
|
+
import { UFOExperienceState } from '@atlaskit/ufo/experience-state';
|
|
3
3
|
export const useUFOConcurrentExperience = (experience, id) => {
|
|
4
4
|
const experienceForId = experience.getInstance(id);
|
|
5
5
|
|
package/dist/esm/analytics.js
CHANGED
|
@@ -2,11 +2,11 @@ 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
4
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
5
|
-
import
|
|
5
|
+
import createAndFireEvent from '@atlaskit/analytics-next/createAndFireEvents';
|
|
6
6
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
7
7
|
import { v4 as uuid } from 'uuid';
|
|
8
8
|
var packageName = "@atlaskit/smart-user-picker";
|
|
9
|
-
var packageVersion = "11.5.
|
|
9
|
+
var packageVersion = "11.5.1";
|
|
10
10
|
export var startSession = function startSession() {
|
|
11
11
|
return {
|
|
12
12
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
@@ -22,12 +22,12 @@ import React from 'react';
|
|
|
22
22
|
import debounce from 'lodash/debounce';
|
|
23
23
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
24
24
|
import { v4 as uuidV4 } from 'uuid';
|
|
25
|
-
import
|
|
25
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
26
26
|
import memoizeOne from 'memoize-one';
|
|
27
27
|
import { injectIntl } from 'react-intl';
|
|
28
|
-
import { UFOExperienceState } from '@atlaskit/ufo';
|
|
28
|
+
import { UFOExperienceState } from '@atlaskit/ufo/experience-state';
|
|
29
29
|
import UserPicker, { isExternalUser, isTeam, isGroup, isUser, isValidEmail } from '@atlaskit/user-picker';
|
|
30
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
30
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
31
31
|
import { requestUsersEvent, filterUsersEvent, preparedUsersLoadedEvent, successfulRequestUsersEvent, failedRequestUsersEvent, mountedWithPrefetchEvent, createAndFireEventInElementsChannel, failedUserResolversEvent } from '../analytics';
|
|
32
32
|
import MessagesIntlProvider from './MessagesIntlProvider';
|
|
33
33
|
import { UserEntityType } from '../types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExternalUserType, GroupType, TeamType, UserType } from '@atlaskit/user-picker';
|
|
2
2
|
import { messages } from '../i18n';
|
|
3
3
|
import { EntityType } from '../types';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
var getLozenzeProperties = function getLozenzeProperties(entity, intl) {
|
|
6
6
|
var _entity$attributes, _entity$attributes2, _entity$attributes3;
|
|
7
7
|
if ((_entity$attributes = entity.attributes) !== null && _entity$attributes !== void 0 && _entity$attributes.workspaceMember) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ExperiencePerformanceTypes, ExperienceTypes
|
|
1
|
+
import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
|
|
2
|
+
import { ConcurrentExperience } from '@atlaskit/ufo/concurrent-experience';
|
|
2
3
|
var COMPONENT_NAME = 'smart-user-picker';
|
|
3
4
|
export var smartUserPickerRenderedUfoExperience = new ConcurrentExperience('smart-user-picker-rendered', {
|
|
4
5
|
platform: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { UFOExperienceState } from '@atlaskit/ufo';
|
|
2
|
+
import { UFOExperienceState } from '@atlaskit/ufo/experience-state';
|
|
3
3
|
export var useUFOConcurrentExperience = function useUFOConcurrentExperience(experience, id) {
|
|
4
4
|
var experienceForId = experience.getInstance(id);
|
|
5
5
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
2
|
+
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next/AnalyticsEvent';
|
|
3
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
4
|
import { type Props } from './types';
|
|
3
5
|
export type UserPickerSession = {
|
|
4
6
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type MemoizedFn } from 'memoize-one';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl';
|
|
4
|
-
import {
|
|
4
|
+
import type { UFOExperience } from '@atlaskit/ufo/experience';
|
|
5
5
|
import { type OptionData } from '@atlaskit/user-picker';
|
|
6
6
|
import { type Props, type State, type FilterOptions } from '../types';
|
|
7
7
|
import type { DebouncedFunc } from 'lodash';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
2
2
|
import { type DefaultValue, type ExternalUser, type OptionData, type Team, type User, type UserPickerProps } from '@atlaskit/user-picker';
|
|
3
3
|
export interface Context {
|
|
4
4
|
containerId?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ConcurrentExperience } from '@atlaskit/ufo';
|
|
1
|
+
import { ConcurrentExperience } from '@atlaskit/ufo/concurrent-experience';
|
|
2
2
|
export declare const smartUserPickerRenderedUfoExperience: ConcurrentExperience;
|
|
3
3
|
export declare const smartUserPickerOptionsShownUfoExperience: ConcurrentExperience;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ConcurrentExperience } from '@atlaskit/ufo/concurrent-experience';
|
|
2
2
|
export declare const useUFOConcurrentExperience: (experience: ConcurrentExperience, id: string) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-user-picker",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@atlaskit/afm-i18n-platform-smart-experiences-smart-user-picker": "2.202.0",
|
|
30
|
-
"@atlaskit/analytics-next": "^12.
|
|
31
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
32
|
-
"@atlaskit/ufo": "^1.
|
|
33
|
-
"@atlaskit/user-picker": "^13.
|
|
30
|
+
"@atlaskit/analytics-next": "^12.5.0",
|
|
31
|
+
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
32
|
+
"@atlaskit/ufo": "^1.1.0",
|
|
33
|
+
"@atlaskit/user-picker": "^13.12.0",
|
|
34
34
|
"@babel/runtime": "^7.0.0",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
36
36
|
"memoize-one": "^6.0.0",
|
|
@@ -42,13 +42,17 @@
|
|
|
42
42
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@atlaskit/
|
|
45
|
+
"@atlaskit/button": "^25.3.0",
|
|
46
|
+
"@atlaskit/select": "^22.11.0",
|
|
47
|
+
"@atlaskit/textfield": "^10.2.0",
|
|
46
48
|
"@atlaskit/util-data-test": "^19.1.0",
|
|
47
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
48
|
-
"@atlassian/feature-flags-test-utils": "^1.
|
|
49
|
+
"@atlassian/a11y-jest-testing": "^0.17.0",
|
|
50
|
+
"@atlassian/feature-flags-test-utils": "^1.3.0",
|
|
51
|
+
"@atlassian/integrations": "^33.7.0",
|
|
49
52
|
"@testing-library/dom": "^10.1.0",
|
|
50
53
|
"@testing-library/react": "^16.3.0",
|
|
51
54
|
"@testing-library/user-event": "^14.4.3",
|
|
55
|
+
"@types/enzyme": "3.1.15",
|
|
52
56
|
"enzyme": "^3.10.0",
|
|
53
57
|
"fetch-mock": "^8.0.0",
|
|
54
58
|
"graphql-tag": "^2.10.1",
|
package/report.api.md
DELETED
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
<!-- API Report Version: 2.3 -->
|
|
2
|
-
|
|
3
|
-
## API Report File for "@atlaskit/smart-user-picker"
|
|
4
|
-
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
6
|
-
> [API Extractor](https://api-extractor.com/).
|
|
7
|
-
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
8
|
-
|
|
9
|
-
### Table of contents
|
|
10
|
-
|
|
11
|
-
- [Main Entry Types](#main-entry-types)
|
|
12
|
-
- [Peer Dependencies](#peer-dependencies)
|
|
13
|
-
|
|
14
|
-
### Main Entry Types
|
|
15
|
-
|
|
16
|
-
<!--SECTION START: Main Entry Types-->
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import { ActionTypes } from '@atlaskit/user-picker';
|
|
20
|
-
import { Appearance } from '@atlaskit/user-picker';
|
|
21
|
-
import { AtlasKitSelectChange } from '@atlaskit/user-picker';
|
|
22
|
-
import { AtlaskitSelectValue } from '@atlaskit/user-picker';
|
|
23
|
-
import { DefaultValue } from '@atlaskit/user-picker';
|
|
24
|
-
import { Email } from '@atlaskit/user-picker';
|
|
25
|
-
import { EmailType } from '@atlaskit/user-picker';
|
|
26
|
-
import { EmailValidationResponse } from '@atlaskit/user-picker';
|
|
27
|
-
import { EmailValidator } from '@atlaskit/user-picker';
|
|
28
|
-
import { ExternalUser } from '@atlaskit/user-picker';
|
|
29
|
-
import { Group } from '@atlaskit/user-picker';
|
|
30
|
-
import { GroupHighlight } from '@atlaskit/user-picker';
|
|
31
|
-
import { GroupType } from '@atlaskit/user-picker';
|
|
32
|
-
import { HighlightRange } from '@atlaskit/user-picker';
|
|
33
|
-
import { InputActionTypes } from '@atlaskit/user-picker';
|
|
34
|
-
import { IntlShape } from 'react-intl';
|
|
35
|
-
import { isEmail } from '@atlaskit/user-picker';
|
|
36
|
-
import { isTeam } from '@atlaskit/user-picker';
|
|
37
|
-
import { isUser } from '@atlaskit/user-picker';
|
|
38
|
-
import { isValidEmail } from '@atlaskit/user-picker';
|
|
39
|
-
import { LoadOptions } from '@atlaskit/user-picker';
|
|
40
|
-
import { LozengeProps } from '@atlaskit/user-picker';
|
|
41
|
-
import { OnChange } from '@atlaskit/user-picker';
|
|
42
|
-
import { OnInputChange } from '@atlaskit/user-picker';
|
|
43
|
-
import { OnOption } from '@atlaskit/user-picker';
|
|
44
|
-
import { OnPicker } from '@atlaskit/user-picker';
|
|
45
|
-
import { Option as Option_2 } from '@atlaskit/user-picker';
|
|
46
|
-
import { OptionData } from '@atlaskit/user-picker';
|
|
47
|
-
import { OptionIdentifier } from '@atlaskit/user-picker';
|
|
48
|
-
import { PopupUserPickerProps } from '@atlaskit/user-picker';
|
|
49
|
-
import { Promisable } from '@atlaskit/user-picker';
|
|
50
|
-
import { default as React_2 } from 'react';
|
|
51
|
-
import { Target } from '@atlaskit/user-picker';
|
|
52
|
-
import { Team } from '@atlaskit/user-picker';
|
|
53
|
-
import { TeamHighlight } from '@atlaskit/user-picker';
|
|
54
|
-
import { TeamMember } from '@atlaskit/user-picker';
|
|
55
|
-
import { TeamType } from '@atlaskit/user-picker';
|
|
56
|
-
import { User } from '@atlaskit/user-picker';
|
|
57
|
-
import { UserHighlight } from '@atlaskit/user-picker';
|
|
58
|
-
import { UserPickerProps } from '@atlaskit/user-picker';
|
|
59
|
-
import { UserPickerState } from '@atlaskit/user-picker';
|
|
60
|
-
import { UserSource } from '@atlaskit/user-picker';
|
|
61
|
-
import { UserType } from '@atlaskit/user-picker';
|
|
62
|
-
import { Value } from '@atlaskit/user-picker';
|
|
63
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
64
|
-
|
|
65
|
-
export { ActionTypes };
|
|
66
|
-
|
|
67
|
-
export { Appearance };
|
|
68
|
-
|
|
69
|
-
export { AtlasKitSelectChange };
|
|
70
|
-
|
|
71
|
-
export { AtlaskitSelectValue };
|
|
72
|
-
|
|
73
|
-
// @public (undocumented)
|
|
74
|
-
interface BitbucketAttributes {
|
|
75
|
-
emailDomain?: string;
|
|
76
|
-
isPublicRepo?: boolean;
|
|
77
|
-
workspaceIds?: string[];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// @public (undocumented)
|
|
81
|
-
interface ConfluenceAttributes {
|
|
82
|
-
isEntitledConfluenceExternalCollaborator?: boolean;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// @public (undocumented)
|
|
86
|
-
interface Context {
|
|
87
|
-
// (undocumented)
|
|
88
|
-
childObjectId?: string;
|
|
89
|
-
// (undocumented)
|
|
90
|
-
containerId?: string;
|
|
91
|
-
// (undocumented)
|
|
92
|
-
contextType: string;
|
|
93
|
-
// (undocumented)
|
|
94
|
-
objectId?: string;
|
|
95
|
-
// (undocumented)
|
|
96
|
-
organizationId?: string;
|
|
97
|
-
// (undocumented)
|
|
98
|
-
principalId?: string;
|
|
99
|
-
// (undocumented)
|
|
100
|
-
productAttributes?: ProductAttributes;
|
|
101
|
-
// (undocumented)
|
|
102
|
-
productKey: string;
|
|
103
|
-
// (undocumented)
|
|
104
|
-
sessionId?: string;
|
|
105
|
-
// (undocumented)
|
|
106
|
-
siteId: string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export { DefaultValue };
|
|
110
|
-
|
|
111
|
-
export { Email };
|
|
112
|
-
|
|
113
|
-
export { EmailType };
|
|
114
|
-
|
|
115
|
-
export { EmailValidationResponse };
|
|
116
|
-
|
|
117
|
-
export { EmailValidator };
|
|
118
|
-
|
|
119
|
-
export { ExternalUser };
|
|
120
|
-
|
|
121
|
-
// @public (undocumented)
|
|
122
|
-
type FilterOptions = (options: OptionData[], query: string) => OptionData[];
|
|
123
|
-
|
|
124
|
-
// @public (undocumented)
|
|
125
|
-
export const getUserRecommendations: (
|
|
126
|
-
request: RecommendationRequest,
|
|
127
|
-
intl: IntlShape,
|
|
128
|
-
) => Promise<OptionData[]>;
|
|
129
|
-
|
|
130
|
-
export { Group };
|
|
131
|
-
|
|
132
|
-
export { GroupHighlight };
|
|
133
|
-
|
|
134
|
-
export { GroupType };
|
|
135
|
-
|
|
136
|
-
export { HighlightRange };
|
|
137
|
-
|
|
138
|
-
// @public (undocumented)
|
|
139
|
-
export function hydrateDefaultValues(
|
|
140
|
-
baseUrl: string | undefined,
|
|
141
|
-
value: DefaultValue,
|
|
142
|
-
productKey: string,
|
|
143
|
-
): Promise<DefaultValue>;
|
|
144
|
-
|
|
145
|
-
export { InputActionTypes };
|
|
146
|
-
|
|
147
|
-
export { isEmail };
|
|
148
|
-
|
|
149
|
-
export { isTeam };
|
|
150
|
-
|
|
151
|
-
export { isUser };
|
|
152
|
-
|
|
153
|
-
export { isValidEmail };
|
|
154
|
-
|
|
155
|
-
export { LoadOptions };
|
|
156
|
-
|
|
157
|
-
export { LozengeProps };
|
|
158
|
-
|
|
159
|
-
export { OnChange };
|
|
160
|
-
|
|
161
|
-
// @public (undocumented)
|
|
162
|
-
type OnEmpty = (query: string) => Promise<OptionData[]>;
|
|
163
|
-
|
|
164
|
-
// @public (undocumented)
|
|
165
|
-
type OnError = (error: any, request: RecommendationRequest) => Promise<OptionData[]> | void;
|
|
166
|
-
|
|
167
|
-
export { OnInputChange };
|
|
168
|
-
|
|
169
|
-
export { OnOption };
|
|
170
|
-
|
|
171
|
-
export { OnPicker };
|
|
172
|
-
|
|
173
|
-
// @public (undocumented)
|
|
174
|
-
type OnValueError = (error: any, defaultValue: DefaultValue) => Promise<OptionData[]> | void;
|
|
175
|
-
|
|
176
|
-
export { Option_2 as Option };
|
|
177
|
-
|
|
178
|
-
export { OptionData };
|
|
179
|
-
|
|
180
|
-
export { OptionIdentifier };
|
|
181
|
-
|
|
182
|
-
export { PopupUserPickerProps };
|
|
183
|
-
|
|
184
|
-
// @public (undocumented)
|
|
185
|
-
type ProductAttributes = BitbucketAttributes | ConfluenceAttributes;
|
|
186
|
-
|
|
187
|
-
export { Promisable };
|
|
188
|
-
|
|
189
|
-
// @public (undocumented)
|
|
190
|
-
export interface Props extends SmartProps, UserPickerProps, WithAnalyticsEventsProps {
|
|
191
|
-
defaultValue?: DefaultValue;
|
|
192
|
-
fieldId: string;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// @public (undocumented)
|
|
196
|
-
export interface RecommendationRequest {
|
|
197
|
-
// (undocumented)
|
|
198
|
-
baseUrl?: string;
|
|
199
|
-
// (undocumented)
|
|
200
|
-
context: Context;
|
|
201
|
-
// (undocumented)
|
|
202
|
-
includeGroups?: boolean;
|
|
203
|
-
// (undocumented)
|
|
204
|
-
includeTeams?: boolean;
|
|
205
|
-
// (undocumented)
|
|
206
|
-
includeUsers?: boolean;
|
|
207
|
-
// (undocumented)
|
|
208
|
-
maxNumberOfResults: number;
|
|
209
|
-
// (undocumented)
|
|
210
|
-
query?: string;
|
|
211
|
-
// (undocumented)
|
|
212
|
-
searchQueryFilter?: string;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// @public (undocumented)
|
|
216
|
-
interface SmartProps {
|
|
217
|
-
baseUrl?: string;
|
|
218
|
-
bootstrapOptions?: OptionData[];
|
|
219
|
-
childObjectId?: string;
|
|
220
|
-
containerId?: string;
|
|
221
|
-
debounceTime?: number;
|
|
222
|
-
filterOptions?: FilterOptions;
|
|
223
|
-
includeGroups?: boolean;
|
|
224
|
-
includeTeams?: boolean;
|
|
225
|
-
includeUsers?: boolean;
|
|
226
|
-
objectId?: string;
|
|
227
|
-
onEmpty?: OnEmpty;
|
|
228
|
-
onError?: OnError;
|
|
229
|
-
onValueError?: OnValueError;
|
|
230
|
-
orgId?: string;
|
|
231
|
-
prefetch?: boolean;
|
|
232
|
-
principalId?: string;
|
|
233
|
-
productAttributes?: ProductAttributes;
|
|
234
|
-
productKey: string;
|
|
235
|
-
searchQueryFilter?: string;
|
|
236
|
-
siteId: string;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// @public (undocumented)
|
|
240
|
-
const SmartUserPickerWithIntlProvider: React_2.FunctionComponent<Props>;
|
|
241
|
-
export default SmartUserPickerWithIntlProvider;
|
|
242
|
-
|
|
243
|
-
// @public (undocumented)
|
|
244
|
-
export interface State {
|
|
245
|
-
// (undocumented)
|
|
246
|
-
bootstrapOptions: OptionData[];
|
|
247
|
-
// (undocumented)
|
|
248
|
-
closed: boolean;
|
|
249
|
-
// (undocumented)
|
|
250
|
-
defaultValue?: DefaultValue;
|
|
251
|
-
// (undocumented)
|
|
252
|
-
loading: boolean;
|
|
253
|
-
// (undocumented)
|
|
254
|
-
query: string;
|
|
255
|
-
// (undocumented)
|
|
256
|
-
sessionId?: string;
|
|
257
|
-
// (undocumented)
|
|
258
|
-
users: OptionData[];
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export { Target };
|
|
262
|
-
|
|
263
|
-
export { Team };
|
|
264
|
-
|
|
265
|
-
export { TeamHighlight };
|
|
266
|
-
|
|
267
|
-
export { TeamMember };
|
|
268
|
-
|
|
269
|
-
export { TeamType };
|
|
270
|
-
|
|
271
|
-
export { User };
|
|
272
|
-
|
|
273
|
-
export { UserHighlight };
|
|
274
|
-
|
|
275
|
-
export { UserPickerProps };
|
|
276
|
-
|
|
277
|
-
export { UserPickerState };
|
|
278
|
-
|
|
279
|
-
export { UserSource };
|
|
280
|
-
|
|
281
|
-
export { UserType };
|
|
282
|
-
|
|
283
|
-
export { Value };
|
|
284
|
-
|
|
285
|
-
// (No @packageDocumentation comment for this package)
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
<!--SECTION END: Main Entry Types-->
|
|
289
|
-
|
|
290
|
-
### Peer Dependencies
|
|
291
|
-
|
|
292
|
-
<!--SECTION START: Peer Dependencies-->
|
|
293
|
-
|
|
294
|
-
```json
|
|
295
|
-
{
|
|
296
|
-
"react": "^16.8.0",
|
|
297
|
-
"react-dom": "^16.8.0"
|
|
298
|
-
}
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
<!--SECTION END: Peer Dependencies-->
|