@atlaskit/share 4.16.13 → 4.18.0
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 +16 -0
- package/afm-cc/tsconfig.json +6 -0
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +5 -0
- package/dist/cjs/components/LazyShareForm/lazy.js +9 -3
- package/dist/cjs/components/ShareDialogWithTrigger.js +33 -5
- package/dist/cjs/components/ShareForm.js +62 -9
- package/dist/cjs/components/ShareFormWrapper/ShareFormWrapper.js +9 -2
- package/dist/cjs/components/ShareFormWrapper/styled.js +26 -6
- package/dist/cjs/components/ShareMenuItem.js +37 -0
- package/dist/cjs/components/UserPickerField.js +42 -11
- package/dist/cjs/components/analytics/analytics.js +7 -2
- package/dist/cjs/i18n/cs.js +1 -0
- package/dist/cjs/i18n/da.js +1 -0
- package/dist/cjs/i18n/de.js +1 -0
- package/dist/cjs/i18n/en.js +1 -0
- package/dist/cjs/i18n/en_GB.js +1 -0
- package/dist/cjs/i18n/en_ZZ.js +1 -0
- package/dist/cjs/i18n/es.js +1 -0
- package/dist/cjs/i18n/fi.js +1 -0
- package/dist/cjs/i18n/fr.js +1 -0
- package/dist/cjs/i18n/hu.js +1 -0
- package/dist/cjs/i18n/it.js +1 -0
- package/dist/cjs/i18n/ja.js +1 -0
- package/dist/cjs/i18n/ko.js +1 -0
- package/dist/cjs/i18n/nb.js +1 -0
- package/dist/cjs/i18n/nl.js +1 -0
- package/dist/cjs/i18n/pl.js +1 -0
- package/dist/cjs/i18n/pt_BR.js +1 -0
- package/dist/cjs/i18n/ru.js +1 -0
- package/dist/cjs/i18n/sv.js +1 -0
- package/dist/cjs/i18n/th.js +1 -0
- package/dist/cjs/i18n/tr.js +1 -0
- package/dist/cjs/i18n/uk.js +1 -0
- package/dist/cjs/i18n/vi.js +1 -0
- package/dist/cjs/i18n/zh.js +1 -0
- package/dist/cjs/i18n/zh_TW.js +1 -0
- package/dist/cjs/i18n.js +10 -0
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +5 -0
- package/dist/es2019/components/LazyShareForm/lazy.js +9 -3
- package/dist/es2019/components/ShareDialogWithTrigger.js +37 -6
- package/dist/es2019/components/ShareForm.js +49 -1
- package/dist/es2019/components/ShareFormWrapper/ShareFormWrapper.js +7 -2
- package/dist/es2019/components/ShareFormWrapper/styled.js +38 -12
- package/dist/es2019/components/ShareMenuItem.js +28 -0
- package/dist/es2019/components/UserPickerField.js +22 -7
- package/dist/es2019/components/analytics/analytics.js +4 -1
- package/dist/es2019/i18n/cs.js +1 -0
- package/dist/es2019/i18n/da.js +1 -0
- package/dist/es2019/i18n/de.js +1 -0
- package/dist/es2019/i18n/en.js +1 -0
- package/dist/es2019/i18n/en_GB.js +1 -0
- package/dist/es2019/i18n/en_ZZ.js +1 -0
- package/dist/es2019/i18n/es.js +1 -0
- package/dist/es2019/i18n/fi.js +1 -0
- package/dist/es2019/i18n/fr.js +1 -0
- package/dist/es2019/i18n/hu.js +1 -0
- package/dist/es2019/i18n/it.js +1 -0
- package/dist/es2019/i18n/ja.js +1 -0
- package/dist/es2019/i18n/ko.js +1 -0
- package/dist/es2019/i18n/nb.js +1 -0
- package/dist/es2019/i18n/nl.js +1 -0
- package/dist/es2019/i18n/pl.js +1 -0
- package/dist/es2019/i18n/pt_BR.js +1 -0
- package/dist/es2019/i18n/ru.js +1 -0
- package/dist/es2019/i18n/sv.js +1 -0
- package/dist/es2019/i18n/th.js +1 -0
- package/dist/es2019/i18n/tr.js +1 -0
- package/dist/es2019/i18n/uk.js +1 -0
- package/dist/es2019/i18n/vi.js +1 -0
- package/dist/es2019/i18n/zh.js +1 -0
- package/dist/es2019/i18n/zh_TW.js +1 -0
- package/dist/es2019/i18n.js +10 -0
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +5 -0
- package/dist/esm/components/LazyShareForm/lazy.js +9 -3
- package/dist/esm/components/ShareDialogWithTrigger.js +34 -6
- package/dist/esm/components/ShareForm.js +62 -9
- package/dist/esm/components/ShareFormWrapper/ShareFormWrapper.js +9 -2
- package/dist/esm/components/ShareFormWrapper/styled.js +27 -6
- package/dist/esm/components/ShareMenuItem.js +30 -0
- package/dist/esm/components/UserPickerField.js +42 -11
- package/dist/esm/components/analytics/analytics.js +6 -1
- package/dist/esm/i18n/cs.js +1 -0
- package/dist/esm/i18n/da.js +1 -0
- package/dist/esm/i18n/de.js +1 -0
- package/dist/esm/i18n/en.js +1 -0
- package/dist/esm/i18n/en_GB.js +1 -0
- package/dist/esm/i18n/en_ZZ.js +1 -0
- package/dist/esm/i18n/es.js +1 -0
- package/dist/esm/i18n/fi.js +1 -0
- package/dist/esm/i18n/fr.js +1 -0
- package/dist/esm/i18n/hu.js +1 -0
- package/dist/esm/i18n/it.js +1 -0
- package/dist/esm/i18n/ja.js +1 -0
- package/dist/esm/i18n/ko.js +1 -0
- package/dist/esm/i18n/nb.js +1 -0
- package/dist/esm/i18n/nl.js +1 -0
- package/dist/esm/i18n/pl.js +1 -0
- package/dist/esm/i18n/pt_BR.js +1 -0
- package/dist/esm/i18n/ru.js +1 -0
- package/dist/esm/i18n/sv.js +1 -0
- package/dist/esm/i18n/th.js +1 -0
- package/dist/esm/i18n/tr.js +1 -0
- package/dist/esm/i18n/uk.js +1 -0
- package/dist/esm/i18n/vi.js +1 -0
- package/dist/esm/i18n/zh.js +1 -0
- package/dist/esm/i18n/zh_TW.js +1 -0
- package/dist/esm/i18n.js +10 -0
- package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +4 -3
- package/dist/types/components/ShareDialogContainer.d.ts +3 -3
- package/dist/types/components/ShareDialogWithTrigger.d.ts +2 -0
- package/dist/types/components/ShareForm.d.ts +3 -2
- package/dist/types/components/ShareFormWrapper/ShareFormWrapper.d.ts +6 -3
- package/dist/types/components/ShareFormWrapper/styled.d.ts +6 -2
- package/dist/types/components/ShareMenuItem.d.ts +11 -0
- package/dist/types/components/UserPickerField.d.ts +3 -3
- package/dist/types/components/analytics/analytics.d.ts +4 -2
- package/dist/types/i18n/cs.d.ts +1 -0
- package/dist/types/i18n/da.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/en.d.ts +1 -0
- package/dist/types/i18n/en_GB.d.ts +1 -0
- package/dist/types/i18n/en_ZZ.d.ts +1 -0
- package/dist/types/i18n/es.d.ts +1 -0
- package/dist/types/i18n/fi.d.ts +1 -0
- package/dist/types/i18n/fr.d.ts +1 -0
- package/dist/types/i18n/hu.d.ts +1 -0
- package/dist/types/i18n/it.d.ts +1 -0
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types/i18n/ko.d.ts +1 -0
- package/dist/types/i18n/nb.d.ts +1 -0
- package/dist/types/i18n/nl.d.ts +1 -0
- package/dist/types/i18n/pl.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/sv.d.ts +1 -0
- package/dist/types/i18n/th.d.ts +1 -0
- package/dist/types/i18n/tr.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- package/dist/types/i18n.d.ts +10 -0
- package/dist/types/types/ShareDialogContainer.d.ts +1 -0
- package/dist/types/types/ShareDialogWithTrigger.d.ts +2 -1
- package/dist/types/types/ShareEntities.d.ts +2 -1
- package/dist/types/types/ShareForm.d.ts +3 -0
- package/dist/types/types/UserPickerOptions.d.ts +13 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +4 -3
- package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +3 -3
- package/dist/types-ts4.5/components/ShareDialogWithTrigger.d.ts +2 -0
- package/dist/types-ts4.5/components/ShareForm.d.ts +3 -2
- package/dist/types-ts4.5/components/ShareFormWrapper/ShareFormWrapper.d.ts +6 -3
- package/dist/types-ts4.5/components/ShareFormWrapper/styled.d.ts +6 -2
- package/dist/types-ts4.5/components/ShareMenuItem.d.ts +11 -0
- package/dist/types-ts4.5/components/UserPickerField.d.ts +3 -3
- package/dist/types-ts4.5/components/analytics/analytics.d.ts +4 -2
- package/dist/types-ts4.5/i18n/cs.d.ts +1 -0
- package/dist/types-ts4.5/i18n/da.d.ts +1 -0
- package/dist/types-ts4.5/i18n/de.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +1 -0
- package/dist/types-ts4.5/i18n/es.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +1 -0
- package/dist/types-ts4.5/i18n/it.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +1 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +1 -0
- package/dist/types-ts4.5/i18n/th.d.ts +1 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +1 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -0
- package/dist/types-ts4.5/i18n.d.ts +10 -0
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +1 -0
- package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +2 -1
- package/dist/types-ts4.5/types/ShareEntities.d.ts +2 -1
- package/dist/types-ts4.5/types/ShareForm.d.ts +3 -0
- package/dist/types-ts4.5/types/UserPickerOptions.d.ts +13 -0
- package/dist/types-ts4.5/types/index.d.ts +1 -0
- package/package.json +9 -7
package/dist/esm/i18n.js
CHANGED
|
@@ -242,5 +242,15 @@ export var messages = defineMessages({
|
|
|
242
242
|
id: 'fabric.elements.share.popup.label',
|
|
243
243
|
defaultMessage: 'Share',
|
|
244
244
|
description: 'Label of the popup that contains share menu used by assistive technologies'
|
|
245
|
+
},
|
|
246
|
+
slackMenuItemText: {
|
|
247
|
+
id: 'fabric.elements.share.menu.slack.label',
|
|
248
|
+
defaultMessage: 'Slack',
|
|
249
|
+
description: 'Text for the slack menu in share'
|
|
250
|
+
},
|
|
251
|
+
emailMenuItemText: {
|
|
252
|
+
id: 'fabric.elements.share.menu.email.label',
|
|
253
|
+
defaultMessage: 'Email',
|
|
254
|
+
description: 'Text for the email menu in share'
|
|
245
255
|
}
|
|
246
256
|
});
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
|
-
import type { ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
|
-
import { IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
-
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
3
|
+
import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
|
+
import { type IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
+
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
6
|
onLinkCopy: () => void;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
8
|
onSubmit: (data: ShareData) => void;
|
|
9
9
|
onTabChange: (index: number) => void;
|
|
10
|
+
onMenuItemChange: (menuType: MenuType) => void;
|
|
10
11
|
loadOptions?: LoadOptions;
|
|
11
12
|
selectPortalRef: any;
|
|
12
13
|
showTitle: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AnalyticsEventPayload, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
import { ShortenRequest } from '../clients/AtlassianUrlShortenerClient';
|
|
4
|
-
import { ConfigResponse } from '../clients/ShareServiceClient';
|
|
2
|
+
import { type AnalyticsEventPayload, type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import { type ShortenRequest } from '../clients/AtlassianUrlShortenerClient';
|
|
4
|
+
import { type ConfigResponse } from '../clients/ShareServiceClient';
|
|
5
5
|
import type { OriginTracing, OriginTracingFactory, ShareData, ShareDialogContainerProps } from '../types';
|
|
6
6
|
export declare const defaultConfig: ConfigResponse;
|
|
7
7
|
export type State = {
|
|
@@ -25,6 +25,7 @@ export declare class ShareDialogWithTriggerInternal extends React.PureComponent<
|
|
|
25
25
|
private closeAndResetDialog;
|
|
26
26
|
private createAndFireEvent;
|
|
27
27
|
private onTabChange;
|
|
28
|
+
private onMenuItemChange;
|
|
28
29
|
private getFlags;
|
|
29
30
|
private setIsLoading;
|
|
30
31
|
private focus;
|
|
@@ -35,6 +36,7 @@ export declare class ShareDialogWithTriggerInternal extends React.PureComponent<
|
|
|
35
36
|
private generateShareError;
|
|
36
37
|
private handleShareSubmit;
|
|
37
38
|
private handleFormDismiss;
|
|
39
|
+
private calculatePopupOffset;
|
|
38
40
|
handleCopyLink: () => void;
|
|
39
41
|
handleIntegrationClick: (integration: Integration) => void;
|
|
40
42
|
renderShareTriggerButton: (triggerProps: TriggerProps) => React.ReactNode;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import { FormChildrenArgs, ShareData, ShareFormProps, TabType } from '../types';
|
|
3
|
+
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import { type FormChildrenArgs, type MenuType, type ShareData, type ShareFormProps, TabType } from '../types';
|
|
5
5
|
export declare const formWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const formFooterStyles: import("@emotion/react").SerializedStyles;
|
|
7
7
|
export type State = {
|
|
8
8
|
selectedTab: TabType;
|
|
9
|
+
selectedMenuItem: MenuType;
|
|
9
10
|
};
|
|
10
11
|
export type InternalFormProps = FormChildrenArgs<ShareData> & ShareFormProps & WrappedComponentProps;
|
|
11
12
|
export declare const ShareForm: React.FC<ShareFormProps>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ShareDialogWithTriggerProps } from '../../types';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ShareDialogWithTriggerProps } from '../../types';
|
|
3
|
+
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
3
4
|
export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareFormTitle'> & {
|
|
4
5
|
shouldShowTitle?: boolean;
|
|
5
6
|
children?: ReactNode;
|
|
6
7
|
footer?: ReactNode;
|
|
8
|
+
integrationMode?: IntegrationMode;
|
|
9
|
+
isMenuItemSelected?: boolean;
|
|
7
10
|
};
|
|
8
|
-
declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, footer, }: ShareFormWrapperProps) => JSX.Element;
|
|
11
|
+
declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, footer, integrationMode, isMenuItemSelected, }: ShareFormWrapperProps) => JSX.Element;
|
|
9
12
|
export default ShareFormWrapper;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { type PropsWithChildren } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
|
|
4
|
+
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
5
|
+
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, }: PropsWithChildren<{
|
|
6
|
+
integrationMode?: IntegrationMode | undefined;
|
|
7
|
+
isMenuItemSelected?: boolean | undefined;
|
|
8
|
+
}>) => jsx.JSX.Element;
|
|
5
9
|
/**
|
|
6
10
|
* Apply the same styling, as previous @atlaskit/inline-dialog had,
|
|
7
11
|
* compared to the @atlaskit/popup we are now using.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type MessageDescriptor } from 'react-intl-next';
|
|
3
|
+
export declare const ShareMenuItem: ({ iconName, labelId, onClickHandler }: {
|
|
4
|
+
iconName: React.ReactNode;
|
|
5
|
+
labelId: MessageDescriptor;
|
|
6
|
+
onClickHandler: () => void;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export declare const IconContainer: ({ icon }: {
|
|
9
|
+
icon: React.ReactNode;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export declare const menuWrapperWidth = "102px";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import { LoadOptions, OptionData, Value } from '@atlaskit/smart-user-picker';
|
|
4
|
-
import { ConfigResponse, ProductName, ShareError, UserPickerOptions } from '../types';
|
|
2
|
+
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import { type LoadOptions, type OptionData, type Value } from '@atlaskit/smart-user-picker';
|
|
4
|
+
import { type ConfigResponse, type ProductName, type ShareError, type UserPickerOptions } from '../types';
|
|
5
5
|
export declare const REQUIRED = "REQUIRED";
|
|
6
6
|
export type Props = {
|
|
7
7
|
loadOptions?: LoadOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
-
import { DialogContentState, OriginTracing } from '../../types';
|
|
1
|
+
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
+
import { type DialogContentState, type OriginTracing } from '../../types';
|
|
3
3
|
export declare const CHANNEL_ID = "fabric-elements";
|
|
4
4
|
export declare const ANALYTICS_SOURCE = "shareModal";
|
|
5
5
|
export declare const INTEGRATION_MODAL_SOURCE = "integrationShareDialog";
|
|
@@ -11,7 +11,9 @@ export declare const shareIntegrationButtonEvent: (type?: string) => AnalyticsEv
|
|
|
11
11
|
export declare const errorEncountered: (actionSubjectId: string | undefined, attributes?: any) => AnalyticsEventPayload;
|
|
12
12
|
export declare const shareTriggerButtonClicked: () => AnalyticsEventPayload;
|
|
13
13
|
export type TabSubjectIdType = 'shareTab' | 'shareToSlackTab';
|
|
14
|
+
export type MenuItemSubjectIdType = 'shareMenuItem' | 'shareToSlackMenuItem';
|
|
14
15
|
export declare const shareTabClicked: (subjectId: TabSubjectIdType, shareContentType?: string) => AnalyticsEventPayload;
|
|
16
|
+
export declare const shareMenuItemClicked: (subjectId: MenuItemSubjectIdType, shareContentType?: string) => AnalyticsEventPayload;
|
|
15
17
|
export declare const cancelShare: (start: number) => AnalyticsEventPayload;
|
|
16
18
|
export declare const shortUrlRequested: () => AnalyticsEventPayload;
|
|
17
19
|
export declare const shortUrlGenerated: (start: number, tooSlow: boolean) => AnalyticsEventPayload;
|
package/dist/types/i18n/cs.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/da.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/de.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/en.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/es.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/fi.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/fr.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/hu.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/it.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/ja.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/ko.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/nb.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/nl.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/pl.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/ru.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/sv.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/th.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/tr.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/uk.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/vi.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n/zh.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
|
45
45
|
'fabric.elements.share.invite.to.jira': string;
|
|
46
46
|
'fabric.elements.share.main.tab.text.confluence': string;
|
|
47
47
|
'fabric.elements.share.main.tab.text.jira': string;
|
|
48
|
+
'fabric.elements.share.popup.label': string;
|
|
48
49
|
'fabric.elements.share.success.message': string;
|
|
49
50
|
'fabric.elements.share.to.integration.button': string;
|
|
50
51
|
'fabric.elements.share.trigger.button.icon.label': string;
|
package/dist/types/i18n.d.ts
CHANGED
|
@@ -234,4 +234,14 @@ export declare const messages: {
|
|
|
234
234
|
defaultMessage: string;
|
|
235
235
|
description: string;
|
|
236
236
|
};
|
|
237
|
+
slackMenuItemText: {
|
|
238
|
+
id: string;
|
|
239
|
+
defaultMessage: string;
|
|
240
|
+
description: string;
|
|
241
|
+
};
|
|
242
|
+
emailMenuItemText: {
|
|
243
|
+
id: string;
|
|
244
|
+
defaultMessage: string;
|
|
245
|
+
description: string;
|
|
246
|
+
};
|
|
237
247
|
};
|
|
@@ -144,6 +144,7 @@ export type ShareDialogContainerProps = {
|
|
|
144
144
|
isCopyDisabled?: boolean;
|
|
145
145
|
isPublicLink?: boolean;
|
|
146
146
|
integrationMode?: IntegrationMode;
|
|
147
|
+
isMenuItemSelected?: boolean;
|
|
147
148
|
shareIntegrations?: Array<Integration>;
|
|
148
149
|
/**
|
|
149
150
|
* Optionally sets a tabIndex value if you need to set focus
|
|
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
|
|
|
19
19
|
* with the demo page and clearly visible options on that page.
|
|
20
20
|
*/
|
|
21
21
|
export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
|
|
22
|
-
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | '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' | 'userPickerOptions'> & {
|
|
22
|
+
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & {
|
|
23
23
|
config?: ConfigResponse;
|
|
24
24
|
isFetchingConfig?: boolean;
|
|
25
25
|
children?: RenderCustomTriggerButton;
|
|
@@ -42,4 +42,5 @@ export type ShareDialogWithTriggerStates = {
|
|
|
42
42
|
showIntegrationForm: boolean;
|
|
43
43
|
selectedIntegration: Integration | null;
|
|
44
44
|
tabIndex: number;
|
|
45
|
+
isMenuItemSelected: boolean;
|
|
45
46
|
};
|
|
@@ -23,9 +23,10 @@ export declare enum TabType {
|
|
|
23
23
|
default = 0,
|
|
24
24
|
Slack = 1
|
|
25
25
|
}
|
|
26
|
+
export type MenuType = 'none' | 'default' | 'Slack';
|
|
26
27
|
export type Integration = {
|
|
27
28
|
type: string;
|
|
28
29
|
Icon: React.ComponentType;
|
|
29
30
|
Content: React.ComponentType<IntegrationContentProps>;
|
|
30
31
|
};
|
|
31
|
-
export type IntegrationMode = 'tabs' | 'split' | 'off';
|
|
32
|
+
export type IntegrationMode = 'tabs' | 'split' | 'menu' | 'off';
|
|
@@ -4,6 +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
|
+
import { type MenuType } from './ShareEntities';
|
|
7
8
|
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & {
|
|
8
9
|
config?: ConfigResponse;
|
|
9
10
|
isFetchingConfig?: boolean;
|
|
@@ -26,6 +27,8 @@ export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' |
|
|
|
26
27
|
onDismiss?: (data: ShareData) => void;
|
|
27
28
|
onUserInputChange?: (query?: string, sessionId?: string) => void;
|
|
28
29
|
onTabChange?: (index: number) => void;
|
|
30
|
+
onMenuItemChange?: (menuItem: MenuType) => void;
|
|
31
|
+
selectedMenuItem?: number;
|
|
29
32
|
Content?: React.ReactNode;
|
|
30
33
|
handleCloseDialog?: () => void;
|
|
31
34
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
3
|
import type { Props as SmartUserPickerProps } from '@atlaskit/smart-user-picker';
|
|
3
4
|
export type UserPickerOptions = Pick<SmartUserPickerProps, 'onFocus' | 'header' | 'includeNonLicensedUsers'> & {
|
|
4
5
|
/** Message to be shown when the menu is open but no options are provided.
|
|
@@ -10,4 +11,16 @@ export type UserPickerOptions = Pick<SmartUserPickerProps, 'onFocus' | 'header'
|
|
|
10
11
|
isPublicLink?: boolean;
|
|
11
12
|
allowEmail?: boolean;
|
|
12
13
|
}) => string | null | React.ReactNode) | null;
|
|
14
|
+
/**
|
|
15
|
+
* Placeholder message for the user picker.
|
|
16
|
+
*/
|
|
17
|
+
getPlaceholderMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
|
|
18
|
+
/**
|
|
19
|
+
* Label message for the user picker.
|
|
20
|
+
*/
|
|
21
|
+
getLabelMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
|
|
22
|
+
/**
|
|
23
|
+
* Message to be shown when required validation is shown in the user picker.
|
|
24
|
+
*/
|
|
25
|
+
getRequiredMessage?: (allowEmail?: boolean, isBrowseUsersDisabled?: boolean) => MessageDescriptor;
|
|
13
26
|
};
|
|
@@ -10,6 +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 type { MenuType } from './ShareEntities';
|
|
13
14
|
export type KeysOfType<T, TProp> = {
|
|
14
15
|
[P in keyof T]: T[P] extends TProp ? P : never;
|
|
15
16
|
}[keyof T];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
|
-
import type { ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
|
-
import { IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
-
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
3
|
+
import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
|
+
import { type IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
+
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
6
|
onLinkCopy: () => void;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
8
|
onSubmit: (data: ShareData) => void;
|
|
9
9
|
onTabChange: (index: number) => void;
|
|
10
|
+
onMenuItemChange: (menuType: MenuType) => void;
|
|
10
11
|
loadOptions?: LoadOptions;
|
|
11
12
|
selectPortalRef: any;
|
|
12
13
|
showTitle: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AnalyticsEventPayload, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
import { ShortenRequest } from '../clients/AtlassianUrlShortenerClient';
|
|
4
|
-
import { ConfigResponse } from '../clients/ShareServiceClient';
|
|
2
|
+
import { type AnalyticsEventPayload, type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import { type ShortenRequest } from '../clients/AtlassianUrlShortenerClient';
|
|
4
|
+
import { type ConfigResponse } from '../clients/ShareServiceClient';
|
|
5
5
|
import type { OriginTracing, OriginTracingFactory, ShareData, ShareDialogContainerProps } from '../types';
|
|
6
6
|
export declare const defaultConfig: ConfigResponse;
|
|
7
7
|
export type State = {
|
|
@@ -25,6 +25,7 @@ export declare class ShareDialogWithTriggerInternal extends React.PureComponent<
|
|
|
25
25
|
private closeAndResetDialog;
|
|
26
26
|
private createAndFireEvent;
|
|
27
27
|
private onTabChange;
|
|
28
|
+
private onMenuItemChange;
|
|
28
29
|
private getFlags;
|
|
29
30
|
private setIsLoading;
|
|
30
31
|
private focus;
|
|
@@ -35,6 +36,7 @@ export declare class ShareDialogWithTriggerInternal extends React.PureComponent<
|
|
|
35
36
|
private generateShareError;
|
|
36
37
|
private handleShareSubmit;
|
|
37
38
|
private handleFormDismiss;
|
|
39
|
+
private calculatePopupOffset;
|
|
38
40
|
handleCopyLink: () => void;
|
|
39
41
|
handleIntegrationClick: (integration: Integration) => void;
|
|
40
42
|
renderShareTriggerButton: (triggerProps: TriggerProps) => React.ReactNode;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import { FormChildrenArgs, ShareData, ShareFormProps, TabType } from '../types';
|
|
3
|
+
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import { type FormChildrenArgs, type MenuType, type ShareData, type ShareFormProps, TabType } from '../types';
|
|
5
5
|
export declare const formWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const formFooterStyles: import("@emotion/react").SerializedStyles;
|
|
7
7
|
export type State = {
|
|
8
8
|
selectedTab: TabType;
|
|
9
|
+
selectedMenuItem: MenuType;
|
|
9
10
|
};
|
|
10
11
|
export type InternalFormProps = FormChildrenArgs<ShareData> & ShareFormProps & WrappedComponentProps;
|
|
11
12
|
export declare const ShareForm: React.FC<ShareFormProps>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ShareDialogWithTriggerProps } from '../../types';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ShareDialogWithTriggerProps } from '../../types';
|
|
3
|
+
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
3
4
|
export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareFormTitle'> & {
|
|
4
5
|
shouldShowTitle?: boolean;
|
|
5
6
|
children?: ReactNode;
|
|
6
7
|
footer?: ReactNode;
|
|
8
|
+
integrationMode?: IntegrationMode;
|
|
9
|
+
isMenuItemSelected?: boolean;
|
|
7
10
|
};
|
|
8
|
-
declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, footer, }: ShareFormWrapperProps) => JSX.Element;
|
|
11
|
+
declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, footer, integrationMode, isMenuItemSelected, }: ShareFormWrapperProps) => JSX.Element;
|
|
9
12
|
export default ShareFormWrapper;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { type PropsWithChildren } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
|
|
4
|
+
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
5
|
+
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, }: PropsWithChildren<{
|
|
6
|
+
integrationMode?: IntegrationMode | undefined;
|
|
7
|
+
isMenuItemSelected?: boolean | undefined;
|
|
8
|
+
}>) => jsx.JSX.Element;
|
|
5
9
|
/**
|
|
6
10
|
* Apply the same styling, as previous @atlaskit/inline-dialog had,
|
|
7
11
|
* compared to the @atlaskit/popup we are now using.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type MessageDescriptor } from 'react-intl-next';
|
|
3
|
+
export declare const ShareMenuItem: ({ iconName, labelId, onClickHandler }: {
|
|
4
|
+
iconName: React.ReactNode;
|
|
5
|
+
labelId: MessageDescriptor;
|
|
6
|
+
onClickHandler: () => void;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export declare const IconContainer: ({ icon }: {
|
|
9
|
+
icon: React.ReactNode;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export declare const menuWrapperWidth = "102px";
|