@atlaskit/renderer 85.0.0 → 86.0.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 +65 -0
- package/dist/cjs/analytics/enums.js +1 -0
- package/dist/cjs/messages.js +47 -1
- package/dist/cjs/react/hooks/use-observed-width.js +94 -0
- package/dist/cjs/react/index.js +2 -0
- package/dist/cjs/react/nodes/copy-text-provider.js +2 -1
- package/dist/cjs/react/nodes/heading-anchor.js +8 -2
- package/dist/cjs/react/nodes/inlineCard.js +12 -1
- package/dist/cjs/react/nodes/mediaSingle/index.js +145 -151
- package/dist/cjs/react/nodes/mention.js +0 -2
- package/dist/cjs/react/nodes/status.js +2 -1
- package/dist/cjs/react/nodes/tableCell.js +19 -8
- package/dist/cjs/react/nodes/task-item-with-providers.js +4 -2
- package/dist/cjs/react/nodes/taskItem.js +1 -0
- package/dist/cjs/render-document.js +17 -1
- package/dist/cjs/types/smartLinksOptions.js +5 -0
- package/dist/cjs/ui/Renderer/breakout-ssr.js +47 -4
- package/dist/cjs/ui/Renderer/index.js +1 -0
- package/dist/cjs/ui/SortingIcon.js +22 -9
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/enums.js +1 -0
- package/dist/es2019/messages.js +44 -0
- package/dist/es2019/react/hooks/use-observed-width.js +59 -0
- package/dist/es2019/react/index.js +2 -0
- package/dist/es2019/react/nodes/copy-text-provider.js +2 -1
- package/dist/es2019/react/nodes/heading-anchor.js +11 -2
- package/dist/es2019/react/nodes/inlineCard.js +11 -1
- package/dist/es2019/react/nodes/mediaSingle/index.js +132 -112
- package/dist/es2019/react/nodes/mention.js +0 -2
- package/dist/es2019/react/nodes/status.js +2 -1
- package/dist/es2019/react/nodes/tableCell.js +20 -9
- package/dist/es2019/react/nodes/task-item-with-providers.js +3 -1
- package/dist/es2019/react/nodes/taskItem.js +1 -0
- package/dist/es2019/render-document.js +17 -1
- package/dist/es2019/types/smartLinksOptions.js +1 -0
- package/dist/es2019/ui/Renderer/breakout-ssr.js +45 -4
- package/dist/es2019/ui/Renderer/index.js +1 -0
- package/dist/es2019/ui/SortingIcon.js +22 -10
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/enums.js +1 -0
- package/dist/esm/messages.js +44 -0
- package/dist/esm/react/hooks/use-observed-width.js +80 -0
- package/dist/esm/react/index.js +2 -0
- package/dist/esm/react/nodes/copy-text-provider.js +2 -1
- package/dist/esm/react/nodes/heading-anchor.js +9 -2
- package/dist/esm/react/nodes/inlineCard.js +11 -1
- package/dist/esm/react/nodes/mediaSingle/index.js +140 -141
- package/dist/esm/react/nodes/mention.js +0 -2
- package/dist/esm/react/nodes/status.js +2 -1
- package/dist/esm/react/nodes/tableCell.js +17 -8
- package/dist/esm/react/nodes/task-item-with-providers.js +4 -2
- package/dist/esm/react/nodes/taskItem.js +1 -0
- package/dist/esm/render-document.js +16 -1
- package/dist/esm/types/smartLinksOptions.js +1 -0
- package/dist/esm/ui/Renderer/breakout-ssr.js +47 -4
- package/dist/esm/ui/Renderer/index.js +1 -0
- package/dist/esm/ui/SortingIcon.js +20 -10
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/enums.d.ts +2 -1
- package/dist/types/analytics/events.d.ts +2 -1
- package/dist/types/messages.d.ts +44 -0
- package/dist/types/react/hooks/use-observed-width.d.ts +3 -0
- package/dist/types/react/index.d.ts +3 -0
- package/dist/types/react/nodes/index.d.ts +1 -1
- package/dist/types/react/nodes/inlineCard.d.ts +22 -20
- package/dist/types/react/nodes/mediaSingle/index.d.ts +3 -7
- package/dist/types/react/nodes/mediaSingle/styles.d.ts +1 -1
- package/dist/types/react/nodes/mention.d.ts +0 -1
- package/dist/types/react/nodes/tableCell.d.ts +6 -59
- package/dist/types/react/nodes/task-item-with-providers.d.ts +1 -0
- package/dist/types/types/smartLinksOptions.d.ts +3 -0
- package/dist/types/ui/SortingIcon.d.ts +6 -3
- package/dist/types/ui/renderer-props.d.ts +2 -0
- package/package.json +14 -14
|
@@ -96,5 +96,6 @@ export declare enum RESOLVE_METHOD {
|
|
|
96
96
|
ORPHANED = "orphaned"
|
|
97
97
|
}
|
|
98
98
|
export declare type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
99
|
-
|
|
99
|
+
declare type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
|
|
100
|
+
export declare type AnalyticsEventPayload = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | HeadingAnchorLinkButtonAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP;
|
|
100
101
|
export {};
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -14,6 +14,50 @@ export declare const headingAnchorLinkMessages: {
|
|
|
14
14
|
defaultMessage: string;
|
|
15
15
|
description: string;
|
|
16
16
|
};
|
|
17
|
+
copyAriaLabel: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const tableCellMessages: {
|
|
24
|
+
noneSortingLabel: {
|
|
25
|
+
id: string;
|
|
26
|
+
defaultMessage: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
ascSortingLabel: {
|
|
30
|
+
id: string;
|
|
31
|
+
defaultMessage: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
descSortingLabel: {
|
|
35
|
+
id: string;
|
|
36
|
+
defaultMessage: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export declare const sortingIconMessages: {
|
|
41
|
+
noOrderLabel: {
|
|
42
|
+
id: string;
|
|
43
|
+
defaultMessage: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
ascOrderLabel: {
|
|
47
|
+
id: string;
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
descOrderLabel: {
|
|
52
|
+
id: string;
|
|
53
|
+
defaultMessage: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
invalidLabel: {
|
|
57
|
+
id: string;
|
|
58
|
+
defaultMessage: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
17
61
|
};
|
|
18
62
|
export declare const codeBlockCopyButtonMessages: {
|
|
19
63
|
copyCodeToClipboard: {
|
|
@@ -9,6 +9,7 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
9
9
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
10
10
|
import { RendererContext } from './types';
|
|
11
11
|
import { MediaOptions } from '../types/mediaOptions';
|
|
12
|
+
import { SmartLinksOptions } from '../types/smartLinksOptions';
|
|
12
13
|
export interface ReactSerializerInit {
|
|
13
14
|
providers?: ProviderFactory;
|
|
14
15
|
eventHandlers?: EventHandlers;
|
|
@@ -28,6 +29,7 @@ export interface ReactSerializerInit {
|
|
|
28
29
|
allowMediaLinking?: boolean;
|
|
29
30
|
surroundTextNodesWithTextWrapper?: boolean;
|
|
30
31
|
media?: MediaOptions;
|
|
32
|
+
smartLinks?: SmartLinksOptions;
|
|
31
33
|
allowCopyToClipboard?: boolean;
|
|
32
34
|
allowPlaceholderText?: boolean;
|
|
33
35
|
allowCustomPanels?: boolean;
|
|
@@ -72,6 +74,7 @@ export default class ReactSerializer implements Serializer<JSX.Element> {
|
|
|
72
74
|
private startPos;
|
|
73
75
|
private surroundTextNodesWithTextWrapper;
|
|
74
76
|
private media?;
|
|
77
|
+
private smartLinks?;
|
|
75
78
|
private allowAnnotations;
|
|
76
79
|
private allowSelectAllTrap?;
|
|
77
80
|
constructor(init: ReactSerializerInit);
|
|
@@ -67,7 +67,7 @@ declare const EmbedCard: (React.ComponentClass<{
|
|
|
67
67
|
isInsideOfBlockNode?: boolean | undefined;
|
|
68
68
|
allowDynamicTextSizing?: boolean | undefined;
|
|
69
69
|
}> & Loadable.LoadableComponent);
|
|
70
|
-
declare const InlineCard: (React.ComponentClass<Pick<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">, any> & Loadable.LoadableComponent) | (React.FunctionComponent<Pick<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">> & Loadable.LoadableComponent);
|
|
70
|
+
declare const InlineCard: (React.ComponentClass<Pick<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">, any> & Loadable.LoadableComponent) | (React.FunctionComponent<Pick<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">> & Loadable.LoadableComponent);
|
|
71
71
|
declare const BlockCard: (React.ComponentClass<{
|
|
72
72
|
url?: string | undefined;
|
|
73
73
|
data?: object | undefined;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
3
3
|
import { WithSmartCardStorageProps } from '../../ui/SmartCardStorage';
|
|
4
|
+
import { SmartLinksOptions } from '../../types/smartLinksOptions';
|
|
4
5
|
export interface InlineCardProps {
|
|
5
6
|
url?: string;
|
|
6
7
|
data?: object;
|
|
7
8
|
eventHandlers?: EventHandlers;
|
|
8
9
|
portal?: HTMLElement;
|
|
10
|
+
smartLinks?: SmartLinksOptions;
|
|
9
11
|
}
|
|
10
12
|
declare const _default: {
|
|
11
|
-
new (props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>): {
|
|
13
|
+
new (props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>): {
|
|
12
14
|
render(): JSX.Element;
|
|
13
15
|
context: any;
|
|
14
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
16
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
15
17
|
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
16
|
-
readonly props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">> & Readonly<{
|
|
18
|
+
readonly props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">> & Readonly<{
|
|
17
19
|
children?: React.ReactNode;
|
|
18
20
|
}>;
|
|
19
21
|
state: Readonly<{}>;
|
|
@@ -21,24 +23,24 @@ declare const _default: {
|
|
|
21
23
|
[key: string]: React.ReactInstance;
|
|
22
24
|
};
|
|
23
25
|
componentDidMount?(): void;
|
|
24
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
26
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
25
27
|
componentWillUnmount?(): void;
|
|
26
28
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
27
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, prevState: Readonly<{}>): any;
|
|
28
|
-
componentDidUpdate?(prevProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
29
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, prevState: Readonly<{}>): any;
|
|
30
|
+
componentDidUpdate?(prevProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
29
31
|
componentWillMount?(): void;
|
|
30
32
|
UNSAFE_componentWillMount?(): void;
|
|
31
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextContext: any): void;
|
|
32
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextContext: any): void;
|
|
33
|
-
componentWillUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
34
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
33
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextContext: any): void;
|
|
34
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextContext: any): void;
|
|
35
|
+
componentWillUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
36
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
35
37
|
};
|
|
36
|
-
new (props: Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">, context?: any): {
|
|
38
|
+
new (props: Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">, context?: any): {
|
|
37
39
|
render(): JSX.Element;
|
|
38
40
|
context: any;
|
|
39
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
41
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
40
42
|
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
41
|
-
readonly props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">> & Readonly<{
|
|
43
|
+
readonly props: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">> & Readonly<{
|
|
42
44
|
children?: React.ReactNode;
|
|
43
45
|
}>;
|
|
44
46
|
state: Readonly<{}>;
|
|
@@ -46,17 +48,17 @@ declare const _default: {
|
|
|
46
48
|
[key: string]: React.ReactInstance;
|
|
47
49
|
};
|
|
48
50
|
componentDidMount?(): void;
|
|
49
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
51
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
50
52
|
componentWillUnmount?(): void;
|
|
51
53
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
52
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, prevState: Readonly<{}>): any;
|
|
53
|
-
componentDidUpdate?(prevProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
54
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, prevState: Readonly<{}>): any;
|
|
55
|
+
componentDidUpdate?(prevProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
54
56
|
componentWillMount?(): void;
|
|
55
57
|
UNSAFE_componentWillMount?(): void;
|
|
56
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextContext: any): void;
|
|
57
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextContext: any): void;
|
|
58
|
-
componentWillUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
59
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
58
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextContext: any): void;
|
|
59
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextContext: any): void;
|
|
60
|
+
componentWillUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
61
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<InlineCardProps & WithSmartCardStorageProps, "data" | "url" | "eventHandlers" | "portal" | "smartLinks">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
60
62
|
};
|
|
61
63
|
contextType?: React.Context<any> | undefined;
|
|
62
64
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
3
1
|
import { default as React } from 'react';
|
|
4
2
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
4
|
+
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
5
|
+
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
5
6
|
import { AnalyticsEventPayload } from '../../../analytics/events';
|
|
6
7
|
import { RendererAppearance } from '../../../ui/Renderer/types';
|
|
7
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
8
8
|
export interface Props {
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
layout: MediaSingleLayout;
|
|
@@ -16,10 +16,6 @@ export interface Props {
|
|
|
16
16
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
17
17
|
featureFlags?: MediaFeatureFlags;
|
|
18
18
|
}
|
|
19
|
-
export interface State {
|
|
20
|
-
width?: number;
|
|
21
|
-
height?: number;
|
|
22
|
-
}
|
|
23
19
|
export declare const getMediaContainerWidth: (currentContainerWidth: number, layout: MediaSingleLayout) => number;
|
|
24
20
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
25
21
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ExtendedUIMediaSingle: import("styled-components").StyledComponentClass<import("@atlaskit/editor-common/ui").MediaSingleProps, any, Pick<import("@atlaskit/editor-common/ui").MediaSingleProps, "children" | "layout" | "width" | "height" | "className" | "containerWidth" | "isLoading" | "nodeType" | "lineLength" | "pctWidth" | "fullWidthMode" | "hasFallbackContainer"> & {
|
|
1
|
+
export declare const ExtendedUIMediaSingle: import("styled-components").StyledComponentClass<import("@atlaskit/editor-common/ui").MediaSingleProps, any, Pick<import("@atlaskit/editor-common/ui").MediaSingleProps, "children" | "layout" | "width" | "height" | "className" | "containerWidth" | "isLoading" | "nodeType" | "lineLength" | "pctWidth" | "fullWidthMode" | "hasFallbackContainer" | "handleMediaSingleRef"> & {
|
|
2
2
|
theme?: any;
|
|
3
3
|
}>;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { CellAttributes } from '@atlaskit/adf-schema';
|
|
3
3
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { AnalyticsEventPayload } from '../../analytics/events';
|
|
5
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
6
|
declare type CellProps = CellAttributes & {
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
onClick?: () => void;
|
|
@@ -17,66 +18,12 @@ export declare type CellWithSortingProps = CellProps & {
|
|
|
17
18
|
columnIndex?: number;
|
|
18
19
|
sortOrdered?: SortOrder;
|
|
19
20
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
21
|
+
} & WrappedComponentProps;
|
|
22
|
+
export declare const withSortableColumn: (WrapperComponent: React.ElementType) => React.FC<import("react-intl-next").WithIntlProps<CellWithSortingProps>> & {
|
|
23
|
+
WrappedComponent: React.ComponentType<CellWithSortingProps>;
|
|
20
24
|
};
|
|
21
|
-
export declare const
|
|
22
|
-
|
|
23
|
-
render(): JSX.Element;
|
|
24
|
-
onKeyPress: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
25
|
-
onClick: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
|
|
26
|
-
context: any;
|
|
27
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CellWithSortingProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
28
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
29
|
-
readonly props: Readonly<CellWithSortingProps> & Readonly<{
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
}>;
|
|
32
|
-
state: Readonly<{}>;
|
|
33
|
-
refs: {
|
|
34
|
-
[key: string]: React.ReactInstance;
|
|
35
|
-
};
|
|
36
|
-
componentDidMount?(): void;
|
|
37
|
-
shouldComponentUpdate?(nextProps: Readonly<CellWithSortingProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
38
|
-
componentWillUnmount?(): void;
|
|
39
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
40
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<CellWithSortingProps>, prevState: Readonly<{}>): any;
|
|
41
|
-
componentDidUpdate?(prevProps: Readonly<CellWithSortingProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
42
|
-
componentWillMount?(): void;
|
|
43
|
-
UNSAFE_componentWillMount?(): void;
|
|
44
|
-
componentWillReceiveProps?(nextProps: Readonly<CellWithSortingProps>, nextContext: any): void;
|
|
45
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CellWithSortingProps>, nextContext: any): void;
|
|
46
|
-
componentWillUpdate?(nextProps: Readonly<CellWithSortingProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
47
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<CellWithSortingProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
48
|
-
};
|
|
49
|
-
contextType?: React.Context<any> | undefined;
|
|
50
|
-
};
|
|
51
|
-
export declare const TableHeader: {
|
|
52
|
-
new (props: CellWithSortingProps): {
|
|
53
|
-
render(): JSX.Element;
|
|
54
|
-
onKeyPress: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
55
|
-
onClick: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
|
|
56
|
-
context: any;
|
|
57
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CellWithSortingProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
58
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
59
|
-
readonly props: Readonly<CellWithSortingProps> & Readonly<{
|
|
60
|
-
children?: React.ReactNode;
|
|
61
|
-
}>;
|
|
62
|
-
state: Readonly<{}>;
|
|
63
|
-
refs: {
|
|
64
|
-
[key: string]: React.ReactInstance;
|
|
65
|
-
};
|
|
66
|
-
componentDidMount?(): void;
|
|
67
|
-
shouldComponentUpdate?(nextProps: Readonly<CellWithSortingProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
68
|
-
componentWillUnmount?(): void;
|
|
69
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
70
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<CellWithSortingProps>, prevState: Readonly<{}>): any;
|
|
71
|
-
componentDidUpdate?(prevProps: Readonly<CellWithSortingProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
72
|
-
componentWillMount?(): void;
|
|
73
|
-
UNSAFE_componentWillMount?(): void;
|
|
74
|
-
componentWillReceiveProps?(nextProps: Readonly<CellWithSortingProps>, nextContext: any): void;
|
|
75
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CellWithSortingProps>, nextContext: any): void;
|
|
76
|
-
componentWillUpdate?(nextProps: Readonly<CellWithSortingProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
77
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<CellWithSortingProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
78
|
-
};
|
|
79
|
-
contextType?: React.Context<any> | undefined;
|
|
25
|
+
export declare const TableHeader: React.FC<import("react-intl-next").WithIntlProps<CellWithSortingProps>> & {
|
|
26
|
+
WrappedComponent: React.ComponentType<CellWithSortingProps>;
|
|
80
27
|
};
|
|
81
28
|
export declare const TableCell: {
|
|
82
29
|
new (props: Readonly<CellProps>): {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
4
|
export declare const TableSortIconDataUrl: string;
|
|
4
5
|
export declare enum StatusClassNames {
|
|
5
6
|
ASC = "sorting-icon-svg__asc",
|
|
@@ -10,6 +11,8 @@ export declare enum StatusClassNames {
|
|
|
10
11
|
declare type Props = {
|
|
11
12
|
isSortingAllowed: boolean;
|
|
12
13
|
sortOrdered?: SortOrder;
|
|
14
|
+
} & WrappedComponentProps;
|
|
15
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props>> & {
|
|
16
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
13
17
|
};
|
|
14
|
-
|
|
15
|
-
export default SortingIcon;
|
|
18
|
+
export default _default;
|
|
@@ -11,6 +11,7 @@ import { RendererContext } from '../';
|
|
|
11
11
|
import { RenderOutputStat } from '../render-document';
|
|
12
12
|
import { RendererAppearance, StickyHeaderProps, HeadingAnchorLinksProps } from './Renderer/types';
|
|
13
13
|
import { MediaOptions } from '../types/mediaOptions';
|
|
14
|
+
import { SmartLinksOptions } from '../types/smartLinksOptions';
|
|
14
15
|
export interface RendererProps {
|
|
15
16
|
document: any;
|
|
16
17
|
dataProviders?: ProviderFactory;
|
|
@@ -38,6 +39,7 @@ export interface RendererProps {
|
|
|
38
39
|
allowAltTextOnImages?: boolean;
|
|
39
40
|
stickyHeaders?: StickyHeaderProps;
|
|
40
41
|
media?: MediaOptions;
|
|
42
|
+
smartLinks?: SmartLinksOptions;
|
|
41
43
|
allowAnnotations?: boolean;
|
|
42
44
|
annotationProvider?: AnnotationProviders | null;
|
|
43
45
|
innerRef?: React.RefObject<HTMLDivElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "86.0.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^
|
|
28
|
-
"@atlaskit/adf-utils": "^
|
|
29
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
30
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
27
|
+
"@atlaskit/adf-schema": "^22.0.0",
|
|
28
|
+
"@atlaskit/adf-utils": "^16.0.0",
|
|
29
|
+
"@atlaskit/analytics-listeners": "^8.2.0",
|
|
30
|
+
"@atlaskit/analytics-namespaced-context": "^6.4.0",
|
|
31
31
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
32
32
|
"@atlaskit/button": "^16.1.0",
|
|
33
33
|
"@atlaskit/code": "^14.3.0",
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^64.0.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^1.6.0",
|
|
37
37
|
"@atlaskit/icon": "^21.10.0",
|
|
38
|
-
"@atlaskit/media-card": "^73.
|
|
38
|
+
"@atlaskit/media-card": "^73.2.0",
|
|
39
39
|
"@atlaskit/media-client": "^14.3.0",
|
|
40
40
|
"@atlaskit/media-common": "^2.10.0",
|
|
41
41
|
"@atlaskit/media-filmstrip": "^42.2.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@atlaskit/media-core": "^32.2.0",
|
|
61
|
-
"@atlaskit/smart-card": "^17.0
|
|
61
|
+
"@atlaskit/smart-card": "^17.1.0",
|
|
62
62
|
"react": "^16.8.0",
|
|
63
63
|
"react-dom": "^16.8.0",
|
|
64
64
|
"styled-components": "^3.2.6"
|
|
@@ -68,18 +68,18 @@
|
|
|
68
68
|
"@atlaskit/avatar": "^20.5.0",
|
|
69
69
|
"@atlaskit/css-reset": "^6.3.0",
|
|
70
70
|
"@atlaskit/docs": "*",
|
|
71
|
-
"@atlaskit/editor-core": "^
|
|
72
|
-
"@atlaskit/editor-test-helpers": "^16.
|
|
71
|
+
"@atlaskit/editor-core": "^155.0.0",
|
|
72
|
+
"@atlaskit/editor-test-helpers": "^16.1.0",
|
|
73
73
|
"@atlaskit/logo": "^13.5.0",
|
|
74
74
|
"@atlaskit/media-core": "^32.2.0",
|
|
75
75
|
"@atlaskit/media-integration-test-helpers": "^2.5.0",
|
|
76
|
-
"@atlaskit/media-test-helpers": "^29.
|
|
77
|
-
"@atlaskit/mention": "^
|
|
76
|
+
"@atlaskit/media-test-helpers": "^29.1.0",
|
|
77
|
+
"@atlaskit/mention": "^20.0.0",
|
|
78
78
|
"@atlaskit/navigation-next": "^9.0.0",
|
|
79
79
|
"@atlaskit/profilecard": "^16.2.0",
|
|
80
80
|
"@atlaskit/radio": "^5.3.0",
|
|
81
|
-
"@atlaskit/range": "^
|
|
82
|
-
"@atlaskit/smart-card": "^17.
|
|
81
|
+
"@atlaskit/range": "^6.0.0",
|
|
82
|
+
"@atlaskit/smart-card": "^17.1.0",
|
|
83
83
|
"@atlaskit/ssr": "*",
|
|
84
84
|
"@atlaskit/util-data-test": "^17.2.0",
|
|
85
85
|
"@atlaskit/visual-regression": "*",
|