@atlaskit/editor-plugin-card 7.2.7 → 7.3.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 +12 -0
- package/dist/cjs/nodeviews/inlineCard.js +3 -1
- package/dist/cjs/nodeviews/lazy-block-card.js +3 -1
- package/dist/cjs/nodeviews/lazy-embed-card.js +3 -1
- package/dist/cjs/nodeviews/lazy-inline-card.js +2 -1
- package/dist/cjs/pm-plugins/main.js +2 -0
- package/dist/es2019/nodeviews/inlineCard.js +3 -1
- package/dist/es2019/nodeviews/lazy-block-card.js +5 -1
- package/dist/es2019/nodeviews/lazy-embed-card.js +5 -1
- package/dist/es2019/nodeviews/lazy-inline-card.js +3 -1
- package/dist/es2019/pm-plugins/main.js +2 -0
- package/dist/esm/nodeviews/inlineCard.js +3 -1
- package/dist/esm/nodeviews/lazy-block-card.js +3 -1
- package/dist/esm/nodeviews/lazy-embed-card.js +3 -1
- package/dist/esm/nodeviews/lazy-inline-card.js +2 -1
- package/dist/esm/pm-plugins/main.js +2 -0
- package/dist/types/nodeviews/blockCard.d.ts +2 -1
- package/dist/types/nodeviews/embedCard.d.ts +2 -1
- package/dist/types/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/blockCard.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/embedCard.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/inlineCard.d.ts +1 -1
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 7.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#198611](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/198611)
|
|
8
|
+
[`a608f23cb3d4e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a608f23cb3d4e) -
|
|
9
|
+
[https://product-fabric.atlassian.net/browse/ED-28628](ED-28628) - add SSR support for smart cards
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 7.2.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -18,6 +18,7 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
18
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
19
|
var _smartCard = require("@atlaskit/smart-card");
|
|
20
20
|
var _ssr = require("@atlaskit/smart-card/ssr");
|
|
21
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
21
22
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
22
23
|
var _actions = require("../pm-plugins/actions");
|
|
23
24
|
var _utils = require("../pm-plugins/utils");
|
|
@@ -110,7 +111,8 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
110
111
|
exposure: true
|
|
111
112
|
}) ? handleOnClick : propsOnClick;
|
|
112
113
|
var card = (0, _react.useMemo)(function () {
|
|
113
|
-
|
|
114
|
+
// Should be removed when the platform_editor_smart_card_otp experiment is rolled out
|
|
115
|
+
if (isPageSSRed && url && !(0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
114
116
|
return /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
|
|
115
117
|
key: url,
|
|
116
118
|
url: url,
|
|
@@ -7,11 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.lazyBlockCardView = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
12
|
var _blockCard = require("./blockCard");
|
|
12
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
14
|
var lazyBlockCardView = exports.lazyBlockCardView = function lazyBlockCardView(props) {
|
|
14
|
-
|
|
15
|
+
var isPageSSRed = props.isPageSSRed;
|
|
16
|
+
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || isPageSSRed && (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
15
17
|
return (0, _blockCard.blockCardNodeView)(props);
|
|
16
18
|
}
|
|
17
19
|
return (0, _lazyNodeView.withLazyLoading)({
|
|
@@ -7,11 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.lazyEmbedCardView = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
12
|
var _embedCard = require("./embedCard");
|
|
12
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
14
|
var lazyEmbedCardView = exports.lazyEmbedCardView = function lazyEmbedCardView(props) {
|
|
14
|
-
|
|
15
|
+
var isPageSSRed = props.isPageSSRed;
|
|
16
|
+
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || isPageSSRed && (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
15
17
|
return (0, _embedCard.embedCardNodeView)(props);
|
|
16
18
|
}
|
|
17
19
|
return (0, _lazyNodeView.withLazyLoading)({
|
|
@@ -11,7 +11,8 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
|
11
11
|
var _inlineCard = require("./inlineCard");
|
|
12
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
13
|
var lazyInlineCardView = exports.lazyInlineCardView = function lazyInlineCardView(props) {
|
|
14
|
-
var isPageSSRed = props.isPageSSRed
|
|
14
|
+
var _props$isPageSSRed = props.isPageSSRed,
|
|
15
|
+
isPageSSRed = _props$isPageSSRed === void 0 ? false : _props$isPageSSRed;
|
|
15
16
|
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
|
|
16
17
|
return (0, _inlineCard.inlineCardNodeView)(props);
|
|
17
18
|
}
|
|
@@ -244,6 +244,7 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
|
|
|
244
244
|
onClickCallback: onClickCallback,
|
|
245
245
|
allowDatasource: options.allowDatasource,
|
|
246
246
|
inlineCardViewProducer: inlineCardViewProducer,
|
|
247
|
+
isPageSSRed: isPageSSRed,
|
|
247
248
|
CompetitorPrompt: options.CompetitorPrompt
|
|
248
249
|
}),
|
|
249
250
|
embedCard: (0, _lazyEmbedCard.lazyEmbedCardView)({
|
|
@@ -253,6 +254,7 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
|
|
|
253
254
|
pluginInjectionApi: pluginInjectionApi,
|
|
254
255
|
actionOptions: actionOptions,
|
|
255
256
|
onClickCallback: options.onClickCallback,
|
|
257
|
+
isPageSSRed: isPageSSRed,
|
|
256
258
|
CompetitorPrompt: options.CompetitorPrompt
|
|
257
259
|
})
|
|
258
260
|
}
|
|
@@ -8,6 +8,7 @@ import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-co
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
10
10
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
11
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
13
|
import { registerCard, removeCard } from '../pm-plugins/actions';
|
|
13
14
|
import { getAwarenessProps } from '../pm-plugins/utils';
|
|
@@ -106,7 +107,8 @@ export const InlineCard = /*#__PURE__*/memo(({
|
|
|
106
107
|
exposure: true
|
|
107
108
|
}) ? handleOnClick : propsOnClick;
|
|
108
109
|
const card = useMemo(() => {
|
|
109
|
-
|
|
110
|
+
// Should be removed when the platform_editor_smart_card_otp experiment is rolled out
|
|
111
|
+
if (isPageSSRed && url && !expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
110
112
|
return /*#__PURE__*/React.createElement(CardSSR, {
|
|
111
113
|
key: url,
|
|
112
114
|
url: url,
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
import { blockCardNodeView } from './blockCard';
|
|
4
5
|
export const lazyBlockCardView = props => {
|
|
5
|
-
|
|
6
|
+
const {
|
|
7
|
+
isPageSSRed
|
|
8
|
+
} = props;
|
|
9
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
6
10
|
return blockCardNodeView(props);
|
|
7
11
|
}
|
|
8
12
|
return withLazyLoading({
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
import { embedCardNodeView } from './embedCard';
|
|
4
5
|
export const lazyEmbedCardView = props => {
|
|
5
|
-
|
|
6
|
+
const {
|
|
7
|
+
isPageSSRed
|
|
8
|
+
} = props;
|
|
9
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
6
10
|
return embedCardNodeView(props);
|
|
7
11
|
}
|
|
8
12
|
return withLazyLoading({
|
|
@@ -2,7 +2,9 @@ import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
2
2
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
3
|
import { inlineCardNodeView } from './inlineCard';
|
|
4
4
|
export const lazyInlineCardView = props => {
|
|
5
|
-
const
|
|
5
|
+
const {
|
|
6
|
+
isPageSSRed = false
|
|
7
|
+
} = props;
|
|
6
8
|
if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
|
|
7
9
|
return inlineCardNodeView(props);
|
|
8
10
|
}
|
|
@@ -241,6 +241,7 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
|
|
|
241
241
|
onClickCallback,
|
|
242
242
|
allowDatasource: options.allowDatasource,
|
|
243
243
|
inlineCardViewProducer,
|
|
244
|
+
isPageSSRed,
|
|
244
245
|
CompetitorPrompt: options.CompetitorPrompt
|
|
245
246
|
}),
|
|
246
247
|
embedCard: lazyEmbedCardView({
|
|
@@ -250,6 +251,7 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
|
|
|
250
251
|
pluginInjectionApi,
|
|
251
252
|
actionOptions,
|
|
252
253
|
onClickCallback: options.onClickCallback,
|
|
254
|
+
isPageSSRed,
|
|
253
255
|
CompetitorPrompt: options.CompetitorPrompt
|
|
254
256
|
})
|
|
255
257
|
},
|
|
@@ -8,6 +8,7 @@ import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-co
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
10
10
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
11
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
13
|
import { registerCard, removeCard } from '../pm-plugins/actions';
|
|
13
14
|
import { getAwarenessProps } from '../pm-plugins/utils';
|
|
@@ -99,7 +100,8 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
99
100
|
exposure: true
|
|
100
101
|
}) ? handleOnClick : propsOnClick;
|
|
101
102
|
var card = useMemo(function () {
|
|
102
|
-
|
|
103
|
+
// Should be removed when the platform_editor_smart_card_otp experiment is rolled out
|
|
104
|
+
if (isPageSSRed && url && !expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
103
105
|
return /*#__PURE__*/React.createElement(CardSSR, {
|
|
104
106
|
key: url,
|
|
105
107
|
url: url,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
import { blockCardNodeView } from './blockCard';
|
|
4
5
|
export var lazyBlockCardView = function lazyBlockCardView(props) {
|
|
5
|
-
|
|
6
|
+
var isPageSSRed = props.isPageSSRed;
|
|
7
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
6
8
|
return blockCardNodeView(props);
|
|
7
9
|
}
|
|
8
10
|
return withLazyLoading({
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
import { embedCardNodeView } from './embedCard';
|
|
4
5
|
export var lazyEmbedCardView = function lazyEmbedCardView(props) {
|
|
5
|
-
|
|
6
|
+
var isPageSSRed = props.isPageSSRed;
|
|
7
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
|
|
6
8
|
return embedCardNodeView(props);
|
|
7
9
|
}
|
|
8
10
|
return withLazyLoading({
|
|
@@ -2,7 +2,8 @@ import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
2
2
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
3
|
import { inlineCardNodeView } from './inlineCard';
|
|
4
4
|
export var lazyInlineCardView = function lazyInlineCardView(props) {
|
|
5
|
-
var isPageSSRed = props.isPageSSRed
|
|
5
|
+
var _props$isPageSSRed = props.isPageSSRed,
|
|
6
|
+
isPageSSRed = _props$isPageSSRed === void 0 ? false : _props$isPageSSRed;
|
|
6
7
|
if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
|
|
7
8
|
return inlineCardNodeView(props);
|
|
8
9
|
}
|
|
@@ -237,6 +237,7 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
|
|
|
237
237
|
onClickCallback: onClickCallback,
|
|
238
238
|
allowDatasource: options.allowDatasource,
|
|
239
239
|
inlineCardViewProducer: inlineCardViewProducer,
|
|
240
|
+
isPageSSRed: isPageSSRed,
|
|
240
241
|
CompetitorPrompt: options.CompetitorPrompt
|
|
241
242
|
}),
|
|
242
243
|
embedCard: lazyEmbedCardView({
|
|
@@ -246,6 +247,7 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
|
|
|
246
247
|
pluginInjectionApi: pluginInjectionApi,
|
|
247
248
|
actionOptions: actionOptions,
|
|
248
249
|
onClickCallback: options.onClickCallback,
|
|
250
|
+
isPageSSRed: isPageSSRed,
|
|
249
251
|
CompetitorPrompt: options.CompetitorPrompt
|
|
250
252
|
})
|
|
251
253
|
}
|
|
@@ -25,7 +25,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
25
25
|
}) => void;
|
|
26
26
|
render(): React.JSX.Element;
|
|
27
27
|
}
|
|
28
|
-
export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback' | 'CompetitorPrompt'>;
|
|
28
|
+
export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt'>;
|
|
29
29
|
export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
|
|
30
30
|
private id;
|
|
31
31
|
unsubscribe: (() => void) | undefined;
|
|
@@ -43,6 +43,7 @@ export interface BlockCardNodeViewProperties {
|
|
|
43
43
|
onClickCallback: BlockCardNodeViewProps['onClickCallback'];
|
|
44
44
|
allowDatasource: boolean | undefined;
|
|
45
45
|
inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
|
|
46
|
+
isPageSSRed: BlockCardNodeViewProps['isPageSSRed'];
|
|
46
47
|
CompetitorPrompt?: React.ComponentType<{
|
|
47
48
|
sourceUrl: string;
|
|
48
49
|
linkType?: string;
|
|
@@ -44,7 +44,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
44
44
|
render(): React.JSX.Element;
|
|
45
45
|
}
|
|
46
46
|
export declare const EmbedOrBlockCardComponent: (props: ComponentProps<typeof EmbedCardComponent>) => React.JSX.Element;
|
|
47
|
-
export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback' | 'CompetitorPrompt'>;
|
|
47
|
+
export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt'>;
|
|
48
48
|
export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
|
|
49
49
|
private id;
|
|
50
50
|
unsubscribe: (() => void) | undefined;
|
|
@@ -61,6 +61,7 @@ export interface EmbedCardNodeViewProperties {
|
|
|
61
61
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
62
62
|
actionOptions: EmbedCardNodeViewProps['actionOptions'];
|
|
63
63
|
onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
|
|
64
|
+
isPageSSRed: EmbedCardNodeViewProps['isPageSSRed'];
|
|
64
65
|
CompetitorPrompt?: EmbedCardNodeViewProps['CompetitorPrompt'];
|
|
65
66
|
}
|
|
66
67
|
export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, CompetitorPrompt, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
|
|
@@ -14,6 +14,6 @@ export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloa
|
|
|
14
14
|
export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): React.JSX.Element;
|
|
15
15
|
export interface InlineCardNodeViewProperties {
|
|
16
16
|
inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
|
|
17
|
-
isPageSSRed
|
|
17
|
+
isPageSSRed: InlineCardNodeViewProps['isPageSSRed'];
|
|
18
18
|
}
|
|
19
19
|
export declare const inlineCardNodeView: ({ inlineCardViewProducer }: InlineCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => import("prosemirror-view").NodeView;
|
|
@@ -25,7 +25,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
25
25
|
}) => void;
|
|
26
26
|
render(): React.JSX.Element;
|
|
27
27
|
}
|
|
28
|
-
export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback' | 'CompetitorPrompt'>;
|
|
28
|
+
export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt'>;
|
|
29
29
|
export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
|
|
30
30
|
private id;
|
|
31
31
|
unsubscribe: (() => void) | undefined;
|
|
@@ -43,6 +43,7 @@ export interface BlockCardNodeViewProperties {
|
|
|
43
43
|
onClickCallback: BlockCardNodeViewProps['onClickCallback'];
|
|
44
44
|
allowDatasource: boolean | undefined;
|
|
45
45
|
inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
|
|
46
|
+
isPageSSRed: BlockCardNodeViewProps['isPageSSRed'];
|
|
46
47
|
CompetitorPrompt?: React.ComponentType<{
|
|
47
48
|
sourceUrl: string;
|
|
48
49
|
linkType?: string;
|
|
@@ -44,7 +44,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
44
44
|
render(): React.JSX.Element;
|
|
45
45
|
}
|
|
46
46
|
export declare const EmbedOrBlockCardComponent: (props: ComponentProps<typeof EmbedCardComponent>) => React.JSX.Element;
|
|
47
|
-
export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback' | 'CompetitorPrompt'>;
|
|
47
|
+
export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt'>;
|
|
48
48
|
export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
|
|
49
49
|
private id;
|
|
50
50
|
unsubscribe: (() => void) | undefined;
|
|
@@ -61,6 +61,7 @@ export interface EmbedCardNodeViewProperties {
|
|
|
61
61
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
62
62
|
actionOptions: EmbedCardNodeViewProps['actionOptions'];
|
|
63
63
|
onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
|
|
64
|
+
isPageSSRed: EmbedCardNodeViewProps['isPageSSRed'];
|
|
64
65
|
CompetitorPrompt?: EmbedCardNodeViewProps['CompetitorPrompt'];
|
|
65
66
|
}
|
|
66
67
|
export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, CompetitorPrompt, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
|
|
@@ -14,6 +14,6 @@ export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloa
|
|
|
14
14
|
export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): React.JSX.Element;
|
|
15
15
|
export interface InlineCardNodeViewProperties {
|
|
16
16
|
inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
|
|
17
|
-
isPageSSRed
|
|
17
|
+
isPageSSRed: InlineCardNodeViewProps['isPageSSRed'];
|
|
18
18
|
}
|
|
19
19
|
export declare const inlineCardNodeView: ({ inlineCardViewProducer }: InlineCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => import("prosemirror-view").NodeView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"@atlaskit/editor-plugin-grid": "^3.1.0",
|
|
48
48
|
"@atlaskit/editor-plugin-width": "^4.0.0",
|
|
49
49
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
50
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
50
|
+
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
51
51
|
"@atlaskit/frontend-utilities": "^3.1.0",
|
|
52
|
-
"@atlaskit/icon": "^27.
|
|
52
|
+
"@atlaskit/icon": "^27.10.0",
|
|
53
53
|
"@atlaskit/link": "^3.2.0",
|
|
54
54
|
"@atlaskit/link-analytics": "^10.0.0",
|
|
55
55
|
"@atlaskit/link-client-extension": "^5.0.0",
|
|
@@ -60,9 +60,9 @@
|
|
|
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.8.0",
|
|
64
64
|
"@atlaskit/theme": "^19.0.0",
|
|
65
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
65
|
+
"@atlaskit/tmp-editor-statsig": "^9.26.0",
|
|
66
66
|
"@atlaskit/tokens": "^6.0.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|
|
@@ -72,14 +72,11 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^107.
|
|
75
|
+
"@atlaskit/editor-common": "^107.20.0",
|
|
76
76
|
"@atlaskit/link-provider": "^3.4.0",
|
|
77
77
|
"react": "^18.2.0",
|
|
78
78
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
79
79
|
},
|
|
80
|
-
"devDependencies": {
|
|
81
|
-
"typescript": "~5.4.2"
|
|
82
|
-
},
|
|
83
80
|
"techstack": {
|
|
84
81
|
"@atlassian/frontend": {
|
|
85
82
|
"code-structure": [
|