@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.
Files changed (92) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/clients/package.json +8 -1
  3. package/copy-link-button/package.json +8 -1
  4. package/dist/cjs/clients/AtlassianUrlShortenerClient.js +5 -1
  5. package/dist/cjs/components/analytics/analytics.js +1 -1
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/es2019/clients/AtlassianUrlShortenerClient.js +4 -1
  8. package/dist/es2019/components/analytics/analytics.js +1 -1
  9. package/dist/es2019/version.json +1 -1
  10. package/dist/esm/clients/AtlassianUrlShortenerClient.js +5 -1
  11. package/dist/esm/components/analytics/analytics.js +1 -1
  12. package/dist/esm/version.json +1 -1
  13. package/dist/types-ts4.0/clients/AtlassianUrlShortenerClient.d.ts +16 -0
  14. package/dist/types-ts4.0/clients/ShareServiceClient.d.ts +25 -0
  15. package/dist/types-ts4.0/clients/index.d.ts +2 -0
  16. package/dist/types-ts4.0/components/CommentField.d.ts +6 -0
  17. package/dist/types-ts4.0/components/CopyLinkButton.d.ts +37 -0
  18. package/dist/types-ts4.0/components/ErrorBoundary.d.ts +4 -0
  19. package/dist/types-ts4.0/components/IntegrationButton.d.ts +10 -0
  20. package/dist/types-ts4.0/components/IntegrationForm.d.ts +11 -0
  21. package/dist/types-ts4.0/components/LazyShareForm/LazyShareForm.d.ts +20 -0
  22. package/dist/types-ts4.0/components/LazyShareForm/index.d.ts +1 -0
  23. package/dist/types-ts4.0/components/LazyShareForm/lazy.d.ts +4 -0
  24. package/dist/types-ts4.0/components/MessagesIntlProvider.d.ts +9 -0
  25. package/dist/types-ts4.0/components/ShareButton.d.ts +13 -0
  26. package/dist/types-ts4.0/components/ShareDialogContainer.d.ts +59 -0
  27. package/dist/types-ts4.0/components/ShareDialogWithTrigger.d.ts +43 -0
  28. package/dist/types-ts4.0/components/ShareForm.d.ts +11 -0
  29. package/dist/types-ts4.0/components/ShareFormWrapper/ShareFormWrapper.d.ts +9 -0
  30. package/dist/types-ts4.0/components/ShareFormWrapper/index.d.ts +1 -0
  31. package/dist/types-ts4.0/components/ShareFormWrapper/styled.d.ts +10 -0
  32. package/dist/types-ts4.0/components/ShareHeader.d.ts +8 -0
  33. package/dist/types-ts4.0/components/SlackIcon.d.ts +3 -0
  34. package/dist/types-ts4.0/components/SplitButton.d.ts +19 -0
  35. package/dist/types-ts4.0/components/UserPickerField.d.ts +28 -0
  36. package/dist/types-ts4.0/components/analytics/analytics.d.ts +19 -0
  37. package/dist/types-ts4.0/components/analytics/ufoExperienceHelper.d.ts +2 -0
  38. package/dist/types-ts4.0/components/analytics/ufoExperiences.d.ts +3 -0
  39. package/dist/types-ts4.0/components/colorSlackIcon.d.ts +3 -0
  40. package/dist/types-ts4.0/components/localStorageUtils.d.ts +5 -0
  41. package/dist/types-ts4.0/components/monochromeSlackIcon.d.ts +3 -0
  42. package/dist/types-ts4.0/components/styles.d.ts +5 -0
  43. package/dist/types-ts4.0/components/utils.d.ts +20 -0
  44. package/dist/types-ts4.0/i18n/cs.d.ts +43 -0
  45. package/dist/types-ts4.0/i18n/da.d.ts +43 -0
  46. package/dist/types-ts4.0/i18n/de.d.ts +43 -0
  47. package/dist/types-ts4.0/i18n/en.d.ts +35 -0
  48. package/dist/types-ts4.0/i18n/en_GB.d.ts +35 -0
  49. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +43 -0
  50. package/dist/types-ts4.0/i18n/es.d.ts +43 -0
  51. package/dist/types-ts4.0/i18n/et.d.ts +30 -0
  52. package/dist/types-ts4.0/i18n/fi.d.ts +43 -0
  53. package/dist/types-ts4.0/i18n/fr.d.ts +43 -0
  54. package/dist/types-ts4.0/i18n/hu.d.ts +43 -0
  55. package/dist/types-ts4.0/i18n/index.d.ts +36 -0
  56. package/dist/types-ts4.0/i18n/is.d.ts +33 -0
  57. package/dist/types-ts4.0/i18n/it.d.ts +43 -0
  58. package/dist/types-ts4.0/i18n/ja.d.ts +43 -0
  59. package/dist/types-ts4.0/i18n/ko.d.ts +43 -0
  60. package/dist/types-ts4.0/i18n/languages.d.ts +33 -0
  61. package/dist/types-ts4.0/i18n/nb.d.ts +43 -0
  62. package/dist/types-ts4.0/i18n/nl.d.ts +43 -0
  63. package/dist/types-ts4.0/i18n/pl.d.ts +43 -0
  64. package/dist/types-ts4.0/i18n/pt_BR.d.ts +43 -0
  65. package/dist/types-ts4.0/i18n/pt_PT.d.ts +30 -0
  66. package/dist/types-ts4.0/i18n/ro.d.ts +33 -0
  67. package/dist/types-ts4.0/i18n/ru.d.ts +43 -0
  68. package/dist/types-ts4.0/i18n/sk.d.ts +30 -0
  69. package/dist/types-ts4.0/i18n/sv.d.ts +43 -0
  70. package/dist/types-ts4.0/i18n/th.d.ts +43 -0
  71. package/dist/types-ts4.0/i18n/tr.d.ts +43 -0
  72. package/dist/types-ts4.0/i18n/uk.d.ts +43 -0
  73. package/dist/types-ts4.0/i18n/vi.d.ts +43 -0
  74. package/dist/types-ts4.0/i18n/zh.d.ts +43 -0
  75. package/dist/types-ts4.0/i18n/zh_TW.d.ts +43 -0
  76. package/dist/types-ts4.0/i18n.d.ts +172 -0
  77. package/dist/types-ts4.0/index.d.ts +4 -0
  78. package/dist/types-ts4.0/types/Flag.d.ts +13 -0
  79. package/dist/types-ts4.0/types/OriginTracing.d.ts +17 -0
  80. package/dist/types-ts4.0/types/Products.d.ts +3 -0
  81. package/dist/types-ts4.0/types/ShareButton.d.ts +2 -0
  82. package/dist/types-ts4.0/types/ShareContentState.d.ts +14 -0
  83. package/dist/types-ts4.0/types/ShareDialogContainer.d.ts +144 -0
  84. package/dist/types-ts4.0/types/ShareDialogWithTrigger.d.ts +45 -0
  85. package/dist/types-ts4.0/types/ShareEntities.d.ts +30 -0
  86. package/dist/types-ts4.0/types/ShareForm.d.ts +31 -0
  87. package/dist/types-ts4.0/types/User.d.ts +9 -0
  88. package/dist/types-ts4.0/types/form.d.ts +5 -0
  89. package/dist/types-ts4.0/types/index.d.ts +17 -0
  90. package/dist/types-ts4.0/util/i18n-util.d.ts +17 -0
  91. package/package.json +11 -4
  92. package/report.api.md +114 -152
@@ -0,0 +1,43 @@
1
+ declare const _default: {
2
+ 'fabric.elements.share.copied.to.clipboard.message': string;
3
+ 'fabric.elements.share.copylink.button.text': string;
4
+ 'fabric.elements.share.copypubliclink.button.text': string;
5
+ 'fabric.elements.share.failure.icon.label': string;
6
+ 'fabric.elements.share.failure.message': string;
7
+ 'fabric.elements.share.form.comment.placeholder': string;
8
+ 'fabric.elements.share.form.info.message.no.invite.confluence': string;
9
+ 'fabric.elements.share.form.info.message.no.invite.jira': string;
10
+ 'fabric.elements.share.form.public.send': string;
11
+ 'fabric.elements.share.form.public.share': string;
12
+ 'fabric.elements.share.form.retry': string;
13
+ 'fabric.elements.share.form.send': string;
14
+ 'fabric.elements.share.form.share': string;
15
+ 'fabric.elements.share.form.title': string;
16
+ 'fabric.elements.share.form.user-picker.add-more': string;
17
+ 'fabric.elements.share.form.user-picker.no-options.existingUserOnly': string;
18
+ 'fabric.elements.share.form.user-picker.no-options.generic': string;
19
+ 'fabric.elements.share.form.user-picker.placeholder.existingUserOnly': string;
20
+ 'fabric.elements.share.form.user-picker.placeholder.generic': string;
21
+ 'fabric.elements.share.form.user-picker.placeholder.jira': string;
22
+ 'fabric.elements.share.form.user-picker.placholder.generic.existingUserOnly': string;
23
+ 'fabric.elements.share.form.user-picker.validation.required': string;
24
+ 'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': string;
25
+ 'fabric.elements.share.form.user-picker.validation.required.jira': string;
26
+ 'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': string;
27
+ 'fabric.elements.share.in.integration.button': string;
28
+ 'fabric.elements.share.main.tab.text.confluence': string;
29
+ 'fabric.elements.share.main.tab.text.jira': string;
30
+ 'fabric.elements.share.success.message': string;
31
+ 'fabric.elements.share.to.integration.button': string;
32
+ 'fabric.elements.share.trigger.button.icon.label': string;
33
+ 'fabric.elements.share.trigger.button.invite.text': string;
34
+ 'fabric.elements.share.trigger.button.text': string;
35
+ 'fabric.elements.share.trigger.button.tooltip.text': string;
36
+ };
37
+ /**
38
+ * NOTE:
39
+ *
40
+ * This file is automatically generated by Traduki 2.0.
41
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
42
+ */
43
+ export default _default;
@@ -0,0 +1,43 @@
1
+ declare const _default: {
2
+ 'fabric.elements.share.copied.to.clipboard.message': string;
3
+ 'fabric.elements.share.copylink.button.text': string;
4
+ 'fabric.elements.share.copypubliclink.button.text': string;
5
+ 'fabric.elements.share.failure.icon.label': string;
6
+ 'fabric.elements.share.failure.message': string;
7
+ 'fabric.elements.share.form.comment.placeholder': string;
8
+ 'fabric.elements.share.form.info.message.no.invite.confluence': string;
9
+ 'fabric.elements.share.form.info.message.no.invite.jira': string;
10
+ 'fabric.elements.share.form.public.send': string;
11
+ 'fabric.elements.share.form.public.share': string;
12
+ 'fabric.elements.share.form.retry': string;
13
+ 'fabric.elements.share.form.send': string;
14
+ 'fabric.elements.share.form.share': string;
15
+ 'fabric.elements.share.form.title': string;
16
+ 'fabric.elements.share.form.user-picker.add-more': string;
17
+ 'fabric.elements.share.form.user-picker.no-options.existingUserOnly': string;
18
+ 'fabric.elements.share.form.user-picker.no-options.generic': string;
19
+ 'fabric.elements.share.form.user-picker.placeholder.existingUserOnly': string;
20
+ 'fabric.elements.share.form.user-picker.placeholder.generic': string;
21
+ 'fabric.elements.share.form.user-picker.placeholder.jira': string;
22
+ 'fabric.elements.share.form.user-picker.placholder.generic.existingUserOnly': string;
23
+ 'fabric.elements.share.form.user-picker.validation.required': string;
24
+ 'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': string;
25
+ 'fabric.elements.share.form.user-picker.validation.required.jira': string;
26
+ 'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': string;
27
+ 'fabric.elements.share.in.integration.button': string;
28
+ 'fabric.elements.share.main.tab.text.confluence': string;
29
+ 'fabric.elements.share.main.tab.text.jira': string;
30
+ 'fabric.elements.share.success.message': string;
31
+ 'fabric.elements.share.to.integration.button': string;
32
+ 'fabric.elements.share.trigger.button.icon.label': string;
33
+ 'fabric.elements.share.trigger.button.invite.text': string;
34
+ 'fabric.elements.share.trigger.button.text': string;
35
+ 'fabric.elements.share.trigger.button.tooltip.text': string;
36
+ };
37
+ /**
38
+ * NOTE:
39
+ *
40
+ * This file is automatically generated by Traduki 2.0.
41
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
42
+ */
43
+ export default _default;
@@ -0,0 +1,172 @@
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
+ commentPlaceholder: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ userPickerGenericPlaceholder: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ userPickerGenericExistingUserOnlyPlaceholder: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
47
+ userPickerGenericPlaceholderJira: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ description: string;
51
+ };
52
+ userPickerExistingUserOnlyPlaceholder: {
53
+ id: string;
54
+ defaultMessage: string;
55
+ description: string;
56
+ };
57
+ userPickerAddMoreMessage: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
62
+ userPickerRequiredMessage: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ description: string;
66
+ };
67
+ userPickerRequiredMessageJira: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
72
+ userPickerRequiredExistingUserOnlyMessage: {
73
+ id: string;
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
77
+ userPickerRequiredExistingUserOnlyMessageJira: {
78
+ id: string;
79
+ defaultMessage: string;
80
+ description: string;
81
+ };
82
+ userPickerExistingUserOnlyNoOptionsMessage: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ description: string;
86
+ };
87
+ userPickerGenericNoOptionsMessage: {
88
+ id: string;
89
+ defaultMessage: string;
90
+ description: string;
91
+ };
92
+ shareTriggerButtonIconLabel: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
97
+ shareTriggerButtonText: {
98
+ id: string;
99
+ defaultMessage: string;
100
+ description: string;
101
+ };
102
+ shareTriggerButtonTooltipText: {
103
+ id: string;
104
+ defaultMessage: string;
105
+ description: string;
106
+ };
107
+ inviteTriggerButtonText: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ description: string;
111
+ };
112
+ copyLinkButtonText: {
113
+ id: string;
114
+ defaultMessage: string;
115
+ description: string;
116
+ };
117
+ copyPublicLinkButtonText: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ description: string;
121
+ };
122
+ copiedToClipboardMessage: {
123
+ id: string;
124
+ defaultMessage: string;
125
+ description: string;
126
+ };
127
+ infoMessageDefaultConfluence: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ description: string;
131
+ };
132
+ infoMessageDefaultJira: {
133
+ id: string;
134
+ defaultMessage: string;
135
+ description: string;
136
+ };
137
+ shareFailureIconLabel: {
138
+ id: string;
139
+ defaultMessage: string;
140
+ description: string;
141
+ };
142
+ shareFailureMessage: {
143
+ id: string;
144
+ defaultMessage: string;
145
+ description: string;
146
+ };
147
+ shareSuccessMessage: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
152
+ shareToIntegrationButtonText: {
153
+ id: string;
154
+ defaultMessage: string;
155
+ description: string;
156
+ };
157
+ shareInIntegrationButtonText: {
158
+ id: string;
159
+ defaultMessage: string;
160
+ description: string;
161
+ };
162
+ shareMainTabTextJira: {
163
+ id: string;
164
+ defaultMessage: string;
165
+ description: string;
166
+ };
167
+ shareMainTabTextConfluence: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
172
+ };
@@ -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 declare type FlagType = 'object-shared' | 'admin-notified';
4
+ export declare type MessageDescriptor = {
5
+ id: string;
6
+ description: string;
7
+ defaultMessage: string;
8
+ };
9
+ export declare type Flag = {
10
+ appearance: 'success';
11
+ title: MessageDescriptor;
12
+ type: FlagType;
13
+ };
@@ -0,0 +1,17 @@
1
+ export declare type OriginTracingWithIdGenerated = {
2
+ originIdGenerated: string;
3
+ originProduct: string;
4
+ };
5
+ export declare type OriginTracingForSubSequentEvents = {
6
+ originId: string;
7
+ originProduct: string;
8
+ };
9
+ export declare type OriginAnalyticAttributes = {
10
+ hasGeneratedId: boolean;
11
+ };
12
+ export declare type OriginTracing = {
13
+ id: string;
14
+ addToUrl: (link: string) => string;
15
+ toAnalyticsAttributes: (attrs: OriginAnalyticAttributes) => OriginTracingWithIdGenerated | OriginTracingForSubSequentEvents;
16
+ };
17
+ export declare type OriginTracingFactory = () => OriginTracing;
@@ -0,0 +1,3 @@
1
+ /** Product ID (Canonical ID) in ARI of the share request */
2
+ export declare type ProductId = 'bitbucket' | 'confluence' | 'jira-addon' | 'jira-core' | 'jira-platform' | 'jira-polaris' | 'jira-portfolio' | 'jira-servicedesk' | 'jira-software' | 'jira-unknown' | 'trello';
3
+ export declare type ProductName = 'jira' | 'confluence';
@@ -0,0 +1,2 @@
1
+ export declare type ShareButtonStyle = 'icon-only' | 'icon-with-text' | 'text-only';
2
+ export declare type TooltipPosition = 'top' | 'right' | 'bottom' | 'left' | 'mouse';
@@ -0,0 +1,14 @@
1
+ import { OptionData } from '@atlaskit/smart-user-picker';
2
+ import { Comment } from './ShareEntities';
3
+ import { User } from './User';
4
+ export declare type ShareContentState = {
5
+ users: User[];
6
+ comment?: Comment;
7
+ };
8
+ export declare type ShareError = {
9
+ message: string;
10
+ };
11
+ export declare type ShareData = {
12
+ users: OptionData[];
13
+ comment: Comment;
14
+ };
@@ -0,0 +1,144 @@
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 declare 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
+ shareFormHelperMessage?: string;
84
+ /** To enable closing the modal on escape key press. */
85
+ shouldCloseOnEscapePress?: boolean;
86
+ /**
87
+ * 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
88
+ * 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.
89
+ */
90
+ showFlags: (flags: Array<Flag>) => void;
91
+ /**
92
+ * Power the user picker with smarts. To enable smart user picker, the following props are used:
93
+ * - `product`: 'jira' or 'confluence'
94
+ * - `loggedInAccountId`: if not provided, defaults to obtaining from request context
95
+ * - `cloudId`
96
+ */
97
+ enableSmartUserPicker?: boolean;
98
+ /**
99
+ * The userId of the sharer. If not provided, smart user picker
100
+ * defaults it to the value 'Context'
101
+ * which will tell the recommendation service to extract the
102
+ * value from the request context.
103
+ */
104
+ loggedInAccountId?: string;
105
+ /** Appearance of the share modal trigger button */
106
+ triggerButtonAppearance?: Appearance;
107
+ /** Share button Icon */
108
+ triggerButtonIcon?: React.ComponentType<IconProps>;
109
+ /** Style of the share modal trigger button. */
110
+ triggerButtonStyle?: ShareButtonStyle;
111
+ /** Position of the tooltip on share modal trigger button. */
112
+ triggerButtonTooltipPosition?: TooltipPosition;
113
+ /** Custom text of the tooltip on share modal trigger button. */
114
+ triggerButtonTooltipText?: React.ReactNode;
115
+ /** Message to be appended to the modal. */
116
+ bottomMessage?: React.ReactNode;
117
+ /** @deprecated Use the `shortLinkData` prop instead.
118
+ *
119
+ * Whether we should use the Atlassian Url Shortener or not.
120
+ * Note that all products may not be supported. */
121
+ useUrlShortener?: boolean;
122
+ /** Action that will be performed by the recipient when he/she receives the notification. */
123
+ shareeAction?: 'view' | 'edit';
124
+ /**
125
+ * Optional, this prop can be `jira` or `confluence`. Default value is `confluence`.
126
+ * We use this prop to control different text messages in UI.
127
+ */
128
+ product?: ProductName;
129
+ /**
130
+ * Footer for the share dialog.
131
+ */
132
+ customFooter?: React.ReactNode;
133
+ onUserSelectionChange?: (value: Value) => void;
134
+ shareFieldsFooter?: React.ReactNode;
135
+ isCopyDisabled?: boolean;
136
+ isPublicLink?: boolean;
137
+ integrationMode?: IntegrationMode;
138
+ shareIntegrations?: Array<Integration>;
139
+ /**
140
+ * Optionally sets a tabIndex value if you need to set focus
141
+ */
142
+ tabIndex?: number;
143
+ copyTooltipText?: string;
144
+ };
@@ -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 declare type RenderCustomTriggerButton = (args: {
11
+ error?: ShareError;
12
+ isDisabled?: boolean;
13
+ isSelected?: boolean;
14
+ onClick: () => void;
15
+ }, triggerProps: TriggerProps) => React.ReactNode;
16
+ export declare 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 declare type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
22
+ export declare 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'> & {
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 declare 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 declare type Content = {
3
+ ari: string;
4
+ link: string;
5
+ title: string;
6
+ type: string;
7
+ };
8
+ export declare type Comment = {
9
+ format: 'plain_text' | 'adf';
10
+ value: string;
11
+ };
12
+ export declare type MetaData = {
13
+ productId: string;
14
+ atlOriginId: string;
15
+ shareeAction?: 'view' | 'edit';
16
+ };
17
+ export declare 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 declare type Integration = {
26
+ type: string;
27
+ Icon: React.ComponentType;
28
+ Content: React.ComponentType<IntegrationContentProps>;
29
+ };
30
+ export declare 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 declare type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId'> & {
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,9 @@
1
+ export declare type UserWithId = {
2
+ type: 'user' | 'group' | 'team';
3
+ id: string;
4
+ };
5
+ export declare type UserWithEmail = {
6
+ type: 'user';
7
+ email: string;
8
+ };
9
+ export declare type User = UserWithId | UserWithEmail;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare type FormChildrenArgs<T> = {
3
+ formProps: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
4
+ getValues: () => T;
5
+ };
@@ -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 declare 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 declare type LangCode = keyof typeof languages | 'pt-BR' | 'pt-PT';
3
+ declare 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 {};