@atlaskit/smart-card 32.7.2 → 32.7.4
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 +20 -0
- package/analytics.spec.yaml +112 -53
- package/dist/cjs/extractors/common/context/extractAccessContext.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/actions/{flexible/AuthorizeAction.js → AuthorizeAction.js} +2 -2
- package/dist/cjs/view/BlockCard/actions/ForbiddenAction.js +16 -13
- package/dist/cjs/view/BlockCard/actions/{flexible/RetryAction.js → RetryAction.js} +2 -2
- package/dist/cjs/view/BlockCard/index.js +14 -14
- package/dist/cjs/view/BlockCard/views/{flexible/FlexibleErroredView.js → ErroredView.js} +5 -5
- package/dist/cjs/view/BlockCard/views/{flexible/FlexibleForbiddenView.js → ForbiddenView.js} +9 -9
- package/dist/cjs/view/BlockCard/views/{flexible/FlexibleNotFoundView.js → NotFoundView.js} +4 -4
- package/dist/cjs/view/BlockCard/views/{flexible/FlexibleResolvedView.js → ResolvedView.js} +5 -5
- package/dist/cjs/view/BlockCard/views/{flexible/FlexibleUnauthorisedView.js → UnauthorisedView.js} +7 -7
- package/dist/cjs/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/index.js +2 -2
- package/dist/cjs/view/BlockCard/views/{flexible/utils → utils}/index.js +3 -3
- package/dist/cjs/view/CardWithUrl/component.js +26 -9
- package/dist/cjs/view/CardWithUrl/loader.js +21 -7
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +2 -2
- package/dist/cjs/view/EmbedCard/index.js +8 -8
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +2 -2
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +35 -8
- package/dist/cjs/view/HoverCard/index.js +25 -8
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/access/ForbiddenAction.js +28 -0
- package/dist/cjs/view/common/utils.js +9 -2
- package/dist/es2019/extractors/common/context/extractAccessContext.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/actions/{flexible/AuthorizeAction.js → AuthorizeAction.js} +2 -2
- package/dist/es2019/view/BlockCard/actions/ForbiddenAction.js +16 -6
- package/dist/es2019/view/BlockCard/actions/{flexible/RetryAction.js → RetryAction.js} +2 -2
- package/dist/es2019/view/BlockCard/index.js +13 -13
- package/dist/es2019/view/BlockCard/views/{flexible/FlexibleErroredView.js → ErroredView.js} +5 -5
- package/dist/es2019/view/BlockCard/views/{flexible/FlexibleForbiddenView.js → ForbiddenView.js} +9 -9
- package/dist/es2019/view/BlockCard/views/{flexible/FlexibleNotFoundView.js → NotFoundView.js} +4 -4
- package/dist/es2019/view/BlockCard/views/{flexible/FlexibleResolvedView.js → ResolvedView.js} +5 -5
- package/dist/es2019/view/BlockCard/views/{flexible/FlexibleUnauthorisedView.js → UnauthorisedView.js} +7 -7
- package/dist/es2019/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/index.js +2 -2
- package/dist/es2019/view/BlockCard/views/{flexible/utils → utils}/index.js +3 -3
- package/dist/es2019/view/CardWithUrl/component.js +26 -9
- package/dist/es2019/view/CardWithUrl/loader.js +21 -7
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +1 -1
- package/dist/es2019/view/EmbedCard/index.js +3 -3
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +33 -9
- package/dist/es2019/view/HoverCard/index.js +26 -8
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/access/ForbiddenAction.js +12 -0
- package/dist/es2019/view/common/utils.js +8 -1
- package/dist/esm/extractors/common/context/extractAccessContext.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/actions/{flexible/AuthorizeAction.js → AuthorizeAction.js} +2 -2
- package/dist/esm/view/BlockCard/actions/ForbiddenAction.js +16 -13
- package/dist/esm/view/BlockCard/actions/{flexible/RetryAction.js → RetryAction.js} +2 -2
- package/dist/esm/view/BlockCard/index.js +13 -13
- package/dist/esm/view/BlockCard/views/{flexible/FlexibleErroredView.js → ErroredView.js} +5 -5
- package/dist/esm/view/BlockCard/views/{flexible/FlexibleForbiddenView.js → ForbiddenView.js} +9 -9
- package/dist/esm/view/BlockCard/views/{flexible/FlexibleNotFoundView.js → NotFoundView.js} +4 -4
- package/dist/esm/view/BlockCard/views/{flexible/FlexibleResolvedView.js → ResolvedView.js} +5 -5
- package/dist/esm/view/BlockCard/views/{flexible/FlexibleUnauthorisedView.js → UnauthorisedView.js} +7 -7
- package/dist/esm/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/index.js +2 -2
- package/dist/esm/view/BlockCard/views/{flexible/utils → utils}/index.js +3 -3
- package/dist/esm/view/CardWithUrl/component.js +26 -9
- package/dist/esm/view/CardWithUrl/loader.js +21 -7
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +1 -1
- package/dist/esm/view/EmbedCard/index.js +3 -3
- package/dist/esm/view/EmbedCard/views/ErroredView.js +1 -1
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +36 -9
- package/dist/esm/view/HoverCard/index.js +25 -8
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/access/ForbiddenAction.js +21 -0
- package/dist/esm/view/common/utils.js +8 -1
- package/dist/types/common/analytics/generated/analytics.types.d.ts +35 -1
- package/dist/types/types.d.ts +4 -11
- package/dist/{types-ts4.5/view/BlockCard/actions/flexible → types/view/BlockCard/actions}/AuthorizeAction.d.ts +1 -1
- package/dist/types/view/BlockCard/actions/ForbiddenAction.d.ts +12 -2
- package/dist/types/view/BlockCard/actions/{flexible/RetryAction.d.ts → RetryAction.d.ts} +1 -1
- package/dist/types/view/BlockCard/views/{flexible/types.d.ts → types.d.ts} +1 -1
- package/dist/{types-ts4.5/view/BlockCard/views/flexible → types/view/BlockCard/views}/unresolved-view/types.d.ts +2 -2
- package/dist/{types-ts4.5/view/BlockCard/views/flexible → types/view/BlockCard/views}/utils/index.d.ts +5 -5
- package/dist/types/view/EmbedCard/types.d.ts +1 -2
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types/view/common/access/ForbiddenAction.d.ts +2 -0
- package/dist/types/view/common/utils.d.ts +2 -0
- package/dist/types/view/types.d.ts +8 -6
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +35 -1
- package/dist/types-ts4.5/types.d.ts +4 -11
- package/dist/{types/view/BlockCard/actions/flexible → types-ts4.5/view/BlockCard/actions}/AuthorizeAction.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/actions/ForbiddenAction.d.ts +12 -2
- package/dist/types-ts4.5/view/BlockCard/actions/{flexible/RetryAction.d.ts → RetryAction.d.ts} +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/{flexible/types.d.ts → types.d.ts} +1 -1
- package/dist/{types/view/BlockCard/views/flexible → types-ts4.5/view/BlockCard/views}/unresolved-view/types.d.ts +2 -2
- package/dist/{types/view/BlockCard/views/flexible → types-ts4.5/view/BlockCard/views}/utils/index.d.ts +5 -5
- package/dist/types-ts4.5/view/EmbedCard/types.d.ts +1 -2
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/common/access/ForbiddenAction.d.ts +2 -0
- package/dist/types-ts4.5/view/common/utils.d.ts +2 -0
- package/dist/types-ts4.5/view/types.d.ts +8 -6
- package/package.json +1 -1
- package/dist/cjs/view/BlockCard/actions/flexible/ForbiddenAction.js +0 -31
- package/dist/cjs/view/BlockCard/components/Action.js +0 -5
- package/dist/cjs/view/BlockCard/utils/handlers.js +0 -13
- package/dist/es2019/view/BlockCard/actions/flexible/ForbiddenAction.js +0 -22
- package/dist/es2019/view/BlockCard/components/Action.js +0 -1
- package/dist/es2019/view/BlockCard/utils/handlers.js +0 -7
- package/dist/esm/view/BlockCard/actions/flexible/ForbiddenAction.js +0 -24
- package/dist/esm/view/BlockCard/components/Action.js +0 -1
- package/dist/esm/view/BlockCard/utils/handlers.js +0 -7
- package/dist/types/view/BlockCard/actions/flexible/ForbiddenAction.d.ts +0 -12
- package/dist/types/view/BlockCard/components/Action.d.ts +0 -8
- package/dist/types/view/BlockCard/utils/handlers.d.ts +0 -2
- package/dist/types-ts4.5/view/BlockCard/actions/flexible/ForbiddenAction.d.ts +0 -12
- package/dist/types-ts4.5/view/BlockCard/components/Action.d.ts +0 -8
- package/dist/types-ts4.5/view/BlockCard/utils/handlers.d.ts +0 -2
- /package/dist/cjs/view/BlockCard/views/{flexible/styled.js → styled.js} +0 -0
- /package/dist/cjs/view/BlockCard/views/{flexible/types.js → types.js} +0 -0
- /package/dist/cjs/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/types.js +0 -0
- /package/dist/cjs/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.js +0 -0
- /package/dist/cjs/view/{BlockCard/components/Frame.js → EmbedCard/components/ErrorFrame.js} +0 -0
- /package/dist/es2019/view/BlockCard/views/{flexible/styled.js → styled.js} +0 -0
- /package/dist/es2019/view/BlockCard/views/{flexible/types.js → types.js} +0 -0
- /package/dist/es2019/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/types.js +0 -0
- /package/dist/es2019/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.js +0 -0
- /package/dist/es2019/view/{BlockCard/components/Frame.js → EmbedCard/components/ErrorFrame.js} +0 -0
- /package/dist/esm/view/BlockCard/views/{flexible/styled.js → styled.js} +0 -0
- /package/dist/esm/view/BlockCard/views/{flexible/types.js → types.js} +0 -0
- /package/dist/esm/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/types.js +0 -0
- /package/dist/esm/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.js +0 -0
- /package/dist/esm/view/{BlockCard/components/Frame.js → EmbedCard/components/ErrorFrame.js} +0 -0
- /package/dist/types/view/BlockCard/views/{flexible/FlexibleErroredView.d.ts → ErroredView.d.ts} +0 -0
- /package/dist/types/view/BlockCard/views/{flexible/FlexibleForbiddenView.d.ts → ForbiddenView.d.ts} +0 -0
- /package/dist/types/view/BlockCard/views/{flexible/FlexibleNotFoundView.d.ts → NotFoundView.d.ts} +0 -0
- /package/dist/types/view/BlockCard/views/{flexible/FlexibleResolvedView.d.ts → ResolvedView.d.ts} +0 -0
- /package/dist/types/view/BlockCard/views/{flexible/FlexibleUnauthorisedView.d.ts → UnauthorisedView.d.ts} +0 -0
- /package/dist/types/view/BlockCard/views/{flexible/styled.d.ts → styled.d.ts} +0 -0
- /package/dist/types/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/index.d.ts +0 -0
- /package/dist/types/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.d.ts +0 -0
- /package/dist/types/view/{BlockCard/components/Frame.d.ts → EmbedCard/components/ErrorFrame.d.ts} +0 -0
- /package/dist/types-ts4.5/view/BlockCard/views/{flexible/FlexibleErroredView.d.ts → ErroredView.d.ts} +0 -0
- /package/dist/types-ts4.5/view/BlockCard/views/{flexible/FlexibleForbiddenView.d.ts → ForbiddenView.d.ts} +0 -0
- /package/dist/types-ts4.5/view/BlockCard/views/{flexible/FlexibleNotFoundView.d.ts → NotFoundView.d.ts} +0 -0
- /package/dist/types-ts4.5/view/BlockCard/views/{flexible/FlexibleResolvedView.d.ts → ResolvedView.d.ts} +0 -0
- /package/dist/types-ts4.5/view/BlockCard/views/{flexible/FlexibleUnauthorisedView.d.ts → UnauthorisedView.d.ts} +0 -0
- /package/dist/types-ts4.5/view/BlockCard/views/{flexible/styled.d.ts → styled.d.ts} +0 -0
- /package/dist/types-ts4.5/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/index.d.ts +0 -0
- /package/dist/types-ts4.5/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.d.ts +0 -0
- /package/dist/types-ts4.5/view/{BlockCard/components/Frame.d.ts → EmbedCard/components/ErrorFrame.d.ts} +0 -0
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type MessageKey, type RequestAccessMessageKey } from '../../../messages';
|
|
3
|
+
import { type CustomActionItem } from '../../FlexibleCard/components/blocks/types';
|
|
4
|
+
/**
|
|
5
|
+
* Returns a CustomActionItem with a "Try Another Account" default message
|
|
6
|
+
*
|
|
7
|
+
* @see CustomActionItem
|
|
8
|
+
* @param onClick a function that will be called on the click of the button
|
|
9
|
+
* @param content is a message key for a message to be displayed in the action
|
|
10
|
+
* @param context is a variable for a message in case a message contains a placeholder
|
|
11
|
+
*/
|
|
12
|
+
export declare const ForbiddenAction: (onClick: () => void, content: RequestAccessMessageKey | MessageKey, context?: Record<string, ReactNode>, isDisabled?: boolean) => CustomActionItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type FlexibleCardProps } from '
|
|
1
|
+
import { type FlexibleCardProps } from '../../FlexibleCard/types';
|
|
2
2
|
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'analytics' | 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
2
|
+
import { type ActionItem } from '../../../FlexibleCard/components/blocks/types';
|
|
3
|
+
import { type FlexibleBlockCardProps } from '../types';
|
|
4
4
|
export type UnresolvedViewProps = PropsWithChildren<FlexibleBlockCardProps & {
|
|
5
5
|
actions?: ActionItem[];
|
|
6
6
|
showPreview?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { JsonLd } from 'json-ld-types';
|
|
2
|
-
import type { FooterBlockProps } from '
|
|
3
|
-
import type { PreviewBlockProps } from '
|
|
4
|
-
import type { TitleBlockProps } from '
|
|
5
|
-
import type { ElementItem } from '
|
|
6
|
-
import type { FlexibleUiOptions } from '
|
|
2
|
+
import type { FooterBlockProps } from '../../../FlexibleCard/components/blocks/footer-block/types';
|
|
3
|
+
import type { PreviewBlockProps } from '../../../FlexibleCard/components/blocks/preview-block/types';
|
|
4
|
+
import type { TitleBlockProps } from '../../../FlexibleCard/components/blocks/title-block/types';
|
|
5
|
+
import type { ElementItem } from '../../../FlexibleCard/components/blocks/types';
|
|
6
|
+
import type { FlexibleUiOptions } from '../../../FlexibleCard/types';
|
|
7
7
|
export declare const getSimulatedBetterMetadata: (cardDetails?: JsonLd.Response) => SimulatedMetadata;
|
|
8
8
|
type SimulatedMetadata = {
|
|
9
9
|
titleMetadata: ElementItem[];
|
|
@@ -4,9 +4,8 @@ import { type RequestAccessMessageKey } from '../../messages';
|
|
|
4
4
|
import { type InvokeHandler } from '../../model/invoke-handler';
|
|
5
5
|
import { type AnalyticsFacade } from '../../state/analytics';
|
|
6
6
|
import { type CardState } from '../../state/types';
|
|
7
|
-
import { type ActionProps } from '../BlockCard/components/Action';
|
|
8
7
|
import type { CardActionOptions, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
9
|
-
import { type OnErrorCallback } from '../types';
|
|
8
|
+
import { type ActionProps, type OnErrorCallback } from '../types';
|
|
10
9
|
export type EmbedCardProps = {
|
|
11
10
|
url: string;
|
|
12
11
|
cardState: CardState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type HoverCardResolvedProps } from './types';
|
|
3
|
-
declare const HoverCardResolvedView: ({ analytics, cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, titleBlockProps, }: HoverCardResolvedProps) => JSX.Element;
|
|
3
|
+
declare const HoverCardResolvedView: ({ analytics, cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, titleBlockProps, id, }: HoverCardResolvedProps) => JSX.Element;
|
|
4
4
|
export default HoverCardResolvedView;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import facepaint from 'facepaint';
|
|
2
3
|
declare const gs: (times: number) => string;
|
|
3
4
|
declare const br: (times?: number) => string;
|
|
4
5
|
declare const mq: facepaint.DynamicStyleFunction;
|
|
5
6
|
export { gs, br, mq };
|
|
7
|
+
export declare const handleClickCommon: (event: React.MouseEvent, onClick?: React.MouseEventHandler) => void;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type Appearance } from '@atlaskit/button';
|
|
2
3
|
import { type CardType } from '@atlaskit/linking-common';
|
|
3
4
|
import { type RequestAccessMessageKey } from '../messages';
|
|
4
|
-
import { type ActionProps } from './BlockCard/components/Action';
|
|
5
5
|
export interface WithShowControlMethodProp {
|
|
6
6
|
showControls?: () => void;
|
|
7
7
|
}
|
|
8
|
-
export interface ContextViewModel {
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
text: string;
|
|
11
|
-
}
|
|
12
8
|
export type AccessTypes = 'REQUEST_ACCESS' | 'PENDING_REQUEST_EXISTS' | 'FORBIDDEN' | 'DIRECT_ACCESS' | 'DENIED_REQUEST_EXISTS' | 'APPROVED_REQUEST_EXISTS' | 'ACCESS_EXISTS';
|
|
13
9
|
export interface AccessContext {
|
|
14
10
|
accessType?: AccessTypes;
|
|
@@ -16,6 +12,12 @@ export interface AccessContext {
|
|
|
16
12
|
url?: string;
|
|
17
13
|
smartLinksAccessMetadataExperimentCohort?: 'experiment' | 'control' | 'not-enrolled';
|
|
18
14
|
}
|
|
15
|
+
export interface ActionProps {
|
|
16
|
+
id: string;
|
|
17
|
+
text: React.ReactNode;
|
|
18
|
+
promise: () => Promise<any>;
|
|
19
|
+
buttonAppearance?: Appearance;
|
|
20
|
+
}
|
|
19
21
|
export interface RequestAccessContextProps extends AccessContext {
|
|
20
22
|
action?: ActionProps;
|
|
21
23
|
callToActionMessageKey?: RequestAccessMessageKey;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::1e6835b50307a44a077c38d864a2c66e>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataContextType = {
|
|
@@ -61,6 +61,13 @@ export type ButtonClickedShortcutGoToLinkAttributesType = {
|
|
|
61
61
|
display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
|
|
62
62
|
resourceType: string | null;
|
|
63
63
|
};
|
|
64
|
+
export type ButtonClickedIssueStatusUpdateAttributesType = {
|
|
65
|
+
actionType: string | null;
|
|
66
|
+
id: string | null;
|
|
67
|
+
definitionId: string | null;
|
|
68
|
+
display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
|
|
69
|
+
resourceType: string | null;
|
|
70
|
+
};
|
|
64
71
|
export type ButtonClickedAiSummaryAttributesType = {};
|
|
65
72
|
export type ButtonClickedCopySummaryAttributesType = {};
|
|
66
73
|
export type SummaryViewedAttributesType = {
|
|
@@ -200,6 +207,21 @@ export type ButtonClickedSmartLinkStatusOpenPreviewAttributesType = {};
|
|
|
200
207
|
export type ButtonClickedSmartLinkFollowButtonAttributesType = {};
|
|
201
208
|
export type ButtonClickedStatusUpdateActionAttributesType = {};
|
|
202
209
|
export type ButtonClickedGetStatusTransitionsActionAttributesType = {};
|
|
210
|
+
export type ButtonClickedEmbedPreviewResizeAttributesType = {
|
|
211
|
+
newSize: 'large' | 'small';
|
|
212
|
+
origin: 'smartLinkCard' | 'smartLinkEmbed' | 'smartLinkInline' | 'smartLinkPreviewHoverCard' | null;
|
|
213
|
+
previousSize: 'large' | 'small';
|
|
214
|
+
};
|
|
215
|
+
export type SmartLinkRenderSuccessAttributesType = {
|
|
216
|
+
display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
|
|
217
|
+
definitionId: string | null;
|
|
218
|
+
};
|
|
219
|
+
export type SmartLinkRenderFailedAttributesType = {
|
|
220
|
+
display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
|
|
221
|
+
error: Record<string, unknown>;
|
|
222
|
+
errorInfo: Record<string, unknown>;
|
|
223
|
+
id: string | null;
|
|
224
|
+
};
|
|
203
225
|
export type AnalyticsEventAttributes = {
|
|
204
226
|
/**
|
|
205
227
|
* Fired when an copy link is clicked */
|
|
@@ -213,6 +235,9 @@ export type AnalyticsEventAttributes = {
|
|
|
213
235
|
/**
|
|
214
236
|
* Fired when an view link is clicked */
|
|
215
237
|
'ui.button.clicked.shortcutGoToLink': ButtonClickedShortcutGoToLinkAttributesType;
|
|
238
|
+
/**
|
|
239
|
+
* fires an event that represents a user clicking on the preview action button */
|
|
240
|
+
'ui.button.clicked.issueStatusUpdate': ButtonClickedIssueStatusUpdateAttributesType;
|
|
216
241
|
/**
|
|
217
242
|
* fired when an ai summary is clicked */
|
|
218
243
|
'ui.button.clicked.aiSummary': ButtonClickedAiSummaryAttributesType;
|
|
@@ -337,5 +362,14 @@ export type AnalyticsEventAttributes = {
|
|
|
337
362
|
'ui.button.clicked.StatusUpdateAction': ButtonClickedStatusUpdateActionAttributesType;
|
|
338
363
|
/** */
|
|
339
364
|
'ui.button.clicked.GetStatusTransitionsAction': ButtonClickedGetStatusTransitionsActionAttributesType;
|
|
365
|
+
/**
|
|
366
|
+
* fires an event that represents a user clicking on the resize button in the embed preview */
|
|
367
|
+
'ui.button.clicked.embedPreviewResize': ButtonClickedEmbedPreviewResizeAttributesType;
|
|
368
|
+
/**
|
|
369
|
+
* fires an event that represents when a Smart Link was rendered successfully (even if the Smart Link errors out) */
|
|
370
|
+
'ui.smartLink.renderSuccess': SmartLinkRenderSuccessAttributesType;
|
|
371
|
+
/**
|
|
372
|
+
* fires an event that represents when a Smart Link renders unsuccessfully. */
|
|
373
|
+
'ui.smartLink.renderFailed': SmartLinkRenderFailedAttributesType;
|
|
340
374
|
};
|
|
341
375
|
export type EventKey = keyof AnalyticsEventAttributes;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { type JsonLd } from 'json-ld-types';
|
|
2
|
-
export type
|
|
2
|
+
export { type CardContext } from '@atlaskit/link-provider';
|
|
3
3
|
import { type LozengeProps as AtlaskitLozengeProps } from '@atlaskit/lozenge';
|
|
4
|
-
|
|
5
|
-
import { type ActionProps } from './view/BlockCard/components/Action';
|
|
6
|
-
import { type AccessContext } from './view/types';
|
|
4
|
+
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-15961 Internal documentation for deprecation (no external access)} */
|
|
7
5
|
export type ResolveResponse = JsonLd.Response;
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export interface RequestAccessContextProps extends AccessContext {
|
|
11
|
-
action?: ActionProps;
|
|
12
|
-
callToActionMessageKey?: RequestAccessMessageKey;
|
|
13
|
-
descriptiveMessageKey?: RequestAccessMessageKey;
|
|
14
|
-
}
|
|
6
|
+
export { type ProviderProps, type CardType } from './state';
|
|
7
|
+
export { type CardProps, type CardAppearance, type CardPlatform } from './view/Card/types';
|
|
15
8
|
export type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
|
|
16
9
|
export type LozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
|
|
17
10
|
export interface LozengeProps {
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type MessageKey, type RequestAccessMessageKey } from '../../../messages';
|
|
3
|
+
import { type CustomActionItem } from '../../FlexibleCard/components/blocks/types';
|
|
4
|
+
/**
|
|
5
|
+
* Returns a CustomActionItem with a "Try Another Account" default message
|
|
6
|
+
*
|
|
7
|
+
* @see CustomActionItem
|
|
8
|
+
* @param onClick a function that will be called on the click of the button
|
|
9
|
+
* @param content is a message key for a message to be displayed in the action
|
|
10
|
+
* @param context is a variable for a message in case a message contains a placeholder
|
|
11
|
+
*/
|
|
12
|
+
export declare const ForbiddenAction: (onClick: () => void, content: RequestAccessMessageKey | MessageKey, context?: Record<string, ReactNode>, isDisabled?: boolean) => CustomActionItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type FlexibleCardProps } from '
|
|
1
|
+
import { type FlexibleCardProps } from '../../FlexibleCard/types';
|
|
2
2
|
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'analytics' | 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
2
|
+
import { type ActionItem } from '../../../FlexibleCard/components/blocks/types';
|
|
3
|
+
import { type FlexibleBlockCardProps } from '../types';
|
|
4
4
|
export type UnresolvedViewProps = PropsWithChildren<FlexibleBlockCardProps & {
|
|
5
5
|
actions?: ActionItem[];
|
|
6
6
|
showPreview?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { JsonLd } from 'json-ld-types';
|
|
2
|
-
import type { FooterBlockProps } from '
|
|
3
|
-
import type { PreviewBlockProps } from '
|
|
4
|
-
import type { TitleBlockProps } from '
|
|
5
|
-
import type { ElementItem } from '
|
|
6
|
-
import type { FlexibleUiOptions } from '
|
|
2
|
+
import type { FooterBlockProps } from '../../../FlexibleCard/components/blocks/footer-block/types';
|
|
3
|
+
import type { PreviewBlockProps } from '../../../FlexibleCard/components/blocks/preview-block/types';
|
|
4
|
+
import type { TitleBlockProps } from '../../../FlexibleCard/components/blocks/title-block/types';
|
|
5
|
+
import type { ElementItem } from '../../../FlexibleCard/components/blocks/types';
|
|
6
|
+
import type { FlexibleUiOptions } from '../../../FlexibleCard/types';
|
|
7
7
|
export declare const getSimulatedBetterMetadata: (cardDetails?: JsonLd.Response) => SimulatedMetadata;
|
|
8
8
|
type SimulatedMetadata = {
|
|
9
9
|
titleMetadata: ElementItem[];
|
|
@@ -4,9 +4,8 @@ import { type RequestAccessMessageKey } from '../../messages';
|
|
|
4
4
|
import { type InvokeHandler } from '../../model/invoke-handler';
|
|
5
5
|
import { type AnalyticsFacade } from '../../state/analytics';
|
|
6
6
|
import { type CardState } from '../../state/types';
|
|
7
|
-
import { type ActionProps } from '../BlockCard/components/Action';
|
|
8
7
|
import type { CardActionOptions, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
9
|
-
import { type OnErrorCallback } from '../types';
|
|
8
|
+
import { type ActionProps, type OnErrorCallback } from '../types';
|
|
10
9
|
export type EmbedCardProps = {
|
|
11
10
|
url: string;
|
|
12
11
|
cardState: CardState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type HoverCardResolvedProps } from './types';
|
|
3
|
-
declare const HoverCardResolvedView: ({ analytics, cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, titleBlockProps, }: HoverCardResolvedProps) => JSX.Element;
|
|
3
|
+
declare const HoverCardResolvedView: ({ analytics, cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, titleBlockProps, id, }: HoverCardResolvedProps) => JSX.Element;
|
|
4
4
|
export default HoverCardResolvedView;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import facepaint from 'facepaint';
|
|
2
3
|
declare const gs: (times: number) => string;
|
|
3
4
|
declare const br: (times?: number) => string;
|
|
4
5
|
declare const mq: facepaint.DynamicStyleFunction;
|
|
5
6
|
export { gs, br, mq };
|
|
7
|
+
export declare const handleClickCommon: (event: React.MouseEvent, onClick?: React.MouseEventHandler) => void;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type Appearance } from '@atlaskit/button';
|
|
2
3
|
import { type CardType } from '@atlaskit/linking-common';
|
|
3
4
|
import { type RequestAccessMessageKey } from '../messages';
|
|
4
|
-
import { type ActionProps } from './BlockCard/components/Action';
|
|
5
5
|
export interface WithShowControlMethodProp {
|
|
6
6
|
showControls?: () => void;
|
|
7
7
|
}
|
|
8
|
-
export interface ContextViewModel {
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
text: string;
|
|
11
|
-
}
|
|
12
8
|
export type AccessTypes = 'REQUEST_ACCESS' | 'PENDING_REQUEST_EXISTS' | 'FORBIDDEN' | 'DIRECT_ACCESS' | 'DENIED_REQUEST_EXISTS' | 'APPROVED_REQUEST_EXISTS' | 'ACCESS_EXISTS';
|
|
13
9
|
export interface AccessContext {
|
|
14
10
|
accessType?: AccessTypes;
|
|
@@ -16,6 +12,12 @@ export interface AccessContext {
|
|
|
16
12
|
url?: string;
|
|
17
13
|
smartLinksAccessMetadataExperimentCohort?: 'experiment' | 'control' | 'not-enrolled';
|
|
18
14
|
}
|
|
15
|
+
export interface ActionProps {
|
|
16
|
+
id: string;
|
|
17
|
+
text: React.ReactNode;
|
|
18
|
+
promise: () => Promise<any>;
|
|
19
|
+
buttonAppearance?: Appearance;
|
|
20
|
+
}
|
|
19
21
|
export interface RequestAccessContextProps extends AccessContext {
|
|
20
22
|
action?: ActionProps;
|
|
21
23
|
callToActionMessageKey?: RequestAccessMessageKey;
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.ForbiddenAction = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _reactIntlNext = require("react-intl-next");
|
|
11
|
-
var _constants = require("../../../../constants");
|
|
12
|
-
var _messages = require("../../../../messages");
|
|
13
|
-
/**
|
|
14
|
-
* Returns a CustomActionItem with a "Try Another Account" default message
|
|
15
|
-
*
|
|
16
|
-
* @see CustomActionItem
|
|
17
|
-
* @param onClick a function that will be called on the click of the button
|
|
18
|
-
* @param content is a message key for a message to be displayed in the action
|
|
19
|
-
* @param context is a variable for a message in case a message contains a placeholder
|
|
20
|
-
*/
|
|
21
|
-
var ForbiddenAction = exports.ForbiddenAction = function ForbiddenAction(onClick, content, context, isDisabled) {
|
|
22
|
-
return {
|
|
23
|
-
name: _constants.ActionName.CustomAction,
|
|
24
|
-
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[content], {
|
|
25
|
-
values: context
|
|
26
|
-
})),
|
|
27
|
-
onClick: onClick,
|
|
28
|
-
testId: 'smart-action-connect-other-account',
|
|
29
|
-
isDisabled: isDisabled
|
|
30
|
-
};
|
|
31
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.handleClickCommon = void 0;
|
|
7
|
-
var handleClickCommon = exports.handleClickCommon = function handleClickCommon(event, onClick) {
|
|
8
|
-
if (onClick) {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
event.stopPropagation();
|
|
11
|
-
onClick(event);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
-
import { ActionName } from '../../../../constants';
|
|
5
|
-
import { messages } from '../../../../messages';
|
|
6
|
-
/**
|
|
7
|
-
* Returns a CustomActionItem with a "Try Another Account" default message
|
|
8
|
-
*
|
|
9
|
-
* @see CustomActionItem
|
|
10
|
-
* @param onClick a function that will be called on the click of the button
|
|
11
|
-
* @param content is a message key for a message to be displayed in the action
|
|
12
|
-
* @param context is a variable for a message in case a message contains a placeholder
|
|
13
|
-
*/
|
|
14
|
-
export const ForbiddenAction = (onClick, content, context, isDisabled) => ({
|
|
15
|
-
name: ActionName.CustomAction,
|
|
16
|
-
content: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[content], {
|
|
17
|
-
values: context
|
|
18
|
-
})),
|
|
19
|
-
onClick,
|
|
20
|
-
testId: 'smart-action-connect-other-account',
|
|
21
|
-
isDisabled
|
|
22
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
-
import { ActionName } from '../../../../constants';
|
|
5
|
-
import { messages } from '../../../../messages';
|
|
6
|
-
/**
|
|
7
|
-
* Returns a CustomActionItem with a "Try Another Account" default message
|
|
8
|
-
*
|
|
9
|
-
* @see CustomActionItem
|
|
10
|
-
* @param onClick a function that will be called on the click of the button
|
|
11
|
-
* @param content is a message key for a message to be displayed in the action
|
|
12
|
-
* @param context is a variable for a message in case a message contains a placeholder
|
|
13
|
-
*/
|
|
14
|
-
export var ForbiddenAction = function ForbiddenAction(onClick, content, context, isDisabled) {
|
|
15
|
-
return {
|
|
16
|
-
name: ActionName.CustomAction,
|
|
17
|
-
content: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[content], {
|
|
18
|
-
values: context
|
|
19
|
-
})),
|
|
20
|
-
onClick: onClick,
|
|
21
|
-
testId: 'smart-action-connect-other-account',
|
|
22
|
-
isDisabled: isDisabled
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type MessageKey, type RequestAccessMessageKey } from '../../../../messages';
|
|
3
|
-
import { type CustomActionItem } from '../../../FlexibleCard/components/blocks/types';
|
|
4
|
-
/**
|
|
5
|
-
* Returns a CustomActionItem with a "Try Another Account" default message
|
|
6
|
-
*
|
|
7
|
-
* @see CustomActionItem
|
|
8
|
-
* @param onClick a function that will be called on the click of the button
|
|
9
|
-
* @param content is a message key for a message to be displayed in the action
|
|
10
|
-
* @param context is a variable for a message in case a message contains a placeholder
|
|
11
|
-
*/
|
|
12
|
-
export declare const ForbiddenAction: (onClick: () => void, content: RequestAccessMessageKey | MessageKey, context?: Record<string, ReactNode>, isDisabled?: boolean) => CustomActionItem;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type MessageKey, type RequestAccessMessageKey } from '../../../../messages';
|
|
3
|
-
import { type CustomActionItem } from '../../../FlexibleCard/components/blocks/types';
|
|
4
|
-
/**
|
|
5
|
-
* Returns a CustomActionItem with a "Try Another Account" default message
|
|
6
|
-
*
|
|
7
|
-
* @see CustomActionItem
|
|
8
|
-
* @param onClick a function that will be called on the click of the button
|
|
9
|
-
* @param content is a message key for a message to be displayed in the action
|
|
10
|
-
* @param context is a variable for a message in case a message contains a placeholder
|
|
11
|
-
*/
|
|
12
|
-
export declare const ForbiddenAction: (onClick: () => void, content: RequestAccessMessageKey | MessageKey, context?: Record<string, ReactNode>, isDisabled?: boolean) => CustomActionItem;
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/types.js
RENAMED
|
File without changes
|
/package/dist/cjs/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/es2019/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/types.js
RENAMED
|
File without changes
|
/package/dist/es2019/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.js
RENAMED
|
File without changes
|
/package/dist/es2019/view/{BlockCard/components/Frame.js → EmbedCard/components/ErrorFrame.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/esm/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/types.js
RENAMED
|
File without changes
|
/package/dist/esm/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types/view/BlockCard/views/{flexible/FlexibleErroredView.d.ts → ErroredView.d.ts}
RENAMED
|
File without changes
|
/package/dist/types/view/BlockCard/views/{flexible/FlexibleForbiddenView.d.ts → ForbiddenView.d.ts}
RENAMED
|
File without changes
|
/package/dist/types/view/BlockCard/views/{flexible/FlexibleNotFoundView.d.ts → NotFoundView.d.ts}
RENAMED
|
File without changes
|
/package/dist/types/view/BlockCard/views/{flexible/FlexibleResolvedView.d.ts → ResolvedView.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/view/BlockCard/views/{flexible/unresolved-view → unresolved-view}/index.d.ts
RENAMED
|
File without changes
|
/package/dist/types/view/BlockCard/views/{flexible/utils → utils}/withFlexibleUIBlockCardStyle.d.ts
RENAMED
|
File without changes
|
/package/dist/types/view/{BlockCard/components/Frame.d.ts → EmbedCard/components/ErrorFrame.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|