@atlaskit/share 4.2.1 → 4.2.2
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/components/analytics/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.5/clients/AtlassianUrlShortenerClient.d.ts +16 -0
- package/dist/types-ts4.5/clients/ShareServiceClient.d.ts +25 -0
- package/dist/types-ts4.5/clients/index.d.ts +2 -0
- package/dist/types-ts4.5/components/CommentField.d.ts +6 -0
- package/dist/types-ts4.5/components/CopyLinkButton.d.ts +37 -0
- package/dist/types-ts4.5/components/ErrorBoundary.d.ts +4 -0
- package/dist/types-ts4.5/components/IntegrationButton.d.ts +10 -0
- package/dist/types-ts4.5/components/IntegrationForm.d.ts +11 -0
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +20 -0
- package/dist/types-ts4.5/components/LazyShareForm/index.d.ts +1 -0
- package/dist/types-ts4.5/components/LazyShareForm/lazy.d.ts +4 -0
- package/dist/types-ts4.5/components/MessagesIntlProvider.d.ts +9 -0
- package/dist/types-ts4.5/components/ShareButton.d.ts +13 -0
- package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +57 -0
- package/dist/types-ts4.5/components/ShareDialogWithTrigger.d.ts +43 -0
- package/dist/types-ts4.5/components/ShareForm.d.ts +11 -0
- package/dist/types-ts4.5/components/ShareFormWrapper/ShareFormWrapper.d.ts +9 -0
- package/dist/types-ts4.5/components/ShareFormWrapper/index.d.ts +1 -0
- package/dist/types-ts4.5/components/ShareFormWrapper/styled.d.ts +10 -0
- package/dist/types-ts4.5/components/ShareHeader.d.ts +8 -0
- package/dist/types-ts4.5/components/SlackIcon.d.ts +3 -0
- package/dist/types-ts4.5/components/SplitButton.d.ts +19 -0
- package/dist/types-ts4.5/components/UserPickerField.d.ts +29 -0
- package/dist/types-ts4.5/components/analytics/analytics.d.ts +19 -0
- package/dist/types-ts4.5/components/analytics/ufoExperienceHelper.d.ts +2 -0
- package/dist/types-ts4.5/components/analytics/ufoExperiences.d.ts +3 -0
- package/dist/types-ts4.5/components/colorSlackIcon.d.ts +3 -0
- package/dist/types-ts4.5/components/localStorageUtils.d.ts +5 -0
- package/dist/types-ts4.5/components/monochromeSlackIcon.d.ts +3 -0
- package/dist/types-ts4.5/components/styles.d.ts +5 -0
- package/dist/types-ts4.5/components/utils.d.ts +19 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +46 -0
- package/dist/types-ts4.5/i18n/da.d.ts +46 -0
- package/dist/types-ts4.5/i18n/de.d.ts +46 -0
- package/dist/types-ts4.5/i18n/en.d.ts +46 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +46 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +43 -0
- package/dist/types-ts4.5/i18n/es.d.ts +46 -0
- package/dist/types-ts4.5/i18n/et.d.ts +30 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +46 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +46 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +46 -0
- package/dist/types-ts4.5/i18n/index.d.ts +36 -0
- package/dist/types-ts4.5/i18n/is.d.ts +33 -0
- package/dist/types-ts4.5/i18n/it.d.ts +46 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +46 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +46 -0
- package/dist/types-ts4.5/i18n/languages.d.ts +33 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +46 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +46 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +46 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +46 -0
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +30 -0
- package/dist/types-ts4.5/i18n/ro.d.ts +33 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +46 -0
- package/dist/types-ts4.5/i18n/sk.d.ts +30 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +46 -0
- package/dist/types-ts4.5/i18n/th.d.ts +46 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +46 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +46 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +46 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +46 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +46 -0
- package/dist/types-ts4.5/i18n.d.ts +187 -0
- package/dist/types-ts4.5/index.d.ts +4 -0
- package/dist/types-ts4.5/types/Flag.d.ts +13 -0
- package/dist/types-ts4.5/types/OriginTracing.d.ts +17 -0
- package/dist/types-ts4.5/types/Products.d.ts +3 -0
- package/dist/types-ts4.5/types/ShareButton.d.ts +2 -0
- package/dist/types-ts4.5/types/ShareContentState.d.ts +14 -0
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +147 -0
- package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +45 -0
- package/dist/types-ts4.5/types/ShareEntities.d.ts +30 -0
- package/dist/types-ts4.5/types/ShareForm.d.ts +31 -0
- package/dist/types-ts4.5/types/User.d.ts +9 -0
- package/dist/types-ts4.5/types/form.d.ts +5 -0
- package/dist/types-ts4.5/types/index.d.ts +17 -0
- package/dist/types-ts4.5/util/i18n-util.d.ts +17 -0
- package/package.json +2 -2
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
'fabric.elements.share.copied.to.clipboard.message': string;
|
|
9
|
+
'fabric.elements.share.copylink.button.text': string;
|
|
10
|
+
'fabric.elements.share.copypubliclink.button.text': string;
|
|
11
|
+
'fabric.elements.share.failure.icon.label': string;
|
|
12
|
+
'fabric.elements.share.failure.message': string;
|
|
13
|
+
'fabric.elements.share.form.comment.placeholder': string;
|
|
14
|
+
'fabric.elements.share.form.info.message.no.invite.confluence': string;
|
|
15
|
+
'fabric.elements.share.form.info.message.no.invite.jira': string;
|
|
16
|
+
'fabric.elements.share.form.no-permissions': string;
|
|
17
|
+
'fabric.elements.share.form.public.send': string;
|
|
18
|
+
'fabric.elements.share.form.public.share': string;
|
|
19
|
+
'fabric.elements.share.form.retry': string;
|
|
20
|
+
'fabric.elements.share.form.send': string;
|
|
21
|
+
'fabric.elements.share.form.share': string;
|
|
22
|
+
'fabric.elements.share.form.title': string;
|
|
23
|
+
'fabric.elements.share.form.user-picker.add-more': string;
|
|
24
|
+
'fabric.elements.share.form.user-picker.no-options.existingUserOnly': string;
|
|
25
|
+
'fabric.elements.share.form.user-picker.no-options.generic': string;
|
|
26
|
+
'fabric.elements.share.form.user-picker.placeholder.emailOnly': string;
|
|
27
|
+
'fabric.elements.share.form.user-picker.placeholder.existingUserOnly': string;
|
|
28
|
+
'fabric.elements.share.form.user-picker.placeholder.generic': string;
|
|
29
|
+
'fabric.elements.share.form.user-picker.placeholder.jira': string;
|
|
30
|
+
'fabric.elements.share.form.user-picker.placholder.generic.existingUserOnly': string;
|
|
31
|
+
'fabric.elements.share.form.user-picker.validation.required': string;
|
|
32
|
+
'fabric.elements.share.form.user-picker.validation.required.email-only': string;
|
|
33
|
+
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': string;
|
|
34
|
+
'fabric.elements.share.form.user-picker.validation.required.jira': string;
|
|
35
|
+
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': string;
|
|
36
|
+
'fabric.elements.share.in.integration.button': string;
|
|
37
|
+
'fabric.elements.share.main.tab.text.confluence': string;
|
|
38
|
+
'fabric.elements.share.main.tab.text.jira': string;
|
|
39
|
+
'fabric.elements.share.success.message': string;
|
|
40
|
+
'fabric.elements.share.to.integration.button': string;
|
|
41
|
+
'fabric.elements.share.trigger.button.icon.label': string;
|
|
42
|
+
'fabric.elements.share.trigger.button.invite.text': string;
|
|
43
|
+
'fabric.elements.share.trigger.button.text': string;
|
|
44
|
+
'fabric.elements.share.trigger.button.tooltip.text': string;
|
|
45
|
+
};
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
'fabric.elements.share.copied.to.clipboard.message': string;
|
|
9
|
+
'fabric.elements.share.copylink.button.text': string;
|
|
10
|
+
'fabric.elements.share.copypubliclink.button.text': string;
|
|
11
|
+
'fabric.elements.share.failure.icon.label': string;
|
|
12
|
+
'fabric.elements.share.failure.message': string;
|
|
13
|
+
'fabric.elements.share.form.comment.placeholder': string;
|
|
14
|
+
'fabric.elements.share.form.info.message.no.invite.confluence': string;
|
|
15
|
+
'fabric.elements.share.form.info.message.no.invite.jira': string;
|
|
16
|
+
'fabric.elements.share.form.no-permissions': string;
|
|
17
|
+
'fabric.elements.share.form.public.send': string;
|
|
18
|
+
'fabric.elements.share.form.public.share': string;
|
|
19
|
+
'fabric.elements.share.form.retry': string;
|
|
20
|
+
'fabric.elements.share.form.send': string;
|
|
21
|
+
'fabric.elements.share.form.share': string;
|
|
22
|
+
'fabric.elements.share.form.title': string;
|
|
23
|
+
'fabric.elements.share.form.user-picker.add-more': string;
|
|
24
|
+
'fabric.elements.share.form.user-picker.no-options.existingUserOnly': string;
|
|
25
|
+
'fabric.elements.share.form.user-picker.no-options.generic': string;
|
|
26
|
+
'fabric.elements.share.form.user-picker.placeholder.emailOnly': string;
|
|
27
|
+
'fabric.elements.share.form.user-picker.placeholder.existingUserOnly': string;
|
|
28
|
+
'fabric.elements.share.form.user-picker.placeholder.generic': string;
|
|
29
|
+
'fabric.elements.share.form.user-picker.placeholder.jira': string;
|
|
30
|
+
'fabric.elements.share.form.user-picker.placholder.generic.existingUserOnly': string;
|
|
31
|
+
'fabric.elements.share.form.user-picker.validation.required': string;
|
|
32
|
+
'fabric.elements.share.form.user-picker.validation.required.email-only': string;
|
|
33
|
+
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': string;
|
|
34
|
+
'fabric.elements.share.form.user-picker.validation.required.jira': string;
|
|
35
|
+
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': string;
|
|
36
|
+
'fabric.elements.share.in.integration.button': string;
|
|
37
|
+
'fabric.elements.share.main.tab.text.confluence': string;
|
|
38
|
+
'fabric.elements.share.main.tab.text.jira': string;
|
|
39
|
+
'fabric.elements.share.success.message': string;
|
|
40
|
+
'fabric.elements.share.to.integration.button': string;
|
|
41
|
+
'fabric.elements.share.trigger.button.icon.label': string;
|
|
42
|
+
'fabric.elements.share.trigger.button.invite.text': string;
|
|
43
|
+
'fabric.elements.share.trigger.button.text': string;
|
|
44
|
+
'fabric.elements.share.trigger.button.tooltip.text': string;
|
|
45
|
+
};
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
export declare const messages: {
|
|
2
|
+
formTitle: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
formSend: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
formShare: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
formSendPublic: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
formSharePublic: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
formRetry: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
formNoPermissions: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
commentPlaceholder: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
userPickerGenericPlaceholder: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
userPickerGenericExistingUserOnlyPlaceholder: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
userPickerGenericPlaceholderJira: {
|
|
53
|
+
id: string;
|
|
54
|
+
defaultMessage: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
userPickerExistingUserOnlyPlaceholder: {
|
|
58
|
+
id: string;
|
|
59
|
+
defaultMessage: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
userPickerGenericEmailOnlyPlaceholder: {
|
|
63
|
+
id: string;
|
|
64
|
+
defaultMessage: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
userPickerAddMoreMessage: {
|
|
68
|
+
id: string;
|
|
69
|
+
defaultMessage: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
userPickerRequiredMessage: {
|
|
73
|
+
id: string;
|
|
74
|
+
defaultMessage: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
userPickerRequiredMessageJira: {
|
|
78
|
+
id: string;
|
|
79
|
+
defaultMessage: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
userPickerRequiredMessageEmailOnly: {
|
|
83
|
+
id: string;
|
|
84
|
+
defaultMessage: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
userPickerRequiredExistingUserOnlyMessage: {
|
|
88
|
+
id: string;
|
|
89
|
+
defaultMessage: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
userPickerRequiredExistingUserOnlyMessageJira: {
|
|
93
|
+
id: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
userPickerExistingUserOnlyNoOptionsMessage: {
|
|
98
|
+
id: string;
|
|
99
|
+
defaultMessage: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
userPickerGenericNoOptionsMessage: {
|
|
103
|
+
id: string;
|
|
104
|
+
defaultMessage: string;
|
|
105
|
+
description: string;
|
|
106
|
+
};
|
|
107
|
+
shareTriggerButtonIconLabel: {
|
|
108
|
+
id: string;
|
|
109
|
+
defaultMessage: string;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
shareTriggerButtonText: {
|
|
113
|
+
id: string;
|
|
114
|
+
defaultMessage: string;
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
shareTriggerButtonTooltipText: {
|
|
118
|
+
id: string;
|
|
119
|
+
defaultMessage: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
inviteTriggerButtonText: {
|
|
123
|
+
id: string;
|
|
124
|
+
defaultMessage: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
copyLinkButtonText: {
|
|
128
|
+
id: string;
|
|
129
|
+
defaultMessage: string;
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
copyPublicLinkButtonText: {
|
|
133
|
+
id: string;
|
|
134
|
+
defaultMessage: string;
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
copiedToClipboardMessage: {
|
|
138
|
+
id: string;
|
|
139
|
+
defaultMessage: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
infoMessageDefaultConfluence: {
|
|
143
|
+
id: string;
|
|
144
|
+
defaultMessage: string;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
infoMessageDefaultJira: {
|
|
148
|
+
id: string;
|
|
149
|
+
defaultMessage: string;
|
|
150
|
+
description: string;
|
|
151
|
+
};
|
|
152
|
+
shareFailureIconLabel: {
|
|
153
|
+
id: string;
|
|
154
|
+
defaultMessage: string;
|
|
155
|
+
description: string;
|
|
156
|
+
};
|
|
157
|
+
shareFailureMessage: {
|
|
158
|
+
id: string;
|
|
159
|
+
defaultMessage: string;
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
shareSuccessMessage: {
|
|
163
|
+
id: string;
|
|
164
|
+
defaultMessage: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
shareToIntegrationButtonText: {
|
|
168
|
+
id: string;
|
|
169
|
+
defaultMessage: string;
|
|
170
|
+
description: string;
|
|
171
|
+
};
|
|
172
|
+
shareInIntegrationButtonText: {
|
|
173
|
+
id: string;
|
|
174
|
+
defaultMessage: string;
|
|
175
|
+
description: string;
|
|
176
|
+
};
|
|
177
|
+
shareMainTabTextJira: {
|
|
178
|
+
id: string;
|
|
179
|
+
defaultMessage: string;
|
|
180
|
+
description: string;
|
|
181
|
+
};
|
|
182
|
+
shareMainTabTextConfluence: {
|
|
183
|
+
id: string;
|
|
184
|
+
defaultMessage: string;
|
|
185
|
+
description: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ShareDialogContainer } from './components/ShareDialogContainer';
|
|
2
|
+
export { CopyLinkButton } from './components/CopyLinkButton';
|
|
3
|
+
export { ADMIN_NOTIFIED, OBJECT_SHARED, } from './types';
|
|
4
|
+
export type { Comment, Content, DialogContentState, DialogPlacement, Flag, FlagType, FormChildrenArgs, KeysOfType, MessageDescriptor, MetaData, OriginAnalyticAttributes, OriginTracing, OriginTracingFactory, OriginTracingForSubSequentEvents, OriginTracingWithIdGenerated, ProductId, ProductName, RenderCustomTriggerButton, ShareButtonStyle, ShareContentState, ShareError, ShareRequest, ShareResponse, ConfigResponse, TooltipPosition, User, UserWithEmail, UserWithId, ShareDialogContainerProps, } from './types';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const OBJECT_SHARED = "object-shared";
|
|
2
|
+
export declare const ADMIN_NOTIFIED = "admin-notified";
|
|
3
|
+
export type FlagType = 'object-shared' | 'admin-notified';
|
|
4
|
+
export type MessageDescriptor = {
|
|
5
|
+
id: string;
|
|
6
|
+
description: string;
|
|
7
|
+
defaultMessage: string;
|
|
8
|
+
};
|
|
9
|
+
export type Flag = {
|
|
10
|
+
appearance: 'success';
|
|
11
|
+
title: MessageDescriptor;
|
|
12
|
+
type: FlagType;
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type OriginTracingWithIdGenerated = {
|
|
2
|
+
originIdGenerated: string;
|
|
3
|
+
originProduct: string;
|
|
4
|
+
};
|
|
5
|
+
export type OriginTracingForSubSequentEvents = {
|
|
6
|
+
originId: string;
|
|
7
|
+
originProduct: string;
|
|
8
|
+
};
|
|
9
|
+
export type OriginAnalyticAttributes = {
|
|
10
|
+
hasGeneratedId: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type OriginTracing = {
|
|
13
|
+
id: string;
|
|
14
|
+
addToUrl: (link: string) => string;
|
|
15
|
+
toAnalyticsAttributes: (attrs: OriginAnalyticAttributes) => OriginTracingWithIdGenerated | OriginTracingForSubSequentEvents;
|
|
16
|
+
};
|
|
17
|
+
export type OriginTracingFactory = () => OriginTracing;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Product ID (Canonical ID) in ARI of the share request */
|
|
2
|
+
export type ProductId = 'bitbucket' | 'confluence' | 'jira-addon' | 'jira-core' | 'jira-platform' | 'jira-polaris' | 'jira-portfolio' | 'jira-servicedesk' | 'jira-software' | 'jira-unknown' | 'trello';
|
|
3
|
+
export type ProductName = 'jira' | 'confluence';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OptionData } from '@atlaskit/smart-user-picker';
|
|
2
|
+
import { Comment } from './ShareEntities';
|
|
3
|
+
import { User } from './User';
|
|
4
|
+
export type ShareContentState = {
|
|
5
|
+
users: User[];
|
|
6
|
+
comment?: Comment;
|
|
7
|
+
};
|
|
8
|
+
export type ShareError = {
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export type ShareData = {
|
|
12
|
+
users: OptionData[];
|
|
13
|
+
comment: Comment;
|
|
14
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Appearance } from '@atlaskit/button/types';
|
|
3
|
+
import type { IconProps } from '@atlaskit/icon';
|
|
4
|
+
import type { LoadOptions, Value } from '@atlaskit/smart-user-picker';
|
|
5
|
+
import type { ShortenRequest, UrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
|
|
6
|
+
import type { ShareClient } from '../clients/ShareServiceClient';
|
|
7
|
+
import type { Flag } from './Flag';
|
|
8
|
+
import type { OriginTracing, OriginTracingFactory } from './OriginTracing';
|
|
9
|
+
import type { ProductId, ProductName } from './Products';
|
|
10
|
+
import type { ShareButtonStyle, TooltipPosition } from './ShareButton';
|
|
11
|
+
import type { DialogPlacement, RenderCustomTriggerButton } from './ShareDialogWithTrigger';
|
|
12
|
+
import type { Integration, IntegrationMode } from './ShareEntities';
|
|
13
|
+
export type ShareDialogContainerProps = {
|
|
14
|
+
onTriggerButtonClick?: () => void;
|
|
15
|
+
onDialogOpen?: () => void;
|
|
16
|
+
onDialogClose?: () => void;
|
|
17
|
+
isAutoOpenDialog?: boolean;
|
|
18
|
+
/** Share service client implementation that gets share configs and performs share.
|
|
19
|
+
* Optional, a default one is provided. */
|
|
20
|
+
shareClient?: ShareClient;
|
|
21
|
+
/** URL Shortener service client implementation that may shorten links for copy.
|
|
22
|
+
* Optional, a default one is provided. */
|
|
23
|
+
urlShortenerClient?: UrlShortenerClient;
|
|
24
|
+
/** Data provided to the `urlShortenerClient` to shorten the shared URL.
|
|
25
|
+
* If it is not provided, the link will not be shortened.
|
|
26
|
+
* If link shortening fails, the full URL will be shared instead. */
|
|
27
|
+
shortLinkData?: ShortenRequest;
|
|
28
|
+
/** Cloud ID of the instance.
|
|
29
|
+
* Note: we assume this props is stable. */
|
|
30
|
+
cloudId: string;
|
|
31
|
+
/** Organisation ID of the instance. */
|
|
32
|
+
orgId?: string;
|
|
33
|
+
/** Placement of the modal to the trigger button. */
|
|
34
|
+
dialogPlacement?: DialogPlacement;
|
|
35
|
+
/**
|
|
36
|
+
* Z-index that the popup should be displayed in.
|
|
37
|
+
* This is passed to the portal component.
|
|
38
|
+
* Defaults to `layers.modal()` from `@atlaskit/theme`.
|
|
39
|
+
*/
|
|
40
|
+
dialogZIndex?: number;
|
|
41
|
+
/** Transform function to provide custom formatted copy link.
|
|
42
|
+
* Optional, a default one is provided. */
|
|
43
|
+
formatCopyLink?: (origin: OriginTracing, link: string) => string;
|
|
44
|
+
/** Function used to load users options asynchronously. Not needed if smart user picker is enabled. */
|
|
45
|
+
loadUserOptions?: LoadOptions;
|
|
46
|
+
/** Factory function to generate new Origin Tracing instance. */
|
|
47
|
+
originTracingFactory: OriginTracingFactory;
|
|
48
|
+
/** Product ID (Canonical ID) in ARI of the share request.
|
|
49
|
+
* Note: we assume this props is stable. */
|
|
50
|
+
productId: ProductId;
|
|
51
|
+
/** Render function for a custom Share Dialog Trigger Button. */
|
|
52
|
+
renderCustomTriggerButton?: RenderCustomTriggerButton;
|
|
53
|
+
/** Atlassian Resource Identifier of a Site resource to be shared. */
|
|
54
|
+
shareAri: string;
|
|
55
|
+
/** 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:*/
|
|
56
|
+
/** blogpost */
|
|
57
|
+
/** board */
|
|
58
|
+
/** calendar */
|
|
59
|
+
/** draft */
|
|
60
|
+
/** filter */
|
|
61
|
+
/** issue */
|
|
62
|
+
/** media */
|
|
63
|
+
/** page */
|
|
64
|
+
/** project */
|
|
65
|
+
/** pullrequest */
|
|
66
|
+
/** question */
|
|
67
|
+
/** report */
|
|
68
|
+
/** repository */
|
|
69
|
+
/** request */
|
|
70
|
+
/** roadmap */
|
|
71
|
+
/** site */
|
|
72
|
+
/** space */
|
|
73
|
+
/** Any other unlisted type will have a default message of "Link shared". */
|
|
74
|
+
shareContentType: string;
|
|
75
|
+
/** Link of the resource to be shared (should NOT includes origin tracing).
|
|
76
|
+
* Optional, the current page URL is used by default. */
|
|
77
|
+
shareLink?: string;
|
|
78
|
+
/** Title of the resource to be shared that will be sent in notifications. */
|
|
79
|
+
shareTitle: string;
|
|
80
|
+
/** Title of the share modal. */
|
|
81
|
+
shareFormTitle?: React.ReactNode;
|
|
82
|
+
/** Copy for helper message to be displayed under share form input box.
|
|
83
|
+
* If set to empty string, no helper message will be displayed
|
|
84
|
+
*/
|
|
85
|
+
shareFormHelperMessage?: string;
|
|
86
|
+
/** To enable closing the modal on escape key press. */
|
|
87
|
+
shouldCloseOnEscapePress?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 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
|
|
90
|
+
* 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.
|
|
91
|
+
*/
|
|
92
|
+
showFlags: (flags: Array<Flag>) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Power the user picker with smarts. To enable smart user picker, the following props are used:
|
|
95
|
+
* - `product`: 'jira' or 'confluence'
|
|
96
|
+
* - `loggedInAccountId`: if not provided, defaults to obtaining from request context
|
|
97
|
+
* - `cloudId`
|
|
98
|
+
*/
|
|
99
|
+
enableSmartUserPicker?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* The userId of the sharer. If not provided, smart user picker
|
|
102
|
+
* defaults it to the value 'Context'
|
|
103
|
+
* which will tell the recommendation service to extract the
|
|
104
|
+
* value from the request context.
|
|
105
|
+
*/
|
|
106
|
+
loggedInAccountId?: string;
|
|
107
|
+
/** Appearance of the share modal trigger button */
|
|
108
|
+
triggerButtonAppearance?: Appearance;
|
|
109
|
+
/** Share button Icon */
|
|
110
|
+
triggerButtonIcon?: React.ComponentType<IconProps>;
|
|
111
|
+
/** Style of the share modal trigger button. */
|
|
112
|
+
triggerButtonStyle?: ShareButtonStyle;
|
|
113
|
+
/** Position of the tooltip on share modal trigger button. */
|
|
114
|
+
triggerButtonTooltipPosition?: TooltipPosition;
|
|
115
|
+
/** Custom text of the tooltip on share modal trigger button. */
|
|
116
|
+
triggerButtonTooltipText?: React.ReactNode;
|
|
117
|
+
/** Message to be appended to the modal. */
|
|
118
|
+
bottomMessage?: React.ReactNode;
|
|
119
|
+
/** @deprecated Use the `shortLinkData` prop instead.
|
|
120
|
+
*
|
|
121
|
+
* Whether we should use the Atlassian Url Shortener or not.
|
|
122
|
+
* Note that all products may not be supported. */
|
|
123
|
+
useUrlShortener?: boolean;
|
|
124
|
+
/** Action that will be performed by the recipient when he/she receives the notification. */
|
|
125
|
+
shareeAction?: 'view' | 'edit';
|
|
126
|
+
/**
|
|
127
|
+
* Optional, this prop can be `jira` or `confluence`. Default value is `confluence`.
|
|
128
|
+
* We use this prop to control different text messages in UI.
|
|
129
|
+
*/
|
|
130
|
+
product?: ProductName;
|
|
131
|
+
/**
|
|
132
|
+
* Footer for the share dialog.
|
|
133
|
+
*/
|
|
134
|
+
customFooter?: React.ReactNode;
|
|
135
|
+
onUserSelectionChange?: (value: Value) => void;
|
|
136
|
+
shareFieldsFooter?: React.ReactNode;
|
|
137
|
+
isCopyDisabled?: boolean;
|
|
138
|
+
isPublicLink?: boolean;
|
|
139
|
+
integrationMode?: IntegrationMode;
|
|
140
|
+
shareIntegrations?: Array<Integration>;
|
|
141
|
+
/**
|
|
142
|
+
* Optionally sets a tabIndex value if you need to set focus
|
|
143
|
+
*/
|
|
144
|
+
tabIndex?: number;
|
|
145
|
+
copyTooltipText?: string;
|
|
146
|
+
isBrowseUsersDisabled?: boolean;
|
|
147
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
|
+
import type { Placement } from '@atlaskit/popper';
|
|
4
|
+
import type { TriggerProps } from '@atlaskit/popup';
|
|
5
|
+
import type { ConfigResponse } from '../clients/ShareServiceClient';
|
|
6
|
+
import type { OriginTracing } from './OriginTracing';
|
|
7
|
+
import type { ShareData, ShareError } from './ShareContentState';
|
|
8
|
+
import type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
9
|
+
import type { Integration } from './ShareEntities';
|
|
10
|
+
export type RenderCustomTriggerButton = (args: {
|
|
11
|
+
error?: ShareError;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
isSelected?: boolean;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}, triggerProps: TriggerProps) => React.ReactNode;
|
|
16
|
+
export type DialogPlacement = Placement;
|
|
17
|
+
/**
|
|
18
|
+
* Ideally, this would be Pick<PopupProps, ''>, but that doesn't play well
|
|
19
|
+
* with the demo page and clearly visible options on that page.
|
|
20
|
+
*/
|
|
21
|
+
export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
|
|
22
|
+
export type ShareDialogWithTriggerProps = Pick<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' | 'orgId' | 'isBrowseUsersDisabled'> & {
|
|
23
|
+
config?: ConfigResponse;
|
|
24
|
+
isFetchingConfig?: boolean;
|
|
25
|
+
children?: RenderCustomTriggerButton;
|
|
26
|
+
copyLink: string;
|
|
27
|
+
analyticsDecorator?: (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
|
|
28
|
+
isDisabled?: boolean;
|
|
29
|
+
onShareSubmit?: (shareContentState: ShareData) => Promise<any>;
|
|
30
|
+
copyLinkOrigin?: OriginTracing;
|
|
31
|
+
formShareOrigin?: OriginTracing;
|
|
32
|
+
submitButtonLabel?: React.ReactNode;
|
|
33
|
+
};
|
|
34
|
+
export type ShareDialogWithTriggerStates = {
|
|
35
|
+
isLoading: boolean;
|
|
36
|
+
isDialogOpen: boolean;
|
|
37
|
+
isSharing: boolean;
|
|
38
|
+
shareError?: ShareError;
|
|
39
|
+
ignoreIntermediateState: boolean;
|
|
40
|
+
defaultValue: ShareData;
|
|
41
|
+
isUsingSplitButton: boolean;
|
|
42
|
+
showIntegrationForm: boolean;
|
|
43
|
+
selectedIntegration: Integration | null;
|
|
44
|
+
tabIndex: number;
|
|
45
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type Content = {
|
|
3
|
+
ari: string;
|
|
4
|
+
link: string;
|
|
5
|
+
title: string;
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
export type Comment = {
|
|
9
|
+
format: 'plain_text' | 'adf';
|
|
10
|
+
value: string;
|
|
11
|
+
};
|
|
12
|
+
export type MetaData = {
|
|
13
|
+
productId: string;
|
|
14
|
+
atlOriginId: string;
|
|
15
|
+
shareeAction?: 'view' | 'edit';
|
|
16
|
+
};
|
|
17
|
+
export type IntegrationContentProps = {
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
changeTab?: (index: TabType) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare enum TabType {
|
|
22
|
+
default = 0,
|
|
23
|
+
Slack = 1
|
|
24
|
+
}
|
|
25
|
+
export type Integration = {
|
|
26
|
+
type: string;
|
|
27
|
+
Icon: React.ComponentType;
|
|
28
|
+
Content: React.ComponentType<IntegrationContentProps>;
|
|
29
|
+
};
|
|
30
|
+
export type IntegrationMode = 'tabs' | 'split' | 'off';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
|
+
import type { ConfigResponse } from '../clients/ShareServiceClient';
|
|
4
|
+
import type { ProductName } from './Products';
|
|
5
|
+
import type { ShareData, ShareError } from './ShareContentState';
|
|
6
|
+
import type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
7
|
+
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled'> & {
|
|
8
|
+
config?: ConfigResponse;
|
|
9
|
+
isFetchingConfig?: boolean;
|
|
10
|
+
copyLink: string;
|
|
11
|
+
isSharing?: boolean;
|
|
12
|
+
shareError?: ShareError;
|
|
13
|
+
submitButtonLabel?: React.ReactNode;
|
|
14
|
+
title?: React.ReactNode;
|
|
15
|
+
showTitle?: boolean;
|
|
16
|
+
helperMessage?: string;
|
|
17
|
+
defaultValue?: ShareData;
|
|
18
|
+
product?: ProductName;
|
|
19
|
+
fieldsFooter?: React.ReactNode;
|
|
20
|
+
selectPortalRef?: React.Ref<HTMLDivElement>;
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
isSplitButton?: boolean;
|
|
23
|
+
loadOptions?: LoadOptions;
|
|
24
|
+
onLinkCopy?: (link: string) => void;
|
|
25
|
+
onSubmit?: (data: ShareData) => void;
|
|
26
|
+
onDismiss?: (data: ShareData) => void;
|
|
27
|
+
onUserInputChange?: (query?: string, sessionId?: string) => void;
|
|
28
|
+
onTabChange?: (index: number) => void;
|
|
29
|
+
Content?: React.ReactNode;
|
|
30
|
+
handleCloseDialog?: () => void;
|
|
31
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type { ConfigResponse, ShareClient, ShareRequest, ShareResponse, } from '../clients/ShareServiceClient';
|
|
2
|
+
export type { FormChildrenArgs } from './form';
|
|
3
|
+
export { ADMIN_NOTIFIED, OBJECT_SHARED } from './Flag';
|
|
4
|
+
export type { Flag, FlagType, MessageDescriptor } from './Flag';
|
|
5
|
+
export type { OriginAnalyticAttributes, OriginTracing, OriginTracingFactory, OriginTracingForSubSequentEvents, OriginTracingWithIdGenerated, } from './OriginTracing';
|
|
6
|
+
export type { ProductId, ProductName } from './Products';
|
|
7
|
+
export type { ShareButtonStyle, TooltipPosition } from './ShareButton';
|
|
8
|
+
export type { ShareData, ShareData as DialogContentState, ShareContentState, ShareError, } from './ShareContentState';
|
|
9
|
+
export type { DialogPlacement, DialogBoundariesElement, RenderCustomTriggerButton, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates, } from './ShareDialogWithTrigger';
|
|
10
|
+
export type { User, UserWithEmail, UserWithId } from './User';
|
|
11
|
+
export type { Comment, Content, MetaData, Integration, IntegrationContentProps, } from './ShareEntities';
|
|
12
|
+
export { TabType } from './ShareEntities';
|
|
13
|
+
export type KeysOfType<T, TProp> = {
|
|
14
|
+
[P in keyof T]: T[P] extends TProp ? P : never;
|
|
15
|
+
}[keyof T];
|
|
16
|
+
export type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
17
|
+
export type { ShareFormProps } from './ShareForm';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import languages from '../i18n/languages';
|
|
2
|
+
export type LangCode = keyof typeof languages | 'pt-BR' | 'pt-PT';
|
|
3
|
+
type LocaleMessages = {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Tries to get the most specific messages bundle for a given locale.
|
|
8
|
+
*
|
|
9
|
+
* Strategy:
|
|
10
|
+
* 1. Try to find messages with the exact string (i.e. 'fr_FR')
|
|
11
|
+
* 2. If that doesn't work, try to find messages for the country locale (i.e. 'fr')
|
|
12
|
+
* 3. If that doesn't work, return english messages as a fallback.
|
|
13
|
+
*
|
|
14
|
+
* @param locale string specifying the locale like 'en_GB', or 'fr'.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getMessagesForLocale: (locale: LangCode) => LocaleMessages;
|
|
17
|
+
export {};
|