@atlaskit/share 3.0.11 → 3.0.12

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/share
2
2
 
3
+ ## 3.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7d2e926ff5a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d2e926ff5a) - use latest SmartUserPicker in @atlaskit/share
8
+
3
9
  ## 3.0.11
4
10
 
5
11
  ### Patch Changes
@@ -31,7 +31,9 @@ var _reactIntlNext = require("react-intl-next");
31
31
 
32
32
  var _form = require("@atlaskit/form");
33
33
 
34
- var _userPicker = _interopRequireWildcard(require("@atlaskit/user-picker"));
34
+ var _smartUserPicker = _interopRequireWildcard(require("@atlaskit/smart-user-picker"));
35
+
36
+ var _userPicker = _interopRequireDefault(require("@atlaskit/user-picker"));
35
37
 
36
38
  var _i18n = require("../i18n");
37
39
 
@@ -66,7 +68,7 @@ var getNoOptionsMessageDescriptor = function getNoOptionsMessageDescriptor(email
66
68
  var getNoOptionsMessage = function getNoOptionsMessage(isPublicLink, allowEmail) {
67
69
  return function (_ref) {
68
70
  var inputValue = _ref.inputValue;
69
- return inputValue && inputValue.trim().length > 0 ? /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, getNoOptionsMessageDescriptor((0, _userPicker.isValidEmail)(inputValue), isPublicLink, allowEmail), {
71
+ return inputValue && inputValue.trim().length > 0 ? /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, getNoOptionsMessageDescriptor((0, _smartUserPicker.isValidEmail)(inputValue), isPublicLink, allowEmail), {
70
72
  values: {
71
73
  inputValue: inputValue
72
74
  }
@@ -200,7 +202,7 @@ var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
200
202
  maxPickerHeight: _styles.MAX_PICKER_HEIGHT,
201
203
  textFieldBackgroundColor: true
202
204
  };
203
- var UserPickerComponent = enableSmartUserPicker ? _userPicker.SmartUserPicker : _userPicker.default;
205
+ var UserPickerComponent = enableSmartUserPicker ? _smartUserPicker.default : _userPicker.default;
204
206
  var menuPortalTarget = (0, _utils.getMenuPortalTargetCurrentHTML)(selectPortalRef);
205
207
  return /*#__PURE__*/_react.default.createElement(_form.Field, {
206
208
  name: "users",
@@ -9,7 +9,7 @@ exports.shortUrlRequested = exports.shortUrlGenerated = exports.shareTriggerButt
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
12
- var _userPicker = require("@atlaskit/user-picker");
12
+ var _smartUserPicker = require("@atlaskit/smart-user-picker");
13
13
 
14
14
  var _version = require("../version.json");
15
15
 
@@ -145,10 +145,10 @@ exports.copyLinkButtonClicked = copyLinkButtonClicked;
145
145
 
146
146
  var formShareSubmitted = function formShareSubmitted(start, data, shareContentType, shareOrigin) {
147
147
  var isPublicLink = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
148
- var users = extractIdsByType(data, _userPicker.isUser);
149
- var teams = extractIdsByType(data, _userPicker.isTeam);
150
- var teamUserCounts = extractMemberCountsFromTeams(data, _userPicker.isTeam);
151
- var emails = extractIdsByType(data, _userPicker.isEmail);
148
+ var users = extractIdsByType(data, _smartUserPicker.isUser);
149
+ var teams = extractIdsByType(data, _smartUserPicker.isTeam);
150
+ var teamUserCounts = extractMemberCountsFromTeams(data, _smartUserPicker.isTeam);
151
+ var emails = extractIdsByType(data, _smartUserPicker.isEmail);
152
152
  return createEvent('ui', ANALYTICS_SOURCE, 'clicked', 'button', 'submitShare', _objectSpread(_objectSpread({}, getOriginTracingAttributes(shareOrigin)), {}, {
153
153
  contentType: shareContentType,
154
154
  duration: duration(start),
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.0.11"
3
+ "version": "3.0.12"
4
4
  }
@@ -3,7 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import React from 'react';
4
4
  import { FormattedMessage, injectIntl } from 'react-intl-next';
5
5
  import { ErrorMessage, Field, HelperMessage } from '@atlaskit/form';
6
- import UserPicker, { isValidEmail, SmartUserPicker } from '@atlaskit/user-picker';
6
+ import SmartUserPicker, { isValidEmail } from '@atlaskit/smart-user-picker';
7
+ import UserPicker from '@atlaskit/user-picker';
7
8
  import { messages } from '../i18n';
8
9
  import { MAX_PICKER_HEIGHT } from './styles';
9
10
  import { allowEmails, getMenuPortalTargetCurrentHTML } from './utils';
@@ -1,4 +1,4 @@
1
- import { isEmail, isTeam, isUser } from '@atlaskit/user-picker';
1
+ import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
  import { name as packageName, version as packageVersion } from '../version.json';
3
3
 
4
4
  const buildAttributes = (attributes = {}) => ({
@@ -1,4 +1,5 @@
1
- import { layers } from '@atlaskit/theme/constants';
1
+ import { layers } from '@atlaskit/theme/constants'; // AFP-2532 TODO: Fix automatic suppressions below
2
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
2
3
 
3
4
  /**
4
5
  * We need to generate correct zIndex, for the PopUp and for the Select inside it.
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.0.11"
3
+ "version": "3.0.12"
4
4
  }
@@ -14,7 +14,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
14
14
  import React from 'react';
15
15
  import { FormattedMessage, injectIntl } from 'react-intl-next';
16
16
  import { ErrorMessage, Field, HelperMessage } from '@atlaskit/form';
17
- import UserPicker, { isValidEmail, SmartUserPicker } from '@atlaskit/user-picker';
17
+ import SmartUserPicker, { isValidEmail } from '@atlaskit/smart-user-picker';
18
+ import UserPicker from '@atlaskit/user-picker';
18
19
  import { messages } from '../i18n';
19
20
  import { MAX_PICKER_HEIGHT } from './styles';
20
21
  import { allowEmails, getMenuPortalTargetCurrentHTML } from './utils';
@@ -4,7 +4,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
4
4
 
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
 
7
- import { isEmail, isTeam, isUser } from '@atlaskit/user-picker';
7
+ import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
8
8
  import { name as packageName, version as packageVersion } from '../version.json';
9
9
 
10
10
  var buildAttributes = function buildAttributes() {
@@ -1,4 +1,5 @@
1
- import { layers } from '@atlaskit/theme/constants';
1
+ import { layers } from '@atlaskit/theme/constants'; // AFP-2532 TODO: Fix automatic suppressions below
2
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
2
3
 
3
4
  /**
4
5
  * We need to generate correct zIndex, for the PopUp and for the Select inside it.
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.0.11"
3
+ "version": "3.0.12"
4
4
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { LoadOptions } from '@atlaskit/user-picker';
2
+ import type { LoadOptions } from '@atlaskit/smart-user-picker';
3
3
  import type { ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
4
4
  import { IntegrationFormProps } from '../IntegrationForm';
5
5
  export declare type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { WrappedComponentProps } from 'react-intl-next';
3
- import { LoadOptions, OptionData, Value } from '@atlaskit/user-picker';
3
+ import { LoadOptions, OptionData, Value } from '@atlaskit/smart-user-picker';
4
4
  import { ConfigResponse, ProductName } from '../types';
5
5
  export declare const REQUIRED = "REQUIRED";
6
6
  export declare type Props = {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { OptionData } from '@atlaskit/user-picker';
2
+ import { OptionData } from '@atlaskit/smart-user-picker';
3
3
  import { ConfigResponse, User } from '../types';
4
4
  import type { IntegrationMode } from '../types/ShareEntities';
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { OptionData } from '@atlaskit/user-picker';
1
+ import { OptionData } from '@atlaskit/smart-user-picker';
2
2
  import { Comment } from './ShareEntities';
3
3
  import { User } from './User';
4
4
  export declare type ShareContentState = {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { Appearance } from '@atlaskit/button/types';
3
3
  import type { IconProps } from '@atlaskit/icon';
4
- import type { LoadOptions, Value } from '@atlaskit/user-picker';
4
+ import type { LoadOptions, Value } from '@atlaskit/smart-user-picker';
5
5
  import type { ShortenRequest, UrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
6
6
  import type { ShareClient } from '../clients/ShareServiceClient';
7
7
  import type { Flag } from './Flag';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { LoadOptions } from '@atlaskit/user-picker';
2
+ import type { LoadOptions } from '@atlaskit/smart-user-picker';
3
3
  import type { ConfigResponse } from '../clients/ShareServiceClient';
4
4
  import type { ProductName } from './Products';
5
5
  import type { ShareData, ShareError } from './ShareContentState';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.0.11",
3
+ "version": "3.0.12",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,17 +32,18 @@
32
32
  "dependencies": {
33
33
  "@atlaskit/analytics-next": "^8.2.0",
34
34
  "@atlaskit/button": "^16.0.0",
35
- "@atlaskit/dropdown-menu": "^11.0.0",
36
- "@atlaskit/form": "^8.4.0",
35
+ "@atlaskit/dropdown-menu": "^11.1.0",
36
+ "@atlaskit/form": "^8.5.0",
37
37
  "@atlaskit/icon": "^21.10.0",
38
38
  "@atlaskit/popup": "^1.3.0",
39
39
  "@atlaskit/portal": "^4.0.0",
40
+ "@atlaskit/smart-user-picker": "^4.0.1",
40
41
  "@atlaskit/spinner": "^15.1.4",
41
42
  "@atlaskit/tabs": "^13.2.3",
42
- "@atlaskit/textarea": "^4.2.2",
43
+ "@atlaskit/textarea": "^4.3.0",
43
44
  "@atlaskit/theme": "^12.1.0",
44
45
  "@atlaskit/tooltip": "^17.5.0",
45
- "@atlaskit/user-picker": "^8.4.0",
46
+ "@atlaskit/user-picker": "^8.6.0",
46
47
  "@atlaskit/util-service-support": "^6.1.0",
47
48
  "@babel/runtime": "^7.0.0",
48
49
  "fast-deep-equal": "^3.1.1",
@@ -57,7 +58,7 @@
57
58
  },
58
59
  "devDependencies": {
59
60
  "@atlaskit/docs": "^9.0.0",
60
- "@atlaskit/editor-test-helpers": "^16.0.0",
61
+ "@atlaskit/editor-test-helpers": "^16.1.0",
61
62
  "@atlaskit/flag": "^14.5.0",
62
63
  "@atlaskit/section-message": "^6.0.0",
63
64
  "@atlaskit/select": "^15.0.0",