@atlaskit/share 2.0.1 → 3.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 +6 -0
- package/dist/cjs/clients/ShareServiceClient.js +1 -7
- package/dist/cjs/components/ShareDialogContainer.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/clients/ShareServiceClient.js +1 -7
- package/dist/es2019/components/ShareDialogContainer.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/clients/ShareServiceClient.js +1 -7
- package/dist/esm/components/ShareDialogContainer.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/clients/ShareServiceClient.d.ts +2 -2
- package/dist/types/components/ShareDialogContainer.d.ts +1 -1
- package/dist/types/types/ShareDialogContainer.d.ts +0 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -36,13 +36,7 @@ var ShareServiceClient = /*#__PURE__*/function () {
|
|
|
36
36
|
|
|
37
37
|
(0, _createClass2.default)(ShareServiceClient, [{
|
|
38
38
|
key: "getConfig",
|
|
39
|
-
value: function getConfig(cloudId
|
|
40
|
-
if (!enableEmailPermissionCheck) {
|
|
41
|
-
return Promise.resolve({
|
|
42
|
-
disableSharingToEmails: false
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
39
|
+
value: function getConfig(cloudId) {
|
|
46
40
|
var options = {
|
|
47
41
|
path: SHARE_CONFIG_PATH,
|
|
48
42
|
queryParams: {
|
|
@@ -111,7 +111,7 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
111
111
|
case 0:
|
|
112
112
|
_context.prev = 0;
|
|
113
113
|
_context.next = 3;
|
|
114
|
-
return _this.shareClient.getConfig(_this.props.cloudId
|
|
114
|
+
return _this.shareClient.getConfig(_this.props.cloudId);
|
|
115
115
|
|
|
116
116
|
case 3:
|
|
117
117
|
config = _context.sent;
|
package/dist/cjs/version.json
CHANGED
|
@@ -10,13 +10,7 @@ export class ShareServiceClient {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
getConfig(cloudId
|
|
14
|
-
if (!enableEmailPermissionCheck) {
|
|
15
|
-
return Promise.resolve({
|
|
16
|
-
disableSharingToEmails: false
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
13
|
+
getConfig(cloudId) {
|
|
20
14
|
const options = {
|
|
21
15
|
path: SHARE_CONFIG_PATH,
|
|
22
16
|
queryParams: {
|
|
@@ -53,7 +53,7 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
53
53
|
isFetchingConfig: true
|
|
54
54
|
}, async () => {
|
|
55
55
|
try {
|
|
56
|
-
const config = await this.shareClient.getConfig(this.props.cloudId
|
|
56
|
+
const config = await this.shareClient.getConfig(this.props.cloudId);
|
|
57
57
|
|
|
58
58
|
if (this._isMounted) {
|
|
59
59
|
this.setState({
|
package/dist/es2019/version.json
CHANGED
|
@@ -21,13 +21,7 @@ export var ShareServiceClient = /*#__PURE__*/function () {
|
|
|
21
21
|
|
|
22
22
|
_createClass(ShareServiceClient, [{
|
|
23
23
|
key: "getConfig",
|
|
24
|
-
value: function getConfig(cloudId
|
|
25
|
-
if (!enableEmailPermissionCheck) {
|
|
26
|
-
return Promise.resolve({
|
|
27
|
-
disableSharingToEmails: false
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
24
|
+
value: function getConfig(cloudId) {
|
|
31
25
|
var options = {
|
|
32
26
|
path: SHARE_CONFIG_PATH,
|
|
33
27
|
queryParams: {
|
|
@@ -84,7 +84,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
84
84
|
case 0:
|
|
85
85
|
_context.prev = 0;
|
|
86
86
|
_context.next = 3;
|
|
87
|
-
return _this.shareClient.getConfig(_this.props.cloudId
|
|
87
|
+
return _this.shareClient.getConfig(_this.props.cloudId);
|
|
88
88
|
|
|
89
89
|
case 3:
|
|
90
90
|
config = _context.sent;
|
package/dist/esm/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import { ServiceConfig } from '@atlaskit/util-service-support';
|
|
|
2
2
|
import { Comment, Content, MetaData, User } from '../types';
|
|
3
3
|
export interface ShareClient {
|
|
4
4
|
share(content: Content, recipients: User[], metadata: MetaData, comment?: Comment): Promise<ShareResponse>;
|
|
5
|
-
getConfig(cloudId: string
|
|
5
|
+
getConfig(cloudId: string): Promise<ConfigResponse>;
|
|
6
6
|
}
|
|
7
7
|
export declare type ShareRequest = (content: Content, recipients: User[], metadata: MetaData, comment?: Comment) => Promise<ShareResponse>;
|
|
8
8
|
export declare type ShareResponse = {
|
|
@@ -17,7 +17,7 @@ export declare const DEFAULT_SHARE_SERVICE_URL = "/gateway/api";
|
|
|
17
17
|
export declare class ShareServiceClient implements ShareClient {
|
|
18
18
|
private serviceConfig;
|
|
19
19
|
constructor(serviceConfig?: Partial<ServiceConfig>);
|
|
20
|
-
getConfig(cloudId: string
|
|
20
|
+
getConfig(cloudId: string): Promise<ConfigResponse>;
|
|
21
21
|
/**
|
|
22
22
|
* To send a POST request to the share endpoint in Share service
|
|
23
23
|
*/
|
|
@@ -53,7 +53,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
|
|
|
53
53
|
getFormShareLink: () => string;
|
|
54
54
|
render(): JSX.Element;
|
|
55
55
|
}
|
|
56
|
-
export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Pick<WithAnalyticsEventsProps & ShareDialogContainerProps, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "enableSmartUserPicker" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "product" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "
|
|
56
|
+
export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Pick<WithAnalyticsEventsProps & ShareDialogContainerProps, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "enableSmartUserPicker" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "product" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener" | "shareeAction">, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener"> & Partial<Pick<Pick<WithAnalyticsEventsProps & ShareDialogContainerProps, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "enableSmartUserPicker" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "product" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener" | "shareeAction">, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
|
|
57
57
|
enableSmartUserPicker: boolean;
|
|
58
58
|
shareeAction: "view" | "edit";
|
|
59
59
|
product: string;
|
|
@@ -93,11 +93,6 @@ export declare type ShareDialogContainerProps = {
|
|
|
93
93
|
* - `cloudId`
|
|
94
94
|
*/
|
|
95
95
|
enableSmartUserPicker?: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* When true, the component will call the Share service to check whether the
|
|
98
|
-
* site has sharing to emails enabled.
|
|
99
|
-
*/
|
|
100
|
-
enableEmailPermissionCheck?: boolean;
|
|
101
96
|
/**
|
|
102
97
|
* The userId of the sharer. If not provided, smart user picker
|
|
103
98
|
* defaults it to the value 'Context'
|