@atlaskit/share 3.5.2 → 3.5.3
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/clients/package.json +8 -1
- package/copy-link-button/package.json +8 -1
- package/dist/cjs/clients/AtlassianUrlShortenerClient.js +5 -1
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/clients/AtlassianUrlShortenerClient.js +4 -1
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/clients/AtlassianUrlShortenerClient.js +5 -1
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.0/clients/AtlassianUrlShortenerClient.d.ts +16 -0
- package/dist/types-ts4.0/clients/ShareServiceClient.d.ts +25 -0
- package/dist/types-ts4.0/clients/index.d.ts +2 -0
- package/dist/types-ts4.0/components/CommentField.d.ts +6 -0
- package/dist/types-ts4.0/components/CopyLinkButton.d.ts +37 -0
- package/dist/types-ts4.0/components/ErrorBoundary.d.ts +4 -0
- package/dist/types-ts4.0/components/IntegrationButton.d.ts +10 -0
- package/dist/types-ts4.0/components/IntegrationForm.d.ts +11 -0
- package/dist/types-ts4.0/components/LazyShareForm/LazyShareForm.d.ts +20 -0
- package/dist/types-ts4.0/components/LazyShareForm/index.d.ts +1 -0
- package/dist/types-ts4.0/components/LazyShareForm/lazy.d.ts +4 -0
- package/dist/types-ts4.0/components/MessagesIntlProvider.d.ts +9 -0
- package/dist/types-ts4.0/components/ShareButton.d.ts +13 -0
- package/dist/types-ts4.0/components/ShareDialogContainer.d.ts +59 -0
- package/dist/types-ts4.0/components/ShareDialogWithTrigger.d.ts +43 -0
- package/dist/types-ts4.0/components/ShareForm.d.ts +11 -0
- package/dist/types-ts4.0/components/ShareFormWrapper/ShareFormWrapper.d.ts +9 -0
- package/dist/types-ts4.0/components/ShareFormWrapper/index.d.ts +1 -0
- package/dist/types-ts4.0/components/ShareFormWrapper/styled.d.ts +10 -0
- package/dist/types-ts4.0/components/ShareHeader.d.ts +8 -0
- package/dist/types-ts4.0/components/SlackIcon.d.ts +3 -0
- package/dist/types-ts4.0/components/SplitButton.d.ts +19 -0
- package/dist/types-ts4.0/components/UserPickerField.d.ts +28 -0
- package/dist/types-ts4.0/components/analytics/analytics.d.ts +19 -0
- package/dist/types-ts4.0/components/analytics/ufoExperienceHelper.d.ts +2 -0
- package/dist/types-ts4.0/components/analytics/ufoExperiences.d.ts +3 -0
- package/dist/types-ts4.0/components/colorSlackIcon.d.ts +3 -0
- package/dist/types-ts4.0/components/localStorageUtils.d.ts +5 -0
- package/dist/types-ts4.0/components/monochromeSlackIcon.d.ts +3 -0
- package/dist/types-ts4.0/components/styles.d.ts +5 -0
- package/dist/types-ts4.0/components/utils.d.ts +20 -0
- package/dist/types-ts4.0/i18n/cs.d.ts +43 -0
- package/dist/types-ts4.0/i18n/da.d.ts +43 -0
- package/dist/types-ts4.0/i18n/de.d.ts +43 -0
- package/dist/types-ts4.0/i18n/en.d.ts +35 -0
- package/dist/types-ts4.0/i18n/en_GB.d.ts +35 -0
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +43 -0
- package/dist/types-ts4.0/i18n/es.d.ts +43 -0
- package/dist/types-ts4.0/i18n/et.d.ts +30 -0
- package/dist/types-ts4.0/i18n/fi.d.ts +43 -0
- package/dist/types-ts4.0/i18n/fr.d.ts +43 -0
- package/dist/types-ts4.0/i18n/hu.d.ts +43 -0
- package/dist/types-ts4.0/i18n/index.d.ts +36 -0
- package/dist/types-ts4.0/i18n/is.d.ts +33 -0
- package/dist/types-ts4.0/i18n/it.d.ts +43 -0
- package/dist/types-ts4.0/i18n/ja.d.ts +43 -0
- package/dist/types-ts4.0/i18n/ko.d.ts +43 -0
- package/dist/types-ts4.0/i18n/languages.d.ts +33 -0
- package/dist/types-ts4.0/i18n/nb.d.ts +43 -0
- package/dist/types-ts4.0/i18n/nl.d.ts +43 -0
- package/dist/types-ts4.0/i18n/pl.d.ts +43 -0
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +43 -0
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +30 -0
- package/dist/types-ts4.0/i18n/ro.d.ts +33 -0
- package/dist/types-ts4.0/i18n/ru.d.ts +43 -0
- package/dist/types-ts4.0/i18n/sk.d.ts +30 -0
- package/dist/types-ts4.0/i18n/sv.d.ts +43 -0
- package/dist/types-ts4.0/i18n/th.d.ts +43 -0
- package/dist/types-ts4.0/i18n/tr.d.ts +43 -0
- package/dist/types-ts4.0/i18n/uk.d.ts +43 -0
- package/dist/types-ts4.0/i18n/vi.d.ts +43 -0
- package/dist/types-ts4.0/i18n/zh.d.ts +43 -0
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +43 -0
- package/dist/types-ts4.0/i18n.d.ts +172 -0
- package/dist/types-ts4.0/index.d.ts +4 -0
- package/dist/types-ts4.0/types/Flag.d.ts +13 -0
- package/dist/types-ts4.0/types/OriginTracing.d.ts +17 -0
- package/dist/types-ts4.0/types/Products.d.ts +3 -0
- package/dist/types-ts4.0/types/ShareButton.d.ts +2 -0
- package/dist/types-ts4.0/types/ShareContentState.d.ts +14 -0
- package/dist/types-ts4.0/types/ShareDialogContainer.d.ts +144 -0
- package/dist/types-ts4.0/types/ShareDialogWithTrigger.d.ts +45 -0
- package/dist/types-ts4.0/types/ShareEntities.d.ts +30 -0
- package/dist/types-ts4.0/types/ShareForm.d.ts +31 -0
- package/dist/types-ts4.0/types/User.d.ts +9 -0
- package/dist/types-ts4.0/types/form.d.ts +5 -0
- package/dist/types-ts4.0/types/index.d.ts +17 -0
- package/dist/types-ts4.0/util/i18n-util.d.ts +17 -0
- package/package.json +11 -4
- package/report.api.md +114 -152
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.3",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.0 <4.5": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.0/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"atlaskit:src": "src/index.ts",
|
|
16
23
|
"atlassian": {
|
|
17
24
|
"team": "People and Teams Collective",
|
|
@@ -45,7 +52,7 @@
|
|
|
45
52
|
"@atlaskit/tokens": "^0.10.0",
|
|
46
53
|
"@atlaskit/tooltip": "^17.5.0",
|
|
47
54
|
"@atlaskit/ufo": "^0.1.0",
|
|
48
|
-
"@atlaskit/user-picker": "^9.
|
|
55
|
+
"@atlaskit/user-picker": "^9.4.0",
|
|
49
56
|
"@atlaskit/util-service-support": "^6.1.0",
|
|
50
57
|
"@babel/runtime": "^7.0.0",
|
|
51
58
|
"@emotion/react": "^11.7.1",
|
|
@@ -60,7 +67,7 @@
|
|
|
60
67
|
},
|
|
61
68
|
"devDependencies": {
|
|
62
69
|
"@atlaskit/docs": "^9.0.0",
|
|
63
|
-
"@atlaskit/editor-test-helpers": "^17.
|
|
70
|
+
"@atlaskit/editor-test-helpers": "^17.2.0",
|
|
64
71
|
"@atlaskit/flag": "^14.7.0",
|
|
65
72
|
"@atlaskit/section-message": "^6.2.0",
|
|
66
73
|
"@atlaskit/select": "^15.7.0",
|
|
@@ -71,7 +78,7 @@
|
|
|
71
78
|
"enzyme-adapter-react-16": "^1.15.1",
|
|
72
79
|
"enzyme-react-intl": "^2.0.6",
|
|
73
80
|
"react": "^16.8.0",
|
|
74
|
-
"typescript": "4.
|
|
81
|
+
"typescript": "4.5.5"
|
|
75
82
|
},
|
|
76
83
|
"keywords": [
|
|
77
84
|
"ui",
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/share"
|
|
1
|
+
## API Report File for "@atlaskit/share"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
@@ -19,55 +23,64 @@ import { TriggerProps } from '@atlaskit/popup';
|
|
|
19
23
|
import type { Value } from '@atlaskit/smart-user-picker';
|
|
20
24
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
export const ADMIN_NOTIFIED = 'admin-notified';
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
// @public (undocumented)
|
|
30
|
+
type Comment_2 = {
|
|
25
31
|
format: 'plain_text' | 'adf';
|
|
26
32
|
value: string;
|
|
27
33
|
};
|
|
28
34
|
export { Comment_2 as Comment };
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
export type ConfigResponse = {
|
|
31
38
|
disableSharingToEmails?: boolean;
|
|
32
39
|
};
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
// @public (undocumented)
|
|
42
|
+
export type Content = {
|
|
35
43
|
ari: string;
|
|
36
44
|
link: string;
|
|
37
45
|
title: string;
|
|
38
46
|
type: string;
|
|
39
47
|
};
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
// @public (undocumented)
|
|
50
|
+
export class CopyLinkButton extends React_2.Component<Props, State> {
|
|
51
|
+
// (undocumented)
|
|
52
|
+
componentWillUnmount(): void;
|
|
53
|
+
// (undocumented)
|
|
54
|
+
render(): jsx.JSX.Element;
|
|
55
|
+
// (undocumented)
|
|
56
|
+
renderTriggerButton: (triggerProps: TriggerProps) => jsx.JSX.Element;
|
|
57
|
+
// (undocumented)
|
|
44
58
|
state: {
|
|
45
59
|
shouldShowCopiedMessage: boolean;
|
|
46
60
|
};
|
|
47
|
-
componentWillUnmount(): void;
|
|
48
|
-
private clearAutoDismiss;
|
|
49
|
-
private handleClick;
|
|
50
|
-
private handleDismissCopiedMessage;
|
|
51
|
-
renderTriggerButton: (triggerProps: TriggerProps) => jsx.JSX.Element;
|
|
52
|
-
render(): jsx.JSX.Element;
|
|
53
61
|
}
|
|
54
62
|
|
|
55
|
-
|
|
63
|
+
// @public (undocumented)
|
|
64
|
+
export type DialogContentState = {
|
|
56
65
|
users: OptionData[];
|
|
57
66
|
comment: Comment_2;
|
|
58
67
|
};
|
|
59
68
|
|
|
60
|
-
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
export type DialogPlacement = Placement;
|
|
61
71
|
|
|
62
|
-
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
export type Flag = {
|
|
63
74
|
appearance: 'success';
|
|
64
75
|
title: MessageDescriptor;
|
|
65
76
|
type: FlagType;
|
|
66
77
|
};
|
|
67
78
|
|
|
68
|
-
|
|
79
|
+
// @public (undocumented)
|
|
80
|
+
export type FlagType = 'object-shared' | 'admin-notified';
|
|
69
81
|
|
|
70
|
-
|
|
82
|
+
// @public (undocumented)
|
|
83
|
+
export type FormChildrenArgs<T> = {
|
|
71
84
|
formProps: React.DetailedHTMLProps<
|
|
72
85
|
React.FormHTMLAttributes<HTMLFormElement>,
|
|
73
86
|
HTMLFormElement
|
|
@@ -75,42 +88,51 @@ export declare type FormChildrenArgs<T> = {
|
|
|
75
88
|
getValues: () => T;
|
|
76
89
|
};
|
|
77
90
|
|
|
78
|
-
|
|
91
|
+
// @public (undocumented)
|
|
92
|
+
type Integration = {
|
|
79
93
|
type: string;
|
|
80
94
|
Icon: React.ComponentType;
|
|
81
95
|
Content: React.ComponentType<IntegrationContentProps>;
|
|
82
96
|
};
|
|
83
97
|
|
|
84
|
-
|
|
98
|
+
// @public (undocumented)
|
|
99
|
+
type IntegrationContentProps = {
|
|
85
100
|
onClose: () => void;
|
|
86
101
|
changeTab?: (index: TabType) => void;
|
|
87
102
|
};
|
|
88
103
|
|
|
89
|
-
|
|
104
|
+
// @public (undocumented)
|
|
105
|
+
type IntegrationMode = 'tabs' | 'split' | 'off';
|
|
90
106
|
|
|
91
|
-
|
|
107
|
+
// @public (undocumented)
|
|
108
|
+
export type KeysOfType<T, TProp> = {
|
|
92
109
|
[P in keyof T]: T[P] extends TProp ? P : never;
|
|
93
110
|
}[keyof T];
|
|
94
111
|
|
|
95
|
-
|
|
112
|
+
// @public (undocumented)
|
|
113
|
+
export type MessageDescriptor = {
|
|
96
114
|
id: string;
|
|
97
115
|
description: string;
|
|
98
116
|
defaultMessage: string;
|
|
99
117
|
};
|
|
100
118
|
|
|
101
|
-
|
|
119
|
+
// @public (undocumented)
|
|
120
|
+
export type MetaData = {
|
|
102
121
|
productId: string;
|
|
103
122
|
atlOriginId: string;
|
|
104
123
|
shareeAction?: 'view' | 'edit';
|
|
105
124
|
};
|
|
106
125
|
|
|
107
|
-
|
|
126
|
+
// @public (undocumented)
|
|
127
|
+
export const OBJECT_SHARED = 'object-shared';
|
|
108
128
|
|
|
109
|
-
|
|
129
|
+
// @public (undocumented)
|
|
130
|
+
export type OriginAnalyticAttributes = {
|
|
110
131
|
hasGeneratedId: boolean;
|
|
111
132
|
};
|
|
112
133
|
|
|
113
|
-
|
|
134
|
+
// @public (undocumented)
|
|
135
|
+
export type OriginTracing = {
|
|
114
136
|
id: string;
|
|
115
137
|
addToUrl: (link: string) => string;
|
|
116
138
|
toAnalyticsAttributes: (
|
|
@@ -118,20 +140,23 @@ export declare type OriginTracing = {
|
|
|
118
140
|
) => OriginTracingWithIdGenerated | OriginTracingForSubSequentEvents;
|
|
119
141
|
};
|
|
120
142
|
|
|
121
|
-
|
|
143
|
+
// @public (undocumented)
|
|
144
|
+
export type OriginTracingFactory = () => OriginTracing;
|
|
122
145
|
|
|
123
|
-
|
|
146
|
+
// @public (undocumented)
|
|
147
|
+
export type OriginTracingForSubSequentEvents = {
|
|
124
148
|
originId: string;
|
|
125
149
|
originProduct: string;
|
|
126
150
|
};
|
|
127
151
|
|
|
128
|
-
|
|
152
|
+
// @public (undocumented)
|
|
153
|
+
export type OriginTracingWithIdGenerated = {
|
|
129
154
|
originIdGenerated: string;
|
|
130
155
|
originProduct: string;
|
|
131
156
|
};
|
|
132
157
|
|
|
133
|
-
|
|
134
|
-
export
|
|
158
|
+
// @public
|
|
159
|
+
export type ProductId =
|
|
135
160
|
| 'bitbucket'
|
|
136
161
|
| 'confluence'
|
|
137
162
|
| 'jira-addon'
|
|
@@ -144,9 +169,11 @@ export declare type ProductId =
|
|
|
144
169
|
| 'jira-unknown'
|
|
145
170
|
| 'trello';
|
|
146
171
|
|
|
147
|
-
|
|
172
|
+
// @public (undocumented)
|
|
173
|
+
export type ProductName = 'jira' | 'confluence';
|
|
148
174
|
|
|
149
|
-
|
|
175
|
+
// @public (undocumented)
|
|
176
|
+
type Props = {
|
|
150
177
|
onLinkCopy?: (link: string) => void;
|
|
151
178
|
link: string;
|
|
152
179
|
isDisabled?: boolean;
|
|
@@ -157,7 +184,8 @@ declare type Props = {
|
|
|
157
184
|
iconBefore?: ReactElement;
|
|
158
185
|
};
|
|
159
186
|
|
|
160
|
-
|
|
187
|
+
// @public (undocumented)
|
|
188
|
+
export type RenderCustomTriggerButton = (
|
|
161
189
|
args: {
|
|
162
190
|
error?: ShareError;
|
|
163
191
|
isDisabled?: boolean;
|
|
@@ -167,27 +195,30 @@ export declare type RenderCustomTriggerButton = (
|
|
|
167
195
|
triggerProps: TriggerProps,
|
|
168
196
|
) => React.ReactNode;
|
|
169
197
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
| 'icon-with-text'
|
|
173
|
-
| 'text-only';
|
|
198
|
+
// @public (undocumented)
|
|
199
|
+
export type ShareButtonStyle = 'icon-only' | 'icon-with-text' | 'text-only';
|
|
174
200
|
|
|
175
|
-
|
|
201
|
+
// @public (undocumented)
|
|
202
|
+
interface ShareClient {
|
|
203
|
+
// (undocumented)
|
|
204
|
+
getConfig(cloudId: string): Promise<ConfigResponse>;
|
|
205
|
+
// (undocumented)
|
|
176
206
|
share(
|
|
177
207
|
content: Content,
|
|
178
208
|
recipients: User[],
|
|
179
209
|
metadata: MetaData,
|
|
180
210
|
comment?: Comment_2,
|
|
181
211
|
): Promise<ShareResponse>;
|
|
182
|
-
getConfig(cloudId: string): Promise<ConfigResponse>;
|
|
183
212
|
}
|
|
184
213
|
|
|
185
|
-
|
|
214
|
+
// @public (undocumented)
|
|
215
|
+
export type ShareContentState = {
|
|
186
216
|
users: User[];
|
|
187
217
|
comment?: Comment_2;
|
|
188
218
|
};
|
|
189
219
|
|
|
190
|
-
|
|
220
|
+
// @public (undocumented)
|
|
221
|
+
export const ShareDialogContainer: React_2.ForwardRefExoticComponent<
|
|
191
222
|
Pick<
|
|
192
223
|
Omit<
|
|
193
224
|
WithAnalyticsEventsProps & ShareDialogContainerProps,
|
|
@@ -257,125 +288,43 @@ export declare const ShareDialogContainer: React_2.ForwardRefExoticComponent<
|
|
|
257
288
|
React_2.RefAttributes<any>
|
|
258
289
|
>;
|
|
259
290
|
|
|
260
|
-
|
|
291
|
+
// @public (undocumented)
|
|
292
|
+
export type ShareDialogContainerProps = {
|
|
261
293
|
onTriggerButtonClick?: () => void;
|
|
262
294
|
onDialogOpen?: () => void;
|
|
263
295
|
onDialogClose?: () => void;
|
|
264
296
|
isAutoOpenDialog?: boolean;
|
|
265
|
-
/** Share service client implementation that gets share configs and performs share.
|
|
266
|
-
* Optional, a default one is provided. */
|
|
267
297
|
shareClient?: ShareClient;
|
|
268
|
-
/** URL Shortener service client implementation that may shorten links for copy.
|
|
269
|
-
* Optional, a default one is provided. */
|
|
270
298
|
urlShortenerClient?: UrlShortenerClient;
|
|
271
|
-
/** Data provided to the `urlShortenerClient` to shorten the shared URL.
|
|
272
|
-
* If it is not provided, the link will not be shortened.
|
|
273
|
-
* If link shortening fails, the full URL will be shared instead. */
|
|
274
299
|
shortLinkData?: ShortenRequest;
|
|
275
|
-
/** Cloud ID of the instance.
|
|
276
|
-
* Note: we assume this props is stable. */
|
|
277
300
|
cloudId: string;
|
|
278
|
-
/** Organisation ID of the instance. */
|
|
279
301
|
orgId?: string;
|
|
280
|
-
/** Placement of the modal to the trigger button. */
|
|
281
302
|
dialogPlacement?: DialogPlacement;
|
|
282
|
-
/**
|
|
283
|
-
* Z-index that the popup should be displayed in.
|
|
284
|
-
* This is passed to the portal component.
|
|
285
|
-
* Defaults to `layers.modal()` from `@atlaskit/theme`.
|
|
286
|
-
*/
|
|
287
303
|
dialogZIndex?: number;
|
|
288
|
-
/** Transform function to provide custom formatted copy link.
|
|
289
|
-
* Optional, a default one is provided. */
|
|
290
304
|
formatCopyLink?: (origin: OriginTracing, link: string) => string;
|
|
291
|
-
/** Function used to load users options asynchronously. Not needed if smart user picker is enabled. */
|
|
292
305
|
loadUserOptions?: LoadOptions;
|
|
293
|
-
/** Factory function to generate new Origin Tracing instance. */
|
|
294
306
|
originTracingFactory: OriginTracingFactory;
|
|
295
|
-
/** Product ID (Canonical ID) in ARI of the share request.
|
|
296
|
-
* Note: we assume this props is stable. */
|
|
297
307
|
productId: ProductId;
|
|
298
|
-
/** Render function for a custom Share Dialog Trigger Button. */
|
|
299
308
|
renderCustomTriggerButton?: RenderCustomTriggerButton;
|
|
300
|
-
/** Atlassian Resource Identifier of a Site resource to be shared. */
|
|
301
309
|
shareAri: string;
|
|
302
|
-
/** Content Type of the resource to be shared. It will also affect on the successful share message in the flag. A pre-defined list as follows:*/
|
|
303
|
-
/** blogpost */
|
|
304
|
-
/** board */
|
|
305
|
-
/** calendar */
|
|
306
|
-
/** draft */
|
|
307
|
-
/** filter */
|
|
308
|
-
/** issue */
|
|
309
|
-
/** media */
|
|
310
|
-
/** page */
|
|
311
|
-
/** project */
|
|
312
|
-
/** pullrequest */
|
|
313
|
-
/** question */
|
|
314
|
-
/** report */
|
|
315
|
-
/** repository */
|
|
316
|
-
/** request */
|
|
317
|
-
/** roadmap */
|
|
318
|
-
/** site */
|
|
319
|
-
/** space */
|
|
320
|
-
/** Any other unlisted type will have a default message of "Link shared". */
|
|
321
310
|
shareContentType: string;
|
|
322
|
-
/** Link of the resource to be shared (should NOT includes origin tracing).
|
|
323
|
-
* Optional, the current page URL is used by default. */
|
|
324
311
|
shareLink?: string;
|
|
325
|
-
/** Title of the resource to be shared that will be sent in notifications. */
|
|
326
312
|
shareTitle: string;
|
|
327
|
-
/** Title of the share modal. */
|
|
328
313
|
shareFormTitle?: React.ReactNode;
|
|
329
|
-
/** Copy for helper message to be displayed under share form input box. */
|
|
330
314
|
shareFormHelperMessage?: string;
|
|
331
|
-
/** To enable closing the modal on escape key press. */
|
|
332
315
|
shouldCloseOnEscapePress?: boolean;
|
|
333
|
-
/**
|
|
334
|
-
* Callback function for showing successful share flag(s) with a parameter providing details of the flag, including the type of the message with a localized default title
|
|
335
|
-
* This package has an opinion on showing flag(s) upon successful share, and Flag system is NOT provided. Instead, showFlag prop is available for this purpose.
|
|
336
|
-
*/
|
|
337
316
|
showFlags: (flags: Array<Flag>) => void;
|
|
338
|
-
/**
|
|
339
|
-
* Power the user picker with smarts. To enable smart user picker, the following props are used:
|
|
340
|
-
* - `product`: 'jira' or 'confluence'
|
|
341
|
-
* - `loggedInAccountId`: if not provided, defaults to obtaining from request context
|
|
342
|
-
* - `cloudId`
|
|
343
|
-
*/
|
|
344
317
|
enableSmartUserPicker?: boolean;
|
|
345
|
-
/**
|
|
346
|
-
* The userId of the sharer. If not provided, smart user picker
|
|
347
|
-
* defaults it to the value 'Context'
|
|
348
|
-
* which will tell the recommendation service to extract the
|
|
349
|
-
* value from the request context.
|
|
350
|
-
*/
|
|
351
318
|
loggedInAccountId?: string;
|
|
352
|
-
/** Appearance of the share modal trigger button */
|
|
353
319
|
triggerButtonAppearance?: Appearance;
|
|
354
|
-
/** Share button Icon */
|
|
355
320
|
triggerButtonIcon?: React.ComponentType<IconProps>;
|
|
356
|
-
/** Style of the share modal trigger button. */
|
|
357
321
|
triggerButtonStyle?: ShareButtonStyle;
|
|
358
|
-
/** Position of the tooltip on share modal trigger button. */
|
|
359
322
|
triggerButtonTooltipPosition?: TooltipPosition;
|
|
360
|
-
/** Custom text of the tooltip on share modal trigger button. */
|
|
361
323
|
triggerButtonTooltipText?: React.ReactNode;
|
|
362
|
-
/** Message to be appended to the modal. */
|
|
363
324
|
bottomMessage?: React.ReactNode;
|
|
364
|
-
/** @deprecated Use the `shortLinkData` prop instead.
|
|
365
|
-
*
|
|
366
|
-
* Whether we should use the Atlassian Url Shortener or not.
|
|
367
|
-
* Note that all products may not be supported. */
|
|
368
325
|
useUrlShortener?: boolean;
|
|
369
|
-
/** Action that will be performed by the recipient when he/she receives the notification. */
|
|
370
326
|
shareeAction?: 'view' | 'edit';
|
|
371
|
-
/**
|
|
372
|
-
* Optional, this prop can be `jira` or `confluence`. Default value is `confluence`.
|
|
373
|
-
* We use this prop to control different text messages in UI.
|
|
374
|
-
*/
|
|
375
327
|
product?: ProductName;
|
|
376
|
-
/**
|
|
377
|
-
* Footer for the share dialog.
|
|
378
|
-
*/
|
|
379
328
|
customFooter?: React.ReactNode;
|
|
380
329
|
onUserSelectionChange?: (value: Value) => void;
|
|
381
330
|
shareFieldsFooter?: React.ReactNode;
|
|
@@ -383,71 +332,84 @@ export declare type ShareDialogContainerProps = {
|
|
|
383
332
|
isPublicLink?: boolean;
|
|
384
333
|
integrationMode?: IntegrationMode;
|
|
385
334
|
shareIntegrations?: Array<Integration>;
|
|
386
|
-
/**
|
|
387
|
-
* Optionally sets a tabIndex value if you need to set focus
|
|
388
|
-
*/
|
|
389
335
|
tabIndex?: number;
|
|
390
336
|
copyTooltipText?: string;
|
|
391
337
|
};
|
|
392
338
|
|
|
393
|
-
|
|
339
|
+
// @public (undocumented)
|
|
340
|
+
export type ShareError = {
|
|
394
341
|
message: string;
|
|
395
342
|
};
|
|
396
343
|
|
|
397
|
-
|
|
344
|
+
// @public (undocumented)
|
|
345
|
+
export type ShareRequest = (
|
|
398
346
|
content: Content,
|
|
399
347
|
recipients: User[],
|
|
400
348
|
metadata: MetaData,
|
|
401
349
|
comment?: Comment_2,
|
|
402
350
|
) => Promise<ShareResponse>;
|
|
403
351
|
|
|
404
|
-
|
|
352
|
+
// @public (undocumented)
|
|
353
|
+
export type ShareResponse = {
|
|
405
354
|
shareRequestId: string;
|
|
406
355
|
};
|
|
407
356
|
|
|
408
|
-
|
|
357
|
+
// @public (undocumented)
|
|
358
|
+
interface ShortenRequest {
|
|
359
|
+
// (undocumented)
|
|
409
360
|
cloudId?: string;
|
|
410
|
-
|
|
411
|
-
type: string;
|
|
361
|
+
// (undocumented)
|
|
412
362
|
params: Record<string, string>;
|
|
363
|
+
// (undocumented)
|
|
364
|
+
product: string;
|
|
365
|
+
// (undocumented)
|
|
413
366
|
query?: string;
|
|
367
|
+
// (undocumented)
|
|
368
|
+
type: string;
|
|
414
369
|
}
|
|
415
370
|
|
|
416
|
-
|
|
371
|
+
// @public (undocumented)
|
|
372
|
+
interface ShortenResponse {
|
|
373
|
+
// (undocumented)
|
|
417
374
|
shortUrl: string;
|
|
418
375
|
}
|
|
419
376
|
|
|
420
|
-
|
|
377
|
+
// @public (undocumented)
|
|
378
|
+
type State = {
|
|
421
379
|
shouldShowCopiedMessage: boolean;
|
|
422
380
|
};
|
|
423
381
|
|
|
424
|
-
|
|
382
|
+
// @public (undocumented)
|
|
383
|
+
enum TabType {
|
|
384
|
+
// (undocumented)
|
|
425
385
|
default = 0,
|
|
386
|
+
// (undocumented)
|
|
426
387
|
Slack = 1,
|
|
427
388
|
}
|
|
428
389
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
| 'right'
|
|
432
|
-
| 'bottom'
|
|
433
|
-
| 'left'
|
|
434
|
-
| 'mouse';
|
|
390
|
+
// @public (undocumented)
|
|
391
|
+
export type TooltipPosition = 'top' | 'right' | 'bottom' | 'left' | 'mouse';
|
|
435
392
|
|
|
436
|
-
|
|
393
|
+
// @public (undocumented)
|
|
394
|
+
interface UrlShortenerClient {
|
|
395
|
+
// (undocumented)
|
|
437
396
|
shorten(data: ShortenRequest): Promise<ShortenResponse>;
|
|
438
397
|
}
|
|
439
398
|
|
|
440
|
-
|
|
399
|
+
// @public (undocumented)
|
|
400
|
+
export type User = UserWithId | UserWithEmail;
|
|
441
401
|
|
|
442
|
-
|
|
402
|
+
// @public (undocumented)
|
|
403
|
+
export type UserWithEmail = {
|
|
443
404
|
type: 'user';
|
|
444
405
|
email: string;
|
|
445
406
|
};
|
|
446
407
|
|
|
447
|
-
|
|
408
|
+
// @public (undocumented)
|
|
409
|
+
export type UserWithId = {
|
|
448
410
|
type: 'user' | 'group' | 'team';
|
|
449
411
|
id: string;
|
|
450
412
|
};
|
|
451
413
|
|
|
452
|
-
|
|
414
|
+
// (No @packageDocumentation comment for this package)
|
|
453
415
|
```
|