@atlaskit/share 6.16.4 → 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.
Files changed (62) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/afm-cc/tsconfig.json +2 -2
  3. package/dist/cjs/components/analytics/analytics.js +1 -1
  4. package/dist/es2019/components/analytics/analytics.js +1 -1
  5. package/dist/esm/components/analytics/analytics.js +1 -1
  6. package/dist/types/clients/AtlassianUrlShortenerClient.d.ts +2 -2
  7. package/dist/types/clients/ShareServiceClient.d.ts +1 -1
  8. package/dist/types/components/CopyLinkButton.d.ts +6 -6
  9. package/dist/types/components/CopyLinkButtonNext.d.ts +6 -6
  10. package/dist/types/components/IntegrationButton.d.ts +1 -1
  11. package/dist/types/components/IntegrationButtonNext.d.ts +1 -1
  12. package/dist/types/components/IntegrationForm.d.ts +1 -1
  13. package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +4 -4
  14. package/dist/types/components/LazyShareForm/LazyShareFormNext.d.ts +4 -4
  15. package/dist/types/components/ShareButton.d.ts +3 -3
  16. package/dist/types/components/ShareDialogContainer.d.ts +24 -24
  17. package/dist/types/components/ShareForm.d.ts +1 -1
  18. package/dist/types/components/ShareFormNext.d.ts +1 -1
  19. package/dist/types/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -2
  20. package/dist/types/components/ShareFormWrapper/compiled.d.ts +2 -2
  21. package/dist/types/components/ShareFormWrapper/styled.d.ts +2 -2
  22. package/dist/types/components/SplitButton.d.ts +6 -6
  23. package/dist/types/components/UserPickerField.d.ts +12 -12
  24. package/dist/types/components/analytics/analytics.d.ts +17 -17
  25. package/dist/types/types/Flag.d.ts +2 -2
  26. package/dist/types/types/OriginTracing.d.ts +1 -1
  27. package/dist/types/types/ShareContentState.d.ts +4 -4
  28. package/dist/types/types/ShareDialogContainer.d.ts +80 -80
  29. package/dist/types/types/ShareDialogWithTrigger.d.ts +12 -12
  30. package/dist/types/types/ShareEntities.d.ts +5 -5
  31. package/dist/types/types/ShareForm.d.ts +15 -15
  32. package/dist/types/types/User.d.ts +2 -2
  33. package/dist/types/types/UserPickerOptions.d.ts +12 -12
  34. package/dist/types-ts4.5/clients/AtlassianUrlShortenerClient.d.ts +2 -2
  35. package/dist/types-ts4.5/clients/ShareServiceClient.d.ts +1 -1
  36. package/dist/types-ts4.5/components/CopyLinkButton.d.ts +6 -6
  37. package/dist/types-ts4.5/components/CopyLinkButtonNext.d.ts +6 -6
  38. package/dist/types-ts4.5/components/IntegrationButton.d.ts +1 -1
  39. package/dist/types-ts4.5/components/IntegrationButtonNext.d.ts +1 -1
  40. package/dist/types-ts4.5/components/IntegrationForm.d.ts +1 -1
  41. package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +4 -4
  42. package/dist/types-ts4.5/components/LazyShareForm/LazyShareFormNext.d.ts +4 -4
  43. package/dist/types-ts4.5/components/ShareButton.d.ts +3 -3
  44. package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +24 -24
  45. package/dist/types-ts4.5/components/ShareForm.d.ts +1 -1
  46. package/dist/types-ts4.5/components/ShareFormNext.d.ts +1 -1
  47. package/dist/types-ts4.5/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -2
  48. package/dist/types-ts4.5/components/ShareFormWrapper/compiled.d.ts +2 -2
  49. package/dist/types-ts4.5/components/ShareFormWrapper/styled.d.ts +2 -2
  50. package/dist/types-ts4.5/components/SplitButton.d.ts +6 -6
  51. package/dist/types-ts4.5/components/UserPickerField.d.ts +12 -12
  52. package/dist/types-ts4.5/components/analytics/analytics.d.ts +17 -17
  53. package/dist/types-ts4.5/types/Flag.d.ts +2 -2
  54. package/dist/types-ts4.5/types/OriginTracing.d.ts +1 -1
  55. package/dist/types-ts4.5/types/ShareContentState.d.ts +4 -4
  56. package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +80 -80
  57. package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +12 -12
  58. package/dist/types-ts4.5/types/ShareEntities.d.ts +5 -5
  59. package/dist/types-ts4.5/types/ShareForm.d.ts +15 -15
  60. package/dist/types-ts4.5/types/User.d.ts +2 -2
  61. package/dist/types-ts4.5/types/UserPickerOptions.d.ts +12 -12
  62. package/package.json +3 -3
@@ -13,25 +13,26 @@ import type { AdditionalTab, Integration, IntegrationMode } from './ShareEntitie
13
13
  import type { RenderCustomSubmitButtonProps } from './ShareForm';
14
14
  import type { UserPickerOptions } from './UserPickerOptions';
15
15
  export type ShareDialogContainerProps = {
16
- onTriggerButtonClick?: () => void;
17
- onDialogOpen?: () => void;
18
- onDialogClose?: () => void;
19
- isAutoOpenDialog?: boolean;
20
- /** Share service client implementation that gets share configs and performs share.
21
- * Optional, a default one is provided. */
22
- shareClient?: ShareClient;
23
- /** URL Shortener service client implementation that may shorten links for copy.
24
- * Optional, a default one is provided. */
25
- urlShortenerClient?: UrlShortenerClient;
26
- /** Data provided to the `urlShortenerClient` to shorten the shared URL.
27
- * If it is not provided, the link will not be shortened.
28
- * If link shortening fails, the full URL will be shared instead. */
29
- 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;
30
21
  /** Cloud ID of the instance.
31
22
  * Note: we assume this props is stable. */
32
23
  cloudId: string;
33
- /** Organisation ID of the instance. */
34
- orgId?: string;
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>;
35
36
  /** Placement of the modal to the trigger button. */
36
37
  dialogPlacement?: DialogPlacement;
37
38
  /**
@@ -40,22 +41,63 @@ export type ShareDialogContainerProps = {
40
41
  * Defaults to `layers.modal()` from `@atlaskit/theme`.
41
42
  */
42
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;
43
51
  /** Transform function to provide custom formatted copy link.
44
52
  * Optional, a default one is provided. */
45
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;
46
62
  /** Function used to load users options asynchronously. Not needed if smart user picker is enabled. */
47
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;
48
78
  /** Factory function to generate new Origin Tracing instance. */
49
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'];
50
86
  /** Product ID (Canonical ID) in ARI of the share request.
51
87
  * Note: we assume this props is stable. */
52
88
  productId: ProductId;
53
89
  /** Render function for a custom Share Dialog Trigger Button. */
54
90
  renderCustomTriggerButton?: RenderCustomTriggerButton;
55
- /** An Icon used for the custom Share Dialog Trigger Button */
56
- customTriggerButtonIcon?: React.ComponentType<NewCoreIconProps>;
57
91
  /** Atlassian Resource Identifier of a Site resource to be shared. */
58
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;
59
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:*/
60
102
  /** blogpost */
61
103
  /** board */
@@ -76,22 +118,25 @@ export type ShareDialogContainerProps = {
76
118
  /** space */
77
119
  /** Any other unlisted type will have a default message of "Link shared". */
78
120
  shareContentType: string;
79
- /** Content SubType of the resource to be shared. Optional. */
80
- /** embed */
81
- shareContentSubType?: string;
82
- /** Content ID of the resource to be shared. Optional. */
83
- shareContentId?: string;
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>;
84
131
  /** Link of the resource to be shared (should NOT includes origin tracing).
85
132
  * Optional, the current page URL is used by default. */
86
133
  shareLink?: string;
87
134
  /** Title of the resource to be shared that will be sent in notifications. */
88
135
  shareTitle: string;
89
- /** Title of the share modal. */
90
- shareFormTitle?: React.ReactNode;
91
- /** Copy for helper message to be displayed under share form input box.
92
- * If set to empty string, no helper message will be displayed
93
- */
94
- 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;
95
140
  /** To enable closing the modal on escape key press. */
96
141
  shouldCloseOnEscapePress?: boolean;
97
142
  /**
@@ -100,19 +145,9 @@ export type ShareDialogContainerProps = {
100
145
  */
101
146
  showFlags: (flags: Array<Flag>) => void;
102
147
  /**
103
- * Power the user picker with smarts. To enable smart user picker, the following props are used:
104
- * - `product`: 'jira' or 'confluence'
105
- * - `loggedInAccountId`: if not provided, defaults to obtaining from request context
106
- * - `cloudId`
107
- */
108
- enableSmartUserPicker?: boolean;
109
- /**
110
- * The userId of the sharer. If not provided, smart user picker
111
- * defaults it to the value 'Context'
112
- * which will tell the recommendation service to extract the
113
- * value from the request context.
148
+ * Optionally sets a tabIndex value if you need to set focus
114
149
  */
115
- loggedInAccountId?: string;
150
+ tabIndex?: number;
116
151
  /** Appearance of the share modal trigger button */
117
152
  triggerButtonAppearance?: IconButtonProps['appearance'];
118
153
  /** Share button Icon */
@@ -123,49 +158,14 @@ export type ShareDialogContainerProps = {
123
158
  triggerButtonTooltipPosition?: TooltipPosition;
124
159
  /** Custom text of the tooltip on share modal trigger button. */
125
160
  triggerButtonTooltipText?: React.ReactNode;
126
- /** Message to be appended to the modal. */
127
- bottomMessage?: React.ReactNode;
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;
128
165
  /** @deprecated Use the `shortLinkData` prop instead.
129
166
  *
130
167
  * Whether we should use the Atlassian Url Shortener or not.
131
168
  * Note that all products may not be supported. */
132
169
  useUrlShortener?: boolean;
133
- /** Action that will be performed by the recipient when he/she receives the notification. */
134
- shareeAction?: 'view' | 'edit';
135
- /**
136
- * Optional, this prop can be `jira` or `confluence`. Default value is `confluence`.
137
- * We use this prop to control different text messages in UI.
138
- */
139
- product?: ProductName;
140
- productAttributes?: SmartUserPickerProps['productAttributes'];
141
- /**
142
- * Header for the share dialog.
143
- */
144
- customHeader?: React.ReactNode;
145
- /**
146
- * Footer for the share dialog.
147
- */
148
- customFooter?: React.ReactNode;
149
- userPickerOptions?: UserPickerOptions;
150
- onUserSelectionChange?: (value: Value) => void;
151
- shareFieldsFooter?: React.ReactNode;
152
- isCopyDisabled?: boolean;
153
- isPublicLink?: boolean;
154
- integrationMode?: IntegrationMode;
155
- isMenuItemSelected?: boolean;
156
- shareIntegrations?: Array<Integration>;
157
- additionalTabs?: Array<AdditionalTab>;
158
- builtInTabContentWidth?: number;
159
- /**
160
- * Optionally sets a tabIndex value if you need to set focus
161
- */
162
- tabIndex?: number;
163
- copyTooltipText?: string;
164
- isBrowseUsersDisabled?: boolean;
165
170
  workspaceAri?: string;
166
- isSubmitShareDisabled?: boolean;
167
- isExtendedShareDialogEnabled?: boolean;
168
- additionalUserFields?: React.ReactNode;
169
- onSubmit?: (formValues: ShareData) => void | Promise<void>;
170
- CustomSubmitButton?: React.FC<RenderCustomSubmitButtonProps>;
171
171
  };
@@ -9,10 +9,10 @@ import type { ShareDialogContainerProps } from './ShareDialogContainer';
9
9
  import type { Integration } from './ShareEntities';
10
10
  export type RenderCustomTriggerButton = (args: {
11
11
  error?: ShareError;
12
+ iconBefore?: React.ComponentType<NewCoreIconProps>;
12
13
  isDisabled?: boolean;
13
14
  isSelected?: boolean;
14
15
  onClick: () => void;
15
- iconBefore?: React.ComponentType<NewCoreIconProps>;
16
16
  }, triggerProps: TriggerProps) => React.ReactNode;
17
17
  export type DialogPlacement = Placement;
18
18
  /**
@@ -21,27 +21,27 @@ export type DialogPlacement = Placement;
21
21
  */
22
22
  export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
23
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'> & {
24
- config?: ConfigResponse;
25
- isFetchingConfig?: boolean;
24
+ analyticsDecorator?: (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
26
25
  children?: RenderCustomTriggerButton;
26
+ config?: ConfigResponse;
27
27
  copyLink: string;
28
- analyticsDecorator?: (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
29
- isDisabled?: boolean;
30
- onShareSubmit?: (shareContentState: ShareData) => Promise<any>;
31
28
  copyLinkOrigin?: OriginTracing;
32
29
  formShareOrigin?: OriginTracing;
30
+ isDisabled?: boolean;
31
+ isFetchingConfig?: boolean;
32
+ onShareSubmit?: (shareContentState: ShareData) => Promise<any>;
33
33
  submitButtonLabel?: React.ReactNode;
34
34
  };
35
35
  export type ShareDialogWithTriggerStates = {
36
- isLoading: boolean;
36
+ defaultValue: ShareData;
37
+ ignoreIntermediateState: boolean;
37
38
  isDialogOpen: boolean;
39
+ isLoading: boolean;
40
+ isMenuItemSelected: boolean;
38
41
  isSharing: boolean;
39
- shareError?: ShareError;
40
- ignoreIntermediateState: boolean;
41
- defaultValue: ShareData;
42
42
  isUsingSplitButton: boolean;
43
- showIntegrationForm: boolean;
44
43
  selectedIntegration: Integration | null;
44
+ shareError?: ShareError;
45
+ showIntegrationForm: boolean;
45
46
  tabIndex: number;
46
- isMenuItemSelected: boolean;
47
47
  };
@@ -10,13 +10,13 @@ export type Comment = {
10
10
  value: string;
11
11
  };
12
12
  export type MetaData = {
13
- productId: string;
14
13
  atlOriginId: string;
14
+ productId: string;
15
15
  shareeAction?: 'view' | 'edit';
16
16
  };
17
17
  export type ContentProps = {
18
- onClose: () => void;
19
18
  changeTab?: (index: TabType) => void;
19
+ onClose: () => void;
20
20
  };
21
21
  export declare enum TabType {
22
22
  default = 0,
@@ -24,12 +24,12 @@ export declare enum TabType {
24
24
  }
25
25
  export type MenuType = 'none' | 'default' | 'Slack';
26
26
  export type Integration = {
27
- type: string;
28
- Icon: React.ComponentType;
29
27
  Content: React.ComponentType<ContentProps>;
28
+ Icon: React.ComponentType;
29
+ type: string;
30
30
  };
31
31
  export type IntegrationMode = 'tabs' | 'split' | 'menu' | 'off';
32
32
  export type AdditionalTab = {
33
- label: string;
34
33
  Content: React.ComponentType<ContentProps>;
34
+ label: string;
35
35
  };
@@ -6,30 +6,30 @@ import type { ShareDialogContainerProps } from './ShareDialogContainer';
6
6
  import { type MenuType } from './ShareEntities';
7
7
  export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & {
8
8
  config?: ConfigResponse;
9
- isFetchingConfig?: boolean;
9
+ Content?: React.ReactNode;
10
10
  copyLink: string;
11
- isSharing?: boolean;
12
- shareError?: ShareError;
13
- submitButtonLabel?: React.ReactNode;
14
- title?: React.ReactNode;
15
- showTitle?: boolean;
16
- helperMessage?: string;
17
11
  defaultValue?: ShareData;
18
- product?: ProductName;
19
12
  fieldsFooter?: React.ReactNode;
20
- selectPortalRef?: React.Ref<HTMLDivElement>;
13
+ handleCloseDialog?: () => void;
14
+ helperMessage?: string;
21
15
  isDisabled?: boolean;
16
+ isFetchingConfig?: boolean;
17
+ isSharing?: boolean;
22
18
  isSplitButton?: boolean;
19
+ isSubmitShareDisabled?: boolean;
23
20
  loadOptions?: LoadOptions;
21
+ onDismiss?: (data: ShareData) => void;
24
22
  onLinkCopy?: (link: string) => void;
23
+ onMenuItemChange?: (menuItem: MenuType) => void;
25
24
  onSubmit?: (data: ShareData) => void;
26
- onDismiss?: (data: ShareData) => void;
27
- onUserInputChange?: (query?: string, sessionId?: string) => void;
28
25
  onTabChange?: (index: number) => void;
29
- onMenuItemChange?: (menuItem: MenuType) => void;
26
+ onUserInputChange?: (query?: string, sessionId?: string) => void;
27
+ product?: ProductName;
30
28
  selectedMenuItem?: number;
31
- Content?: React.ReactNode;
32
- handleCloseDialog?: () => void;
33
- isSubmitShareDisabled?: boolean;
29
+ selectPortalRef?: React.Ref<HTMLDivElement>;
30
+ shareError?: ShareError;
31
+ showTitle?: boolean;
32
+ submitButtonLabel?: React.ReactNode;
33
+ title?: React.ReactNode;
34
34
  };
35
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,25 +1,25 @@
1
1
  import { type MessageDescriptor } from 'react-intl-next';
2
2
  import type { Props as SmartUserPickerProps } from '@atlaskit/smart-user-picker';
3
3
  export type UserPickerOptions = Pick<SmartUserPickerProps, 'onFocus' | 'header' | 'includeNonLicensedUsers'> & {
4
- /** Message to be shown when the menu is open but no options are provided.
5
- * If message is null, no message will be displayed.
6
- * If message is undefined, default message will be displayed.
4
+ /**
5
+ * Label message for the user picker.
7
6
  */
8
- noOptionsMessageHandler?: ((value: {
9
- inputValue: string;
10
- isPublicLink?: boolean;
11
- allowEmail?: boolean;
12
- }) => string | null | React.ReactNode) | null;
7
+ getLabelMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
13
8
  /**
14
9
  * Placeholder message for the user picker.
15
10
  */
16
11
  getPlaceholderMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
17
- /**
18
- * Label message for the user picker.
19
- */
20
- getLabelMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
21
12
  /**
22
13
  * Message to be shown when required validation is shown in the user picker.
23
14
  */
24
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;
25
25
  };
@@ -1,9 +1,9 @@
1
1
  export interface ShortenRequest {
2
2
  cloudId?: string;
3
+ originId?: string;
4
+ params: Record<string, string>;
3
5
  product: string;
4
6
  type: string;
5
- params: Record<string, string>;
6
- originId?: string;
7
7
  }
8
8
  export interface ShortenResponse {
9
9
  shortUrl: string;
@@ -5,8 +5,8 @@ export type ShareResponse = {
5
5
  shareRequestId: string;
6
6
  };
7
7
  export interface ShareClient {
8
- share: ShareRequest;
9
8
  getConfig(cloudId: string): Promise<ConfigResponse>;
9
+ share: ShareRequest;
10
10
  }
11
11
  export type ConfigResponse = {
12
12
  disableSharingToEmails?: boolean;
@@ -8,20 +8,20 @@ import { type TriggerProps } from '@atlaskit/popup';
8
8
  export declare const AUTO_DISMISS_MS: number;
9
9
  export declare const messageContainerStyle: import("@emotion/react").SerializedStyles;
10
10
  type InputProps = {
11
- text: string;
12
11
  label: string;
12
+ text: string;
13
13
  };
14
14
  export declare const HiddenInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
15
15
  export type Props = {
16
- onLinkCopy?: (link: string) => void;
17
- link: string;
18
- isDisabled?: boolean;
19
- copyTooltipText?: string;
20
16
  children?: string | ReactElement;
21
- copyLinkButtonText: string;
22
17
  copiedToClipboardText: string;
18
+ copyLinkButtonText: string;
19
+ copyTooltipText?: string;
23
20
  iconBefore?: ReactElement;
21
+ isDisabled?: boolean;
24
22
  isExtendedShareDialogEnabled?: boolean;
23
+ link: string;
24
+ onLinkCopy?: (link: string) => void;
25
25
  };
26
26
  export type State = {
27
27
  shouldShowCopiedMessage: boolean;
@@ -2,20 +2,20 @@ import React, { type ReactElement } from 'react';
2
2
  import { type TriggerProps } from '@atlaskit/popup';
3
3
  export declare const AUTO_DISMISS_MS: number;
4
4
  type InputProps = {
5
- text: string;
6
5
  label: string;
6
+ text: string;
7
7
  };
8
8
  export declare const HiddenInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
9
9
  export type Props = {
10
- onLinkCopy?: (link: string) => void;
11
- link: string;
12
- isDisabled?: boolean;
13
- copyTooltipText?: string;
14
10
  children?: string | ReactElement;
15
- copyLinkButtonText: string;
16
11
  copiedToClipboardText: string;
12
+ copyLinkButtonText: string;
13
+ copyTooltipText?: string;
17
14
  iconBefore?: ReactElement;
15
+ isDisabled?: boolean;
18
16
  isExtendedShareDialogEnabled?: boolean;
17
+ link: string;
18
+ onLinkCopy?: (link: string) => void;
19
19
  };
20
20
  export type State = {
21
21
  shouldShowCopiedMessage: boolean;
@@ -5,8 +5,8 @@
5
5
  import React from 'react';
6
6
  import { type CustomThemeButtonProps } from '@atlaskit/button/types';
7
7
  type Props = CustomThemeButtonProps & {
8
- text: React.ReactNode;
9
8
  IntegrationIcon: React.ComponentType;
9
+ text: React.ReactNode;
10
10
  textColor?: string;
11
11
  };
12
12
  declare const IntegrationButton: React.FC<Props>;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { type ButtonProps } from '@atlaskit/button/new';
3
3
  type Props = {
4
- text: React.ReactNode;
5
4
  IntegrationIcon: React.ComponentType;
5
+ text: React.ReactNode;
6
6
  } & Pick<ButtonProps, 'onClick'>;
7
7
  declare const IntegrationButton: {
8
8
  (props: Props): React.JSX.Element;
@@ -7,8 +7,8 @@ import { jsx } from '@emotion/react';
7
7
  import { type ContentProps } from '../types';
8
8
  export declare const formWrapperStyle: import("@emotion/react").SerializedStyles;
9
9
  export type IntegrationFormProps = {
10
+ changeTab?: (index: number) => void;
10
11
  Content: React.ComponentType<ContentProps> | null;
11
12
  onIntegrationClose?: () => void;
12
- changeTab?: (index: number) => void;
13
13
  };
14
14
  export declare const IntegrationForm: ({ Content, onIntegrationClose, changeTab, }: IntegrationFormProps) => jsx.JSX.Element;
@@ -3,15 +3,15 @@ import type { LoadOptions } from '@atlaskit/smart-user-picker';
3
3
  import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
4
4
  import { type IntegrationFormProps } from '../IntegrationForm';
5
5
  export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
6
- onLinkCopy: () => void;
6
+ loadOptions?: LoadOptions;
7
7
  onDismiss: (data: ShareData) => void;
8
+ onLinkCopy: () => void;
9
+ onMenuItemChange: (menuType: MenuType) => void;
8
10
  onSubmit: (data: ShareData) => void;
9
11
  onTabChange: (index: number) => void;
10
- onMenuItemChange: (menuType: MenuType) => void;
11
- loadOptions?: LoadOptions;
12
12
  selectPortalRef: any;
13
- showTitle: boolean;
14
13
  setIsLoading: (isLoading: boolean) => void;
14
+ showTitle: boolean;
15
15
  };
16
16
  /**
17
17
  * A Share form content which is lazy-loaded.
@@ -3,15 +3,15 @@ import type { LoadOptions } from '@atlaskit/smart-user-picker';
3
3
  import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
4
4
  import { type IntegrationFormProps } from '../IntegrationForm';
5
5
  export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
6
- onLinkCopy: () => void;
6
+ loadOptions?: LoadOptions;
7
7
  onDismiss: (data: ShareData) => void;
8
+ onLinkCopy: () => void;
9
+ onMenuItemChange: (menuType: MenuType) => void;
8
10
  onSubmit: (data: ShareData) => void;
9
11
  onTabChange: (index: number) => void;
10
- onMenuItemChange: (menuType: MenuType) => void;
11
- loadOptions?: LoadOptions;
12
12
  selectPortalRef: any;
13
- showTitle: boolean;
14
13
  setIsLoading: (isLoading: boolean) => void;
14
+ showTitle: boolean;
15
15
  };
16
16
  /**
17
17
  * A Share form content which is lazy-loaded.
@@ -2,14 +2,14 @@ import React from 'react';
2
2
  import { type Appearance } from '@atlaskit/button/types';
3
3
  export type Props = {
4
4
  appearance?: Appearance;
5
+ 'aria-haspopup'?: boolean;
6
+ autoFocus?: boolean;
5
7
  iconBefore?: React.ReactChild;
8
+ isDisabled?: boolean;
6
9
  isLoading?: boolean;
7
10
  isSelected?: boolean;
8
- isDisabled?: boolean;
9
11
  onClick: (e: React.MouseEvent<HTMLElement>) => void;
10
12
  text?: React.ReactNode;
11
- autoFocus?: boolean;
12
- 'aria-haspopup'?: boolean;
13
13
  };
14
14
  export declare const ShareButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
15
15
  export default ShareButton;