@atlaskit/editor-plugin-card 6.6.15 → 6.7.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
+ ## 6.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#177020](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/177020)
8
+ [`206ae7b37b4af`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/206ae7b37b4af) -
9
+ [ux] Add Competitor Prompt for Embed Smart Link
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 6.6.15
4
16
 
5
17
  ### Patch Changes
@@ -310,7 +310,8 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
310
310
  getPos = _this$props.getPos,
311
311
  pluginInjectionApi = _this$props.pluginInjectionApi,
312
312
  actionOptions = _this$props.actionOptions,
313
- onClick = _this$props.onClick;
313
+ onClick = _this$props.onClick,
314
+ CompetitorPrompt = _this$props.CompetitorPrompt;
314
315
  var _node$attrs = node.attrs,
315
316
  url = _node$attrs.url,
316
317
  pctWidth = _node$attrs.width,
@@ -349,7 +350,8 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
349
350
  platform: 'web',
350
351
  container: this.scrollContainer,
351
352
  embedIframeRef: this.embedIframeRef,
352
- actionOptions: actionOptions
353
+ actionOptions: actionOptions,
354
+ CompetitorPrompt: CompetitorPrompt
353
355
  });
354
356
  return /*#__PURE__*/_react.default.createElement(_smartCard.EmbedResizeMessageListener, {
355
357
  embedIframeRef: this.embedIframeRef,
@@ -423,7 +425,8 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
423
425
  fullWidthMode = _this$reactComponentP3.fullWidthMode,
424
426
  dispatchAnalyticsEvent = _this$reactComponentP3.dispatchAnalyticsEvent,
425
427
  pluginInjectionApi = _this$reactComponentP3.pluginInjectionApi,
426
- onClickCallback = _this$reactComponentP3.onClickCallback;
428
+ onClickCallback = _this$reactComponentP3.onClickCallback,
429
+ CompetitorPrompt = _this$reactComponentP3.CompetitorPrompt;
427
430
  return /*#__PURE__*/_react.default.createElement(WrappedBlockCard, {
428
431
  node: this.node,
429
432
  view: this.view,
@@ -434,7 +437,8 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
434
437
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
435
438
  pluginInjectionApi: pluginInjectionApi,
436
439
  onClickCallback: onClickCallback,
437
- id: this.id
440
+ id: this.id,
441
+ CompetitorPrompt: CompetitorPrompt
438
442
  });
439
443
  }
440
444
  }, {
@@ -469,7 +473,8 @@ var embedCardNodeView = exports.embedCardNodeView = function embedCardNodeView(_
469
473
  pmPluginFactoryParams = _ref4.pmPluginFactoryParams,
470
474
  pluginInjectionApi = _ref4.pluginInjectionApi,
471
475
  actionOptions = _ref4.actionOptions,
472
- onClickCallback = _ref4.onClickCallback;
476
+ onClickCallback = _ref4.onClickCallback,
477
+ CompetitorPrompt = _ref4.CompetitorPrompt;
473
478
  return function (node, view, getPos) {
474
479
  var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
475
480
  eventDispatcher = pmPluginFactoryParams.eventDispatcher,
@@ -481,7 +486,8 @@ var embedCardNodeView = exports.embedCardNodeView = function embedCardNodeView(_
481
486
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
482
487
  pluginInjectionApi: pluginInjectionApi,
483
488
  actionOptions: actionOptions,
484
- onClickCallback: onClickCallback
489
+ onClickCallback: onClickCallback,
490
+ CompetitorPrompt: CompetitorPrompt
485
491
  };
486
492
  return new EmbedCard(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, undefined).init();
487
493
  };
@@ -272,7 +272,8 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
272
272
  pmPluginFactoryParams: pmPluginFactoryParams,
273
273
  pluginInjectionApi: pluginInjectionApi,
274
274
  actionOptions: actionOptions,
275
- onClickCallback: options.onClickCallback
275
+ onClickCallback: options.onClickCallback,
276
+ CompetitorPrompt: options.CompetitorPrompt
276
277
  })
277
278
  }
278
279
  }, enableInlineUpgradeFeatures && {
@@ -299,7 +299,8 @@ export class EmbedCardComponent extends React.PureComponent {
299
299
  getPos,
300
300
  pluginInjectionApi,
301
301
  actionOptions,
302
- onClick
302
+ onClick,
303
+ CompetitorPrompt
303
304
  } = this.props;
304
305
  const {
305
306
  url,
@@ -341,7 +342,8 @@ export class EmbedCardComponent extends React.PureComponent {
341
342
  platform: 'web',
342
343
  container: this.scrollContainer,
343
344
  embedIframeRef: this.embedIframeRef,
344
- actionOptions: actionOptions
345
+ actionOptions: actionOptions,
346
+ CompetitorPrompt: CompetitorPrompt
345
347
  });
346
348
  return /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
347
349
  embedIframeRef: this.embedIframeRef,
@@ -398,7 +400,8 @@ export class EmbedCard extends ReactNodeView {
398
400
  fullWidthMode,
399
401
  dispatchAnalyticsEvent,
400
402
  pluginInjectionApi,
401
- onClickCallback
403
+ onClickCallback,
404
+ CompetitorPrompt
402
405
  } = this.reactComponentProps;
403
406
  return /*#__PURE__*/React.createElement(WrappedBlockCard, {
404
407
  node: this.node,
@@ -410,7 +413,8 @@ export class EmbedCard extends ReactNodeView {
410
413
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
411
414
  pluginInjectionApi: pluginInjectionApi,
412
415
  onClickCallback: onClickCallback,
413
- id: this.id
416
+ id: this.id,
417
+ CompetitorPrompt: CompetitorPrompt
414
418
  });
415
419
  }
416
420
  destroy() {
@@ -442,7 +446,8 @@ export const embedCardNodeView = ({
442
446
  pmPluginFactoryParams,
443
447
  pluginInjectionApi,
444
448
  actionOptions,
445
- onClickCallback
449
+ onClickCallback,
450
+ CompetitorPrompt
446
451
  }) => (node, view, getPos) => {
447
452
  const {
448
453
  portalProviderAPI,
@@ -456,7 +461,8 @@ export const embedCardNodeView = ({
456
461
  dispatchAnalyticsEvent,
457
462
  pluginInjectionApi,
458
463
  actionOptions,
459
- onClickCallback: onClickCallback
464
+ onClickCallback: onClickCallback,
465
+ CompetitorPrompt
460
466
  };
461
467
  return new EmbedCard(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, undefined).init();
462
468
  };
@@ -271,7 +271,8 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
271
271
  pmPluginFactoryParams,
272
272
  pluginInjectionApi,
273
273
  actionOptions,
274
- onClickCallback: options.onClickCallback
274
+ onClickCallback: options.onClickCallback,
275
+ CompetitorPrompt: options.CompetitorPrompt
275
276
  })
276
277
  },
277
278
  ...(enableInlineUpgradeFeatures && {
@@ -303,7 +303,8 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
303
303
  getPos = _this$props.getPos,
304
304
  pluginInjectionApi = _this$props.pluginInjectionApi,
305
305
  actionOptions = _this$props.actionOptions,
306
- onClick = _this$props.onClick;
306
+ onClick = _this$props.onClick,
307
+ CompetitorPrompt = _this$props.CompetitorPrompt;
307
308
  var _node$attrs = node.attrs,
308
309
  url = _node$attrs.url,
309
310
  pctWidth = _node$attrs.width,
@@ -342,7 +343,8 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
342
343
  platform: 'web',
343
344
  container: this.scrollContainer,
344
345
  embedIframeRef: this.embedIframeRef,
345
- actionOptions: actionOptions
346
+ actionOptions: actionOptions,
347
+ CompetitorPrompt: CompetitorPrompt
346
348
  });
347
349
  return /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
348
350
  embedIframeRef: this.embedIframeRef,
@@ -416,7 +418,8 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
416
418
  fullWidthMode = _this$reactComponentP3.fullWidthMode,
417
419
  dispatchAnalyticsEvent = _this$reactComponentP3.dispatchAnalyticsEvent,
418
420
  pluginInjectionApi = _this$reactComponentP3.pluginInjectionApi,
419
- onClickCallback = _this$reactComponentP3.onClickCallback;
421
+ onClickCallback = _this$reactComponentP3.onClickCallback,
422
+ CompetitorPrompt = _this$reactComponentP3.CompetitorPrompt;
420
423
  return /*#__PURE__*/React.createElement(WrappedBlockCard, {
421
424
  node: this.node,
422
425
  view: this.view,
@@ -427,7 +430,8 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
427
430
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
428
431
  pluginInjectionApi: pluginInjectionApi,
429
432
  onClickCallback: onClickCallback,
430
- id: this.id
433
+ id: this.id,
434
+ CompetitorPrompt: CompetitorPrompt
431
435
  });
432
436
  }
433
437
  }, {
@@ -462,7 +466,8 @@ export var embedCardNodeView = function embedCardNodeView(_ref4) {
462
466
  pmPluginFactoryParams = _ref4.pmPluginFactoryParams,
463
467
  pluginInjectionApi = _ref4.pluginInjectionApi,
464
468
  actionOptions = _ref4.actionOptions,
465
- onClickCallback = _ref4.onClickCallback;
469
+ onClickCallback = _ref4.onClickCallback,
470
+ CompetitorPrompt = _ref4.CompetitorPrompt;
466
471
  return function (node, view, getPos) {
467
472
  var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
468
473
  eventDispatcher = pmPluginFactoryParams.eventDispatcher,
@@ -474,7 +479,8 @@ export var embedCardNodeView = function embedCardNodeView(_ref4) {
474
479
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
475
480
  pluginInjectionApi: pluginInjectionApi,
476
481
  actionOptions: actionOptions,
477
- onClickCallback: onClickCallback
482
+ onClickCallback: onClickCallback,
483
+ CompetitorPrompt: CompetitorPrompt
478
484
  };
479
485
  return new EmbedCard(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, undefined).init();
480
486
  };
@@ -265,7 +265,8 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
265
265
  pmPluginFactoryParams: pmPluginFactoryParams,
266
266
  pluginInjectionApi: pluginInjectionApi,
267
267
  actionOptions: actionOptions,
268
- onClickCallback: options.onClickCallback
268
+ onClickCallback: options.onClickCallback,
269
+ CompetitorPrompt: options.CompetitorPrompt
269
270
  })
270
271
  }
271
272
  }, enableInlineUpgradeFeatures && {
@@ -43,7 +43,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
43
43
  private removeCard;
44
44
  render(): React.JSX.Element;
45
45
  }
46
- export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback'>;
46
+ export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback' | 'CompetitorPrompt'>;
47
47
  export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
48
48
  private id;
49
49
  unsubscribe: (() => void) | undefined;
@@ -62,5 +62,6 @@ export interface EmbedCardNodeViewProperties {
62
62
  pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
63
63
  actionOptions: EmbedCardNodeViewProps['actionOptions'];
64
64
  onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
65
+ CompetitorPrompt?: EmbedCardNodeViewProps['CompetitorPrompt'];
65
66
  }
66
- export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
67
+ export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, CompetitorPrompt, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
@@ -43,7 +43,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
43
43
  private removeCard;
44
44
  render(): React.JSX.Element;
45
45
  }
46
- export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback'>;
46
+ export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback' | 'CompetitorPrompt'>;
47
47
  export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
48
48
  private id;
49
49
  unsubscribe: (() => void) | undefined;
@@ -62,5 +62,6 @@ export interface EmbedCardNodeViewProperties {
62
62
  pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
63
63
  actionOptions: EmbedCardNodeViewProps['actionOptions'];
64
64
  onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
65
+ CompetitorPrompt?: EmbedCardNodeViewProps['CompetitorPrompt'];
65
66
  }
66
- export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
67
+ export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, onClickCallback, CompetitorPrompt, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "6.6.15",
3
+ "version": "6.7.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/menu": "^8.0.0",
62
62
  "@atlaskit/platform-feature-flags": "^1.1.0",
63
63
  "@atlaskit/primitives": "^14.10.0",
64
- "@atlaskit/smart-card": "^38.18.0",
64
+ "@atlaskit/smart-card": "^38.19.0",
65
65
  "@atlaskit/theme": "^18.0.0",
66
66
  "@atlaskit/tmp-editor-statsig": "^8.5.0",
67
67
  "@atlaskit/tokens": "^5.4.0",