@atlaskit/share 4.16.3 → 4.16.4

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
+ ## 4.16.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#83215](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83215) [`d254bd519f7f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d254bd519f7f) - Fix error when submit share with external_user.
8
+
3
9
  ## 4.16.3
4
10
 
5
11
  ### Patch Changes
@@ -13,7 +13,7 @@ var buildAttributes = function buildAttributes() {
13
13
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14
14
  return _objectSpread({
15
15
  packageName: "@atlaskit/share",
16
- packageVersion: "4.16.3"
16
+ packageVersion: "4.16.4"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -48,6 +48,13 @@ var optionDataToUsers = exports.optionDataToUsers = function optionDataToUsers(o
48
48
  email: optionData.id
49
49
  };
50
50
  return user;
51
+ case 'external_user':
52
+ // When optionData.type is 'external_user', we need to convert it to 'user'
53
+ // because 'external_user' isn't a valid type for the '/gateway/api/share' API.
54
+ return {
55
+ type: 'user',
56
+ id: optionData.id
57
+ };
51
58
  default:
52
59
  return {
53
60
  type: optionData.type || 'user',
@@ -1,7 +1,7 @@
1
1
  import { isEmail, isExternalUser, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
  const buildAttributes = (attributes = {}) => ({
3
3
  packageName: "@atlaskit/share",
4
- packageVersion: "4.16.3",
4
+ packageVersion: "4.16.4",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -42,6 +42,13 @@ export const optionDataToUsers = optionDataArray => optionDataArray.map(optionDa
42
42
  email: optionData.id
43
43
  };
44
44
  return user;
45
+ case 'external_user':
46
+ // When optionData.type is 'external_user', we need to convert it to 'user'
47
+ // because 'external_user' isn't a valid type for the '/gateway/api/share' API.
48
+ return {
49
+ type: 'user',
50
+ id: optionData.id
51
+ };
45
52
  default:
46
53
  return {
47
54
  type: optionData.type || 'user',
@@ -6,7 +6,7 @@ var buildAttributes = function buildAttributes() {
6
6
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7
7
  return _objectSpread({
8
8
  packageName: "@atlaskit/share",
9
- packageVersion: "4.16.3"
9
+ packageVersion: "4.16.4"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -43,6 +43,13 @@ export var optionDataToUsers = function optionDataToUsers(optionDataArray) {
43
43
  email: optionData.id
44
44
  };
45
45
  return user;
46
+ case 'external_user':
47
+ // When optionData.type is 'external_user', we need to convert it to 'user'
48
+ // because 'external_user' isn't a valid type for the '/gateway/api/share' API.
49
+ return {
50
+ type: 'user',
51
+ id: optionData.id
52
+ };
46
53
  default:
47
54
  return {
48
55
  type: optionData.type || 'user',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.16.3",
3
+ "version": "4.16.4",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/smart-user-picker": "^6.9.0",
53
53
  "@atlaskit/spinner": "^16.0.0",
54
54
  "@atlaskit/tabs": "^14.0.0",
55
- "@atlaskit/textarea": "^5.1.0",
55
+ "@atlaskit/textarea": "^5.2.0",
56
56
  "@atlaskit/theme": "^12.6.0",
57
57
  "@atlaskit/tokens": "^1.42.0",
58
58
  "@atlaskit/tooltip": "^18.1.0",