@atlaskit/editor-plugin-card 3.1.1 → 3.2.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#145026](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/145026)
8
+ [`98399b2cfafdc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/98399b2cfafdc) -
9
+ Remove references to showActions and showServerActions
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 3.1.1
4
16
 
5
17
  ### Patch Changes
@@ -97,7 +97,6 @@ var BlockCardComponent = exports.BlockCardComponent = /*#__PURE__*/function (_Re
97
97
  node = _this$props2.node,
98
98
  cardContext = _this$props2.cardContext,
99
99
  actionOptions = _this$props2.actionOptions,
100
- showServerActions = _this$props2.showServerActions,
101
100
  onClick = _this$props2.onClick;
102
101
  var _node$attrs = node.attrs,
103
102
  url = _node$attrs.url,
@@ -112,8 +111,7 @@ var BlockCardComponent = exports.BlockCardComponent = /*#__PURE__*/function (_Re
112
111
  onResolve: this.onResolve,
113
112
  onError: this.onError,
114
113
  platform: 'web',
115
- actionOptions: actionOptions,
116
- showServerActions: showServerActions
114
+ actionOptions: actionOptions
117
115
  }), this.gapCursorSpan());
118
116
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
119
117
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -186,7 +184,6 @@ var BlockCard = exports.BlockCard = /*#__PURE__*/function (_ReactNodeView) {
186
184
  value: function render() {
187
185
  var _this$reactComponentP3 = this.reactComponentProps,
188
186
  actionOptions = _this$reactComponentP3.actionOptions,
189
- showServerActions = _this$reactComponentP3.showServerActions,
190
187
  pluginInjectionApi = _this$reactComponentP3.pluginInjectionApi,
191
188
  onClickCallback = _this$reactComponentP3.onClickCallback;
192
189
  return /*#__PURE__*/_react.default.createElement(WrappedBlockCard, {
@@ -194,7 +191,6 @@ var BlockCard = exports.BlockCard = /*#__PURE__*/function (_ReactNodeView) {
194
191
  view: this.view,
195
192
  getPos: this.getPos,
196
193
  actionOptions: actionOptions,
197
- showServerActions: showServerActions,
198
194
  pluginInjectionApi: pluginInjectionApi,
199
195
  onClickCallback: onClickCallback
200
196
  });
@@ -211,7 +207,6 @@ var BlockCard = exports.BlockCard = /*#__PURE__*/function (_ReactNodeView) {
211
207
  var blockCardNodeView = exports.blockCardNodeView = function blockCardNodeView(_ref3) {
212
208
  var pmPluginFactoryParams = _ref3.pmPluginFactoryParams,
213
209
  actionOptions = _ref3.actionOptions,
214
- showServerActions = _ref3.showServerActions,
215
210
  pluginInjectionApi = _ref3.pluginInjectionApi,
216
211
  onClickCallback = _ref3.onClickCallback,
217
212
  allowDatasource = _ref3.allowDatasource,
@@ -221,7 +216,6 @@ var blockCardNodeView = exports.blockCardNodeView = function blockCardNodeView(_
221
216
  eventDispatcher = pmPluginFactoryParams.eventDispatcher;
222
217
  var reactComponentProps = {
223
218
  actionOptions: actionOptions,
224
- showServerActions: showServerActions,
225
219
  pluginInjectionApi: pluginInjectionApi,
226
220
  onClickCallback: onClickCallback
227
221
  };
@@ -271,7 +271,6 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
271
271
  getPos = _this$props.getPos,
272
272
  pluginInjectionApi = _this$props.pluginInjectionApi,
273
273
  actionOptions = _this$props.actionOptions,
274
- showServerActions = _this$props.showServerActions,
275
274
  onClick = _this$props.onClick;
276
275
  var _node$attrs = node.attrs,
277
276
  url = _node$attrs.url,
@@ -311,8 +310,7 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
311
310
  platform: 'web',
312
311
  container: this.scrollContainer,
313
312
  embedIframeRef: this.embedIframeRef,
314
- actionOptions: actionOptions,
315
- showServerActions: showServerActions
313
+ actionOptions: actionOptions
316
314
  });
317
315
  var cardInner = /*#__PURE__*/_react.default.createElement(_smartCard.EmbedResizeMessageListener, {
318
316
  embedIframeRef: this.embedIframeRef,
@@ -425,7 +423,6 @@ var embedCardNodeView = exports.embedCardNodeView = function embedCardNodeView(_
425
423
  pmPluginFactoryParams = _ref4.pmPluginFactoryParams,
426
424
  pluginInjectionApi = _ref4.pluginInjectionApi,
427
425
  actionOptions = _ref4.actionOptions,
428
- showServerActions = _ref4.showServerActions,
429
426
  onClickCallback = _ref4.onClickCallback;
430
427
  return function (node, view, getPos) {
431
428
  var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
@@ -438,7 +435,6 @@ var embedCardNodeView = exports.embedCardNodeView = function embedCardNodeView(_
438
435
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
439
436
  pluginInjectionApi: pluginInjectionApi,
440
437
  actionOptions: actionOptions,
441
- showServerActions: showServerActions,
442
438
  onClickCallback: onClickCallback
443
439
  };
444
440
  return new EmbedCard(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, undefined).init();
@@ -27,7 +27,6 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
27
27
  var node = _ref.node,
28
28
  cardContext = _ref.cardContext,
29
29
  actionOptions = _ref.actionOptions,
30
- showServerActions = _ref.showServerActions,
31
30
  useAlternativePreloader = _ref.useAlternativePreloader,
32
31
  view = _ref.view,
33
32
  getPos = _ref.getPos,
@@ -88,12 +87,11 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
88
87
  onError: onError,
89
88
  inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
90
89
  actionOptions: actionOptions,
91
- showServerActions: showServerActions,
92
90
  isHovered: isHovered,
93
91
  showHoverPreview: showHoverPreview,
94
92
  hoverPreviewOptions: hoverPreviewOptions
95
93
  });
96
- }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, showServerActions, isHovered, showHoverPreview, hoverPreviewOptions]);
94
+ }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions]);
97
95
 
98
96
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
99
97
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -110,7 +108,6 @@ function InlineCardNodeView(props) {
110
108
  view = props.view,
111
109
  getPos = props.getPos,
112
110
  actionOptions = props.actionOptions,
113
- showServerActions = props.showServerActions,
114
111
  allowEmbeds = props.allowEmbeds,
115
112
  allowBlockCards = props.allowBlockCards,
116
113
  enableInlineUpgradeFeatures = props.enableInlineUpgradeFeatures,
@@ -134,7 +131,6 @@ function InlineCardNodeView(props) {
134
131
  view: view,
135
132
  getPos: getPos,
136
133
  actionOptions: actionOptions,
137
- showServerActions: showServerActions,
138
134
  useAlternativePreloader: useAlternativePreloader,
139
135
  onClickCallback: onClickCallback,
140
136
  showHoverPreview: showHoverPreview,
@@ -162,7 +158,6 @@ function InlineCardNodeView(props) {
162
158
  view: view,
163
159
  getPos: getPos,
164
160
  actionOptions: actionOptions,
165
- showServerActions: showServerActions,
166
161
  useAlternativePreloader: useAlternativePreloader,
167
162
  pluginInjectionApi: pluginInjectionApi,
168
163
  onClickCallback: onClickCallback
@@ -17,7 +17,6 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
17
17
  var node = _ref.node,
18
18
  cardContext = _ref.cardContext,
19
19
  actionOptions = _ref.actionOptions,
20
- showServerActions = _ref.showServerActions,
21
20
  useAlternativePreloader = _ref.useAlternativePreloader,
22
21
  view = _ref.view,
23
22
  getPos = _ref.getPos,
@@ -63,13 +62,12 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
63
62
  getPos: getPos,
64
63
  useAlternativePreloader: useAlternativePreloader,
65
64
  actionOptions: actionOptions,
66
- showServerActions: showServerActions,
67
65
  onResolve: onResolve,
68
66
  onClick: onClick,
69
67
  cardContext: cardContext,
70
68
  isHovered: isHovered
71
69
  });
72
- }, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, showServerActions, useAlternativePreloader, view]);
70
+ }, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view]);
73
71
  return isOverlayEnabled || isPulseEnabled ? /*#__PURE__*/_react.default.createElement(_AwarenessWrapper.AwarenessWrapper, {
74
72
  isOverlayEnabled: isOverlayEnabled,
75
73
  isPulseEnabled: isPulseEnabled,
@@ -68,7 +68,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
68
68
  useAlternativePreloader = options.useAlternativePreloader,
69
69
  fullWidthMode = options.fullWidthMode,
70
70
  actionOptions = options.actionOptions,
71
- showServerActions = options.showServerActions,
72
71
  cardPluginEvents = options.cardPluginEvents,
73
72
  showUpgradeDiscoverability = options.showUpgradeDiscoverability,
74
73
  allowEmbeds = options.allowEmbeds,
@@ -82,7 +81,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
82
81
  extraComponentProps: {
83
82
  useAlternativePreloader: useAlternativePreloader,
84
83
  actionOptions: actionOptions,
85
- showServerActions: showServerActions,
86
84
  enableInlineUpgradeFeatures: enableInlineUpgradeFeatures,
87
85
  allowEmbeds: allowEmbeds,
88
86
  allowBlockCards: allowBlockCards,
@@ -261,7 +259,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
261
259
  blockCard: (0, _lazyBlockCard.lazyBlockCardView)({
262
260
  pmPluginFactoryParams: pmPluginFactoryParams,
263
261
  actionOptions: actionOptions,
264
- showServerActions: showServerActions,
265
262
  pluginInjectionApi: pluginInjectionApi,
266
263
  onClickCallback: onClickCallback,
267
264
  allowDatasource: options.allowDatasource,
@@ -273,7 +270,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
273
270
  pmPluginFactoryParams: pmPluginFactoryParams,
274
271
  pluginInjectionApi: pluginInjectionApi,
275
272
  actionOptions: actionOptions,
276
- showServerActions: showServerActions,
277
273
  onClickCallback: options.onClickCallback
278
274
  })
279
275
  }
@@ -76,7 +76,6 @@ export class BlockCardComponent extends React.PureComponent {
76
76
  node,
77
77
  cardContext,
78
78
  actionOptions,
79
- showServerActions,
80
79
  onClick
81
80
  } = this.props;
82
81
  const {
@@ -93,8 +92,7 @@ export class BlockCardComponent extends React.PureComponent {
93
92
  onResolve: this.onResolve,
94
93
  onError: this.onError,
95
94
  platform: 'web',
96
- actionOptions: actionOptions,
97
- showServerActions: showServerActions
95
+ actionOptions: actionOptions
98
96
  }), this.gapCursorSpan());
99
97
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
100
98
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -146,7 +144,6 @@ export class BlockCard extends ReactNodeView {
146
144
  render() {
147
145
  const {
148
146
  actionOptions,
149
- showServerActions,
150
147
  pluginInjectionApi,
151
148
  onClickCallback
152
149
  } = this.reactComponentProps;
@@ -155,7 +152,6 @@ export class BlockCard extends ReactNodeView {
155
152
  view: this.view,
156
153
  getPos: this.getPos,
157
154
  actionOptions: actionOptions,
158
- showServerActions: showServerActions,
159
155
  pluginInjectionApi: pluginInjectionApi,
160
156
  onClickCallback: onClickCallback
161
157
  });
@@ -168,7 +164,6 @@ export class BlockCard extends ReactNodeView {
168
164
  export const blockCardNodeView = ({
169
165
  pmPluginFactoryParams,
170
166
  actionOptions,
171
- showServerActions,
172
167
  pluginInjectionApi,
173
168
  onClickCallback,
174
169
  allowDatasource,
@@ -180,7 +175,6 @@ export const blockCardNodeView = ({
180
175
  } = pmPluginFactoryParams;
181
176
  const reactComponentProps = {
182
177
  actionOptions,
183
- showServerActions,
184
178
  pluginInjectionApi,
185
179
  onClickCallback: onClickCallback
186
180
  };
@@ -257,7 +257,6 @@ export class EmbedCardComponent extends React.PureComponent {
257
257
  getPos,
258
258
  pluginInjectionApi,
259
259
  actionOptions,
260
- showServerActions,
261
260
  onClick
262
261
  } = this.props;
263
262
  let {
@@ -300,8 +299,7 @@ export class EmbedCardComponent extends React.PureComponent {
300
299
  platform: 'web',
301
300
  container: this.scrollContainer,
302
301
  embedIframeRef: this.embedIframeRef,
303
- actionOptions: actionOptions,
304
- showServerActions: showServerActions
302
+ actionOptions: actionOptions
305
303
  });
306
304
  const cardInner = /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
307
305
  embedIframeRef: this.embedIframeRef,
@@ -393,7 +391,6 @@ export const embedCardNodeView = ({
393
391
  pmPluginFactoryParams,
394
392
  pluginInjectionApi,
395
393
  actionOptions,
396
- showServerActions,
397
394
  onClickCallback
398
395
  }) => (node, view, getPos) => {
399
396
  const {
@@ -408,7 +405,6 @@ export const embedCardNodeView = ({
408
405
  dispatchAnalyticsEvent,
409
406
  pluginInjectionApi,
410
407
  actionOptions,
411
- showServerActions,
412
408
  onClickCallback: onClickCallback
413
409
  };
414
410
  return new EmbedCard(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, undefined).init();
@@ -15,7 +15,6 @@ export const InlineCard = /*#__PURE__*/memo(({
15
15
  node,
16
16
  cardContext,
17
17
  actionOptions,
18
- showServerActions,
19
18
  useAlternativePreloader,
20
19
  view,
21
20
  getPos,
@@ -79,11 +78,10 @@ export const InlineCard = /*#__PURE__*/memo(({
79
78
  onError: onError,
80
79
  inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
81
80
  actionOptions: actionOptions,
82
- showServerActions: showServerActions,
83
81
  isHovered: isHovered,
84
82
  showHoverPreview: showHoverPreview,
85
83
  hoverPreviewOptions: hoverPreviewOptions
86
- }), [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, showServerActions, isHovered, showHoverPreview, hoverPreviewOptions]);
84
+ }), [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions]);
87
85
 
88
86
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
89
87
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -101,7 +99,6 @@ export function InlineCardNodeView(props) {
101
99
  view,
102
100
  getPos,
103
101
  actionOptions,
104
- showServerActions,
105
102
  allowEmbeds,
106
103
  allowBlockCards,
107
104
  enableInlineUpgradeFeatures,
@@ -124,7 +121,6 @@ export function InlineCardNodeView(props) {
124
121
  view: view,
125
122
  getPos: getPos,
126
123
  actionOptions: actionOptions,
127
- showServerActions: showServerActions,
128
124
  useAlternativePreloader: useAlternativePreloader,
129
125
  onClickCallback: onClickCallback,
130
126
  showHoverPreview: showHoverPreview,
@@ -152,7 +148,6 @@ export function InlineCardNodeView(props) {
152
148
  view: view,
153
149
  getPos: getPos,
154
150
  actionOptions: actionOptions,
155
- showServerActions: showServerActions,
156
151
  useAlternativePreloader: useAlternativePreloader,
157
152
  pluginInjectionApi: pluginInjectionApi,
158
153
  onClickCallback: onClickCallback
@@ -6,7 +6,6 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
6
6
  node,
7
7
  cardContext,
8
8
  actionOptions,
9
- showServerActions,
10
9
  useAlternativePreloader,
11
10
  view,
12
11
  getPos,
@@ -41,12 +40,11 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
41
40
  getPos: getPos,
42
41
  useAlternativePreloader: useAlternativePreloader,
43
42
  actionOptions: actionOptions,
44
- showServerActions: showServerActions,
45
43
  onResolve: onResolve,
46
44
  onClick: onClick,
47
45
  cardContext: cardContext,
48
46
  isHovered: isHovered
49
- }), [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, showServerActions, useAlternativePreloader, view]);
47
+ }), [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view]);
50
48
  return isOverlayEnabled || isPulseEnabled ? /*#__PURE__*/React.createElement(AwarenessWrapper, {
51
49
  isOverlayEnabled: isOverlayEnabled,
52
50
  isPulseEnabled: isPulseEnabled,
@@ -51,7 +51,6 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
51
51
  useAlternativePreloader,
52
52
  fullWidthMode,
53
53
  actionOptions,
54
- showServerActions,
55
54
  cardPluginEvents,
56
55
  showUpgradeDiscoverability,
57
56
  allowEmbeds,
@@ -67,7 +66,6 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
67
66
  extraComponentProps: {
68
67
  useAlternativePreloader,
69
68
  actionOptions,
70
- showServerActions,
71
69
  enableInlineUpgradeFeatures,
72
70
  allowEmbeds,
73
71
  allowBlockCards,
@@ -254,7 +252,6 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
254
252
  blockCard: lazyBlockCardView({
255
253
  pmPluginFactoryParams,
256
254
  actionOptions,
257
- showServerActions,
258
255
  pluginInjectionApi,
259
256
  onClickCallback,
260
257
  allowDatasource: options.allowDatasource,
@@ -266,7 +263,6 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
266
263
  pmPluginFactoryParams,
267
264
  pluginInjectionApi,
268
265
  actionOptions,
269
- showServerActions,
270
266
  onClickCallback: options.onClickCallback
271
267
  })
272
268
  },
@@ -91,7 +91,6 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
91
91
  node = _this$props2.node,
92
92
  cardContext = _this$props2.cardContext,
93
93
  actionOptions = _this$props2.actionOptions,
94
- showServerActions = _this$props2.showServerActions,
95
94
  onClick = _this$props2.onClick;
96
95
  var _node$attrs = node.attrs,
97
96
  url = _node$attrs.url,
@@ -106,8 +105,7 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
106
105
  onResolve: this.onResolve,
107
106
  onError: this.onError,
108
107
  platform: 'web',
109
- actionOptions: actionOptions,
110
- showServerActions: showServerActions
108
+ actionOptions: actionOptions
111
109
  }), this.gapCursorSpan());
112
110
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
113
111
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -180,7 +178,6 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
180
178
  value: function render() {
181
179
  var _this$reactComponentP3 = this.reactComponentProps,
182
180
  actionOptions = _this$reactComponentP3.actionOptions,
183
- showServerActions = _this$reactComponentP3.showServerActions,
184
181
  pluginInjectionApi = _this$reactComponentP3.pluginInjectionApi,
185
182
  onClickCallback = _this$reactComponentP3.onClickCallback;
186
183
  return /*#__PURE__*/React.createElement(WrappedBlockCard, {
@@ -188,7 +185,6 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
188
185
  view: this.view,
189
186
  getPos: this.getPos,
190
187
  actionOptions: actionOptions,
191
- showServerActions: showServerActions,
192
188
  pluginInjectionApi: pluginInjectionApi,
193
189
  onClickCallback: onClickCallback
194
190
  });
@@ -205,7 +201,6 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
205
201
  export var blockCardNodeView = function blockCardNodeView(_ref3) {
206
202
  var pmPluginFactoryParams = _ref3.pmPluginFactoryParams,
207
203
  actionOptions = _ref3.actionOptions,
208
- showServerActions = _ref3.showServerActions,
209
204
  pluginInjectionApi = _ref3.pluginInjectionApi,
210
205
  onClickCallback = _ref3.onClickCallback,
211
206
  allowDatasource = _ref3.allowDatasource,
@@ -215,7 +210,6 @@ export var blockCardNodeView = function blockCardNodeView(_ref3) {
215
210
  eventDispatcher = pmPluginFactoryParams.eventDispatcher;
216
211
  var reactComponentProps = {
217
212
  actionOptions: actionOptions,
218
- showServerActions: showServerActions,
219
213
  pluginInjectionApi: pluginInjectionApi,
220
214
  onClickCallback: onClickCallback
221
215
  };
@@ -264,7 +264,6 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
264
264
  getPos = _this$props.getPos,
265
265
  pluginInjectionApi = _this$props.pluginInjectionApi,
266
266
  actionOptions = _this$props.actionOptions,
267
- showServerActions = _this$props.showServerActions,
268
267
  onClick = _this$props.onClick;
269
268
  var _node$attrs = node.attrs,
270
269
  url = _node$attrs.url,
@@ -304,8 +303,7 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
304
303
  platform: 'web',
305
304
  container: this.scrollContainer,
306
305
  embedIframeRef: this.embedIframeRef,
307
- actionOptions: actionOptions,
308
- showServerActions: showServerActions
306
+ actionOptions: actionOptions
309
307
  });
310
308
  var cardInner = /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
311
309
  embedIframeRef: this.embedIframeRef,
@@ -418,7 +416,6 @@ export var embedCardNodeView = function embedCardNodeView(_ref4) {
418
416
  pmPluginFactoryParams = _ref4.pmPluginFactoryParams,
419
417
  pluginInjectionApi = _ref4.pluginInjectionApi,
420
418
  actionOptions = _ref4.actionOptions,
421
- showServerActions = _ref4.showServerActions,
422
419
  onClickCallback = _ref4.onClickCallback;
423
420
  return function (node, view, getPos) {
424
421
  var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
@@ -431,7 +428,6 @@ export var embedCardNodeView = function embedCardNodeView(_ref4) {
431
428
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
432
429
  pluginInjectionApi: pluginInjectionApi,
433
430
  actionOptions: actionOptions,
434
- showServerActions: showServerActions,
435
431
  onClickCallback: onClickCallback
436
432
  };
437
433
  return new EmbedCard(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, undefined).init();
@@ -16,7 +16,6 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
16
16
  var node = _ref.node,
17
17
  cardContext = _ref.cardContext,
18
18
  actionOptions = _ref.actionOptions,
19
- showServerActions = _ref.showServerActions,
20
19
  useAlternativePreloader = _ref.useAlternativePreloader,
21
20
  view = _ref.view,
22
21
  getPos = _ref.getPos,
@@ -77,12 +76,11 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
77
76
  onError: onError,
78
77
  inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
79
78
  actionOptions: actionOptions,
80
- showServerActions: showServerActions,
81
79
  isHovered: isHovered,
82
80
  showHoverPreview: showHoverPreview,
83
81
  hoverPreviewOptions: hoverPreviewOptions
84
82
  });
85
- }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, showServerActions, isHovered, showHoverPreview, hoverPreviewOptions]);
83
+ }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions]);
86
84
 
87
85
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
88
86
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -99,7 +97,6 @@ export function InlineCardNodeView(props) {
99
97
  view = props.view,
100
98
  getPos = props.getPos,
101
99
  actionOptions = props.actionOptions,
102
- showServerActions = props.showServerActions,
103
100
  allowEmbeds = props.allowEmbeds,
104
101
  allowBlockCards = props.allowBlockCards,
105
102
  enableInlineUpgradeFeatures = props.enableInlineUpgradeFeatures,
@@ -123,7 +120,6 @@ export function InlineCardNodeView(props) {
123
120
  view: view,
124
121
  getPos: getPos,
125
122
  actionOptions: actionOptions,
126
- showServerActions: showServerActions,
127
123
  useAlternativePreloader: useAlternativePreloader,
128
124
  onClickCallback: onClickCallback,
129
125
  showHoverPreview: showHoverPreview,
@@ -151,7 +147,6 @@ export function InlineCardNodeView(props) {
151
147
  view: view,
152
148
  getPos: getPos,
153
149
  actionOptions: actionOptions,
154
- showServerActions: showServerActions,
155
150
  useAlternativePreloader: useAlternativePreloader,
156
151
  pluginInjectionApi: pluginInjectionApi,
157
152
  onClickCallback: onClickCallback
@@ -7,7 +7,6 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
7
7
  var node = _ref.node,
8
8
  cardContext = _ref.cardContext,
9
9
  actionOptions = _ref.actionOptions,
10
- showServerActions = _ref.showServerActions,
11
10
  useAlternativePreloader = _ref.useAlternativePreloader,
12
11
  view = _ref.view,
13
12
  getPos = _ref.getPos,
@@ -53,13 +52,12 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
53
52
  getPos: getPos,
54
53
  useAlternativePreloader: useAlternativePreloader,
55
54
  actionOptions: actionOptions,
56
- showServerActions: showServerActions,
57
55
  onResolve: onResolve,
58
56
  onClick: onClick,
59
57
  cardContext: cardContext,
60
58
  isHovered: isHovered
61
59
  });
62
- }, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, showServerActions, useAlternativePreloader, view]);
60
+ }, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view]);
63
61
  return isOverlayEnabled || isPulseEnabled ? /*#__PURE__*/React.createElement(AwarenessWrapper, {
64
62
  isOverlayEnabled: isOverlayEnabled,
65
63
  isPulseEnabled: isPulseEnabled,
@@ -55,7 +55,6 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
55
55
  useAlternativePreloader = options.useAlternativePreloader,
56
56
  fullWidthMode = options.fullWidthMode,
57
57
  actionOptions = options.actionOptions,
58
- showServerActions = options.showServerActions,
59
58
  cardPluginEvents = options.cardPluginEvents,
60
59
  showUpgradeDiscoverability = options.showUpgradeDiscoverability,
61
60
  allowEmbeds = options.allowEmbeds,
@@ -69,7 +68,6 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
69
68
  extraComponentProps: {
70
69
  useAlternativePreloader: useAlternativePreloader,
71
70
  actionOptions: actionOptions,
72
- showServerActions: showServerActions,
73
71
  enableInlineUpgradeFeatures: enableInlineUpgradeFeatures,
74
72
  allowEmbeds: allowEmbeds,
75
73
  allowBlockCards: allowBlockCards,
@@ -248,7 +246,6 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
248
246
  blockCard: lazyBlockCardView({
249
247
  pmPluginFactoryParams: pmPluginFactoryParams,
250
248
  actionOptions: actionOptions,
251
- showServerActions: showServerActions,
252
249
  pluginInjectionApi: pluginInjectionApi,
253
250
  onClickCallback: onClickCallback,
254
251
  allowDatasource: options.allowDatasource,
@@ -260,7 +257,6 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
260
257
  pmPluginFactoryParams: pmPluginFactoryParams,
261
258
  pluginInjectionApi: pluginInjectionApi,
262
259
  actionOptions: actionOptions,
263
- showServerActions: showServerActions,
264
260
  onClickCallback: options.onClickCallback
265
261
  })
266
262
  }
@@ -22,7 +22,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
22
22
  }) => void;
23
23
  render(): JSX.Element;
24
24
  }
25
- export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'showServerActions' | 'pluginInjectionApi' | 'onClickCallback'>;
25
+ export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback'>;
26
26
  export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
27
27
  unsubscribe: (() => void) | undefined;
28
28
  createDomRef(): HTMLElement;
@@ -35,10 +35,9 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
35
35
  export interface BlockCardNodeViewProperties {
36
36
  pmPluginFactoryParams: PMPluginFactoryParams;
37
37
  actionOptions: BlockCardNodeViewProps['actionOptions'];
38
- showServerActions: BlockCardNodeViewProps['showServerActions'];
39
38
  pluginInjectionApi: BlockCardNodeViewProps['pluginInjectionApi'];
40
39
  onClickCallback: BlockCardNodeViewProps['onClickCallback'];
41
40
  allowDatasource: boolean | undefined;
42
41
  inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
43
42
  }
44
- export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, showServerActions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => Datasource | BlockCard | import("prosemirror-view").NodeView;
43
+ export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => Datasource | BlockCard | import("prosemirror-view").NodeView;
@@ -41,7 +41,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
41
41
  }) => void;
42
42
  render(): JSX.Element;
43
43
  }
44
- export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'showServerActions' | 'onClickCallback'>;
44
+ export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback'>;
45
45
  export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
46
46
  unsubscribe: (() => void) | undefined;
47
47
  viewShouldUpdate(nextNode: PMNode): boolean;
@@ -56,7 +56,6 @@ export interface EmbedCardNodeViewProperties {
56
56
  pmPluginFactoryParams: PMPluginFactoryParams;
57
57
  pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
58
58
  actionOptions: EmbedCardNodeViewProps['actionOptions'];
59
- showServerActions: EmbedCardNodeViewProps['showServerActions'];
60
59
  onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
61
60
  }
62
- export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, showServerActions, onClickCallback, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
61
+ export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  import type { InlineNodeViewComponentProps } from '@atlaskit/editor-common/react-node-view';
3
3
  import type { SmartCardProps } from './genericCard';
4
4
  import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
5
- export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, showServerActions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => JSX.Element | null>;
6
- export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'showServerActions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage'>;
5
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => JSX.Element | null>;
6
+ export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage'>;
7
7
  export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): JSX.Element;
@@ -5,4 +5,4 @@ export type InlineCardWithAwarenessProps = {
5
5
  isOverlayEnabled?: boolean;
6
6
  isSelected?: boolean;
7
7
  };
8
- export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, showServerActions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => JSX.Element>;
8
+ export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => JSX.Element>;
@@ -22,7 +22,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
22
22
  }) => void;
23
23
  render(): JSX.Element;
24
24
  }
25
- export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'showServerActions' | 'pluginInjectionApi' | 'onClickCallback'>;
25
+ export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback'>;
26
26
  export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
27
27
  unsubscribe: (() => void) | undefined;
28
28
  createDomRef(): HTMLElement;
@@ -35,10 +35,9 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
35
35
  export interface BlockCardNodeViewProperties {
36
36
  pmPluginFactoryParams: PMPluginFactoryParams;
37
37
  actionOptions: BlockCardNodeViewProps['actionOptions'];
38
- showServerActions: BlockCardNodeViewProps['showServerActions'];
39
38
  pluginInjectionApi: BlockCardNodeViewProps['pluginInjectionApi'];
40
39
  onClickCallback: BlockCardNodeViewProps['onClickCallback'];
41
40
  allowDatasource: boolean | undefined;
42
41
  inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
43
42
  }
44
- export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, showServerActions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => Datasource | BlockCard | import("prosemirror-view").NodeView;
43
+ export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => Datasource | BlockCard | import("prosemirror-view").NodeView;
@@ -41,7 +41,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
41
41
  }) => void;
42
42
  render(): JSX.Element;
43
43
  }
44
- export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'showServerActions' | 'onClickCallback'>;
44
+ export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback'>;
45
45
  export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
46
46
  unsubscribe: (() => void) | undefined;
47
47
  viewShouldUpdate(nextNode: PMNode): boolean;
@@ -56,7 +56,6 @@ export interface EmbedCardNodeViewProperties {
56
56
  pmPluginFactoryParams: PMPluginFactoryParams;
57
57
  pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
58
58
  actionOptions: EmbedCardNodeViewProps['actionOptions'];
59
- showServerActions: EmbedCardNodeViewProps['showServerActions'];
60
59
  onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
61
60
  }
62
- export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, showServerActions, onClickCallback, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
61
+ export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  import type { InlineNodeViewComponentProps } from '@atlaskit/editor-common/react-node-view';
3
3
  import type { SmartCardProps } from './genericCard';
4
4
  import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
5
- export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, showServerActions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => JSX.Element | null>;
6
- export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'showServerActions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage'>;
5
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => JSX.Element | null>;
6
+ export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage'>;
7
7
  export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): JSX.Element;
@@ -5,4 +5,4 @@ export type InlineCardWithAwarenessProps = {
5
5
  isOverlayEnabled?: boolean;
6
6
  isSelected?: boolean;
7
7
  };
8
- export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, showServerActions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => JSX.Element>;
8
+ export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => JSX.Element>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/menu": "2.12.3",
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
57
  "@atlaskit/primitives": "^12.2.0",
58
- "@atlaskit/smart-card": "^28.1.0",
58
+ "@atlaskit/smart-card": "^28.2.0",
59
59
  "@atlaskit/theme": "^13.0.0",
60
60
  "@atlaskit/tmp-editor-statsig": "^2.1.8",
61
61
  "@atlaskit/tokens": "^1.61.0",