@atlaskit/smart-user-picker 9.2.1 → 10.0.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,34 @@
1
1
  # @atlassian/smart-user-picker
2
2
 
3
+ ## 10.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`d2e14ba5ae9fc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2e14ba5ae9fc) -
8
+ Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
9
+
10
+ What changed: The `react-intl-next` npm alias (which resolved to `react-intl@^5`) has been
11
+ removed. All imports now reference `react-intl` directly, and `peerDependencies` have been updated
12
+ to `"^5.25.1 || ^6.0.0 || ^7.0.0"`.
13
+
14
+ How consumer should update their code: Ensure `react-intl` is installed at a version satisfying
15
+ `^5.25.1 || ^6.0.0 || ^7.0.0`. If your application was using `react-intl-next` as an npm alias, it
16
+ can be safely removed. Replace any remaining `react-intl-next` imports with `react-intl`.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 9.2.2
23
+
24
+ ### Patch Changes
25
+
26
+ - [`2c91b4048c838`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2c91b4048c838) -
27
+ Bump i18n packages
28
+ - [`ddd049a745d38`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ddd049a745d38) -
29
+ Internal change to how legacy colors are applied. No visual changes.
30
+ - Updated dependencies
31
+
3
32
  ## 9.2.1
4
33
 
5
34
  ### 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,9 +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 = exports.default = (0, _reactIntlNext.injectIntl)(MessagesIntlProvider);
52
+ var _default_1 = (0, _reactIntl.injectIntl)(MessagesIntlProvider);
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:',
@@ -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 => {
@@ -38,4 +38,5 @@ const MessagesIntlProvider = props => {
38
38
  messages: mergedMessages
39
39
  }, children);
40
40
  };
41
- export default injectIntl(MessagesIntlProvider);
41
+ const _default_1 = injectIntl(MessagesIntlProvider);
42
+ export default _default_1;
@@ -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',
@@ -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) {
@@ -40,4 +40,5 @@ var MessagesIntlProvider = function MessagesIntlProvider(props) {
40
40
  messages: mergedMessages
41
41
  }, children);
42
42
  };
43
- export default injectIntl(MessagesIntlProvider);
43
+ var _default_1 = injectIntl(MessagesIntlProvider);
44
+ export default _default_1;
@@ -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,9 +1,9 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { type IntlShape } 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
  }>;
6
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<MessagesIntlProviderProps>> & {
6
+ declare const _default_1: React.FC<WithIntlProps<MessagesIntlProviderProps>> & {
7
7
  WrappedComponent: React.ComponentType<MessagesIntlProviderProps>;
8
8
  };
9
- export default _default;
9
+ export default _default_1;
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
- import { type WrappedComponentProps } from 'react-intl-next';
2
+ import { type MemoizedFn } from 'memoize-one';
3
+ import { type WrappedComponentProps } from 'react-intl';
3
4
  import { type UFOExperience } from '@atlaskit/ufo';
4
5
  import { type OptionData } from '@atlaskit/user-picker';
5
6
  import { type Props, type State, type FilterOptions } from '../types';
7
+ import type { DebouncedFunc } from 'lodash';
6
8
  export declare class SmartUserPickerWithoutAnalytics extends React.Component<Props & WrappedComponentProps, State> {
7
9
  state: State;
8
10
  private lastEmailSearchFoundMatches;
@@ -30,8 +32,8 @@ export declare class SmartUserPickerWithoutAnalytics extends React.Component<Pro
30
32
  startOptionsShownUfoExperience: () => void;
31
33
  private fireEvent;
32
34
  filterOptions: (users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[];
33
- memoizedFilterOptions: import("memoize-one").MemoizedFn<(users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[]>;
34
- getUsers: import("lodash").DebouncedFunc<() => Promise<void>>;
35
+ memoizedFilterOptions: MemoizedFn<(users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[]>;
36
+ getUsers: DebouncedFunc<() => Promise<void>>;
35
37
  onInputChange: (newQuery?: string, sessionId?: string) => void;
36
38
  filterUsers: () => OptionData[];
37
39
  onFocus: (sessionId?: string) => void;
@@ -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,9 +1,9 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { type IntlShape } 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
  }>;
6
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<MessagesIntlProviderProps>> & {
6
+ declare const _default_1: React.FC<WithIntlProps<MessagesIntlProviderProps>> & {
7
7
  WrappedComponent: React.ComponentType<MessagesIntlProviderProps>;
8
8
  };
9
- export default _default;
9
+ export default _default_1;
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
- import { type WrappedComponentProps } from 'react-intl-next';
2
+ import { type MemoizedFn } from 'memoize-one';
3
+ import { type WrappedComponentProps } from 'react-intl';
3
4
  import { type UFOExperience } from '@atlaskit/ufo';
4
5
  import { type OptionData } from '@atlaskit/user-picker';
5
6
  import { type Props, type State, type FilterOptions } from '../types';
7
+ import type { DebouncedFunc } from 'lodash';
6
8
  export declare class SmartUserPickerWithoutAnalytics extends React.Component<Props & WrappedComponentProps, State> {
7
9
  state: State;
8
10
  private lastEmailSearchFoundMatches;
@@ -30,8 +32,8 @@ export declare class SmartUserPickerWithoutAnalytics extends React.Component<Pro
30
32
  startOptionsShownUfoExperience: () => void;
31
33
  private fireEvent;
32
34
  filterOptions: (users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[];
33
- memoizedFilterOptions: import("memoize-one").MemoizedFn<(users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[]>;
34
- getUsers: import("lodash").DebouncedFunc<() => Promise<void>>;
35
+ memoizedFilterOptions: MemoizedFn<(users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[]>;
36
+ getUsers: DebouncedFunc<() => Promise<void>>;
35
37
  onInputChange: (newQuery?: string, sessionId?: string) => void;
36
38
  filterUsers: () => OptionData[];
37
39
  onFocus: (sessionId?: string) => void;
@@ -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.1",
3
+ "version": "10.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,32 +34,33 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/afm-i18n-platform-smart-experiences-smart-user-picker": "2.7.0",
37
+ "@atlaskit/afm-i18n-platform-smart-experiences-smart-user-picker": "2.88.0",
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
- "@atlaskit/select": "^21.8.0",
53
+ "@atlaskit/select": "^21.10.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",
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": {
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';