@atlaskit/editor-plugin-card 7.4.8 → 7.4.9
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 +9 -0
- package/dist/cjs/nodeviews/inlineCard.js +7 -4
- package/dist/cjs/nodeviews/inlineCardWithAwareness.js +4 -2
- package/dist/es2019/nodeviews/inlineCard.js +7 -4
- package/dist/es2019/nodeviews/inlineCardWithAwareness.js +4 -2
- package/dist/esm/nodeviews/inlineCard.js +7 -4
- package/dist/esm/nodeviews/inlineCardWithAwareness.js +4 -2
- package/dist/types/nodeviews/genericCard.d.ts +1 -0
- package/dist/types/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/genericCard.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/inlineCard.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 7.4.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ffc3ef708967c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ffc3ef708967c) -
|
|
8
|
+
[ux] Adds an optional disablePreviewPanel prop on a smartcard to allow consumers opt out of
|
|
9
|
+
opening Preview Panel by default when a smartlink is clicked.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 7.4.8
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -38,7 +38,8 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
38
38
|
showHoverPreview = _ref.showHoverPreview,
|
|
39
39
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
40
40
|
isPageSSRed = _ref.isPageSSRed,
|
|
41
|
-
pluginInjectionApi = _ref.pluginInjectionApi
|
|
41
|
+
pluginInjectionApi = _ref.pluginInjectionApi,
|
|
42
|
+
disablePreviewPanel = _ref.disablePreviewPanel;
|
|
42
43
|
var _node$attrs = node.attrs,
|
|
43
44
|
url = _node$attrs.url,
|
|
44
45
|
data = _node$attrs.data;
|
|
@@ -123,7 +124,8 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
123
124
|
actionOptions: actionOptions,
|
|
124
125
|
isHovered: isHovered,
|
|
125
126
|
showHoverPreview: showHoverPreview,
|
|
126
|
-
hoverPreviewOptions: hoverPreviewOptions
|
|
127
|
+
hoverPreviewOptions: hoverPreviewOptions,
|
|
128
|
+
disablePreviewPanel: disablePreviewPanel
|
|
127
129
|
});
|
|
128
130
|
}
|
|
129
131
|
return /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
|
|
@@ -138,9 +140,10 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
138
140
|
actionOptions: actionOptions,
|
|
139
141
|
isHovered: isHovered,
|
|
140
142
|
showHoverPreview: showHoverPreview,
|
|
141
|
-
hoverPreviewOptions: hoverPreviewOptions
|
|
143
|
+
hoverPreviewOptions: hoverPreviewOptions,
|
|
144
|
+
disablePreviewPanel: disablePreviewPanel
|
|
142
145
|
});
|
|
143
|
-
}, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed]);
|
|
146
|
+
}, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, disablePreviewPanel]);
|
|
144
147
|
|
|
145
148
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready,
|
|
146
149
|
// otherwise if we got data, we can render the card directly since it doesn't need the Provider
|
|
@@ -116,7 +116,8 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
|
|
|
116
116
|
cardContext: cardContext,
|
|
117
117
|
isHovered: isHovered,
|
|
118
118
|
isPageSSRed: isPageSSRed,
|
|
119
|
-
pluginInjectionApi: pluginInjectionApi
|
|
119
|
+
pluginInjectionApi: pluginInjectionApi,
|
|
120
|
+
disablePreviewPanel: true
|
|
120
121
|
}));
|
|
121
122
|
}, [isResolvedViewRendered, node, editorAppearance, view, getPos, useAlternativePreloader, actionOptions, onResolve, onClick, cardContext, isHovered, isPageSSRed, pluginInjectionApi]);
|
|
122
123
|
var innerCardOriginal = (0, _react.useMemo)(function () {
|
|
@@ -200,7 +201,8 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
|
|
|
200
201
|
isHovered: isHovered,
|
|
201
202
|
isPageSSRed: isPageSSRed,
|
|
202
203
|
pluginInjectionApi: pluginInjectionApi,
|
|
203
|
-
showHoverPreview: mode === 'view' && showHoverPreview
|
|
204
|
+
showHoverPreview: mode === 'view' && showHoverPreview,
|
|
205
|
+
disablePreviewPanel: true
|
|
204
206
|
}));
|
|
205
207
|
} else {
|
|
206
208
|
return /*#__PURE__*/_react.default.createElement(_inlineCard.InlineCard, {
|
|
@@ -27,7 +27,8 @@ export const InlineCard = /*#__PURE__*/memo(({
|
|
|
27
27
|
showHoverPreview,
|
|
28
28
|
hoverPreviewOptions,
|
|
29
29
|
isPageSSRed,
|
|
30
|
-
pluginInjectionApi
|
|
30
|
+
pluginInjectionApi,
|
|
31
|
+
disablePreviewPanel
|
|
31
32
|
}) => {
|
|
32
33
|
const {
|
|
33
34
|
url,
|
|
@@ -119,7 +120,8 @@ export const InlineCard = /*#__PURE__*/memo(({
|
|
|
119
120
|
actionOptions: actionOptions,
|
|
120
121
|
isHovered: isHovered,
|
|
121
122
|
showHoverPreview: showHoverPreview,
|
|
122
|
-
hoverPreviewOptions: hoverPreviewOptions
|
|
123
|
+
hoverPreviewOptions: hoverPreviewOptions,
|
|
124
|
+
disablePreviewPanel: disablePreviewPanel
|
|
123
125
|
});
|
|
124
126
|
}
|
|
125
127
|
return /*#__PURE__*/React.createElement(SmartCard, {
|
|
@@ -134,9 +136,10 @@ export const InlineCard = /*#__PURE__*/memo(({
|
|
|
134
136
|
actionOptions: actionOptions,
|
|
135
137
|
isHovered: isHovered,
|
|
136
138
|
showHoverPreview: showHoverPreview,
|
|
137
|
-
hoverPreviewOptions: hoverPreviewOptions
|
|
139
|
+
hoverPreviewOptions: hoverPreviewOptions,
|
|
140
|
+
disablePreviewPanel: disablePreviewPanel
|
|
138
141
|
});
|
|
139
|
-
}, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed]);
|
|
142
|
+
}, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, disablePreviewPanel]);
|
|
140
143
|
|
|
141
144
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready,
|
|
142
145
|
// otherwise if we got data, we can render the card directly since it doesn't need the Provider
|
|
@@ -96,7 +96,8 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
|
|
|
96
96
|
cardContext: cardContext,
|
|
97
97
|
isHovered: isHovered,
|
|
98
98
|
isPageSSRed: isPageSSRed,
|
|
99
|
-
pluginInjectionApi: pluginInjectionApi
|
|
99
|
+
pluginInjectionApi: pluginInjectionApi,
|
|
100
|
+
disablePreviewPanel: true
|
|
100
101
|
}));
|
|
101
102
|
}, [isResolvedViewRendered, node, editorAppearance, view, getPos, useAlternativePreloader, actionOptions, onResolve, onClick, cardContext, isHovered, isPageSSRed, pluginInjectionApi]);
|
|
102
103
|
const innerCardOriginal = useMemo(() => /*#__PURE__*/React.createElement(InlineCard, {
|
|
@@ -179,7 +180,8 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
|
|
|
179
180
|
isHovered: isHovered,
|
|
180
181
|
isPageSSRed: isPageSSRed,
|
|
181
182
|
pluginInjectionApi: pluginInjectionApi,
|
|
182
|
-
showHoverPreview: mode === 'view' && showHoverPreview
|
|
183
|
+
showHoverPreview: mode === 'view' && showHoverPreview,
|
|
184
|
+
disablePreviewPanel: true
|
|
183
185
|
}));
|
|
184
186
|
} else {
|
|
185
187
|
return /*#__PURE__*/React.createElement(InlineCard, {
|
|
@@ -27,7 +27,8 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
27
27
|
showHoverPreview = _ref.showHoverPreview,
|
|
28
28
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
29
29
|
isPageSSRed = _ref.isPageSSRed,
|
|
30
|
-
pluginInjectionApi = _ref.pluginInjectionApi
|
|
30
|
+
pluginInjectionApi = _ref.pluginInjectionApi,
|
|
31
|
+
disablePreviewPanel = _ref.disablePreviewPanel;
|
|
31
32
|
var _node$attrs = node.attrs,
|
|
32
33
|
url = _node$attrs.url,
|
|
33
34
|
data = _node$attrs.data;
|
|
@@ -112,7 +113,8 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
112
113
|
actionOptions: actionOptions,
|
|
113
114
|
isHovered: isHovered,
|
|
114
115
|
showHoverPreview: showHoverPreview,
|
|
115
|
-
hoverPreviewOptions: hoverPreviewOptions
|
|
116
|
+
hoverPreviewOptions: hoverPreviewOptions,
|
|
117
|
+
disablePreviewPanel: disablePreviewPanel
|
|
116
118
|
});
|
|
117
119
|
}
|
|
118
120
|
return /*#__PURE__*/React.createElement(SmartCard, {
|
|
@@ -127,9 +129,10 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
127
129
|
actionOptions: actionOptions,
|
|
128
130
|
isHovered: isHovered,
|
|
129
131
|
showHoverPreview: showHoverPreview,
|
|
130
|
-
hoverPreviewOptions: hoverPreviewOptions
|
|
132
|
+
hoverPreviewOptions: hoverPreviewOptions,
|
|
133
|
+
disablePreviewPanel: disablePreviewPanel
|
|
131
134
|
});
|
|
132
|
-
}, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed]);
|
|
135
|
+
}, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, disablePreviewPanel]);
|
|
133
136
|
|
|
134
137
|
// [WS-2307]: we only render card wrapped into a Provider when the value is ready,
|
|
135
138
|
// otherwise if we got data, we can render the card directly since it doesn't need the Provider
|
|
@@ -107,7 +107,8 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
|
|
|
107
107
|
cardContext: cardContext,
|
|
108
108
|
isHovered: isHovered,
|
|
109
109
|
isPageSSRed: isPageSSRed,
|
|
110
|
-
pluginInjectionApi: pluginInjectionApi
|
|
110
|
+
pluginInjectionApi: pluginInjectionApi,
|
|
111
|
+
disablePreviewPanel: true
|
|
111
112
|
}));
|
|
112
113
|
}, [isResolvedViewRendered, node, editorAppearance, view, getPos, useAlternativePreloader, actionOptions, onResolve, onClick, cardContext, isHovered, isPageSSRed, pluginInjectionApi]);
|
|
113
114
|
var innerCardOriginal = useMemo(function () {
|
|
@@ -191,7 +192,8 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
|
|
|
191
192
|
isHovered: isHovered,
|
|
192
193
|
isPageSSRed: isPageSSRed,
|
|
193
194
|
pluginInjectionApi: pluginInjectionApi,
|
|
194
|
-
showHoverPreview: mode === 'view' && showHoverPreview
|
|
195
|
+
showHoverPreview: mode === 'view' && showHoverPreview,
|
|
196
|
+
disablePreviewPanel: true
|
|
195
197
|
}));
|
|
196
198
|
} else {
|
|
197
199
|
return /*#__PURE__*/React.createElement(InlineCard, {
|
|
@@ -4,7 +4,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { SmartCardProps } from './genericCard';
|
|
6
6
|
import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
|
|
7
|
-
export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, }: SmartCardProps) => React.JSX.Element | null>;
|
|
7
|
+
export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
|
|
8
8
|
export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt'>;
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
@@ -4,7 +4,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { SmartCardProps } from './genericCard';
|
|
6
6
|
import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
|
|
7
|
-
export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, }: SmartCardProps) => React.JSX.Element | null>;
|
|
7
|
+
export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
|
|
8
8
|
export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt'>;
|
|
9
9
|
/**
|
|
10
10
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.9",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
62
62
|
"@atlaskit/primitives": "^14.11.0",
|
|
63
|
-
"@atlaskit/smart-card": "^40.
|
|
63
|
+
"@atlaskit/smart-card": "^40.13.0",
|
|
64
64
|
"@atlaskit/theme": "^19.0.0",
|
|
65
65
|
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
66
66
|
"@atlaskit/tokens": "^6.0.0",
|