@atlaskit/share 4.2.0 → 4.2.1

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 (143) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/clients/package.json +2 -2
  3. package/copy-link-button/package.json +2 -2
  4. package/dist/cjs/components/analytics/analytics.js +1 -1
  5. package/dist/cjs/i18n/cs.js +37 -37
  6. package/dist/cjs/i18n/da.js +37 -37
  7. package/dist/cjs/i18n/de.js +37 -37
  8. package/dist/cjs/i18n/en.js +37 -37
  9. package/dist/cjs/i18n/en_GB.js +37 -37
  10. package/dist/cjs/i18n/es.js +37 -37
  11. package/dist/cjs/i18n/fi.js +37 -37
  12. package/dist/cjs/i18n/fr.js +37 -37
  13. package/dist/cjs/i18n/hu.js +37 -37
  14. package/dist/cjs/i18n/it.js +37 -37
  15. package/dist/cjs/i18n/ja.js +37 -37
  16. package/dist/cjs/i18n/ko.js +37 -37
  17. package/dist/cjs/i18n/nb.js +37 -37
  18. package/dist/cjs/i18n/nl.js +37 -37
  19. package/dist/cjs/i18n/pl.js +37 -37
  20. package/dist/cjs/i18n/pt_BR.js +37 -37
  21. package/dist/cjs/i18n/ru.js +37 -37
  22. package/dist/cjs/i18n/sv.js +37 -37
  23. package/dist/cjs/i18n/th.js +37 -37
  24. package/dist/cjs/i18n/tr.js +37 -37
  25. package/dist/cjs/i18n/uk.js +37 -37
  26. package/dist/cjs/i18n/vi.js +37 -37
  27. package/dist/cjs/i18n/zh.js +37 -37
  28. package/dist/cjs/i18n/zh_TW.js +37 -37
  29. package/dist/cjs/version.json +1 -1
  30. package/dist/es2019/components/analytics/analytics.js +1 -1
  31. package/dist/es2019/i18n/cs.js +37 -37
  32. package/dist/es2019/i18n/da.js +37 -37
  33. package/dist/es2019/i18n/de.js +37 -37
  34. package/dist/es2019/i18n/en.js +37 -37
  35. package/dist/es2019/i18n/en_GB.js +37 -37
  36. package/dist/es2019/i18n/es.js +37 -37
  37. package/dist/es2019/i18n/fi.js +37 -37
  38. package/dist/es2019/i18n/fr.js +37 -37
  39. package/dist/es2019/i18n/hu.js +37 -37
  40. package/dist/es2019/i18n/it.js +37 -37
  41. package/dist/es2019/i18n/ja.js +37 -37
  42. package/dist/es2019/i18n/ko.js +37 -37
  43. package/dist/es2019/i18n/nb.js +37 -37
  44. package/dist/es2019/i18n/nl.js +37 -37
  45. package/dist/es2019/i18n/pl.js +37 -37
  46. package/dist/es2019/i18n/pt_BR.js +37 -37
  47. package/dist/es2019/i18n/ru.js +37 -37
  48. package/dist/es2019/i18n/sv.js +37 -37
  49. package/dist/es2019/i18n/th.js +37 -37
  50. package/dist/es2019/i18n/tr.js +37 -37
  51. package/dist/es2019/i18n/uk.js +37 -37
  52. package/dist/es2019/i18n/vi.js +37 -37
  53. package/dist/es2019/i18n/zh.js +37 -37
  54. package/dist/es2019/i18n/zh_TW.js +37 -37
  55. package/dist/es2019/version.json +1 -1
  56. package/dist/esm/components/analytics/analytics.js +1 -1
  57. package/dist/esm/i18n/cs.js +37 -37
  58. package/dist/esm/i18n/da.js +37 -37
  59. package/dist/esm/i18n/de.js +37 -37
  60. package/dist/esm/i18n/en.js +37 -37
  61. package/dist/esm/i18n/en_GB.js +37 -37
  62. package/dist/esm/i18n/es.js +37 -37
  63. package/dist/esm/i18n/fi.js +37 -37
  64. package/dist/esm/i18n/fr.js +37 -37
  65. package/dist/esm/i18n/hu.js +37 -37
  66. package/dist/esm/i18n/it.js +37 -37
  67. package/dist/esm/i18n/ja.js +37 -37
  68. package/dist/esm/i18n/ko.js +37 -37
  69. package/dist/esm/i18n/nb.js +37 -37
  70. package/dist/esm/i18n/nl.js +37 -37
  71. package/dist/esm/i18n/pl.js +37 -37
  72. package/dist/esm/i18n/pt_BR.js +37 -37
  73. package/dist/esm/i18n/ru.js +37 -37
  74. package/dist/esm/i18n/sv.js +37 -37
  75. package/dist/esm/i18n/th.js +37 -37
  76. package/dist/esm/i18n/tr.js +37 -37
  77. package/dist/esm/i18n/uk.js +37 -37
  78. package/dist/esm/i18n/vi.js +37 -37
  79. package/dist/esm/i18n/zh.js +37 -37
  80. package/dist/esm/i18n/zh_TW.js +37 -37
  81. package/dist/esm/version.json +1 -1
  82. package/dist/types/clients/ShareServiceClient.d.ts +3 -3
  83. package/dist/types/components/CommentField.d.ts +1 -1
  84. package/dist/types/components/CopyLinkButton.d.ts +3 -3
  85. package/dist/types/components/IntegrationButton.d.ts +1 -1
  86. package/dist/types/components/IntegrationForm.d.ts +1 -1
  87. package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +1 -1
  88. package/dist/types/components/ShareButton.d.ts +1 -1
  89. package/dist/types/components/ShareDialogContainer.d.ts +1 -1
  90. package/dist/types/components/ShareDialogWithTrigger.d.ts +1 -1
  91. package/dist/types/components/ShareForm.d.ts +2 -2
  92. package/dist/types/components/ShareFormWrapper/ShareFormWrapper.d.ts +1 -1
  93. package/dist/types/components/ShareHeader.d.ts +1 -1
  94. package/dist/types/components/SplitButton.d.ts +1 -1
  95. package/dist/types/components/UserPickerField.d.ts +1 -1
  96. package/dist/types/components/analytics/analytics.d.ts +4 -4
  97. package/dist/types/components/utils.d.ts +3 -4
  98. package/dist/types/i18n/cs.d.ts +39 -39
  99. package/dist/types/i18n/da.d.ts +39 -39
  100. package/dist/types/i18n/de.d.ts +39 -39
  101. package/dist/types/i18n/en.d.ts +39 -39
  102. package/dist/types/i18n/en_GB.d.ts +39 -39
  103. package/dist/types/i18n/en_ZZ.d.ts +6 -6
  104. package/dist/types/i18n/es.d.ts +39 -39
  105. package/dist/types/i18n/et.d.ts +6 -6
  106. package/dist/types/i18n/fi.d.ts +39 -39
  107. package/dist/types/i18n/fr.d.ts +39 -39
  108. package/dist/types/i18n/hu.d.ts +39 -39
  109. package/dist/types/i18n/is.d.ts +6 -6
  110. package/dist/types/i18n/it.d.ts +39 -39
  111. package/dist/types/i18n/ja.d.ts +39 -39
  112. package/dist/types/i18n/ko.d.ts +39 -39
  113. package/dist/types/i18n/languages.d.ts +6 -6
  114. package/dist/types/i18n/nb.d.ts +39 -39
  115. package/dist/types/i18n/nl.d.ts +39 -39
  116. package/dist/types/i18n/pl.d.ts +39 -39
  117. package/dist/types/i18n/pt_BR.d.ts +39 -39
  118. package/dist/types/i18n/pt_PT.d.ts +6 -6
  119. package/dist/types/i18n/ro.d.ts +6 -6
  120. package/dist/types/i18n/ru.d.ts +39 -39
  121. package/dist/types/i18n/sk.d.ts +6 -6
  122. package/dist/types/i18n/sv.d.ts +39 -39
  123. package/dist/types/i18n/th.d.ts +39 -39
  124. package/dist/types/i18n/tr.d.ts +39 -39
  125. package/dist/types/i18n/uk.d.ts +39 -39
  126. package/dist/types/i18n/vi.d.ts +39 -39
  127. package/dist/types/i18n/zh.d.ts +39 -39
  128. package/dist/types/i18n/zh_TW.d.ts +39 -39
  129. package/dist/types/types/Flag.d.ts +3 -3
  130. package/dist/types/types/OriginTracing.d.ts +5 -5
  131. package/dist/types/types/Products.d.ts +2 -2
  132. package/dist/types/types/ShareButton.d.ts +2 -2
  133. package/dist/types/types/ShareContentState.d.ts +3 -3
  134. package/dist/types/types/ShareDialogContainer.d.ts +1 -1
  135. package/dist/types/types/ShareDialogWithTrigger.d.ts +5 -5
  136. package/dist/types/types/ShareEntities.d.ts +6 -6
  137. package/dist/types/types/ShareForm.d.ts +1 -1
  138. package/dist/types/types/User.d.ts +3 -3
  139. package/dist/types/types/form.d.ts +1 -1
  140. package/dist/types/types/index.d.ts +1 -1
  141. package/dist/types/util/i18n-util.d.ts +2 -2
  142. package/package.json +12 -4
  143. package/tmp/api-report-tmp.d.ts +319 -0
@@ -1,46 +1,46 @@
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.no-permissions": string;
11
- "fabric.elements.share.form.public.send": string;
12
- "fabric.elements.share.form.public.share": string;
13
- "fabric.elements.share.form.retry": string;
14
- "fabric.elements.share.form.send": string;
15
- "fabric.elements.share.form.share": string;
16
- "fabric.elements.share.form.title": string;
17
- "fabric.elements.share.form.user-picker.add-more": string;
18
- "fabric.elements.share.form.user-picker.no-options.existingUserOnly": string;
19
- "fabric.elements.share.form.user-picker.no-options.generic": string;
20
- "fabric.elements.share.form.user-picker.placeholder.emailOnly": string;
21
- "fabric.elements.share.form.user-picker.placeholder.existingUserOnly": string;
22
- "fabric.elements.share.form.user-picker.placeholder.generic": string;
23
- "fabric.elements.share.form.user-picker.placeholder.jira": string;
24
- "fabric.elements.share.form.user-picker.placholder.generic.existingUserOnly": string;
25
- "fabric.elements.share.form.user-picker.validation.required": string;
26
- "fabric.elements.share.form.user-picker.validation.required.email-only": string;
27
- "fabric.elements.share.form.user-picker.validation.required.existingUserOnly": string;
28
- "fabric.elements.share.form.user-picker.validation.required.jira": string;
29
- "fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly": string;
30
- "fabric.elements.share.in.integration.button": string;
31
- "fabric.elements.share.main.tab.text.confluence": string;
32
- "fabric.elements.share.main.tab.text.jira": string;
33
- "fabric.elements.share.success.message": string;
34
- "fabric.elements.share.to.integration.button": string;
35
- "fabric.elements.share.trigger.button.icon.label": string;
36
- "fabric.elements.share.trigger.button.invite.text": string;
37
- "fabric.elements.share.trigger.button.text": string;
38
- "fabric.elements.share.trigger.button.tooltip.text": string;
39
- };
40
1
  /**
41
2
  * NOTE:
42
3
  *
43
4
  * This file is automatically generated by Traduki 2.0.
44
5
  * DO NOT CHANGE IT BY HAND or your changes will be lost.
45
6
  */
7
+ declare const _default: {
8
+ 'fabric.elements.share.copied.to.clipboard.message': string;
9
+ 'fabric.elements.share.copylink.button.text': string;
10
+ 'fabric.elements.share.copypubliclink.button.text': string;
11
+ 'fabric.elements.share.failure.icon.label': string;
12
+ 'fabric.elements.share.failure.message': string;
13
+ 'fabric.elements.share.form.comment.placeholder': string;
14
+ 'fabric.elements.share.form.info.message.no.invite.confluence': string;
15
+ 'fabric.elements.share.form.info.message.no.invite.jira': string;
16
+ 'fabric.elements.share.form.no-permissions': string;
17
+ 'fabric.elements.share.form.public.send': string;
18
+ 'fabric.elements.share.form.public.share': string;
19
+ 'fabric.elements.share.form.retry': string;
20
+ 'fabric.elements.share.form.send': string;
21
+ 'fabric.elements.share.form.share': string;
22
+ 'fabric.elements.share.form.title': string;
23
+ 'fabric.elements.share.form.user-picker.add-more': string;
24
+ 'fabric.elements.share.form.user-picker.no-options.existingUserOnly': string;
25
+ 'fabric.elements.share.form.user-picker.no-options.generic': string;
26
+ 'fabric.elements.share.form.user-picker.placeholder.emailOnly': string;
27
+ 'fabric.elements.share.form.user-picker.placeholder.existingUserOnly': string;
28
+ 'fabric.elements.share.form.user-picker.placeholder.generic': string;
29
+ 'fabric.elements.share.form.user-picker.placeholder.jira': string;
30
+ 'fabric.elements.share.form.user-picker.placholder.generic.existingUserOnly': string;
31
+ 'fabric.elements.share.form.user-picker.validation.required': string;
32
+ 'fabric.elements.share.form.user-picker.validation.required.email-only': string;
33
+ 'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': string;
34
+ 'fabric.elements.share.form.user-picker.validation.required.jira': string;
35
+ 'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': string;
36
+ 'fabric.elements.share.in.integration.button': string;
37
+ 'fabric.elements.share.main.tab.text.confluence': string;
38
+ 'fabric.elements.share.main.tab.text.jira': string;
39
+ 'fabric.elements.share.success.message': string;
40
+ 'fabric.elements.share.to.integration.button': string;
41
+ 'fabric.elements.share.trigger.button.icon.label': string;
42
+ 'fabric.elements.share.trigger.button.invite.text': string;
43
+ 'fabric.elements.share.trigger.button.text': string;
44
+ 'fabric.elements.share.trigger.button.tooltip.text': string;
45
+ };
46
46
  export default _default;
@@ -1,12 +1,12 @@
1
1
  export declare const OBJECT_SHARED = "object-shared";
2
2
  export declare const ADMIN_NOTIFIED = "admin-notified";
3
- export declare type FlagType = 'object-shared' | 'admin-notified';
4
- export declare type MessageDescriptor = {
3
+ export type FlagType = 'object-shared' | 'admin-notified';
4
+ export type MessageDescriptor = {
5
5
  id: string;
6
6
  description: string;
7
7
  defaultMessage: string;
8
8
  };
9
- export declare type Flag = {
9
+ export type Flag = {
10
10
  appearance: 'success';
11
11
  title: MessageDescriptor;
12
12
  type: FlagType;
@@ -1,17 +1,17 @@
1
- export declare type OriginTracingWithIdGenerated = {
1
+ export type OriginTracingWithIdGenerated = {
2
2
  originIdGenerated: string;
3
3
  originProduct: string;
4
4
  };
5
- export declare type OriginTracingForSubSequentEvents = {
5
+ export type OriginTracingForSubSequentEvents = {
6
6
  originId: string;
7
7
  originProduct: string;
8
8
  };
9
- export declare type OriginAnalyticAttributes = {
9
+ export type OriginAnalyticAttributes = {
10
10
  hasGeneratedId: boolean;
11
11
  };
12
- export declare type OriginTracing = {
12
+ export type OriginTracing = {
13
13
  id: string;
14
14
  addToUrl: (link: string) => string;
15
15
  toAnalyticsAttributes: (attrs: OriginAnalyticAttributes) => OriginTracingWithIdGenerated | OriginTracingForSubSequentEvents;
16
16
  };
17
- export declare type OriginTracingFactory = () => OriginTracing;
17
+ export type OriginTracingFactory = () => OriginTracing;
@@ -1,3 +1,3 @@
1
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';
2
+ export type ProductId = 'bitbucket' | 'confluence' | 'jira-addon' | 'jira-core' | 'jira-platform' | 'jira-polaris' | 'jira-portfolio' | 'jira-servicedesk' | 'jira-software' | 'jira-unknown' | 'trello';
3
+ export type ProductName = 'jira' | 'confluence';
@@ -1,2 +1,2 @@
1
- export declare type ShareButtonStyle = 'icon-only' | 'icon-with-text' | 'text-only';
2
- export declare type TooltipPosition = 'top' | 'right' | 'bottom' | 'left' | 'mouse';
1
+ export type ShareButtonStyle = 'icon-only' | 'icon-with-text' | 'text-only';
2
+ export type TooltipPosition = 'top' | 'right' | 'bottom' | 'left' | 'mouse';
@@ -1,14 +1,14 @@
1
1
  import { OptionData } from '@atlaskit/smart-user-picker';
2
2
  import { Comment } from './ShareEntities';
3
3
  import { User } from './User';
4
- export declare type ShareContentState = {
4
+ export type ShareContentState = {
5
5
  users: User[];
6
6
  comment?: Comment;
7
7
  };
8
- export declare type ShareError = {
8
+ export type ShareError = {
9
9
  message: string;
10
10
  };
11
- export declare type ShareData = {
11
+ export type ShareData = {
12
12
  users: OptionData[];
13
13
  comment: Comment;
14
14
  };
@@ -10,7 +10,7 @@ import type { ProductId, ProductName } from './Products';
10
10
  import type { ShareButtonStyle, TooltipPosition } from './ShareButton';
11
11
  import type { DialogPlacement, RenderCustomTriggerButton } from './ShareDialogWithTrigger';
12
12
  import type { Integration, IntegrationMode } from './ShareEntities';
13
- export declare type ShareDialogContainerProps = {
13
+ export type ShareDialogContainerProps = {
14
14
  onTriggerButtonClick?: () => void;
15
15
  onDialogOpen?: () => void;
16
16
  onDialogClose?: () => void;
@@ -7,19 +7,19 @@ import type { OriginTracing } from './OriginTracing';
7
7
  import type { ShareData, ShareError } from './ShareContentState';
8
8
  import type { ShareDialogContainerProps } from './ShareDialogContainer';
9
9
  import type { Integration } from './ShareEntities';
10
- export declare type RenderCustomTriggerButton = (args: {
10
+ export type RenderCustomTriggerButton = (args: {
11
11
  error?: ShareError;
12
12
  isDisabled?: boolean;
13
13
  isSelected?: boolean;
14
14
  onClick: () => void;
15
15
  }, triggerProps: TriggerProps) => React.ReactNode;
16
- export declare type DialogPlacement = Placement;
16
+ export type DialogPlacement = Placement;
17
17
  /**
18
18
  * Ideally, this would be Pick<PopupProps, ''>, but that doesn't play well
19
19
  * with the demo page and clearly visible options on that page.
20
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' | 'isBrowseUsersDisabled'> & {
21
+ export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
22
+ export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled'> & {
23
23
  config?: ConfigResponse;
24
24
  isFetchingConfig?: boolean;
25
25
  children?: RenderCustomTriggerButton;
@@ -31,7 +31,7 @@ export declare type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps
31
31
  formShareOrigin?: OriginTracing;
32
32
  submitButtonLabel?: React.ReactNode;
33
33
  };
34
- export declare type ShareDialogWithTriggerStates = {
34
+ export type ShareDialogWithTriggerStates = {
35
35
  isLoading: boolean;
36
36
  isDialogOpen: boolean;
37
37
  isSharing: boolean;
@@ -1,20 +1,20 @@
1
1
  /// <reference types="react" />
2
- export declare type Content = {
2
+ export type Content = {
3
3
  ari: string;
4
4
  link: string;
5
5
  title: string;
6
6
  type: string;
7
7
  };
8
- export declare type Comment = {
8
+ export type Comment = {
9
9
  format: 'plain_text' | 'adf';
10
10
  value: string;
11
11
  };
12
- export declare type MetaData = {
12
+ export type MetaData = {
13
13
  productId: string;
14
14
  atlOriginId: string;
15
15
  shareeAction?: 'view' | 'edit';
16
16
  };
17
- export declare type IntegrationContentProps = {
17
+ export type IntegrationContentProps = {
18
18
  onClose: () => void;
19
19
  changeTab?: (index: TabType) => void;
20
20
  };
@@ -22,9 +22,9 @@ export declare enum TabType {
22
22
  default = 0,
23
23
  Slack = 1
24
24
  }
25
- export declare type Integration = {
25
+ export type Integration = {
26
26
  type: string;
27
27
  Icon: React.ComponentType;
28
28
  Content: React.ComponentType<IntegrationContentProps>;
29
29
  };
30
- export declare type IntegrationMode = 'tabs' | 'split' | 'off';
30
+ export type IntegrationMode = 'tabs' | 'split' | 'off';
@@ -4,7 +4,7 @@ import type { ConfigResponse } from '../clients/ShareServiceClient';
4
4
  import type { ProductName } from './Products';
5
5
  import type { ShareData, ShareError } from './ShareContentState';
6
6
  import type { ShareDialogContainerProps } from './ShareDialogContainer';
7
- export declare type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled'> & {
7
+ export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled'> & {
8
8
  config?: ConfigResponse;
9
9
  isFetchingConfig?: boolean;
10
10
  copyLink: string;
@@ -1,9 +1,9 @@
1
- export declare type UserWithId = {
1
+ export type UserWithId = {
2
2
  type: 'user' | 'group' | 'team' | 'custom';
3
3
  id: string;
4
4
  };
5
- export declare type UserWithEmail = {
5
+ export type UserWithEmail = {
6
6
  type: 'user';
7
7
  email: string;
8
8
  };
9
- export declare type User = UserWithId | UserWithEmail;
9
+ export type User = UserWithId | UserWithEmail;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare type FormChildrenArgs<T> = {
2
+ export type FormChildrenArgs<T> = {
3
3
  formProps: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
4
4
  getValues: () => T;
5
5
  };
@@ -10,7 +10,7 @@ export type { DialogPlacement, DialogBoundariesElement, RenderCustomTriggerButto
10
10
  export type { User, UserWithEmail, UserWithId } from './User';
11
11
  export type { Comment, Content, MetaData, Integration, IntegrationContentProps, } from './ShareEntities';
12
12
  export { TabType } from './ShareEntities';
13
- export declare type KeysOfType<T, TProp> = {
13
+ export type KeysOfType<T, TProp> = {
14
14
  [P in keyof T]: T[P] extends TProp ? P : never;
15
15
  }[keyof T];
16
16
  export type { ShareDialogContainerProps } from './ShareDialogContainer';
@@ -1,6 +1,6 @@
1
1
  import languages from '../i18n/languages';
2
- export declare type LangCode = keyof typeof languages | 'pt-BR' | 'pt-PT';
3
- declare type LocaleMessages = {
2
+ export type LangCode = keyof typeof languages | 'pt-BR' | 'pt-PT';
3
+ type LocaleMessages = {
4
4
  [key: string]: string;
5
5
  };
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "atlaskit:src": "src/index.ts",
16
24
  "atlassian": {
17
25
  "team": "People and Teams Collective",
@@ -42,7 +50,7 @@
42
50
  "@atlaskit/tabs": "^13.4.0",
43
51
  "@atlaskit/textarea": "^4.6.0",
44
52
  "@atlaskit/theme": "^12.5.0",
45
- "@atlaskit/tokens": "^1.3.0",
53
+ "@atlaskit/tokens": "^1.4.0",
46
54
  "@atlaskit/tooltip": "^17.8.0",
47
55
  "@atlaskit/ufo": "^0.2.0",
48
56
  "@atlaskit/user-picker": "^10.2.0",
@@ -61,7 +69,7 @@
61
69
  },
62
70
  "devDependencies": {
63
71
  "@atlaskit/docs": "^9.1.0",
64
- "@atlaskit/editor-test-helpers": "^18.2.0",
72
+ "@atlaskit/editor-test-helpers": "^18.3.0",
65
73
  "@atlaskit/flag": "^15.2.0",
66
74
  "@atlaskit/section-message": "^6.4.0",
67
75
  "@atlaskit/select": "^16.2.0",
@@ -72,7 +80,7 @@
72
80
  "enzyme-adapter-react-16": "^1.15.1",
73
81
  "enzyme-react-intl": "^2.0.6",
74
82
  "react": "^16.8.0",
75
- "typescript": "4.5.5"
83
+ "typescript": "~4.9.5"
76
84
  },
77
85
  "keywords": [
78
86
  "ui",
@@ -0,0 +1,319 @@
1
+ ## API Report File for "@atlaskit/share"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import type { Appearance } from '@atlaskit/button/types';
10
+ import type { IconProps } from '@atlaskit/icon';
11
+ import { jsx } from '@emotion/react';
12
+ import type { LoadOptions } from '@atlaskit/smart-user-picker';
13
+ import { OptionData } from '@atlaskit/smart-user-picker';
14
+ import type { Placement } from '@atlaskit/popper';
15
+ import { default as React_2 } from 'react';
16
+ import { ReactElement } from 'react';
17
+ import { TriggerProps } from '@atlaskit/popup';
18
+ import type { Value } from '@atlaskit/smart-user-picker';
19
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
20
+
21
+ // @public (undocumented)
22
+ export const ADMIN_NOTIFIED = "admin-notified";
23
+
24
+ // @public (undocumented)
25
+ type Comment_2 = {
26
+ format: 'adf' | 'plain_text';
27
+ value: string;
28
+ };
29
+ export { Comment_2 as Comment }
30
+
31
+ // @public (undocumented)
32
+ export type ConfigResponse = {
33
+ disableSharingToEmails?: boolean;
34
+ };
35
+
36
+ // @public (undocumented)
37
+ export type Content = {
38
+ ari: string;
39
+ link: string;
40
+ title: string;
41
+ type: string;
42
+ };
43
+
44
+ // @public (undocumented)
45
+ export class CopyLinkButton extends React_2.Component<Props, State> {
46
+ // (undocumented)
47
+ componentWillUnmount(): void;
48
+ // (undocumented)
49
+ render(): jsx.JSX.Element;
50
+ // (undocumented)
51
+ renderTriggerButton: (triggerProps: TriggerProps) => jsx.JSX.Element;
52
+ // (undocumented)
53
+ state: {
54
+ shouldShowCopiedMessage: boolean;
55
+ };
56
+ }
57
+
58
+ // @public (undocumented)
59
+ export type DialogContentState = {
60
+ users: OptionData[];
61
+ comment: Comment_2;
62
+ };
63
+
64
+ // @public (undocumented)
65
+ export type DialogPlacement = Placement;
66
+
67
+ // @public (undocumented)
68
+ export type Flag = {
69
+ appearance: 'success';
70
+ title: MessageDescriptor;
71
+ type: FlagType;
72
+ };
73
+
74
+ // @public (undocumented)
75
+ export type FlagType = 'admin-notified' | 'object-shared';
76
+
77
+ // @public (undocumented)
78
+ export type FormChildrenArgs<T> = {
79
+ formProps: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
80
+ getValues: () => T;
81
+ };
82
+
83
+ // @public (undocumented)
84
+ type Integration = {
85
+ type: string;
86
+ Icon: React.ComponentType;
87
+ Content: React.ComponentType<IntegrationContentProps>;
88
+ };
89
+
90
+ // @public (undocumented)
91
+ type IntegrationContentProps = {
92
+ onClose: () => void;
93
+ changeTab?: (index: TabType) => void;
94
+ };
95
+
96
+ // @public (undocumented)
97
+ type IntegrationMode = 'off' | 'split' | 'tabs';
98
+
99
+ // @public (undocumented)
100
+ export type KeysOfType<T, TProp> = {
101
+ [P in keyof T]: T[P] extends TProp ? P : never;
102
+ }[keyof T];
103
+
104
+ // @public (undocumented)
105
+ export type MessageDescriptor = {
106
+ id: string;
107
+ description: string;
108
+ defaultMessage: string;
109
+ };
110
+
111
+ // @public (undocumented)
112
+ export type MetaData = {
113
+ productId: string;
114
+ atlOriginId: string;
115
+ shareeAction?: 'edit' | 'view';
116
+ };
117
+
118
+ // @public (undocumented)
119
+ export const OBJECT_SHARED = "object-shared";
120
+
121
+ // @public (undocumented)
122
+ export type OriginAnalyticAttributes = {
123
+ hasGeneratedId: boolean;
124
+ };
125
+
126
+ // @public (undocumented)
127
+ export type OriginTracing = {
128
+ id: string;
129
+ addToUrl: (link: string) => string;
130
+ toAnalyticsAttributes: (attrs: OriginAnalyticAttributes) => OriginTracingForSubSequentEvents | OriginTracingWithIdGenerated;
131
+ };
132
+
133
+ // @public (undocumented)
134
+ export type OriginTracingFactory = () => OriginTracing;
135
+
136
+ // @public (undocumented)
137
+ export type OriginTracingForSubSequentEvents = {
138
+ originId: string;
139
+ originProduct: string;
140
+ };
141
+
142
+ // @public (undocumented)
143
+ export type OriginTracingWithIdGenerated = {
144
+ originIdGenerated: string;
145
+ originProduct: string;
146
+ };
147
+
148
+ // @public
149
+ export type ProductId = 'bitbucket' | 'confluence' | 'jira-addon' | 'jira-core' | 'jira-platform' | 'jira-polaris' | 'jira-portfolio' | 'jira-servicedesk' | 'jira-software' | 'jira-unknown' | 'trello';
150
+
151
+ // @public (undocumented)
152
+ export type ProductName = 'confluence' | 'jira';
153
+
154
+ // @public (undocumented)
155
+ type Props = {
156
+ onLinkCopy?: (link: string) => void;
157
+ link: string;
158
+ isDisabled?: boolean;
159
+ copyTooltipText?: string;
160
+ children?: ReactElement | string;
161
+ copyLinkButtonText: string;
162
+ copiedToClipboardText: string;
163
+ iconBefore?: ReactElement;
164
+ };
165
+
166
+ // @public (undocumented)
167
+ export type RenderCustomTriggerButton = (args: {
168
+ error?: ShareError;
169
+ isDisabled?: boolean;
170
+ isSelected?: boolean;
171
+ onClick: () => void;
172
+ }, triggerProps: TriggerProps) => React.ReactNode;
173
+
174
+ // @public (undocumented)
175
+ export type ShareButtonStyle = 'icon-only' | 'icon-with-text' | 'text-only';
176
+
177
+ // @public (undocumented)
178
+ interface ShareClient {
179
+ // (undocumented)
180
+ getConfig(cloudId: string): Promise<ConfigResponse>;
181
+ // (undocumented)
182
+ share(content: Content, recipients: User[], metadata: MetaData, comment?: Comment_2): Promise<ShareResponse>;
183
+ }
184
+
185
+ // @public (undocumented)
186
+ export type ShareContentState = {
187
+ users: User[];
188
+ comment?: Comment_2;
189
+ };
190
+
191
+ // @public (undocumented)
192
+ export const ShareDialogContainer: React_2.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "bottomMessage" | "cloudId" | "copyTooltipText" | "customFooter" | "dialogPlacement" | "dialogZIndex" | "formatCopyLink" | "integrationMode" | "isAutoOpenDialog" | "isBrowseUsersDisabled" | "isCopyDisabled" | "isPublicLink" | "loadUserOptions" | "loggedInAccountId" | "onDialogClose" | "onDialogOpen" | "onTriggerButtonClick" | "onUserSelectionChange" | "orgId" | "originTracingFactory" | "productId" | "renderCustomTriggerButton" | "shareAri" | "shareClient" | "shareContentType" | "shareFieldsFooter" | "shareFormHelperMessage" | "shareFormTitle" | "shareIntegrations" | "shareLink" | "shareTitle" | "shortLinkData" | "shouldCloseOnEscapePress" | "showFlags" | "tabIndex" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "urlShortenerClient" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
193
+ enableSmartUserPicker: boolean;
194
+ shareeAction: "edit" | "view";
195
+ product: string;
196
+ }, never>> & React_2.RefAttributes<any>>;
197
+
198
+ // @public (undocumented)
199
+ export type ShareDialogContainerProps = {
200
+ onTriggerButtonClick?: () => void;
201
+ onDialogOpen?: () => void;
202
+ onDialogClose?: () => void;
203
+ isAutoOpenDialog?: boolean;
204
+ shareClient?: ShareClient;
205
+ urlShortenerClient?: UrlShortenerClient;
206
+ shortLinkData?: ShortenRequest;
207
+ cloudId: string;
208
+ orgId?: string;
209
+ dialogPlacement?: DialogPlacement;
210
+ dialogZIndex?: number;
211
+ formatCopyLink?: (origin: OriginTracing, link: string) => string;
212
+ loadUserOptions?: LoadOptions;
213
+ originTracingFactory: OriginTracingFactory;
214
+ productId: ProductId;
215
+ renderCustomTriggerButton?: RenderCustomTriggerButton;
216
+ shareAri: string;
217
+ shareContentType: string;
218
+ shareLink?: string;
219
+ shareTitle: string;
220
+ shareFormTitle?: React.ReactNode;
221
+ shareFormHelperMessage?: string;
222
+ shouldCloseOnEscapePress?: boolean;
223
+ showFlags: (flags: Array<Flag>) => void;
224
+ enableSmartUserPicker?: boolean;
225
+ loggedInAccountId?: string;
226
+ triggerButtonAppearance?: Appearance;
227
+ triggerButtonIcon?: React.ComponentType<IconProps>;
228
+ triggerButtonStyle?: ShareButtonStyle;
229
+ triggerButtonTooltipPosition?: TooltipPosition;
230
+ triggerButtonTooltipText?: React.ReactNode;
231
+ bottomMessage?: React.ReactNode;
232
+ useUrlShortener?: boolean;
233
+ shareeAction?: 'edit' | 'view';
234
+ product?: ProductName;
235
+ customFooter?: React.ReactNode;
236
+ onUserSelectionChange?: (value: Value) => void;
237
+ shareFieldsFooter?: React.ReactNode;
238
+ isCopyDisabled?: boolean;
239
+ isPublicLink?: boolean;
240
+ integrationMode?: IntegrationMode;
241
+ shareIntegrations?: Array<Integration>;
242
+ tabIndex?: number;
243
+ copyTooltipText?: string;
244
+ isBrowseUsersDisabled?: boolean;
245
+ };
246
+
247
+ // @public (undocumented)
248
+ export type ShareError = {
249
+ message: string;
250
+ };
251
+
252
+ // @public (undocumented)
253
+ export type ShareRequest = (content: Content, recipients: User[], metadata: MetaData, comment?: Comment_2) => Promise<ShareResponse>;
254
+
255
+ // @public (undocumented)
256
+ export type ShareResponse = {
257
+ shareRequestId: string;
258
+ };
259
+
260
+ // @public (undocumented)
261
+ interface ShortenRequest {
262
+ // (undocumented)
263
+ cloudId?: string;
264
+ // (undocumented)
265
+ originId?: string;
266
+ // (undocumented)
267
+ params: Record<string, string>;
268
+ // (undocumented)
269
+ product: string;
270
+ // (undocumented)
271
+ type: string;
272
+ }
273
+
274
+ // @public (undocumented)
275
+ interface ShortenResponse {
276
+ // (undocumented)
277
+ shortUrl: string;
278
+ }
279
+
280
+ // @public (undocumented)
281
+ type State = {
282
+ shouldShowCopiedMessage: boolean;
283
+ };
284
+
285
+ // @public (undocumented)
286
+ enum TabType {
287
+ // (undocumented)
288
+ default = 0,
289
+ // (undocumented)
290
+ Slack = 1
291
+ }
292
+
293
+ // @public (undocumented)
294
+ export type TooltipPosition = 'bottom' | 'left' | 'mouse' | 'right' | 'top';
295
+
296
+ // @public (undocumented)
297
+ interface UrlShortenerClient {
298
+ // (undocumented)
299
+ shorten(data: ShortenRequest): Promise<ShortenResponse>;
300
+ }
301
+
302
+ // @public (undocumented)
303
+ export type User = UserWithEmail | UserWithId;
304
+
305
+ // @public (undocumented)
306
+ export type UserWithEmail = {
307
+ type: 'user';
308
+ email: string;
309
+ };
310
+
311
+ // @public (undocumented)
312
+ export type UserWithId = {
313
+ type: 'custom' | 'group' | 'team' | 'user';
314
+ id: string;
315
+ };
316
+
317
+ // (No @packageDocumentation comment for this package)
318
+
319
+ ```