@atlaskit/smart-user-picker 9.2.2 → 10.0.1

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,31 @@
1
1
  # @atlassian/smart-user-picker
2
2
 
3
+ ## 10.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9b1521c6d0e35`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b1521c6d0e35) -
8
+ FFCLEANUP-97327: Remove smart-user-picker-attribution-header feature gate (always-on cleanup)
9
+
10
+ ## 10.0.0
11
+
12
+ ### Major Changes
13
+
14
+ - [`d2e14ba5ae9fc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2e14ba5ae9fc) -
15
+ Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
16
+
17
+ What changed: The `react-intl-next` npm alias (which resolved to `react-intl@^5`) has been
18
+ removed. All imports now reference `react-intl` directly, and `peerDependencies` have been updated
19
+ to `"^5.25.1 || ^6.0.0 || ^7.0.0"`.
20
+
21
+ How consumer should update their code: Ensure `react-intl` is installed at a version satisfying
22
+ `^5.25.1 || ^6.0.0 || ^7.0.0`. If your application was using `react-intl-next` as an npm alias, it
23
+ can be safely removed. Replace any remaining `react-intl-next` imports with `react-intl`.
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
3
29
  ## 9.2.2
4
30
 
5
31
  ### Patch Changes
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
- var _reactIntlNext = require("react-intl-next");
12
+ var _reactIntl = require("react-intl");
13
13
  var _i18nUtil = require("../util/i18n-util");
14
14
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
15
  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; }
@@ -44,10 +44,10 @@ var MessagesIntlProvider = function MessagesIntlProvider(props) {
44
44
  var mergedMessages = (0, _react.useMemo)(function () {
45
45
  return _objectSpread(_objectSpread({}, intl.messages), messages);
46
46
  }, [intl.messages, messages]);
47
- return /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
47
+ return /*#__PURE__*/_react.default.createElement(_reactIntl.IntlProvider, {
48
48
  locale: intl.locale,
49
49
  messages: mergedMessages
50
50
  }, children);
51
51
  };
52
- var _default_1 = (0, _reactIntlNext.injectIntl)(MessagesIntlProvider);
52
+ var _default_1 = (0, _reactIntl.injectIntl)(MessagesIntlProvider);
53
53
  var _default = exports.default = _default_1;
@@ -23,7 +23,7 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
23
23
  var _uuid = require("uuid");
24
24
  var _analyticsNext = require("@atlaskit/analytics-next");
25
25
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
26
- var _reactIntlNext = require("react-intl-next");
26
+ var _reactIntl = require("react-intl");
27
27
  var _ufo = require("@atlaskit/ufo");
28
28
  var _userPicker = _interopRequireWildcard(require("@atlaskit/user-picker"));
29
29
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
@@ -616,4 +616,4 @@ var SmartUserPickerWithoutAnalytics = exports.SmartUserPickerWithoutAnalytics =
616
616
  allowEmailSelectionWhenEmailMatched: true,
617
617
  verifiedTeams: false
618
618
  });
619
- var SmartUserPicker = exports.SmartUserPicker = (0, _analyticsNext.withAnalyticsEvents)()((0, _reactIntlNext.injectIntl)(SmartUserPickerWithoutAnalytics));
619
+ var SmartUserPicker = exports.SmartUserPicker = (0, _analyticsNext.withAnalyticsEvents)()((0, _reactIntl.injectIntl)(SmartUserPickerWithoutAnalytics));
package/dist/cjs/i18n.js CHANGED
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.messages = void 0;
7
- var _reactIntlNext = require("react-intl-next");
8
- var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
7
+ var _reactIntl = require("react-intl");
8
+ 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:',
@@ -4,15 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.graphqlQuery = graphqlQuery;
7
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
7
  var _atlAttribution = require("./atl-attribution");
9
8
  var buildHeaders = function buildHeaders(attributionData) {
10
9
  var headers = new Headers();
11
10
  headers.append('Content-Type', 'application/json');
12
- if ((0, _platformFeatureFlags.fg)('smart-user-picker-attribution-header')) {
13
- var atlAttributionHeader = (0, _atlAttribution.createAtlAttributionHeader)(attributionData);
14
- headers.append('atl-attribution', atlAttributionHeader['atl-attribution']);
15
- }
11
+ var atlAttributionHeader = (0, _atlAttribution.createAtlAttributionHeader)(attributionData);
12
+ headers.append('atl-attribution', atlAttributionHeader['atl-attribution']);
16
13
  return headers;
17
14
  };
18
15
  /**
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { IntlProvider, injectIntl } from 'react-intl-next';
2
+ import { IntlProvider, injectIntl } from 'react-intl';
3
3
  import { getMessagesForLocale } from '../util/i18n-util';
4
4
  const EMPTY = {};
5
5
  const useI18n = locale => {
@@ -6,7 +6,7 @@ import debounce from 'lodash/debounce';
6
6
  import { v4 as uuidV4 } from 'uuid';
7
7
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
8
8
  import memoizeOne from 'memoize-one';
9
- import { injectIntl } from 'react-intl-next';
9
+ import { injectIntl } from 'react-intl';
10
10
  import { UFOExperienceState } from '@atlaskit/ufo';
11
11
  import UserPicker, { isExternalUser, isTeam, isGroup, isUser, isValidEmail } from '@atlaskit/user-picker';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -1,4 +1,4 @@
1
- import { defineMessages } from 'react-intl-next';
1
+ import { defineMessages } from 'react-intl';
2
2
  export const messages = defineMessages({
3
3
  externalUserSourcesHeading: {
4
4
  id: 'fabric.elements.user-picker.external.sourced.from',
@@ -1,12 +1,9 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import { createAtlAttributionHeader } from './atl-attribution';
3
2
  const buildHeaders = attributionData => {
4
3
  const headers = new Headers();
5
4
  headers.append('Content-Type', 'application/json');
6
- if (fg('smart-user-picker-attribution-header')) {
7
- const atlAttributionHeader = createAtlAttributionHeader(attributionData);
8
- headers.append('atl-attribution', atlAttributionHeader['atl-attribution']);
9
- }
5
+ const atlAttributionHeader = createAtlAttributionHeader(attributionData);
6
+ headers.append('atl-attribution', atlAttributionHeader['atl-attribution']);
10
7
  return headers;
11
8
  };
12
9
  /**
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
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 React, { useMemo } from 'react';
6
- import { IntlProvider, injectIntl } from 'react-intl-next';
6
+ import { IntlProvider, injectIntl } from 'react-intl';
7
7
  import { getMessagesForLocale } from '../util/i18n-util';
8
8
  var EMPTY = {};
9
9
  var useI18n = function useI18n(locale) {
@@ -24,7 +24,7 @@ import debounce from 'lodash/debounce';
24
24
  import { v4 as uuidV4 } from 'uuid';
25
25
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
26
26
  import memoizeOne from 'memoize-one';
27
- import { injectIntl } from 'react-intl-next';
27
+ import { injectIntl } from 'react-intl';
28
28
  import { UFOExperienceState } from '@atlaskit/ufo';
29
29
  import UserPicker, { isExternalUser, isTeam, isGroup, isUser, isValidEmail } from '@atlaskit/user-picker';
30
30
  import { fg } from '@atlaskit/platform-feature-flags';
package/dist/esm/i18n.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineMessages } from 'react-intl-next';
1
+ import { defineMessages } from 'react-intl';
2
2
  export var messages = defineMessages({
3
3
  externalUserSourcesHeading: {
4
4
  id: 'fabric.elements.user-picker.external.sourced.from',
@@ -1,12 +1,9 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import { createAtlAttributionHeader } from './atl-attribution';
3
2
  var buildHeaders = function buildHeaders(attributionData) {
4
3
  var headers = new Headers();
5
4
  headers.append('Content-Type', 'application/json');
6
- if (fg('smart-user-picker-attribution-header')) {
7
- var atlAttributionHeader = createAtlAttributionHeader(attributionData);
8
- headers.append('atl-attribution', atlAttributionHeader['atl-attribution']);
9
- }
5
+ var atlAttributionHeader = createAtlAttributionHeader(attributionData);
6
+ headers.append('atl-attribution', atlAttributionHeader['atl-attribution']);
10
7
  return headers;
11
8
  };
12
9
  /**
@@ -1,5 +1,5 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { type IntlShape, type WithIntlProps } from 'react-intl-next';
2
+ import { type IntlShape, type WithIntlProps } from 'react-intl';
3
3
  export type MessagesIntlProviderProps = PropsWithChildren<{
4
4
  intl: IntlShape;
5
5
  }>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type MemoizedFn } from 'memoize-one';
3
- import { type WrappedComponentProps } from 'react-intl-next';
3
+ import { type WrappedComponentProps } from 'react-intl';
4
4
  import { type UFOExperience } from '@atlaskit/ufo';
5
5
  import { type OptionData } from '@atlaskit/user-picker';
6
6
  import { type Props, type State, type FilterOptions } from '../types';
@@ -1,6 +1,6 @@
1
1
  import { type OptionData } from '@atlaskit/user-picker';
2
2
  import { type RecommendationRequest } from '../types';
3
- import { type IntlShape } from 'react-intl-next';
3
+ import { type IntlShape } from 'react-intl';
4
4
  export interface SUPError extends Error {
5
5
  message: string;
6
6
  statusCode: number;
@@ -1,5 +1,5 @@
1
1
  import { type OptionData } from '@atlaskit/user-picker';
2
- import { type IntlShape } from 'react-intl-next';
2
+ import { type IntlShape } from 'react-intl';
3
3
  import { EntityType } from '../types';
4
4
  interface ServerItem {
5
5
  id: string;
@@ -195,7 +195,7 @@ export interface SmartProps {
195
195
  * Prefetch the list of suggested assignees before the user picker is focused.
196
196
  * WARNING: please consider carefully before deciding to prefetch your suggestions
197
197
  * as this will increase the load on the recommendations services (has caused HOTs).
198
- * Please give #search-plex a ballpark on the expected request volume.
198
+ * Please give #help-search-plex a ballpark on the expected request volume.
199
199
  */
200
200
  prefetch?: boolean;
201
201
  /**
@@ -304,7 +304,7 @@ export interface Props extends SmartProps, UserPickerProps, WithAnalyticsEventsP
304
304
  * generating suggestions.
305
305
  * All fieldId's will be bucketed into a model that provides generic smart results,
306
306
  * except "assignee", "mentions" which are specifically trained for Jira Assignee and
307
- * @Mentions. For specifically trained models, please contact #search-plex.
307
+ * @Mentions. For specifically trained models, please contact #help-search-plex.
308
308
  */
309
309
  fieldId: string;
310
310
  /** Whether the menu is open or not. */
@@ -1,5 +1,5 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { type IntlShape, type WithIntlProps } from 'react-intl-next';
2
+ import { type IntlShape, type WithIntlProps } from 'react-intl';
3
3
  export type MessagesIntlProviderProps = PropsWithChildren<{
4
4
  intl: IntlShape;
5
5
  }>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type MemoizedFn } from 'memoize-one';
3
- import { type WrappedComponentProps } from 'react-intl-next';
3
+ import { type WrappedComponentProps } from 'react-intl';
4
4
  import { type UFOExperience } from '@atlaskit/ufo';
5
5
  import { type OptionData } from '@atlaskit/user-picker';
6
6
  import { type Props, type State, type FilterOptions } from '../types';
@@ -1,6 +1,6 @@
1
1
  import { type OptionData } from '@atlaskit/user-picker';
2
2
  import { type RecommendationRequest } from '../types';
3
- import { type IntlShape } from 'react-intl-next';
3
+ import { type IntlShape } from 'react-intl';
4
4
  export interface SUPError extends Error {
5
5
  message: string;
6
6
  statusCode: number;
@@ -1,5 +1,5 @@
1
1
  import { type OptionData } from '@atlaskit/user-picker';
2
- import { type IntlShape } from 'react-intl-next';
2
+ import { type IntlShape } from 'react-intl';
3
3
  import { EntityType } from '../types';
4
4
  interface ServerItem {
5
5
  id: string;
@@ -195,7 +195,7 @@ export interface SmartProps {
195
195
  * Prefetch the list of suggested assignees before the user picker is focused.
196
196
  * WARNING: please consider carefully before deciding to prefetch your suggestions
197
197
  * as this will increase the load on the recommendations services (has caused HOTs).
198
- * Please give #search-plex a ballpark on the expected request volume.
198
+ * Please give #help-search-plex a ballpark on the expected request volume.
199
199
  */
200
200
  prefetch?: boolean;
201
201
  /**
@@ -304,7 +304,7 @@ export interface Props extends SmartProps, UserPickerProps, WithAnalyticsEventsP
304
304
  * generating suggestions.
305
305
  * All fieldId's will be bucketed into a model that provides generic smart results,
306
306
  * except "assignee", "mentions" which are specifically trained for Jira Assignee and
307
- * @Mentions. For specifically trained models, please contact #search-plex.
307
+ * @Mentions. For specifically trained models, please contact #help-search-plex.
308
308
  */
309
309
  fieldId: string;
310
310
  /** Whether the menu is open or not. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-user-picker",
3
- "version": "9.2.2",
3
+ "version": "10.0.1",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,16 +38,16 @@
38
38
  "@atlaskit/analytics-next": "^11.2.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/ufo": "^0.4.0",
41
- "@atlaskit/user-picker": "^11.25.0",
41
+ "@atlaskit/user-picker": "^12.0.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "lodash": "^4.17.21",
44
44
  "memoize-one": "^6.0.0",
45
- "react-intl-next": "npm:react-intl@^5.18.1",
46
45
  "uuid": "^3.1.0"
47
46
  },
48
47
  "peerDependencies": {
49
48
  "react": "^18.2.0",
50
- "react-dom": "^18.2.0"
49
+ "react-dom": "^18.2.0",
50
+ "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@atlaskit/select": "^21.10.0",
@@ -59,7 +59,8 @@
59
59
  "enzyme": "^3.10.0",
60
60
  "fetch-mock": "^8.0.0",
61
61
  "graphql-tag": "^2.10.1",
62
- "mock-apollo-client": "^0.1.0"
62
+ "mock-apollo-client": "^0.1.0",
63
+ "react-intl": "^6.6.2"
63
64
  },
64
65
  "platform-feature-flags": {
65
66
  "twcg-444-invite-usd-improvements-m2-gate": {
@@ -71,9 +72,6 @@
71
72
  "smart-user-picker-restrict-to-gate": {
72
73
  "type": "boolean"
73
74
  },
74
- "smart-user-picker-attribution-header": {
75
- "type": "boolean"
76
- },
77
75
  "user_picker_guest_lozenges": {
78
76
  "type": "boolean"
79
77
  }
package/report.api.md CHANGED
@@ -31,7 +31,7 @@ import { GroupHighlight } from '@atlaskit/user-picker';
31
31
  import { GroupType } from '@atlaskit/user-picker';
32
32
  import { HighlightRange } from '@atlaskit/user-picker';
33
33
  import { InputActionTypes } from '@atlaskit/user-picker';
34
- import { IntlShape } from 'react-intl-next';
34
+ import { IntlShape } from 'react-intl';
35
35
  import { isEmail } from '@atlaskit/user-picker';
36
36
  import { isTeam } from '@atlaskit/user-picker';
37
37
  import { isUser } from '@atlaskit/user-picker';