@atlaskit/smart-card 19.1.13 → 19.1.14
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 +55 -0
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +1 -1
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +255 -34
- package/dist/cjs/state/hooks/useSmartLink.js +1 -1
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +1 -1
- package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -1
- package/dist/cjs/state/index.js +9 -1
- package/dist/cjs/utils/analytics/analytics.js +14 -9
- package/dist/cjs/utils/analytics/types.js +5 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithData/loader.js +2 -0
- package/dist/cjs/view/CardWithUrl/component.js +12 -8
- package/dist/cjs/view/CardWithUrl/loader.js +5 -3
- package/dist/cjs/view/HoverCard/index.js +3 -1
- package/dist/cjs/view/HoverCard/utils.js +3 -1
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/cjs/view/InlineCard/index.js +3 -1
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +196 -30
- package/dist/es2019/state/hooks/useSmartLink.js +1 -1
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +1 -1
- package/dist/es2019/state/hooks-external/useSmartLinkReload.js +1 -1
- package/dist/es2019/state/index.js +2 -1
- package/dist/es2019/utils/analytics/analytics.js +14 -9
- package/dist/es2019/utils/analytics/types.js +1 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithData/loader.js +2 -0
- package/dist/es2019/view/CardWithUrl/component.js +12 -8
- package/dist/es2019/view/CardWithUrl/loader.js +5 -3
- package/dist/es2019/view/HoverCard/index.js +3 -1
- package/dist/es2019/view/HoverCard/utils.js +1 -1
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/es2019/view/InlineCard/index.js +2 -0
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +254 -35
- package/dist/esm/state/hooks/useSmartLink.js +1 -1
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +1 -1
- package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -1
- package/dist/esm/state/index.js +2 -1
- package/dist/esm/utils/analytics/analytics.js +14 -9
- package/dist/esm/utils/analytics/types.js +1 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithData/loader.js +2 -0
- package/dist/esm/view/CardWithUrl/component.js +12 -8
- package/dist/esm/view/CardWithUrl/loader.js +5 -3
- package/dist/esm/view/HoverCard/index.js +3 -1
- package/dist/esm/view/HoverCard/utils.js +3 -1
- package/dist/esm/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/esm/view/InlineCard/index.js +3 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +144 -11
- package/dist/types/state/helpers.d.ts +2 -2
- package/dist/types/state/hooks/useSmartLink.d.ts +8 -10
- package/dist/types/state/index.d.ts +1 -0
- package/dist/types/utils/analytics/analytics.d.ts +6 -6
- package/dist/types/utils/analytics/types.d.ts +1 -0
- package/dist/types/utils/performance.d.ts +1 -1
- package/dist/types/utils/types.d.ts +1 -1
- package/dist/types/view/BlockCard/types.d.ts +1 -0
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +3 -0
- package/dist/types/view/CardWithData/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +2 -0
- package/dist/types/view/EmbedCard/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/types.d.ts +4 -0
- package/dist/types/view/HoverCard/index.d.ts +1 -1
- package/dist/types/view/HoverCard/types.d.ts +1 -0
- package/dist/types/view/HoverCard/utils.d.ts +1 -1
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +2 -0
- package/dist/types/view/InlineCard/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
3
|
import { CardAppearance, CardPlatform } from '@atlaskit/linking-common';
|
|
4
|
+
import { AnalyticsFacade } from '../../state/analytics';
|
|
4
5
|
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
5
6
|
import { InlinePreloaderStyle } from '../types';
|
|
6
7
|
export type { CardAppearance, CardPlatform };
|
|
@@ -12,6 +13,7 @@ export declare type OnResolveCallback = (data: {
|
|
|
12
13
|
}) => void;
|
|
13
14
|
export interface CardProps extends WithAnalyticsEventsProps {
|
|
14
15
|
appearance: CardAppearance;
|
|
16
|
+
id?: string;
|
|
15
17
|
platform?: CardPlatform;
|
|
16
18
|
isSelected?: boolean;
|
|
17
19
|
isFrameVisible?: boolean;
|
|
@@ -29,4 +31,5 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
29
31
|
ui?: FlexibleUiOptions;
|
|
30
32
|
children?: React.ReactNode;
|
|
31
33
|
showHoverPreview?: boolean;
|
|
34
|
+
analyticsEvents?: AnalyticsFacade;
|
|
32
35
|
}
|
|
@@ -3,6 +3,7 @@ import { CardAppearance, OnResolveCallback } from '../Card/types';
|
|
|
3
3
|
import { JsonLd } from 'json-ld-types';
|
|
4
4
|
import { InlinePreloaderStyle } from '../types';
|
|
5
5
|
export interface CardWithDataContentProps {
|
|
6
|
+
id?: string;
|
|
6
7
|
appearance: CardAppearance;
|
|
7
8
|
data: JsonLd.Data.BaseData;
|
|
8
9
|
onClick?: EventHandler<MouseEvent | KeyboardEvent>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardWithUrlContentProps } from './types';
|
|
3
|
-
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, }: CardWithUrlContentProps): JSX.Element;
|
|
3
|
+
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, analyticsEvents, }: CardWithUrlContentProps): JSX.Element;
|
|
@@ -3,6 +3,7 @@ import { CardAppearance, CardPlatform, OnResolveCallback } from '../Card/types';
|
|
|
3
3
|
import { AnalyticsHandler } from '../../utils/types';
|
|
4
4
|
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
5
5
|
import { InlinePreloaderStyle } from '../types';
|
|
6
|
+
import { AnalyticsFacade } from '../../state/analytics';
|
|
6
7
|
export declare type CardWithUrlContentProps = {
|
|
7
8
|
id: string;
|
|
8
9
|
url: string;
|
|
@@ -22,4 +23,5 @@ export declare type CardWithUrlContentProps = {
|
|
|
22
23
|
ui?: FlexibleUiOptions;
|
|
23
24
|
children?: React.ReactNode;
|
|
24
25
|
showHoverPreview?: boolean;
|
|
26
|
+
analyticsEvents?: AnalyticsFacade;
|
|
25
27
|
};
|
|
@@ -13,6 +13,7 @@ export declare type EmbedCardProps = {
|
|
|
13
13
|
handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
14
14
|
handleAnalytics: AnalyticsHandler;
|
|
15
15
|
handleInvoke: InvokeHandler;
|
|
16
|
+
id?: string;
|
|
16
17
|
isSelected?: boolean;
|
|
17
18
|
isFrameVisible?: boolean;
|
|
18
19
|
platform?: CardPlatform;
|
|
@@ -6,6 +6,10 @@ import { SmartLinkSize, SmartLinkTheme } from '../../constants';
|
|
|
6
6
|
import { CardAppearance } from '../../view/Card';
|
|
7
7
|
import { OnResolveCallback } from '../Card/types';
|
|
8
8
|
export declare type FlexibleCardProps = {
|
|
9
|
+
/**
|
|
10
|
+
* @internal A unique ID for a Smart Link.
|
|
11
|
+
*/
|
|
12
|
+
id?: string;
|
|
9
13
|
/**
|
|
10
14
|
* Determines the appearance of the Smart Link.
|
|
11
15
|
* @internal
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { HoverCardProps } from './types';
|
|
3
3
|
export declare const HoverCardComponent: FC<HoverCardProps>;
|
|
4
|
-
export declare const HoverCard: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<HoverCardProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "analyticsContext" | "key" | "url"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const HoverCard: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<HoverCardProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "id" | "analyticsContext" | "key" | "url"> & React.RefAttributes<any>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
2
2
|
import { ElementItem } from '../FlexibleCard/components/blocks/types';
|
|
3
3
|
export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
4
|
+
id?: string;
|
|
4
5
|
url: string;
|
|
5
6
|
}
|
|
6
7
|
export declare type PreviewDisplay = 'card' | 'embed';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
|
-
export declare const getSimulatedMetadata: (extensionKey
|
|
2
|
+
export declare const getSimulatedMetadata: (extensionKey?: string) => JsonLd.Primitives.Property<any>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LozengeProps } from '../../../types';
|
|
3
3
|
export interface InlineCardResolvedViewProps {
|
|
4
|
+
/** A unique ID for a Smart Link. */
|
|
5
|
+
id?: string;
|
|
4
6
|
/** The optional con of the service (e.g. Dropbox/Asana/Google/etc) to display */
|
|
5
7
|
icon?: React.ReactNode;
|
|
6
8
|
/** The name of the resource */
|
|
@@ -3,6 +3,7 @@ import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
|
3
3
|
import { CardState } from '../../state/types';
|
|
4
4
|
import { InlinePreloaderStyle } from '../types';
|
|
5
5
|
export declare type InlineCardProps = {
|
|
6
|
+
id: string;
|
|
6
7
|
url: string;
|
|
7
8
|
cardState: CardState;
|
|
8
9
|
handleAuthorize: (() => void) | undefined;
|