@atlaskit/share 4.1.1 → 4.2.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 +10 -0
- package/dist/cjs/clients/AtlassianUrlShortenerClient.js +43 -46
- package/dist/cjs/components/LazyShareForm/lazy.js +2 -1
- package/dist/cjs/components/ShareDialogContainer.js +60 -65
- package/dist/cjs/components/ShareDialogWithTrigger.js +5 -5
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/cjs/types/ShareEntities.js +4 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ShareDialogContainer.js +3 -4
- package/dist/es2019/components/ShareDialogWithTrigger.js +5 -5
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/es2019/types/ShareEntities.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/clients/AtlassianUrlShortenerClient.js +43 -46
- package/dist/esm/components/ShareDialogContainer.js +60 -65
- package/dist/esm/components/ShareDialogWithTrigger.js +5 -5
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/esm/types/ShareEntities.js +3 -3
- package/dist/esm/version.json +1 -1
- package/package.json +24 -24
- package/tmp/api-report-tmp.d.ts +0 -319
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/share"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
/// <reference types="react" />
|
|
8
|
-
|
|
9
|
-
import type { Appearance } from '@atlaskit/button/types';
|
|
10
|
-
import type { IconProps } from '@atlaskit/icon';
|
|
11
|
-
import { jsx } from '@emotion/react';
|
|
12
|
-
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
13
|
-
import { OptionData } from '@atlaskit/smart-user-picker';
|
|
14
|
-
import type { Placement } from '@atlaskit/popper';
|
|
15
|
-
import { default as React_2 } from 'react';
|
|
16
|
-
import { ReactElement } from 'react';
|
|
17
|
-
import { TriggerProps } from '@atlaskit/popup';
|
|
18
|
-
import type { Value } from '@atlaskit/smart-user-picker';
|
|
19
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
20
|
-
|
|
21
|
-
// @public (undocumented)
|
|
22
|
-
export const ADMIN_NOTIFIED = "admin-notified";
|
|
23
|
-
|
|
24
|
-
// @public (undocumented)
|
|
25
|
-
type Comment_2 = {
|
|
26
|
-
format: 'adf' | 'plain_text';
|
|
27
|
-
value: string;
|
|
28
|
-
};
|
|
29
|
-
export { Comment_2 as Comment }
|
|
30
|
-
|
|
31
|
-
// @public (undocumented)
|
|
32
|
-
export type ConfigResponse = {
|
|
33
|
-
disableSharingToEmails?: boolean;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// @public (undocumented)
|
|
37
|
-
export type Content = {
|
|
38
|
-
ari: string;
|
|
39
|
-
link: string;
|
|
40
|
-
title: string;
|
|
41
|
-
type: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
// @public (undocumented)
|
|
45
|
-
export class CopyLinkButton extends React_2.Component<Props, State> {
|
|
46
|
-
// (undocumented)
|
|
47
|
-
componentWillUnmount(): void;
|
|
48
|
-
// (undocumented)
|
|
49
|
-
render(): jsx.JSX.Element;
|
|
50
|
-
// (undocumented)
|
|
51
|
-
renderTriggerButton: (triggerProps: TriggerProps) => jsx.JSX.Element;
|
|
52
|
-
// (undocumented)
|
|
53
|
-
state: {
|
|
54
|
-
shouldShowCopiedMessage: boolean;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// @public (undocumented)
|
|
59
|
-
export type DialogContentState = {
|
|
60
|
-
users: OptionData[];
|
|
61
|
-
comment: Comment_2;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// @public (undocumented)
|
|
65
|
-
export type DialogPlacement = Placement;
|
|
66
|
-
|
|
67
|
-
// @public (undocumented)
|
|
68
|
-
export type Flag = {
|
|
69
|
-
appearance: 'success';
|
|
70
|
-
title: MessageDescriptor;
|
|
71
|
-
type: FlagType;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
// @public (undocumented)
|
|
75
|
-
export type FlagType = 'admin-notified' | 'object-shared';
|
|
76
|
-
|
|
77
|
-
// @public (undocumented)
|
|
78
|
-
export type FormChildrenArgs<T> = {
|
|
79
|
-
formProps: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
|
|
80
|
-
getValues: () => T;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// @public (undocumented)
|
|
84
|
-
type Integration = {
|
|
85
|
-
type: string;
|
|
86
|
-
Icon: React.ComponentType;
|
|
87
|
-
Content: React.ComponentType<IntegrationContentProps>;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// @public (undocumented)
|
|
91
|
-
type IntegrationContentProps = {
|
|
92
|
-
onClose: () => void;
|
|
93
|
-
changeTab?: (index: TabType) => void;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// @public (undocumented)
|
|
97
|
-
type IntegrationMode = 'off' | 'split' | 'tabs';
|
|
98
|
-
|
|
99
|
-
// @public (undocumented)
|
|
100
|
-
export type KeysOfType<T, TProp> = {
|
|
101
|
-
[P in keyof T]: T[P] extends TProp ? P : never;
|
|
102
|
-
}[keyof T];
|
|
103
|
-
|
|
104
|
-
// @public (undocumented)
|
|
105
|
-
export type MessageDescriptor = {
|
|
106
|
-
id: string;
|
|
107
|
-
description: string;
|
|
108
|
-
defaultMessage: string;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// @public (undocumented)
|
|
112
|
-
export type MetaData = {
|
|
113
|
-
productId: string;
|
|
114
|
-
atlOriginId: string;
|
|
115
|
-
shareeAction?: 'edit' | 'view';
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// @public (undocumented)
|
|
119
|
-
export const OBJECT_SHARED = "object-shared";
|
|
120
|
-
|
|
121
|
-
// @public (undocumented)
|
|
122
|
-
export type OriginAnalyticAttributes = {
|
|
123
|
-
hasGeneratedId: boolean;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
// @public (undocumented)
|
|
127
|
-
export type OriginTracing = {
|
|
128
|
-
id: string;
|
|
129
|
-
addToUrl: (link: string) => string;
|
|
130
|
-
toAnalyticsAttributes: (attrs: OriginAnalyticAttributes) => OriginTracingForSubSequentEvents | OriginTracingWithIdGenerated;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
// @public (undocumented)
|
|
134
|
-
export type OriginTracingFactory = () => OriginTracing;
|
|
135
|
-
|
|
136
|
-
// @public (undocumented)
|
|
137
|
-
export type OriginTracingForSubSequentEvents = {
|
|
138
|
-
originId: string;
|
|
139
|
-
originProduct: string;
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
// @public (undocumented)
|
|
143
|
-
export type OriginTracingWithIdGenerated = {
|
|
144
|
-
originIdGenerated: string;
|
|
145
|
-
originProduct: string;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
// @public
|
|
149
|
-
export type ProductId = 'bitbucket' | 'confluence' | 'jira-addon' | 'jira-core' | 'jira-platform' | 'jira-polaris' | 'jira-portfolio' | 'jira-servicedesk' | 'jira-software' | 'jira-unknown' | 'trello';
|
|
150
|
-
|
|
151
|
-
// @public (undocumented)
|
|
152
|
-
export type ProductName = 'confluence' | 'jira';
|
|
153
|
-
|
|
154
|
-
// @public (undocumented)
|
|
155
|
-
type Props = {
|
|
156
|
-
onLinkCopy?: (link: string) => void;
|
|
157
|
-
link: string;
|
|
158
|
-
isDisabled?: boolean;
|
|
159
|
-
copyTooltipText?: string;
|
|
160
|
-
children?: ReactElement | string;
|
|
161
|
-
copyLinkButtonText: string;
|
|
162
|
-
copiedToClipboardText: string;
|
|
163
|
-
iconBefore?: ReactElement;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// @public (undocumented)
|
|
167
|
-
export type RenderCustomTriggerButton = (args: {
|
|
168
|
-
error?: ShareError;
|
|
169
|
-
isDisabled?: boolean;
|
|
170
|
-
isSelected?: boolean;
|
|
171
|
-
onClick: () => void;
|
|
172
|
-
}, triggerProps: TriggerProps) => React.ReactNode;
|
|
173
|
-
|
|
174
|
-
// @public (undocumented)
|
|
175
|
-
export type ShareButtonStyle = 'icon-only' | 'icon-with-text' | 'text-only';
|
|
176
|
-
|
|
177
|
-
// @public (undocumented)
|
|
178
|
-
interface ShareClient {
|
|
179
|
-
// (undocumented)
|
|
180
|
-
getConfig(cloudId: string): Promise<ConfigResponse>;
|
|
181
|
-
// (undocumented)
|
|
182
|
-
share(content: Content, recipients: User[], metadata: MetaData, comment?: Comment_2): Promise<ShareResponse>;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// @public (undocumented)
|
|
186
|
-
export type ShareContentState = {
|
|
187
|
-
users: User[];
|
|
188
|
-
comment?: Comment_2;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
// @public (undocumented)
|
|
192
|
-
export const ShareDialogContainer: React_2.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "bottomMessage" | "cloudId" | "copyTooltipText" | "customFooter" | "dialogPlacement" | "dialogZIndex" | "formatCopyLink" | "integrationMode" | "isAutoOpenDialog" | "isBrowseUsersDisabled" | "isCopyDisabled" | "isPublicLink" | "loadUserOptions" | "loggedInAccountId" | "onDialogClose" | "onDialogOpen" | "onTriggerButtonClick" | "onUserSelectionChange" | "orgId" | "originTracingFactory" | "productId" | "renderCustomTriggerButton" | "shareAri" | "shareClient" | "shareContentType" | "shareFieldsFooter" | "shareFormHelperMessage" | "shareFormTitle" | "shareIntegrations" | "shareLink" | "shareTitle" | "shortLinkData" | "shouldCloseOnEscapePress" | "showFlags" | "tabIndex" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "urlShortenerClient" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
|
|
193
|
-
enableSmartUserPicker: boolean;
|
|
194
|
-
shareeAction: "edit" | "view";
|
|
195
|
-
product: string;
|
|
196
|
-
}, never>> & React_2.RefAttributes<any>>;
|
|
197
|
-
|
|
198
|
-
// @public (undocumented)
|
|
199
|
-
export type ShareDialogContainerProps = {
|
|
200
|
-
onTriggerButtonClick?: () => void;
|
|
201
|
-
onDialogOpen?: () => void;
|
|
202
|
-
onDialogClose?: () => void;
|
|
203
|
-
isAutoOpenDialog?: boolean;
|
|
204
|
-
shareClient?: ShareClient;
|
|
205
|
-
urlShortenerClient?: UrlShortenerClient;
|
|
206
|
-
shortLinkData?: ShortenRequest;
|
|
207
|
-
cloudId: string;
|
|
208
|
-
orgId?: string;
|
|
209
|
-
dialogPlacement?: DialogPlacement;
|
|
210
|
-
dialogZIndex?: number;
|
|
211
|
-
formatCopyLink?: (origin: OriginTracing, link: string) => string;
|
|
212
|
-
loadUserOptions?: LoadOptions;
|
|
213
|
-
originTracingFactory: OriginTracingFactory;
|
|
214
|
-
productId: ProductId;
|
|
215
|
-
renderCustomTriggerButton?: RenderCustomTriggerButton;
|
|
216
|
-
shareAri: string;
|
|
217
|
-
shareContentType: string;
|
|
218
|
-
shareLink?: string;
|
|
219
|
-
shareTitle: string;
|
|
220
|
-
shareFormTitle?: React.ReactNode;
|
|
221
|
-
shareFormHelperMessage?: string;
|
|
222
|
-
shouldCloseOnEscapePress?: boolean;
|
|
223
|
-
showFlags: (flags: Array<Flag>) => void;
|
|
224
|
-
enableSmartUserPicker?: boolean;
|
|
225
|
-
loggedInAccountId?: string;
|
|
226
|
-
triggerButtonAppearance?: Appearance;
|
|
227
|
-
triggerButtonIcon?: React.ComponentType<IconProps>;
|
|
228
|
-
triggerButtonStyle?: ShareButtonStyle;
|
|
229
|
-
triggerButtonTooltipPosition?: TooltipPosition;
|
|
230
|
-
triggerButtonTooltipText?: React.ReactNode;
|
|
231
|
-
bottomMessage?: React.ReactNode;
|
|
232
|
-
useUrlShortener?: boolean;
|
|
233
|
-
shareeAction?: 'edit' | 'view';
|
|
234
|
-
product?: ProductName;
|
|
235
|
-
customFooter?: React.ReactNode;
|
|
236
|
-
onUserSelectionChange?: (value: Value) => void;
|
|
237
|
-
shareFieldsFooter?: React.ReactNode;
|
|
238
|
-
isCopyDisabled?: boolean;
|
|
239
|
-
isPublicLink?: boolean;
|
|
240
|
-
integrationMode?: IntegrationMode;
|
|
241
|
-
shareIntegrations?: Array<Integration>;
|
|
242
|
-
tabIndex?: number;
|
|
243
|
-
copyTooltipText?: string;
|
|
244
|
-
isBrowseUsersDisabled?: boolean;
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
// @public (undocumented)
|
|
248
|
-
export type ShareError = {
|
|
249
|
-
message: string;
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
// @public (undocumented)
|
|
253
|
-
export type ShareRequest = (content: Content, recipients: User[], metadata: MetaData, comment?: Comment_2) => Promise<ShareResponse>;
|
|
254
|
-
|
|
255
|
-
// @public (undocumented)
|
|
256
|
-
export type ShareResponse = {
|
|
257
|
-
shareRequestId: string;
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
// @public (undocumented)
|
|
261
|
-
interface ShortenRequest {
|
|
262
|
-
// (undocumented)
|
|
263
|
-
cloudId?: string;
|
|
264
|
-
// (undocumented)
|
|
265
|
-
originId?: string;
|
|
266
|
-
// (undocumented)
|
|
267
|
-
params: Record<string, string>;
|
|
268
|
-
// (undocumented)
|
|
269
|
-
product: string;
|
|
270
|
-
// (undocumented)
|
|
271
|
-
type: string;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// @public (undocumented)
|
|
275
|
-
interface ShortenResponse {
|
|
276
|
-
// (undocumented)
|
|
277
|
-
shortUrl: string;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
// @public (undocumented)
|
|
281
|
-
type State = {
|
|
282
|
-
shouldShowCopiedMessage: boolean;
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
// @public (undocumented)
|
|
286
|
-
enum TabType {
|
|
287
|
-
// (undocumented)
|
|
288
|
-
default = 0,
|
|
289
|
-
// (undocumented)
|
|
290
|
-
Slack = 1
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// @public (undocumented)
|
|
294
|
-
export type TooltipPosition = 'bottom' | 'left' | 'mouse' | 'right' | 'top';
|
|
295
|
-
|
|
296
|
-
// @public (undocumented)
|
|
297
|
-
interface UrlShortenerClient {
|
|
298
|
-
// (undocumented)
|
|
299
|
-
shorten(data: ShortenRequest): Promise<ShortenResponse>;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// @public (undocumented)
|
|
303
|
-
export type User = UserWithEmail | UserWithId;
|
|
304
|
-
|
|
305
|
-
// @public (undocumented)
|
|
306
|
-
export type UserWithEmail = {
|
|
307
|
-
type: 'user';
|
|
308
|
-
email: string;
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
// @public (undocumented)
|
|
312
|
-
export type UserWithId = {
|
|
313
|
-
type: 'custom' | 'group' | 'team' | 'user';
|
|
314
|
-
id: string;
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
// (No @packageDocumentation comment for this package)
|
|
318
|
-
|
|
319
|
-
```
|