@atlaskit/share 4.16.2 → 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,17 @@
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
+
9
+ ## 4.16.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
14
+
3
15
  ## 4.16.2
4
16
 
5
17
  ### Patch Changes
@@ -5,7 +5,7 @@
5
5
  "module:es2019": "../dist/es2019/clients/index.js",
6
6
  "types": "../dist/types/clients/index.d.ts",
7
7
  "typesVersions": {
8
- ">=4.5 <4.9": {
8
+ ">=4.5 <5.4": {
9
9
  "*": [
10
10
  "../dist/types-ts4.5/clients/index.d.ts"
11
11
  ]
@@ -5,7 +5,7 @@
5
5
  "module:es2019": "../dist/es2019/components/CopyLinkButton.js",
6
6
  "types": "../dist/types/components/CopyLinkButton.d.ts",
7
7
  "typesVersions": {
8
- ">=4.5 <4.9": {
8
+ ">=4.5 <5.4": {
9
9
  "*": [
10
10
  "../dist/types-ts4.5/components/CopyLinkButton.d.ts"
11
11
  ]
@@ -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.2"
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,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -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.2",
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',
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -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.2"
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',
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
3
+ type Props = React.PropsWithChildren<WithAnalyticsEventsProps>;
4
+ declare const _default: React.ForwardRefExoticComponent<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
4
5
  export default _default;
@@ -3,7 +3,7 @@ import { WrappedComponentProps } from 'react-intl-next';
3
3
  export interface Props {
4
4
  children: React.ReactChild;
5
5
  }
6
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
7
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
6
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
7
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
8
8
  };
9
9
  export default _default;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
3
+ type Props = React.PropsWithChildren<WithAnalyticsEventsProps>;
4
+ declare const _default: React.ForwardRefExoticComponent<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
4
5
  export default _default;
@@ -3,7 +3,7 @@ import { WrappedComponentProps } from 'react-intl-next';
3
3
  export interface Props {
4
4
  children: React.ReactChild;
5
5
  }
6
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
7
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
6
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
7
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
8
8
  };
9
9
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.16.2",
3
+ "version": "4.16.4",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,9 +52,9 @@
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
- "@atlaskit/tokens": "^1.41.0",
57
+ "@atlaskit/tokens": "^1.42.0",
58
58
  "@atlaskit/tooltip": "^18.1.0",
59
59
  "@atlaskit/ufo": "^0.2.0",
60
60
  "@atlaskit/user-picker": "^10.19.0",
@@ -72,7 +72,7 @@
72
72
  "react": "^16.8.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@atlaskit/editor-test-helpers": "^18.19.0",
75
+ "@atlaskit/editor-test-helpers": "^18.20.0",
76
76
  "@atlaskit/flag": "^15.2.0",
77
77
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
78
78
  "@testing-library/react": "^12.1.5",
@@ -80,7 +80,7 @@
80
80
  "enzyme": "^3.10.0",
81
81
  "enzyme-adapter-react-16": "^1.15.1",
82
82
  "react": "^16.8.0",
83
- "typescript": "~4.9.5"
83
+ "typescript": "~5.4.2"
84
84
  },
85
85
  "keywords": [
86
86
  "ui",
@@ -118,4 +118,4 @@
118
118
  "./copy-link-button": "./src/components/CopyLinkButton.tsx"
119
119
  },
120
120
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
121
- }
121
+ }