@atlaskit/share 6.16.3 → 6.16.5
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 +14 -0
- package/afm-cc/tsconfig.json +2 -2
- package/afm-townsquare/tsconfig.json +99 -0
- package/clients/package.json +1 -1
- package/copy-link-button/package.json +1 -1
- package/dist/cjs/components/ShareDialogContainer.js +18 -5
- package/dist/cjs/components/analytics/analytics.js +12 -2
- package/dist/es2019/components/ShareDialogContainer.js +14 -1
- package/dist/es2019/components/analytics/analytics.js +9 -1
- package/dist/esm/components/ShareDialogContainer.js +19 -6
- package/dist/esm/components/analytics/analytics.js +11 -1
- package/dist/types/clients/AtlassianUrlShortenerClient.d.ts +2 -2
- package/dist/types/clients/ShareServiceClient.d.ts +1 -1
- package/dist/types/components/CopyLinkButton.d.ts +6 -6
- package/dist/types/components/CopyLinkButtonNext.d.ts +6 -6
- package/dist/types/components/ErrorBoundary.d.ts +1 -1
- package/dist/types/components/IntegrationButton.d.ts +1 -1
- package/dist/types/components/IntegrationButtonNext.d.ts +1 -1
- package/dist/types/components/IntegrationForm.d.ts +1 -1
- package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +4 -4
- package/dist/types/components/LazyShareForm/LazyShareFormNext.d.ts +4 -4
- package/dist/types/components/ShareButton.d.ts +3 -3
- package/dist/types/components/ShareDialogContainer.d.ts +28 -28
- package/dist/types/components/ShareForm.d.ts +1 -1
- package/dist/types/components/ShareFormNext.d.ts +1 -1
- package/dist/types/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -2
- package/dist/types/components/ShareFormWrapper/compiled.d.ts +5 -5
- package/dist/types/components/ShareFormWrapper/styled.d.ts +5 -5
- package/dist/types/components/SplitButton.d.ts +6 -6
- package/dist/types/components/UserPickerField.d.ts +12 -12
- package/dist/types/components/analytics/analytics.d.ts +29 -21
- package/dist/types/types/Flag.d.ts +2 -2
- package/dist/types/types/OriginTracing.d.ts +1 -1
- package/dist/types/types/ShareContentState.d.ts +4 -4
- package/dist/types/types/ShareDialogContainer.d.ts +80 -81
- package/dist/types/types/ShareDialogWithTrigger.d.ts +12 -13
- package/dist/types/types/ShareEntities.d.ts +5 -6
- package/dist/types/types/ShareForm.d.ts +15 -16
- package/dist/types/types/User.d.ts +2 -2
- package/dist/types/types/UserPickerOptions.d.ts +12 -13
- package/dist/types/types/form.d.ts +0 -1
- package/dist/types-ts4.5/clients/AtlassianUrlShortenerClient.d.ts +2 -2
- package/dist/types-ts4.5/clients/ShareServiceClient.d.ts +1 -1
- package/dist/types-ts4.5/components/CopyLinkButton.d.ts +6 -6
- package/dist/types-ts4.5/components/CopyLinkButtonNext.d.ts +6 -6
- package/dist/types-ts4.5/components/ErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/components/IntegrationButton.d.ts +1 -1
- package/dist/types-ts4.5/components/IntegrationButtonNext.d.ts +1 -1
- package/dist/types-ts4.5/components/IntegrationForm.d.ts +1 -1
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +4 -4
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareFormNext.d.ts +4 -4
- package/dist/types-ts4.5/components/ShareButton.d.ts +3 -3
- package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +28 -28
- package/dist/types-ts4.5/components/ShareForm.d.ts +1 -1
- package/dist/types-ts4.5/components/ShareFormNext.d.ts +1 -1
- package/dist/types-ts4.5/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -2
- package/dist/types-ts4.5/components/ShareFormWrapper/compiled.d.ts +5 -5
- package/dist/types-ts4.5/components/ShareFormWrapper/styled.d.ts +5 -5
- package/dist/types-ts4.5/components/SplitButton.d.ts +6 -6
- package/dist/types-ts4.5/components/UserPickerField.d.ts +12 -12
- package/dist/types-ts4.5/components/analytics/analytics.d.ts +29 -21
- package/dist/types-ts4.5/types/Flag.d.ts +2 -2
- package/dist/types-ts4.5/types/OriginTracing.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareContentState.d.ts +4 -4
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +80 -81
- package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +12 -13
- package/dist/types-ts4.5/types/ShareEntities.d.ts +5 -6
- package/dist/types-ts4.5/types/ShareForm.d.ts +15 -16
- package/dist/types-ts4.5/types/User.d.ts +2 -2
- package/dist/types-ts4.5/types/UserPickerOptions.d.ts +12 -13
- package/dist/types-ts4.5/types/form.d.ts +0 -1
- package/package.json +11 -8
|
@@ -2,9 +2,9 @@ export declare const OBJECT_SHARED = "object-shared";
|
|
|
2
2
|
export declare const ADMIN_NOTIFIED = "admin-notified";
|
|
3
3
|
export type FlagType = 'object-shared' | 'admin-notified';
|
|
4
4
|
export type MessageDescriptor = {
|
|
5
|
-
id: string;
|
|
6
|
-
description: string;
|
|
7
5
|
defaultMessage: string;
|
|
6
|
+
description: string;
|
|
7
|
+
id: string;
|
|
8
8
|
};
|
|
9
9
|
export type Flag = {
|
|
10
10
|
appearance: 'success';
|
|
@@ -10,8 +10,8 @@ export type OriginAnalyticAttributes = {
|
|
|
10
10
|
hasGeneratedId: boolean;
|
|
11
11
|
};
|
|
12
12
|
export type OriginTracing = {
|
|
13
|
-
id: string;
|
|
14
13
|
addToUrl: (link: string) => string;
|
|
14
|
+
id: string;
|
|
15
15
|
toAnalyticsAttributes: (attrs: OriginAnalyticAttributes) => OriginTracingWithIdGenerated | OriginTracingForSubSequentEvents;
|
|
16
16
|
};
|
|
17
17
|
export type OriginTracingFactory = () => OriginTracing;
|
|
@@ -2,17 +2,17 @@ import { type OptionData } from '@atlaskit/smart-user-picker';
|
|
|
2
2
|
import { type Comment } from './ShareEntities';
|
|
3
3
|
import { type User } from './User';
|
|
4
4
|
export type ShareContentState = {
|
|
5
|
-
users: User[];
|
|
6
5
|
comment?: Comment;
|
|
6
|
+
users: User[];
|
|
7
7
|
};
|
|
8
8
|
export type ShareError = {
|
|
9
|
-
message: string;
|
|
10
9
|
errorCode?: string;
|
|
11
10
|
helpUrl?: string;
|
|
11
|
+
message: string;
|
|
12
12
|
retryable: boolean;
|
|
13
13
|
};
|
|
14
14
|
export type ShareData = {
|
|
15
|
-
users: OptionData[];
|
|
16
|
-
comment: Comment;
|
|
17
15
|
[key: string]: unknown;
|
|
16
|
+
comment: Comment;
|
|
17
|
+
users: OptionData[];
|
|
18
18
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { IconButtonProps } from '@atlaskit/button/new';
|
|
3
2
|
import type { NewCoreIconProps } from '@atlaskit/icon';
|
|
4
3
|
import type { LoadOptions, Props as SmartUserPickerProps, Value } from '@atlaskit/smart-user-picker';
|
|
@@ -14,25 +13,26 @@ import type { AdditionalTab, Integration, IntegrationMode } from './ShareEntitie
|
|
|
14
13
|
import type { RenderCustomSubmitButtonProps } from './ShareForm';
|
|
15
14
|
import type { UserPickerOptions } from './UserPickerOptions';
|
|
16
15
|
export type ShareDialogContainerProps = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* Optional, a default one is provided. */
|
|
23
|
-
shareClient?: ShareClient;
|
|
24
|
-
/** URL Shortener service client implementation that may shorten links for copy.
|
|
25
|
-
* Optional, a default one is provided. */
|
|
26
|
-
urlShortenerClient?: UrlShortenerClient;
|
|
27
|
-
/** Data provided to the `urlShortenerClient` to shorten the shared URL.
|
|
28
|
-
* If it is not provided, the link will not be shortened.
|
|
29
|
-
* If link shortening fails, the full URL will be shared instead. */
|
|
30
|
-
shortLinkData?: ShortenRequest;
|
|
16
|
+
additionalTabs?: Array<AdditionalTab>;
|
|
17
|
+
additionalUserFields?: React.ReactNode;
|
|
18
|
+
/** Message to be appended to the modal. */
|
|
19
|
+
bottomMessage?: React.ReactNode;
|
|
20
|
+
builtInTabContentWidth?: number;
|
|
31
21
|
/** Cloud ID of the instance.
|
|
32
22
|
* Note: we assume this props is stable. */
|
|
33
23
|
cloudId: string;
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
copyTooltipText?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Footer for the share dialog.
|
|
27
|
+
*/
|
|
28
|
+
customFooter?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Header for the share dialog.
|
|
31
|
+
*/
|
|
32
|
+
customHeader?: React.ReactNode;
|
|
33
|
+
CustomSubmitButton?: React.FC<RenderCustomSubmitButtonProps>;
|
|
34
|
+
/** An Icon used for the custom Share Dialog Trigger Button */
|
|
35
|
+
customTriggerButtonIcon?: React.ComponentType<NewCoreIconProps>;
|
|
36
36
|
/** Placement of the modal to the trigger button. */
|
|
37
37
|
dialogPlacement?: DialogPlacement;
|
|
38
38
|
/**
|
|
@@ -41,22 +41,63 @@ export type ShareDialogContainerProps = {
|
|
|
41
41
|
* Defaults to `layers.modal()` from `@atlaskit/theme`.
|
|
42
42
|
*/
|
|
43
43
|
dialogZIndex?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Power the user picker with smarts. To enable smart user picker, the following props are used:
|
|
46
|
+
* - `product`: 'jira' or 'confluence'
|
|
47
|
+
* - `loggedInAccountId`: if not provided, defaults to obtaining from request context
|
|
48
|
+
* - `cloudId`
|
|
49
|
+
*/
|
|
50
|
+
enableSmartUserPicker?: boolean;
|
|
44
51
|
/** Transform function to provide custom formatted copy link.
|
|
45
52
|
* Optional, a default one is provided. */
|
|
46
53
|
formatCopyLink?: (origin: OriginTracing, link: string) => string;
|
|
54
|
+
integrationMode?: IntegrationMode;
|
|
55
|
+
isAutoOpenDialog?: boolean;
|
|
56
|
+
isBrowseUsersDisabled?: boolean;
|
|
57
|
+
isCopyDisabled?: boolean;
|
|
58
|
+
isExtendedShareDialogEnabled?: boolean;
|
|
59
|
+
isMenuItemSelected?: boolean;
|
|
60
|
+
isPublicLink?: boolean;
|
|
61
|
+
isSubmitShareDisabled?: boolean;
|
|
47
62
|
/** Function used to load users options asynchronously. Not needed if smart user picker is enabled. */
|
|
48
63
|
loadUserOptions?: LoadOptions;
|
|
64
|
+
/**
|
|
65
|
+
* The userId of the sharer. If not provided, smart user picker
|
|
66
|
+
* defaults it to the value 'Context'
|
|
67
|
+
* which will tell the recommendation service to extract the
|
|
68
|
+
* value from the request context.
|
|
69
|
+
*/
|
|
70
|
+
loggedInAccountId?: string;
|
|
71
|
+
onDialogClose?: () => void;
|
|
72
|
+
onDialogOpen?: () => void;
|
|
73
|
+
onSubmit?: (formValues: ShareData) => void | Promise<void>;
|
|
74
|
+
onTriggerButtonClick?: () => void;
|
|
75
|
+
onUserSelectionChange?: (value: Value) => void;
|
|
76
|
+
/** Organisation ID of the instance. */
|
|
77
|
+
orgId?: string;
|
|
49
78
|
/** Factory function to generate new Origin Tracing instance. */
|
|
50
79
|
originTracingFactory: OriginTracingFactory;
|
|
80
|
+
/**
|
|
81
|
+
* Optional, this prop can be `jira` or `confluence`. Default value is `confluence`.
|
|
82
|
+
* We use this prop to control different text messages in UI.
|
|
83
|
+
*/
|
|
84
|
+
product?: ProductName;
|
|
85
|
+
productAttributes?: SmartUserPickerProps['productAttributes'];
|
|
51
86
|
/** Product ID (Canonical ID) in ARI of the share request.
|
|
52
87
|
* Note: we assume this props is stable. */
|
|
53
88
|
productId: ProductId;
|
|
54
89
|
/** Render function for a custom Share Dialog Trigger Button. */
|
|
55
90
|
renderCustomTriggerButton?: RenderCustomTriggerButton;
|
|
56
|
-
/** An Icon used for the custom Share Dialog Trigger Button */
|
|
57
|
-
customTriggerButtonIcon?: React.ComponentType<NewCoreIconProps>;
|
|
58
91
|
/** Atlassian Resource Identifier of a Site resource to be shared. */
|
|
59
92
|
shareAri: string;
|
|
93
|
+
/** Share service client implementation that gets share configs and performs share.
|
|
94
|
+
* Optional, a default one is provided. */
|
|
95
|
+
shareClient?: ShareClient;
|
|
96
|
+
/** Content ID of the resource to be shared. Optional. */
|
|
97
|
+
shareContentId?: string;
|
|
98
|
+
/** Content SubType of the resource to be shared. Optional. */
|
|
99
|
+
/** embed */
|
|
100
|
+
shareContentSubType?: string;
|
|
60
101
|
/** 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:*/
|
|
61
102
|
/** blogpost */
|
|
62
103
|
/** board */
|
|
@@ -77,22 +118,25 @@ export type ShareDialogContainerProps = {
|
|
|
77
118
|
/** space */
|
|
78
119
|
/** Any other unlisted type will have a default message of "Link shared". */
|
|
79
120
|
shareContentType: string;
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
|
|
121
|
+
/** Action that will be performed by the recipient when he/she receives the notification. */
|
|
122
|
+
shareeAction?: 'view' | 'edit';
|
|
123
|
+
shareFieldsFooter?: React.ReactNode;
|
|
124
|
+
/** Copy for helper message to be displayed under share form input box.
|
|
125
|
+
* If set to empty string, no helper message will be displayed
|
|
126
|
+
*/
|
|
127
|
+
shareFormHelperMessage?: string;
|
|
128
|
+
/** Title of the share modal. */
|
|
129
|
+
shareFormTitle?: React.ReactNode;
|
|
130
|
+
shareIntegrations?: Array<Integration>;
|
|
85
131
|
/** Link of the resource to be shared (should NOT includes origin tracing).
|
|
86
132
|
* Optional, the current page URL is used by default. */
|
|
87
133
|
shareLink?: string;
|
|
88
134
|
/** Title of the resource to be shared that will be sent in notifications. */
|
|
89
135
|
shareTitle: string;
|
|
90
|
-
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
*/
|
|
95
|
-
shareFormHelperMessage?: string;
|
|
136
|
+
/** Data provided to the `urlShortenerClient` to shorten the shared URL.
|
|
137
|
+
* If it is not provided, the link will not be shortened.
|
|
138
|
+
* If link shortening fails, the full URL will be shared instead. */
|
|
139
|
+
shortLinkData?: ShortenRequest;
|
|
96
140
|
/** To enable closing the modal on escape key press. */
|
|
97
141
|
shouldCloseOnEscapePress?: boolean;
|
|
98
142
|
/**
|
|
@@ -101,19 +145,9 @@ export type ShareDialogContainerProps = {
|
|
|
101
145
|
*/
|
|
102
146
|
showFlags: (flags: Array<Flag>) => void;
|
|
103
147
|
/**
|
|
104
|
-
*
|
|
105
|
-
* - `product`: 'jira' or 'confluence'
|
|
106
|
-
* - `loggedInAccountId`: if not provided, defaults to obtaining from request context
|
|
107
|
-
* - `cloudId`
|
|
108
|
-
*/
|
|
109
|
-
enableSmartUserPicker?: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* The userId of the sharer. If not provided, smart user picker
|
|
112
|
-
* defaults it to the value 'Context'
|
|
113
|
-
* which will tell the recommendation service to extract the
|
|
114
|
-
* value from the request context.
|
|
148
|
+
* Optionally sets a tabIndex value if you need to set focus
|
|
115
149
|
*/
|
|
116
|
-
|
|
150
|
+
tabIndex?: number;
|
|
117
151
|
/** Appearance of the share modal trigger button */
|
|
118
152
|
triggerButtonAppearance?: IconButtonProps['appearance'];
|
|
119
153
|
/** Share button Icon */
|
|
@@ -124,49 +158,14 @@ export type ShareDialogContainerProps = {
|
|
|
124
158
|
triggerButtonTooltipPosition?: TooltipPosition;
|
|
125
159
|
/** Custom text of the tooltip on share modal trigger button. */
|
|
126
160
|
triggerButtonTooltipText?: React.ReactNode;
|
|
127
|
-
/**
|
|
128
|
-
|
|
161
|
+
/** URL Shortener service client implementation that may shorten links for copy.
|
|
162
|
+
* Optional, a default one is provided. */
|
|
163
|
+
urlShortenerClient?: UrlShortenerClient;
|
|
164
|
+
userPickerOptions?: UserPickerOptions;
|
|
129
165
|
/** @deprecated Use the `shortLinkData` prop instead.
|
|
130
166
|
*
|
|
131
167
|
* Whether we should use the Atlassian Url Shortener or not.
|
|
132
168
|
* Note that all products may not be supported. */
|
|
133
169
|
useUrlShortener?: boolean;
|
|
134
|
-
/** Action that will be performed by the recipient when he/she receives the notification. */
|
|
135
|
-
shareeAction?: 'view' | 'edit';
|
|
136
|
-
/**
|
|
137
|
-
* Optional, this prop can be `jira` or `confluence`. Default value is `confluence`.
|
|
138
|
-
* We use this prop to control different text messages in UI.
|
|
139
|
-
*/
|
|
140
|
-
product?: ProductName;
|
|
141
|
-
productAttributes?: SmartUserPickerProps['productAttributes'];
|
|
142
|
-
/**
|
|
143
|
-
* Header for the share dialog.
|
|
144
|
-
*/
|
|
145
|
-
customHeader?: React.ReactNode;
|
|
146
|
-
/**
|
|
147
|
-
* Footer for the share dialog.
|
|
148
|
-
*/
|
|
149
|
-
customFooter?: React.ReactNode;
|
|
150
|
-
userPickerOptions?: UserPickerOptions;
|
|
151
|
-
onUserSelectionChange?: (value: Value) => void;
|
|
152
|
-
shareFieldsFooter?: React.ReactNode;
|
|
153
|
-
isCopyDisabled?: boolean;
|
|
154
|
-
isPublicLink?: boolean;
|
|
155
|
-
integrationMode?: IntegrationMode;
|
|
156
|
-
isMenuItemSelected?: boolean;
|
|
157
|
-
shareIntegrations?: Array<Integration>;
|
|
158
|
-
additionalTabs?: Array<AdditionalTab>;
|
|
159
|
-
builtInTabContentWidth?: number;
|
|
160
|
-
/**
|
|
161
|
-
* Optionally sets a tabIndex value if you need to set focus
|
|
162
|
-
*/
|
|
163
|
-
tabIndex?: number;
|
|
164
|
-
copyTooltipText?: string;
|
|
165
|
-
isBrowseUsersDisabled?: boolean;
|
|
166
170
|
workspaceAri?: string;
|
|
167
|
-
isSubmitShareDisabled?: boolean;
|
|
168
|
-
isExtendedShareDialogEnabled?: boolean;
|
|
169
|
-
additionalUserFields?: React.ReactNode;
|
|
170
|
-
onSubmit?: (formValues: ShareData) => void | Promise<void>;
|
|
171
|
-
CustomSubmitButton?: React.FC<RenderCustomSubmitButtonProps>;
|
|
172
171
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
2
|
import { type NewCoreIconProps } from '@atlaskit/icon';
|
|
4
3
|
import type { Placement } from '@atlaskit/popper';
|
|
@@ -10,10 +9,10 @@ import type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
|
10
9
|
import type { Integration } from './ShareEntities';
|
|
11
10
|
export type RenderCustomTriggerButton = (args: {
|
|
12
11
|
error?: ShareError;
|
|
12
|
+
iconBefore?: React.ComponentType<NewCoreIconProps>;
|
|
13
13
|
isDisabled?: boolean;
|
|
14
14
|
isSelected?: boolean;
|
|
15
15
|
onClick: () => void;
|
|
16
|
-
iconBefore?: React.ComponentType<NewCoreIconProps>;
|
|
17
16
|
}, triggerProps: TriggerProps) => React.ReactNode;
|
|
18
17
|
export type DialogPlacement = Placement;
|
|
19
18
|
/**
|
|
@@ -22,27 +21,27 @@ export type DialogPlacement = Placement;
|
|
|
22
21
|
*/
|
|
23
22
|
export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
|
|
24
23
|
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'customTriggerButtonIcon' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & {
|
|
25
|
-
|
|
26
|
-
isFetchingConfig?: boolean;
|
|
24
|
+
analyticsDecorator?: (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
|
|
27
25
|
children?: RenderCustomTriggerButton;
|
|
26
|
+
config?: ConfigResponse;
|
|
28
27
|
copyLink: string;
|
|
29
|
-
analyticsDecorator?: (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
|
|
30
|
-
isDisabled?: boolean;
|
|
31
|
-
onShareSubmit?: (shareContentState: ShareData) => Promise<any>;
|
|
32
28
|
copyLinkOrigin?: OriginTracing;
|
|
33
29
|
formShareOrigin?: OriginTracing;
|
|
30
|
+
isDisabled?: boolean;
|
|
31
|
+
isFetchingConfig?: boolean;
|
|
32
|
+
onShareSubmit?: (shareContentState: ShareData) => Promise<any>;
|
|
34
33
|
submitButtonLabel?: React.ReactNode;
|
|
35
34
|
};
|
|
36
35
|
export type ShareDialogWithTriggerStates = {
|
|
37
|
-
|
|
36
|
+
defaultValue: ShareData;
|
|
37
|
+
ignoreIntermediateState: boolean;
|
|
38
38
|
isDialogOpen: boolean;
|
|
39
|
+
isLoading: boolean;
|
|
40
|
+
isMenuItemSelected: boolean;
|
|
39
41
|
isSharing: boolean;
|
|
40
|
-
shareError?: ShareError;
|
|
41
|
-
ignoreIntermediateState: boolean;
|
|
42
|
-
defaultValue: ShareData;
|
|
43
42
|
isUsingSplitButton: boolean;
|
|
44
|
-
showIntegrationForm: boolean;
|
|
45
43
|
selectedIntegration: Integration | null;
|
|
44
|
+
shareError?: ShareError;
|
|
45
|
+
showIntegrationForm: boolean;
|
|
46
46
|
tabIndex: number;
|
|
47
|
-
isMenuItemSelected: boolean;
|
|
48
47
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export type Content = {
|
|
3
2
|
ari: string;
|
|
4
3
|
link: string;
|
|
@@ -11,13 +10,13 @@ export type Comment = {
|
|
|
11
10
|
value: string;
|
|
12
11
|
};
|
|
13
12
|
export type MetaData = {
|
|
14
|
-
productId: string;
|
|
15
13
|
atlOriginId: string;
|
|
14
|
+
productId: string;
|
|
16
15
|
shareeAction?: 'view' | 'edit';
|
|
17
16
|
};
|
|
18
17
|
export type ContentProps = {
|
|
19
|
-
onClose: () => void;
|
|
20
18
|
changeTab?: (index: TabType) => void;
|
|
19
|
+
onClose: () => void;
|
|
21
20
|
};
|
|
22
21
|
export declare enum TabType {
|
|
23
22
|
default = 0,
|
|
@@ -25,12 +24,12 @@ export declare enum TabType {
|
|
|
25
24
|
}
|
|
26
25
|
export type MenuType = 'none' | 'default' | 'Slack';
|
|
27
26
|
export type Integration = {
|
|
28
|
-
type: string;
|
|
29
|
-
Icon: React.ComponentType;
|
|
30
27
|
Content: React.ComponentType<ContentProps>;
|
|
28
|
+
Icon: React.ComponentType;
|
|
29
|
+
type: string;
|
|
31
30
|
};
|
|
32
31
|
export type IntegrationMode = 'tabs' | 'split' | 'menu' | 'off';
|
|
33
32
|
export type AdditionalTab = {
|
|
34
|
-
label: string;
|
|
35
33
|
Content: React.ComponentType<ContentProps>;
|
|
34
|
+
label: string;
|
|
36
35
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
2
|
import type { ConfigResponse } from '../clients/ShareServiceClient';
|
|
4
3
|
import type { ProductName } from './Products';
|
|
@@ -7,30 +6,30 @@ import type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
|
7
6
|
import { type MenuType } from './ShareEntities';
|
|
8
7
|
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & {
|
|
9
8
|
config?: ConfigResponse;
|
|
10
|
-
|
|
9
|
+
Content?: React.ReactNode;
|
|
11
10
|
copyLink: string;
|
|
12
|
-
isSharing?: boolean;
|
|
13
|
-
shareError?: ShareError;
|
|
14
|
-
submitButtonLabel?: React.ReactNode;
|
|
15
|
-
title?: React.ReactNode;
|
|
16
|
-
showTitle?: boolean;
|
|
17
|
-
helperMessage?: string;
|
|
18
11
|
defaultValue?: ShareData;
|
|
19
|
-
product?: ProductName;
|
|
20
12
|
fieldsFooter?: React.ReactNode;
|
|
21
|
-
|
|
13
|
+
handleCloseDialog?: () => void;
|
|
14
|
+
helperMessage?: string;
|
|
22
15
|
isDisabled?: boolean;
|
|
16
|
+
isFetchingConfig?: boolean;
|
|
17
|
+
isSharing?: boolean;
|
|
23
18
|
isSplitButton?: boolean;
|
|
19
|
+
isSubmitShareDisabled?: boolean;
|
|
24
20
|
loadOptions?: LoadOptions;
|
|
21
|
+
onDismiss?: (data: ShareData) => void;
|
|
25
22
|
onLinkCopy?: (link: string) => void;
|
|
23
|
+
onMenuItemChange?: (menuItem: MenuType) => void;
|
|
26
24
|
onSubmit?: (data: ShareData) => void;
|
|
27
|
-
onDismiss?: (data: ShareData) => void;
|
|
28
|
-
onUserInputChange?: (query?: string, sessionId?: string) => void;
|
|
29
25
|
onTabChange?: (index: number) => void;
|
|
30
|
-
|
|
26
|
+
onUserInputChange?: (query?: string, sessionId?: string) => void;
|
|
27
|
+
product?: ProductName;
|
|
31
28
|
selectedMenuItem?: number;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
selectPortalRef?: React.Ref<HTMLDivElement>;
|
|
30
|
+
shareError?: ShareError;
|
|
31
|
+
showTitle?: boolean;
|
|
32
|
+
submitButtonLabel?: React.ReactNode;
|
|
33
|
+
title?: React.ReactNode;
|
|
35
34
|
};
|
|
36
35
|
export type RenderCustomSubmitButtonProps = Pick<ShareFormProps, 'isSharing' | 'isDisabled' | 'isSubmitShareDisabled' | 'isPublicLink' | 'shareError' | 'integrationMode' | 'submitButtonLabel'>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type UserWithId = {
|
|
2
|
-
type: 'user' | 'group' | 'team' | 'custom' | 'external_user';
|
|
3
2
|
id: string;
|
|
3
|
+
type: 'user' | 'group' | 'team' | 'custom' | 'external_user';
|
|
4
4
|
};
|
|
5
5
|
export type UserWithEmail = {
|
|
6
|
-
type: 'user' | 'external_user';
|
|
7
6
|
email: string;
|
|
7
|
+
type: 'user' | 'external_user';
|
|
8
8
|
};
|
|
9
9
|
export type User = UserWithId | UserWithEmail;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
3
2
|
import type { Props as SmartUserPickerProps } from '@atlaskit/smart-user-picker';
|
|
4
3
|
export type UserPickerOptions = Pick<SmartUserPickerProps, 'onFocus' | 'header' | 'includeNonLicensedUsers'> & {
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* If message is undefined, default message will be displayed.
|
|
4
|
+
/**
|
|
5
|
+
* Label message for the user picker.
|
|
8
6
|
*/
|
|
9
|
-
|
|
10
|
-
inputValue: string;
|
|
11
|
-
isPublicLink?: boolean;
|
|
12
|
-
allowEmail?: boolean;
|
|
13
|
-
}) => string | null | React.ReactNode) | null;
|
|
7
|
+
getLabelMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
|
|
14
8
|
/**
|
|
15
9
|
* Placeholder message for the user picker.
|
|
16
10
|
*/
|
|
17
11
|
getPlaceholderMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
|
|
18
|
-
/**
|
|
19
|
-
* Label message for the user picker.
|
|
20
|
-
*/
|
|
21
|
-
getLabelMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
|
|
22
12
|
/**
|
|
23
13
|
* Message to be shown when required validation is shown in the user picker.
|
|
24
14
|
*/
|
|
25
15
|
getRequiredMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
|
|
16
|
+
/** Message to be shown when the menu is open but no options are provided.
|
|
17
|
+
* If message is null, no message will be displayed.
|
|
18
|
+
* If message is undefined, default message will be displayed.
|
|
19
|
+
*/
|
|
20
|
+
noOptionsMessageHandler?: ((value: {
|
|
21
|
+
allowEmail?: boolean;
|
|
22
|
+
inputValue: string;
|
|
23
|
+
isPublicLink?: boolean;
|
|
24
|
+
}) => string | null | React.ReactNode) | null;
|
|
26
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "6.16.
|
|
3
|
+
"version": "6.16.5",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
41
|
-
"@atlaskit/button": "^23.
|
|
41
|
+
"@atlaskit/button": "^23.4.0",
|
|
42
42
|
"@atlaskit/css": "^0.12.0",
|
|
43
43
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
44
|
-
"@atlaskit/form": "^12.
|
|
44
|
+
"@atlaskit/form": "^12.2.0",
|
|
45
45
|
"@atlaskit/heading": "^5.2.0",
|
|
46
|
-
"@atlaskit/icon": "^
|
|
46
|
+
"@atlaskit/icon": "^28.0.0",
|
|
47
47
|
"@atlaskit/link": "^3.2.0",
|
|
48
|
-
"@atlaskit/menu": "^8.
|
|
48
|
+
"@atlaskit/menu": "^8.3.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/popper": "^7.1.0",
|
|
51
51
|
"@atlaskit/popup": "^4.3.0",
|
|
52
52
|
"@atlaskit/portal": "^5.1.0",
|
|
53
53
|
"@atlaskit/primitives": "^14.11.0",
|
|
54
|
-
"@atlaskit/smart-user-picker": "^8.
|
|
54
|
+
"@atlaskit/smart-user-picker": "^8.2.0",
|
|
55
55
|
"@atlaskit/spinner": "^19.0.0",
|
|
56
56
|
"@atlaskit/tabs": "^18.1.0",
|
|
57
57
|
"@atlaskit/textarea": "^8.0.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/tokens": "^6.0.0",
|
|
60
60
|
"@atlaskit/tooltip": "^20.4.0",
|
|
61
61
|
"@atlaskit/ufo": "^0.4.0",
|
|
62
|
-
"@atlaskit/user-picker": "^11.
|
|
62
|
+
"@atlaskit/user-picker": "^11.6.0",
|
|
63
63
|
"@atlaskit/util-service-support": "^6.3.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
65
65
|
"@emotion/react": "^11.7.1",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@testing-library/user-event": "^14.4.3",
|
|
80
80
|
"enzyme": "^3.10.0",
|
|
81
81
|
"react": "^18.2.0",
|
|
82
|
-
"typescript": "
|
|
82
|
+
"typescript": "5.9.2"
|
|
83
83
|
},
|
|
84
84
|
"keywords": [
|
|
85
85
|
"ui",
|
|
@@ -140,6 +140,9 @@
|
|
|
140
140
|
},
|
|
141
141
|
"page_shared_event_from_share_dialogue": {
|
|
142
142
|
"type": "boolean"
|
|
143
|
+
},
|
|
144
|
+
"jira-warepil-track-sharing-to-email-disabled": {
|
|
145
|
+
"type": "boolean"
|
|
143
146
|
}
|
|
144
147
|
},
|
|
145
148
|
"sideEffects": [
|