@atlaskit/editor-plugin-card 4.5.0 → 4.5.2
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 +17 -0
- package/dist/cjs/{plugin.js → cardPlugin.js} +6 -10
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/nodeviews/blockCard.js +1 -5
- package/dist/cjs/nodeviews/datasource.js +15 -27
- package/dist/cjs/nodeviews/embedCard.js +4 -15
- package/dist/cjs/nodeviews/genericCard.js +18 -20
- package/dist/cjs/nodeviews/inlineCard.js +1 -1
- package/dist/cjs/pm-plugins/doc.js +1 -1
- package/dist/cjs/pm-plugins/main.js +3 -3
- package/dist/cjs/{utils.js → pm-plugins/utils.js} +1 -1
- package/dist/cjs/types/index.js +5 -0
- package/dist/cjs/ui/AwarenessWrapper/index.js +3 -3
- package/dist/cjs/ui/DatasourceAppearanceButton.js +11 -13
- package/dist/cjs/ui/DatasourceModal/ModalWithState.js +17 -11
- package/dist/cjs/ui/EditLinkToolbar.js +1 -1
- package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
- package/dist/cjs/ui/EditToolbarButton/index.js +27 -29
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/DatasourceEvents.js +1 -1
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +2 -2
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/index.js +5 -25
- package/dist/cjs/ui/LayoutButton/index.js +1 -1
- package/dist/cjs/ui/LayoutButton/utils.js +1 -1
- package/dist/cjs/ui/LinkToolbarAppearance.js +8 -9
- package/dist/cjs/ui/Pulse/index.js +1 -1
- package/dist/cjs/ui/ToolbarViewedEvent.js +8 -10
- package/dist/cjs/ui/WithCardContext.js +14 -0
- package/dist/cjs/{analytics → ui/analytics}/events-from-tr.js +2 -2
- package/dist/cjs/{analytics → ui/analytics}/utils.js +1 -1
- package/dist/cjs/{datasourceErrorBoundary.js → ui/datasourceErrorBoundary.js} +1 -1
- package/dist/cjs/{toolbar.js → ui/toolbar.js} +9 -9
- package/dist/es2019/{plugin.js → cardPlugin.js} +6 -11
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/nodeviews/blockCard.js +1 -5
- package/dist/es2019/nodeviews/datasource.js +15 -27
- package/dist/es2019/nodeviews/embedCard.js +4 -16
- package/dist/es2019/nodeviews/genericCard.js +6 -10
- package/dist/es2019/nodeviews/inlineCard.js +1 -1
- package/dist/es2019/pm-plugins/doc.js +1 -1
- package/dist/es2019/pm-plugins/main.js +3 -3
- package/dist/es2019/{utils.js → pm-plugins/utils.js} +1 -1
- package/dist/es2019/ui/AwarenessWrapper/index.js +3 -3
- package/dist/es2019/ui/DatasourceAppearanceButton.js +4 -5
- package/dist/es2019/ui/DatasourceModal/ModalWithState.js +15 -7
- package/dist/es2019/ui/EditLinkToolbar.js +1 -1
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
- package/dist/es2019/ui/EditToolbarButton/index.js +27 -30
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/DatasourceEvents.js +1 -1
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +2 -2
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/index.js +4 -23
- package/dist/es2019/ui/LayoutButton/index.js +1 -1
- package/dist/es2019/ui/LayoutButton/utils.js +1 -1
- package/dist/es2019/ui/LinkToolbarAppearance.js +6 -9
- package/dist/es2019/ui/Pulse/index.js +1 -1
- package/dist/es2019/ui/ToolbarViewedEvent.js +5 -6
- package/dist/es2019/ui/WithCardContext.js +8 -0
- package/dist/es2019/{analytics → ui/analytics}/events-from-tr.js +2 -2
- package/dist/es2019/{analytics → ui/analytics}/utils.js +1 -1
- package/dist/es2019/{datasourceErrorBoundary.js → ui/datasourceErrorBoundary.js} +1 -1
- package/dist/es2019/{toolbar.js → ui/toolbar.js} +9 -9
- package/dist/esm/{plugin.js → cardPlugin.js} +6 -11
- package/dist/esm/cardPluginType.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/nodeviews/blockCard.js +1 -5
- package/dist/esm/nodeviews/datasource.js +15 -27
- package/dist/esm/nodeviews/embedCard.js +4 -15
- package/dist/esm/nodeviews/genericCard.js +18 -20
- package/dist/esm/nodeviews/inlineCard.js +1 -1
- package/dist/esm/pm-plugins/doc.js +1 -1
- package/dist/esm/pm-plugins/main.js +3 -3
- package/dist/esm/{utils.js → pm-plugins/utils.js} +1 -1
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/ui/AwarenessWrapper/index.js +3 -3
- package/dist/esm/ui/DatasourceAppearanceButton.js +11 -13
- package/dist/esm/ui/DatasourceModal/ModalWithState.js +17 -11
- package/dist/esm/ui/EditLinkToolbar.js +1 -1
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
- package/dist/esm/ui/EditToolbarButton/index.js +27 -29
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/DatasourceEvents.js +1 -1
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +2 -2
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/index.js +5 -25
- package/dist/esm/ui/LayoutButton/index.js +1 -1
- package/dist/esm/ui/LayoutButton/utils.js +1 -1
- package/dist/esm/ui/LinkToolbarAppearance.js +9 -9
- package/dist/esm/ui/Pulse/index.js +1 -1
- package/dist/esm/ui/ToolbarViewedEvent.js +8 -10
- package/dist/esm/ui/WithCardContext.js +7 -0
- package/dist/esm/{analytics → ui/analytics}/events-from-tr.js +2 -2
- package/dist/esm/{analytics → ui/analytics}/utils.js +1 -1
- package/dist/esm/{datasourceErrorBoundary.js → ui/datasourceErrorBoundary.js} +1 -1
- package/dist/esm/{toolbar.js → ui/toolbar.js} +9 -9
- package/dist/types/cardPlugin.d.ts +2 -0
- package/dist/{types-ts4.5/plugin.d.ts → types/cardPluginType.d.ts} +0 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/nodeviews/blockCard.d.ts +0 -4
- package/dist/types/nodeviews/datasource.d.ts +0 -5
- package/dist/types/nodeviews/embedCard.d.ts +0 -5
- package/dist/types/pm-plugins/util/state.d.ts +1 -1
- package/dist/{types-ts4.5 → types/pm-plugins}/utils.d.ts +1 -1
- package/dist/types/{types.d.ts → types/index.d.ts} +3 -3
- package/dist/types/ui/DatasourceAppearanceButton.d.ts +1 -1
- package/dist/types/ui/DatasourceModal/ModalWithState.d.ts +5 -4
- package/dist/types/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/ui/EditorLinkingPlatformAnalytics/common.d.ts +2 -2
- package/dist/types/ui/EditorLinkingPlatformAnalytics/index.d.ts +1 -6
- package/dist/types/ui/HyperlinkToolbarAppearance.d.ts +1 -1
- package/dist/types/ui/LayoutButton/utils.d.ts +1 -1
- package/dist/types/ui/LinkToolbarAppearance.d.ts +1 -6
- package/dist/types/ui/WithCardContext.d.ts +5 -0
- package/dist/types/{datasourceErrorBoundary.d.ts → ui/datasourceErrorBoundary.d.ts} +1 -1
- package/dist/{types-ts4.5/common → types/ui}/hooks/useLinkUpgradeDiscoverability.d.ts +1 -1
- package/dist/types/{toolbar.d.ts → ui/toolbar.d.ts} +2 -2
- package/dist/types-ts4.5/cardPlugin.d.ts +2 -0
- package/dist/{types/plugin.d.ts → types-ts4.5/cardPluginType.d.ts} +0 -1
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/blockCard.d.ts +0 -4
- package/dist/types-ts4.5/nodeviews/datasource.d.ts +0 -5
- package/dist/types-ts4.5/nodeviews/embedCard.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/util/state.d.ts +1 -1
- package/dist/{types → types-ts4.5/pm-plugins}/utils.d.ts +1 -1
- package/dist/types-ts4.5/{types.d.ts → types/index.d.ts} +3 -3
- package/dist/types-ts4.5/ui/DatasourceAppearanceButton.d.ts +1 -1
- package/dist/types-ts4.5/ui/DatasourceModal/ModalWithState.d.ts +5 -4
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/common.d.ts +2 -2
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/index.d.ts +1 -6
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearance.d.ts +1 -1
- package/dist/types-ts4.5/ui/LayoutButton/utils.d.ts +1 -1
- package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +1 -6
- package/dist/types-ts4.5/ui/WithCardContext.d.ts +5 -0
- package/dist/types-ts4.5/{datasourceErrorBoundary.d.ts → ui/datasourceErrorBoundary.d.ts} +1 -1
- package/dist/{types/common → types-ts4.5/ui}/hooks/useLinkUpgradeDiscoverability.d.ts +1 -1
- package/dist/types-ts4.5/{toolbar.d.ts → ui/toolbar.d.ts} +2 -2
- package/package.json +7 -4
- package/dist/cjs/ui/CardContextProvider.js +0 -47
- package/dist/es2019/ui/CardContextProvider.js +0 -22
- package/dist/esm/ui/CardContextProvider.js +0 -40
- package/dist/types/ui/CardContextProvider.d.ts +0 -20
- package/dist/types-ts4.5/ui/CardContextProvider.d.ts +0 -20
- /package/dist/cjs/{types.js → cardPluginType.js} +0 -0
- /package/dist/cjs/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.js +0 -0
- /package/dist/cjs/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.js +0 -0
- /package/dist/cjs/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.js +0 -0
- /package/dist/cjs/{analytics → ui/analytics}/create-events-queue.js +0 -0
- /package/dist/cjs/{analytics → ui/analytics}/index.js +0 -0
- /package/dist/cjs/{analytics → ui/analytics}/types.js +0 -0
- /package/dist/cjs/{common → ui}/hooks/useLinkUpgradeDiscoverability.js +0 -0
- /package/dist/cjs/{common → ui}/local-storage.js +0 -0
- /package/dist/es2019/{types.js → cardPluginType.js} +0 -0
- /package/dist/es2019/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.js +0 -0
- /package/dist/es2019/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.js +0 -0
- /package/dist/es2019/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.js +0 -0
- /package/dist/{esm/types.js → es2019/types/index.js} +0 -0
- /package/dist/es2019/{analytics → ui/analytics}/create-events-queue.js +0 -0
- /package/dist/es2019/{analytics → ui/analytics}/index.js +0 -0
- /package/dist/es2019/{analytics → ui/analytics}/types.js +0 -0
- /package/dist/es2019/{common → ui}/hooks/useLinkUpgradeDiscoverability.js +0 -0
- /package/dist/es2019/{common → ui}/local-storage.js +0 -0
- /package/dist/esm/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.js +0 -0
- /package/dist/esm/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.js +0 -0
- /package/dist/esm/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.js +0 -0
- /package/dist/esm/{analytics → ui/analytics}/create-events-queue.js +0 -0
- /package/dist/esm/{analytics → ui/analytics}/index.js +0 -0
- /package/dist/esm/{analytics → ui/analytics}/types.js +0 -0
- /package/dist/esm/{common → ui}/hooks/useLinkUpgradeDiscoverability.js +0 -0
- /package/dist/esm/{common → ui}/local-storage.js +0 -0
- /package/dist/types/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.d.ts +0 -0
- /package/dist/types/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.d.ts +0 -0
- /package/dist/types/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/create-events-queue.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/events-from-tr.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/index.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/types.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/utils.d.ts +0 -0
- /package/dist/types/{common → ui}/local-storage.d.ts +0 -0
- /package/dist/types-ts4.5/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.d.ts +0 -0
- /package/dist/types-ts4.5/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.d.ts +0 -0
- /package/dist/types-ts4.5/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/create-events-queue.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/events-from-tr.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/index.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/types.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/utils.d.ts +0 -0
- /package/dist/types-ts4.5/{common → ui}/local-storage.d.ts +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import ReactNodeView, { type getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
|
|
4
3
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
5
4
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -8,9 +7,6 @@ import { Datasource } from '../nodeviews/datasource';
|
|
|
8
7
|
import type { SmartCardProps } from './genericCard';
|
|
9
8
|
export declare class BlockCardComponent extends React.PureComponent<SmartCardProps> {
|
|
10
9
|
private scrollContainer?;
|
|
11
|
-
static contextTypes: {
|
|
12
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
13
|
-
};
|
|
14
10
|
constructor(props: SmartCardProps);
|
|
15
11
|
onResolve: (data: {
|
|
16
12
|
url?: string | undefined;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
7
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
9
8
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
10
9
|
import type { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
@@ -25,10 +24,6 @@ export interface DatasourceProps extends ReactComponentProps {
|
|
|
25
24
|
interface DatasourceComponentProps extends ReactComponentProps, Pick<DatasourceProps, 'node' | 'view' | 'getPos'> {
|
|
26
25
|
}
|
|
27
26
|
export declare class DatasourceComponent extends React.PureComponent<DatasourceComponentProps> {
|
|
28
|
-
static contextTypes: {
|
|
29
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
30
|
-
};
|
|
31
|
-
context: any;
|
|
32
27
|
constructor(props: DatasourceComponentProps);
|
|
33
28
|
private getDatasource;
|
|
34
29
|
private getTableView;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
4
3
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
5
4
|
import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
@@ -16,10 +15,6 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
16
15
|
private scrollContainer?;
|
|
17
16
|
private embedIframeRef;
|
|
18
17
|
constructor(props: SmartCardProps);
|
|
19
|
-
context: any;
|
|
20
|
-
static contextTypes: {
|
|
21
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
22
|
-
};
|
|
23
18
|
state: EmbedCardState;
|
|
24
19
|
private getPosSafely;
|
|
25
20
|
onResolve: (data: {
|
|
@@ -30,7 +30,7 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
30
30
|
showDatasourceModal: boolean;
|
|
31
31
|
datasourceModalType?: import("@atlaskit/editor-common/types").DatasourceModalType | undefined;
|
|
32
32
|
datasourceTableRef?: HTMLElement | undefined;
|
|
33
|
-
layout?: "
|
|
33
|
+
layout?: "center" | "wide" | "full-width" | undefined;
|
|
34
34
|
inlineCardAwarenessCandidatePosition?: number | undefined;
|
|
35
35
|
overlayCandidatePosition?: number | undefined;
|
|
36
36
|
removeOverlay?: (() => void) | undefined;
|
|
@@ -4,7 +4,7 @@ import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
7
|
-
import type { CardInfo, DatasourceNode } from '
|
|
7
|
+
import type { CardInfo, DatasourceNode } from '../types';
|
|
8
8
|
export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
|
|
9
9
|
export declare const selectedCardAppearance: (state: EditorState) => CardAppearance | undefined;
|
|
10
10
|
export type TitleUrlPair = {
|
|
@@ -7,9 +7,9 @@ import type { DatasourceModalType, EditorAppearance, LinkPickerOptions } from '@
|
|
|
7
7
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { DatasourceAdf, DatasourceAdfView } from '@atlaskit/linking-common';
|
|
9
9
|
import type { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
10
|
-
import type { EditorCardPluginEvents } from '
|
|
11
|
-
import type { CardPluginEvent } from '
|
|
12
|
-
import type { DatasourceTableLayout } from '
|
|
10
|
+
import type { EditorCardPluginEvents } from '../ui/analytics/create-events-queue';
|
|
11
|
+
import type { CardPluginEvent } from '../ui/analytics/types';
|
|
12
|
+
import type { DatasourceTableLayout } from '../ui/LayoutButton/types';
|
|
13
13
|
export type CardType = CardAppearance | 'url' | 'datasource';
|
|
14
14
|
export type DatasourceNode = Omit<Node, 'attrs'> & {
|
|
15
15
|
readonly attrs: DatasourceAdf['attrs'] & Partial<RichMediaAttributes>;
|
|
@@ -3,7 +3,7 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type
|
|
6
|
+
import { type CardContext } from '@atlaskit/link-provider';
|
|
7
7
|
export interface DatasourceAppearanceButtonProps {
|
|
8
8
|
intl: IntlShape;
|
|
9
9
|
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
@@ -4,11 +4,12 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { ConfigModalProps } from '@atlaskit/link-datasource';
|
|
5
5
|
import type { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common';
|
|
6
6
|
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
7
|
-
import type { cardPlugin } from '../../
|
|
8
|
-
|
|
7
|
+
import type { cardPlugin } from '../../cardPlugin';
|
|
8
|
+
type ModalWithStateProps = {
|
|
9
9
|
api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
10
10
|
editorView: EditorView;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
|
+
declare const SafeModalWithState: React.MemoExoticComponent<({ api, editorView }: ModalWithStateProps) => JSX.Element>;
|
|
12
13
|
export type ModalTypeToComponentMap = {
|
|
13
14
|
componentType: React.ComponentType<ConfigModalProps<InlineCardAdf | DatasourceAdf, DatasourceParameters>>;
|
|
14
15
|
datasourceId: string;
|
|
@@ -16,4 +17,4 @@ export type ModalTypeToComponentMap = {
|
|
|
16
17
|
export declare const modalTypeToComponentMap: {
|
|
17
18
|
[key in DatasourceModalType]: ModalTypeToComponentMap;
|
|
18
19
|
};
|
|
19
|
-
export default
|
|
20
|
+
export default SafeModalWithState;
|
|
@@ -7,7 +7,7 @@ import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolb
|
|
|
7
7
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
8
8
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
-
import type { cardPlugin } from '../
|
|
10
|
+
import type { cardPlugin } from '../cardPlugin';
|
|
11
11
|
export type EditLinkToolbarProps = {
|
|
12
12
|
view: EditorView;
|
|
13
13
|
providerFactory: ProviderFactory;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { EditorCardPluginEvents } from '
|
|
4
|
-
import type { CardPluginEvent } from '
|
|
3
|
+
import type { EditorCardPluginEvents } from '../analytics/create-events-queue';
|
|
4
|
+
import type { CardPluginEvent } from '../analytics/types';
|
|
5
5
|
export type AnalyticsBindingsProps = {
|
|
6
6
|
editorView: EditorView;
|
|
7
7
|
cardPluginEvents: EditorCardPluginEvents<CardPluginEvent>;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import type { AnalyticsBindingsProps } from './common';
|
|
4
3
|
export declare class EditorLinkingPlatformAnalytics extends React.PureComponent<AnalyticsBindingsProps> {
|
|
5
|
-
|
|
6
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
7
|
-
};
|
|
8
|
-
context: any;
|
|
9
|
-
render(): JSX.Element | null;
|
|
4
|
+
render(): JSX.Element;
|
|
10
5
|
}
|
|
@@ -5,7 +5,7 @@ import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import { type CardPlugin } from '../
|
|
8
|
+
import { type CardPlugin } from '../cardPluginType';
|
|
9
9
|
export interface HyperlinkToolbarAppearanceProps {
|
|
10
10
|
intl: IntlShape;
|
|
11
11
|
editorState: EditorState;
|
|
@@ -8,4 +8,4 @@ export declare const getDatasource: (editorView: EditorView) => {
|
|
|
8
8
|
node: undefined;
|
|
9
9
|
pos: undefined;
|
|
10
10
|
};
|
|
11
|
-
export declare const isDatasourceTableLayout: (layout: unknown) => layout is "
|
|
11
|
+
export declare const isDatasourceTableLayout: (layout: unknown) => layout is "center" | "wide" | "full-width";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import type { IntlShape } from 'react-intl-next';
|
|
4
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
4
|
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -19,10 +18,6 @@ export interface LinkToolbarAppearanceProps {
|
|
|
19
18
|
isDatasourceView?: boolean;
|
|
20
19
|
}
|
|
21
20
|
export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, {}> {
|
|
22
|
-
static contextTypes: {
|
|
23
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
24
|
-
};
|
|
25
|
-
context: any;
|
|
26
21
|
renderDropdown: (view?: EditorView, cardContext?: CardContext) => JSX.Element | null;
|
|
27
|
-
render(): JSX.Element
|
|
22
|
+
render(): JSX.Element;
|
|
28
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { APIError } from '@atlaskit/smart-card';
|
|
4
|
-
import type { DatasourceProps } from '
|
|
4
|
+
import type { DatasourceProps } from '../nodeviews/datasource';
|
|
5
5
|
export type DatasourceErrorBoundaryProps = React.PropsWithChildren<{
|
|
6
6
|
url?: string;
|
|
7
7
|
unsupportedComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
3
|
-
import type { cardPlugin } from '../../
|
|
3
|
+
import type { cardPlugin } from '../../cardPlugin';
|
|
4
4
|
export type LinkUpgradeDiscoverabilityProps = {
|
|
5
5
|
url: string;
|
|
6
6
|
linkPosition: number;
|
|
@@ -2,8 +2,8 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
4
|
import type { Command, ExtractInjectionAPI, FloatingToolbarHandler, FloatingToolbarItem, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { cardPlugin } from '../index';
|
|
6
|
+
import type { CardPluginOptions } from '../types';
|
|
7
7
|
export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
8
8
|
export declare const visitCardLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
9
9
|
export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { cardPlugin } from './
|
|
2
|
-
export type { CardPlugin } from './
|
|
1
|
+
export { cardPlugin } from './cardPlugin';
|
|
2
|
+
export type { CardPlugin } from './cardPluginType';
|
|
3
3
|
export type { Request, CardPluginOptions, CardPluginState } from './types';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import ReactNodeView, { type getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
|
|
4
3
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
5
4
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -8,9 +7,6 @@ import { Datasource } from '../nodeviews/datasource';
|
|
|
8
7
|
import type { SmartCardProps } from './genericCard';
|
|
9
8
|
export declare class BlockCardComponent extends React.PureComponent<SmartCardProps> {
|
|
10
9
|
private scrollContainer?;
|
|
11
|
-
static contextTypes: {
|
|
12
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
13
|
-
};
|
|
14
10
|
constructor(props: SmartCardProps);
|
|
15
11
|
onResolve: (data: {
|
|
16
12
|
url?: string | undefined;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
7
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
9
8
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
10
9
|
import type { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
@@ -25,10 +24,6 @@ export interface DatasourceProps extends ReactComponentProps {
|
|
|
25
24
|
interface DatasourceComponentProps extends ReactComponentProps, Pick<DatasourceProps, 'node' | 'view' | 'getPos'> {
|
|
26
25
|
}
|
|
27
26
|
export declare class DatasourceComponent extends React.PureComponent<DatasourceComponentProps> {
|
|
28
|
-
static contextTypes: {
|
|
29
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
30
|
-
};
|
|
31
|
-
context: any;
|
|
32
27
|
constructor(props: DatasourceComponentProps);
|
|
33
28
|
private getDatasource;
|
|
34
29
|
private getTableView;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
4
3
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
5
4
|
import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
@@ -16,10 +15,6 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
16
15
|
private scrollContainer?;
|
|
17
16
|
private embedIframeRef;
|
|
18
17
|
constructor(props: SmartCardProps);
|
|
19
|
-
context: any;
|
|
20
|
-
static contextTypes: {
|
|
21
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
22
|
-
};
|
|
23
18
|
state: EmbedCardState;
|
|
24
19
|
private getPosSafely;
|
|
25
20
|
onResolve: (data: {
|
|
@@ -30,7 +30,7 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
30
30
|
showDatasourceModal: boolean;
|
|
31
31
|
datasourceModalType?: import("@atlaskit/editor-common/types").DatasourceModalType | undefined;
|
|
32
32
|
datasourceTableRef?: HTMLElement | undefined;
|
|
33
|
-
layout?: "
|
|
33
|
+
layout?: "center" | "wide" | "full-width" | undefined;
|
|
34
34
|
inlineCardAwarenessCandidatePosition?: number | undefined;
|
|
35
35
|
overlayCandidatePosition?: number | undefined;
|
|
36
36
|
removeOverlay?: (() => void) | undefined;
|
|
@@ -4,7 +4,7 @@ import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
7
|
-
import type { CardInfo, DatasourceNode } from '
|
|
7
|
+
import type { CardInfo, DatasourceNode } from '../types';
|
|
8
8
|
export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
|
|
9
9
|
export declare const selectedCardAppearance: (state: EditorState) => CardAppearance | undefined;
|
|
10
10
|
export type TitleUrlPair = {
|
|
@@ -7,9 +7,9 @@ import type { DatasourceModalType, EditorAppearance, LinkPickerOptions } from '@
|
|
|
7
7
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { DatasourceAdf, DatasourceAdfView } from '@atlaskit/linking-common';
|
|
9
9
|
import type { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
10
|
-
import type { EditorCardPluginEvents } from '
|
|
11
|
-
import type { CardPluginEvent } from '
|
|
12
|
-
import type { DatasourceTableLayout } from '
|
|
10
|
+
import type { EditorCardPluginEvents } from '../ui/analytics/create-events-queue';
|
|
11
|
+
import type { CardPluginEvent } from '../ui/analytics/types';
|
|
12
|
+
import type { DatasourceTableLayout } from '../ui/LayoutButton/types';
|
|
13
13
|
export type CardType = CardAppearance | 'url' | 'datasource';
|
|
14
14
|
export type DatasourceNode = Omit<Node, 'attrs'> & {
|
|
15
15
|
readonly attrs: DatasourceAdf['attrs'] & Partial<RichMediaAttributes>;
|
|
@@ -3,7 +3,7 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type
|
|
6
|
+
import { type CardContext } from '@atlaskit/link-provider';
|
|
7
7
|
export interface DatasourceAppearanceButtonProps {
|
|
8
8
|
intl: IntlShape;
|
|
9
9
|
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
@@ -4,11 +4,12 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { ConfigModalProps } from '@atlaskit/link-datasource';
|
|
5
5
|
import type { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common';
|
|
6
6
|
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
7
|
-
import type { cardPlugin } from '../../
|
|
8
|
-
|
|
7
|
+
import type { cardPlugin } from '../../cardPlugin';
|
|
8
|
+
type ModalWithStateProps = {
|
|
9
9
|
api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
10
10
|
editorView: EditorView;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
|
+
declare const SafeModalWithState: React.MemoExoticComponent<({ api, editorView }: ModalWithStateProps) => JSX.Element>;
|
|
12
13
|
export type ModalTypeToComponentMap = {
|
|
13
14
|
componentType: React.ComponentType<ConfigModalProps<InlineCardAdf | DatasourceAdf, DatasourceParameters>>;
|
|
14
15
|
datasourceId: string;
|
|
@@ -16,4 +17,4 @@ export type ModalTypeToComponentMap = {
|
|
|
16
17
|
export declare const modalTypeToComponentMap: {
|
|
17
18
|
[key in DatasourceModalType]: ModalTypeToComponentMap;
|
|
18
19
|
};
|
|
19
|
-
export default
|
|
20
|
+
export default SafeModalWithState;
|
|
@@ -7,7 +7,7 @@ import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolb
|
|
|
7
7
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
8
8
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
-
import type { cardPlugin } from '../
|
|
10
|
+
import type { cardPlugin } from '../cardPlugin';
|
|
11
11
|
export type EditLinkToolbarProps = {
|
|
12
12
|
view: EditorView;
|
|
13
13
|
providerFactory: ProviderFactory;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { EditorCardPluginEvents } from '
|
|
4
|
-
import type { CardPluginEvent } from '
|
|
3
|
+
import type { EditorCardPluginEvents } from '../analytics/create-events-queue';
|
|
4
|
+
import type { CardPluginEvent } from '../analytics/types';
|
|
5
5
|
export type AnalyticsBindingsProps = {
|
|
6
6
|
editorView: EditorView;
|
|
7
7
|
cardPluginEvents: EditorCardPluginEvents<CardPluginEvent>;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import type { AnalyticsBindingsProps } from './common';
|
|
4
3
|
export declare class EditorLinkingPlatformAnalytics extends React.PureComponent<AnalyticsBindingsProps> {
|
|
5
|
-
|
|
6
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
7
|
-
};
|
|
8
|
-
context: any;
|
|
9
|
-
render(): JSX.Element | null;
|
|
4
|
+
render(): JSX.Element;
|
|
10
5
|
}
|
|
@@ -5,7 +5,7 @@ import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import { type CardPlugin } from '../
|
|
8
|
+
import { type CardPlugin } from '../cardPluginType';
|
|
9
9
|
export interface HyperlinkToolbarAppearanceProps {
|
|
10
10
|
intl: IntlShape;
|
|
11
11
|
editorState: EditorState;
|
|
@@ -8,4 +8,4 @@ export declare const getDatasource: (editorView: EditorView) => {
|
|
|
8
8
|
node: undefined;
|
|
9
9
|
pos: undefined;
|
|
10
10
|
};
|
|
11
|
-
export declare const isDatasourceTableLayout: (layout: unknown) => layout is "
|
|
11
|
+
export declare const isDatasourceTableLayout: (layout: unknown) => layout is "center" | "wide" | "full-width";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import type { IntlShape } from 'react-intl-next';
|
|
4
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
4
|
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -19,10 +18,6 @@ export interface LinkToolbarAppearanceProps {
|
|
|
19
18
|
isDatasourceView?: boolean;
|
|
20
19
|
}
|
|
21
20
|
export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, {}> {
|
|
22
|
-
static contextTypes: {
|
|
23
|
-
contextAdapter: PropTypes.Requireable<object>;
|
|
24
|
-
};
|
|
25
|
-
context: any;
|
|
26
21
|
renderDropdown: (view?: EditorView, cardContext?: CardContext) => JSX.Element | null;
|
|
27
|
-
render(): JSX.Element
|
|
22
|
+
render(): JSX.Element;
|
|
28
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { APIError } from '@atlaskit/smart-card';
|
|
4
|
-
import type { DatasourceProps } from '
|
|
4
|
+
import type { DatasourceProps } from '../nodeviews/datasource';
|
|
5
5
|
export type DatasourceErrorBoundaryProps = React.PropsWithChildren<{
|
|
6
6
|
url?: string;
|
|
7
7
|
unsupportedComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
3
|
-
import type { cardPlugin } from '../../
|
|
3
|
+
import type { cardPlugin } from '../../cardPlugin';
|
|
4
4
|
export type LinkUpgradeDiscoverabilityProps = {
|
|
5
5
|
url: string;
|
|
6
6
|
linkPosition: number;
|
|
@@ -2,8 +2,8 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
4
|
import type { Command, ExtractInjectionAPI, FloatingToolbarHandler, FloatingToolbarItem, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { cardPlugin } from '../index';
|
|
6
|
+
import type { CardPluginOptions } from '../types';
|
|
7
7
|
export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
8
8
|
export declare const visitCardLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
9
9
|
export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
|
-
"@atlaskit/analytics-next": "^10.
|
|
35
|
+
"@atlaskit/analytics-next": "^10.2.0",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.9.0",
|
|
37
37
|
"@atlaskit/editor-common": "^96.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"@atlaskit/icon": "^23.1.0",
|
|
50
50
|
"@atlaskit/link-analytics": "^8.6.0",
|
|
51
51
|
"@atlaskit/link-client-extension": "^3.0.0",
|
|
52
|
-
"@atlaskit/link-datasource": "^3.
|
|
52
|
+
"@atlaskit/link-datasource": "^3.14.0",
|
|
53
53
|
"@atlaskit/linking-common": "^6.0.0",
|
|
54
54
|
"@atlaskit/linking-types": "^9.5.0",
|
|
55
55
|
"@atlaskit/menu": "2.13.6",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
57
57
|
"@atlaskit/primitives": "^13.3.0",
|
|
58
|
-
"@atlaskit/smart-card": "^32.
|
|
58
|
+
"@atlaskit/smart-card": "^32.7.0",
|
|
59
59
|
"@atlaskit/theme": "^14.0.0",
|
|
60
60
|
"@atlaskit/tmp-editor-statsig": "^2.23.0",
|
|
61
61
|
"@atlaskit/tokens": "^2.4.0",
|
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
},
|
|
76
76
|
"techstack": {
|
|
77
77
|
"@atlassian/frontend": {
|
|
78
|
+
"code-structure": [
|
|
79
|
+
"editor-plugin"
|
|
80
|
+
],
|
|
78
81
|
"import-structure": [
|
|
79
82
|
"atlassian-conventions"
|
|
80
83
|
],
|
|
@@ -1,47 +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.CardContextProvider = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
17
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
18
|
-
/**
|
|
19
|
-
* Provides the link provider context via the legacy context adapter
|
|
20
|
-
* and children render function
|
|
21
|
-
*/
|
|
22
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
23
|
-
var CardContextProvider = exports.CardContextProvider = /*#__PURE__*/function (_React$Component) {
|
|
24
|
-
(0, _inherits2.default)(CardContextProvider, _React$Component);
|
|
25
|
-
var _super = _createSuper(CardContextProvider);
|
|
26
|
-
function CardContextProvider() {
|
|
27
|
-
(0, _classCallCheck2.default)(this, CardContextProvider);
|
|
28
|
-
return _super.apply(this, arguments);
|
|
29
|
-
}
|
|
30
|
-
(0, _createClass2.default)(CardContextProvider, [{
|
|
31
|
-
key: "render",
|
|
32
|
-
value:
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
-
|
|
35
|
-
function render() {
|
|
36
|
-
var _this$context$context;
|
|
37
|
-
var cardContext = this.context.contextAdapter ? (_this$context$context = this.context.contextAdapter.card) === null || _this$context$context === void 0 ? void 0 : _this$context$context.value : undefined;
|
|
38
|
-
return this.props.children({
|
|
39
|
-
cardContext: cardContext
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}]);
|
|
43
|
-
return CardContextProvider;
|
|
44
|
-
}(_react.default.Component);
|
|
45
|
-
(0, _defineProperty2.default)(CardContextProvider, "contextTypes", {
|
|
46
|
-
contextAdapter: _propTypes.default.object
|
|
47
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
/**
|
|
5
|
-
* Provides the link provider context via the legacy context adapter
|
|
6
|
-
* and children render function
|
|
7
|
-
*/
|
|
8
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
9
|
-
export class CardContextProvider extends React.Component {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
-
|
|
12
|
-
render() {
|
|
13
|
-
var _this$context$context;
|
|
14
|
-
const cardContext = this.context.contextAdapter ? (_this$context$context = this.context.contextAdapter.card) === null || _this$context$context === void 0 ? void 0 : _this$context$context.value : undefined;
|
|
15
|
-
return this.props.children({
|
|
16
|
-
cardContext
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
_defineProperty(CardContextProvider, "contextTypes", {
|
|
21
|
-
contextAdapter: PropTypes.object
|
|
22
|
-
});
|