@atlaskit/editor-plugin-card 4.5.9 → 4.5.11

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/cardPlugin.js +2 -1
  3. package/dist/cjs/nodeviews/blockCard.js +6 -1
  4. package/dist/cjs/nodeviews/embedCard.js +12 -2
  5. package/dist/cjs/nodeviews/genericCard.js +2 -0
  6. package/dist/cjs/nodeviews/inlineCard.js +10 -2
  7. package/dist/cjs/pm-plugins/doc.js +25 -5
  8. package/dist/cjs/pm-plugins/keymap.js +5 -0
  9. package/dist/cjs/pm-plugins/main.js +5 -1
  10. package/dist/cjs/pm-plugins/util/resolve.js +8 -2
  11. package/dist/cjs/pm-plugins/utils.js +4 -1
  12. package/dist/cjs/ui/DatasourceIcon/index.js +4 -0
  13. package/dist/cjs/ui/EditLinkToolbar.js +8 -2
  14. package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
  15. package/dist/cjs/ui/EditToolbarButton/index.js +20 -5
  16. package/dist/cjs/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
  17. package/dist/cjs/ui/HyperlinkToolbarAppearance.js +3 -0
  18. package/dist/cjs/ui/InlineCardOverlay/index.js +49 -45
  19. package/dist/cjs/ui/LayoutButton/index.js +4 -1
  20. package/dist/cjs/ui/ResizableEmbedCard.js +6 -1
  21. package/dist/cjs/ui/analytics/events-from-tr.js +3 -0
  22. package/dist/cjs/ui/analytics/utils.js +4 -1
  23. package/dist/cjs/ui/editDatasourceAction.js +4 -1
  24. package/dist/cjs/ui/toolbar.js +32 -7
  25. package/dist/es2019/cardPlugin.js +2 -0
  26. package/dist/es2019/nodeviews/blockCard.js +6 -1
  27. package/dist/es2019/nodeviews/embedCard.js +14 -4
  28. package/dist/es2019/nodeviews/genericCard.js +2 -0
  29. package/dist/es2019/nodeviews/inlineCard.js +10 -2
  30. package/dist/es2019/pm-plugins/doc.js +35 -9
  31. package/dist/es2019/pm-plugins/keymap.js +5 -0
  32. package/dist/es2019/pm-plugins/main.js +5 -1
  33. package/dist/es2019/pm-plugins/util/resolve.js +9 -3
  34. package/dist/es2019/pm-plugins/utils.js +8 -2
  35. package/dist/es2019/ui/DatasourceIcon/index.js +4 -0
  36. package/dist/es2019/ui/EditLinkToolbar.js +8 -2
  37. package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
  38. package/dist/es2019/ui/EditToolbarButton/index.js +20 -5
  39. package/dist/es2019/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
  40. package/dist/es2019/ui/HyperlinkToolbarAppearance.js +3 -0
  41. package/dist/es2019/ui/InlineCardOverlay/index.js +47 -43
  42. package/dist/es2019/ui/LayoutButton/index.js +4 -1
  43. package/dist/es2019/ui/LinkToolbarAppearance.js +0 -1
  44. package/dist/es2019/ui/ResizableEmbedCard.js +7 -2
  45. package/dist/es2019/ui/analytics/events-from-tr.js +3 -0
  46. package/dist/es2019/ui/analytics/utils.js +4 -1
  47. package/dist/es2019/ui/editDatasourceAction.js +4 -1
  48. package/dist/es2019/ui/toolbar.js +32 -7
  49. package/dist/esm/cardPlugin.js +2 -0
  50. package/dist/esm/nodeviews/blockCard.js +6 -1
  51. package/dist/esm/nodeviews/embedCard.js +12 -2
  52. package/dist/esm/nodeviews/genericCard.js +2 -0
  53. package/dist/esm/nodeviews/inlineCard.js +10 -2
  54. package/dist/esm/pm-plugins/doc.js +25 -5
  55. package/dist/esm/pm-plugins/keymap.js +5 -0
  56. package/dist/esm/pm-plugins/main.js +5 -1
  57. package/dist/esm/pm-plugins/util/resolve.js +8 -2
  58. package/dist/esm/pm-plugins/utils.js +4 -1
  59. package/dist/esm/ui/DatasourceIcon/index.js +4 -0
  60. package/dist/esm/ui/EditLinkToolbar.js +8 -2
  61. package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
  62. package/dist/esm/ui/EditToolbarButton/index.js +20 -5
  63. package/dist/esm/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
  64. package/dist/esm/ui/HyperlinkToolbarAppearance.js +3 -0
  65. package/dist/esm/ui/InlineCardOverlay/index.js +49 -45
  66. package/dist/esm/ui/LayoutButton/index.js +4 -1
  67. package/dist/esm/ui/LinkToolbarAppearance.js +0 -1
  68. package/dist/esm/ui/ResizableEmbedCard.js +6 -1
  69. package/dist/esm/ui/analytics/events-from-tr.js +3 -0
  70. package/dist/esm/ui/analytics/utils.js +4 -1
  71. package/dist/esm/ui/editDatasourceAction.js +4 -1
  72. package/dist/esm/ui/toolbar.js +32 -7
  73. package/dist/types/ui/EditLinkToolbar.d.ts +1 -1
  74. package/dist/types/ui/LinkToolbarAppearance.d.ts +1 -1
  75. package/dist/types/ui/analytics/types.d.ts +1 -1
  76. package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +1 -1
  77. package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +1 -1
  78. package/dist/types-ts4.5/ui/analytics/types.d.ts +1 -1
  79. package/package.json +6 -6
@@ -208,48 +208,52 @@ const InlineCardOverlay = ({
208
208
  }, [isVisible, setVisibility]);
209
209
  const intl = useIntl();
210
210
  const label = intl.formatMessage(messages.inlineOverlay);
211
- return jsx("span", _extends({}, props, {
212
- css: containerStyles,
213
- ref: containerRef
214
- }), children, isVisible && jsx(React.Fragment, null, jsx("span", {
215
- "aria-hidden": "true",
216
- className: OVERLAY_MARKER_CLASSNAME
217
- }, ZERO_WIDTH_JOINER), jsx("a", {
218
- css: [overlayStyles, showOverlay && showOverlayStyles],
219
- style: {
220
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
221
- marginLeft: availableWidth && -availableWidth,
222
- width: availableWidth
223
- },
224
- "data-testid": testId,
225
- href: url,
226
- onClick: e => e.preventDefault(),
227
- tabIndex: -1
228
- }, jsx("span", {
229
- css: overflowingContainerStyles
230
- }, jsx("span", {
231
- css: iconAndLabelStyles
232
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
233
- ,
234
- className: ICON_AND_LABEL_CLASSNAME
235
- }, jsx("span", {
236
- css: iconStyles
237
- }, jsx(PreferencesIcon, {
238
- label: label,
239
- size: iconSize.current,
240
- testId: `${testId}-icon`
241
- })), showLabel && jsx("span", {
242
- css: labelStyles
243
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
244
- ,
245
- className: OVERLAY_LABEL_CLASSNAME,
246
- "data-testid": `${testId}-label`
247
- }, label)), jsx("span", {
248
- css: gradientStyles
249
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
250
- ,
251
- className: OVERLAY_GRADIENT_CLASSNAME,
252
- "data-testid": `${testId}-gradient`
253
- })))));
211
+ return (
212
+ // Ignored via go/ees005
213
+ // eslint-disable-next-line react/jsx-props-no-spreading
214
+ jsx("span", _extends({}, props, {
215
+ css: containerStyles,
216
+ ref: containerRef
217
+ }), children, isVisible && jsx(React.Fragment, null, jsx("span", {
218
+ "aria-hidden": "true",
219
+ className: OVERLAY_MARKER_CLASSNAME
220
+ }, ZERO_WIDTH_JOINER), jsx("a", {
221
+ css: [overlayStyles, showOverlay && showOverlayStyles],
222
+ style: {
223
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
224
+ marginLeft: availableWidth && -availableWidth,
225
+ width: availableWidth
226
+ },
227
+ "data-testid": testId,
228
+ href: url,
229
+ onClick: e => e.preventDefault(),
230
+ tabIndex: -1
231
+ }, jsx("span", {
232
+ css: overflowingContainerStyles
233
+ }, jsx("span", {
234
+ css: iconAndLabelStyles
235
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
236
+ ,
237
+ className: ICON_AND_LABEL_CLASSNAME
238
+ }, jsx("span", {
239
+ css: iconStyles
240
+ }, jsx(PreferencesIcon, {
241
+ label: label,
242
+ size: iconSize.current,
243
+ testId: `${testId}-icon`
244
+ })), showLabel && jsx("span", {
245
+ css: labelStyles
246
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
247
+ ,
248
+ className: OVERLAY_LABEL_CLASSNAME,
249
+ "data-testid": `${testId}-label`
250
+ }, label)), jsx("span", {
251
+ css: gradientStyles
252
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
253
+ ,
254
+ className: OVERLAY_GRADIENT_CLASSNAME,
255
+ "data-testid": `${testId}-gradient`
256
+ })))))
257
+ );
254
258
  };
255
259
  export default InlineCardOverlay;
@@ -119,7 +119,10 @@ const LayoutButtonWrapper = ({
119
119
  return jsx(LayoutButton, {
120
120
  mountPoint: mountPoint,
121
121
  scrollableElement: scrollableElement,
122
- boundariesElement: boundariesElement,
122
+ boundariesElement: boundariesElement
123
+ // Ignored via go/ees005
124
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
125
+ ,
123
126
  targetElement: datasourceTableRef,
124
127
  layout: isDatasourceTableLayout(layout) ? layout : undefined,
125
128
  onLayoutChange: onLayoutChange,
@@ -13,7 +13,6 @@ import { DiscoveryPulse } from './Pulse';
13
13
  import { shouldRenderToolbarPulse } from './toolbar';
14
14
  import { WithCardContext } from './WithCardContext';
15
15
  // eslint-disable-next-line @repo/internal/react/no-class-components
16
-
17
16
  export class LinkToolbarAppearance extends React.Component {
18
17
  constructor(...args) {
19
18
  super(...args);
@@ -223,7 +223,7 @@ export default class ResizableEmbedCard extends React.Component {
223
223
  // full width
224
224
  snapTargets.push(lineLength - offsetLeft);
225
225
  const minimumWidth = calcPxFromColumns(this.wrappedLayout || this.insideInlineLike ? 1 : 2, lineLength, this.props.gridSize);
226
- let snapPoints = snapTargets.filter(width => width >= minimumWidth);
226
+ const snapPoints = snapTargets.filter(width => width >= minimumWidth);
227
227
  const $pos = this.$pos;
228
228
  if (!$pos) {
229
229
  return snapPoints;
@@ -358,7 +358,10 @@ export default class ResizableEmbedCard extends React.Component {
358
358
  containerWidth: containerWidth || DEFAULT_EMBED_CARD_WIDTH,
359
359
  fullWidthMode
360
360
  })
361
- }, jsx(Resizer, _extends({}, this.props, {
361
+ }, jsx(Resizer
362
+ // Ignored via go/ees005
363
+ // eslint-disable-next-line react/jsx-props-no-spreading
364
+ , _extends({}, this.props, {
362
365
  enable: enable,
363
366
  calcNewSize: this.calcNewSize,
364
367
  snapPoints: this.calcSnapPoints(),
@@ -366,6 +369,8 @@ export default class ResizableEmbedCard extends React.Component {
366
369
  highlights: this.highlights,
367
370
  nodeType: "embed",
368
371
  handleStyles: nestedInTableHandleStyles(this.isNestedInTable())
372
+ // Ignored via go/ees005
373
+ // eslint-disable-next-line react/jsx-props-no-spreading
369
374
  }, resizerProps), children, this.getHeightDefiningComponent())));
370
375
  /* eslint-enable @atlaskit/design-system/consistent-css-prop-usage */
371
376
  }
@@ -74,6 +74,9 @@ export const findChanged = (tr, state) => {
74
74
  }
75
75
  }
76
76
  }
77
+
78
+ // Ignored via go/ees005
79
+ // eslint-disable-next-line @typescript-eslint/max-params
77
80
  stepMap.forEach((oldStart, oldEnd, newStart, newEnd) => {
78
81
  var _tr$docs2;
79
82
  const before = tr.docs[i];
@@ -81,7 +81,10 @@ export const findAtPositions = (tr, positions) => {
81
81
  }
82
82
  return entities;
83
83
  };
84
- export const findInNodeRange = (doc, from, to, predicate) => {
84
+ export const findInNodeRange = (doc, from, to, predicate
85
+ // Ignored via go/ees005
86
+ // eslint-disable-next-line @typescript-eslint/max-params
87
+ ) => {
85
88
  const entities = [];
86
89
  doc.nodesBetween(from, to, (node, pos) => {
87
90
  if (predicate(node)) {
@@ -1,7 +1,10 @@
1
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
2
  import { getDatasourceType } from '@atlaskit/editor-common/utils';
3
3
  import { showDatasourceModal } from '../pm-plugins/actions';
4
- export const editDatasource = (datasourceId, editorAnalyticsApi, appearance, extensionKey) => (state, dispatch) => {
4
+ export const editDatasource = (datasourceId, editorAnalyticsApi, appearance, extensionKey
5
+ // Ignored via go/ees005
6
+ // eslint-disable-next-line @typescript-eslint/max-params
7
+ ) => (state, dispatch) => {
5
8
  const datasourceType = getDatasourceType(datasourceId);
6
9
  if (dispatch && datasourceType) {
7
10
  const {
@@ -96,7 +96,10 @@ export const openLinkSettings = editorAnalyticsApi => (state, dispatch) => {
96
96
  }
97
97
  return true;
98
98
  };
99
- export const floatingToolbar = (cardOptions, lpLinkPicker, linkPickerOptions, pluginInjectionApi, disableFloatingToolbar) => {
99
+ export const floatingToolbar = (cardOptions, lpLinkPicker, linkPickerOptions, pluginInjectionApi, disableFloatingToolbar
100
+ // Ignored via go/ees005
101
+ // eslint-disable-next-line @typescript-eslint/max-params
102
+ ) => {
100
103
  return (state, intl, providerFactory) => {
101
104
  if (disableFloatingToolbar) {
102
105
  return;
@@ -132,11 +135,15 @@ export const floatingToolbar = (cardOptions, lpLinkPicker, linkPickerOptions, pl
132
135
  preventPopupOverflow: isLinkPickerEnabled,
133
136
  ...toolbarOffset,
134
137
  getDomRef: view => {
138
+ // Ignored via go/ees005
139
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
135
140
  const element = findDomRefAtPos(view.state.selection.from, view.domAtPos.bind(view));
136
141
  if (!element) {
137
142
  return undefined;
138
143
  }
139
144
  if (isEmbedCard) {
145
+ // Ignored via go/ees005
146
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
140
147
  return element.querySelector(`.${richMediaClassName}`);
141
148
  }
142
149
  return element;
@@ -157,7 +164,10 @@ const unlinkCard = (node, state, editorAnalyticsApi) => {
157
164
  }
158
165
  return () => false;
159
166
  };
160
- const buildAlignmentOptions = (state, intl, widthPluginDependencyApi, analyticsApi, cardOptions) => {
167
+ const buildAlignmentOptions = (state, intl, widthPluginDependencyApi, analyticsApi, cardOptions
168
+ // Ignored via go/ees005
169
+ // eslint-disable-next-line @typescript-eslint/max-params
170
+ ) => {
161
171
  return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
162
172
  };
163
173
  const withToolbarMetadata = command => commandWithMetadata(command, {
@@ -178,7 +188,10 @@ const getToolbarViewedItem = (url, display) => {
178
188
  })
179
189
  }];
180
190
  };
181
- const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkPicker, linkPicker, pluginInjectionApi) => node => {
191
+ const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkPicker, linkPicker, pluginInjectionApi
192
+ // Ignored via go/ees005
193
+ // eslint-disable-next-line @typescript-eslint/max-params
194
+ ) => node => {
182
195
  var _pluginInjectionApi$a, _pluginInjectionApi$d, _pluginInjectionApi$d2, _pluginInjectionApi$a2, _node$attrs, _node$attrs$datasourc;
183
196
  const {
184
197
  url
@@ -369,7 +382,10 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkP
369
382
  return toolbarItems;
370
383
  }
371
384
  };
372
- const getUnlinkButtonGroup = (state, intl, node, inlineCard, editorAnalyticsApi) => {
385
+ const getUnlinkButtonGroup = (state, intl, node, inlineCard, editorAnalyticsApi
386
+ // Ignored via go/ees005
387
+ // eslint-disable-next-line @typescript-eslint/max-params
388
+ ) => {
373
389
  return node.type === inlineCard ? [{
374
390
  id: 'editor.link.unlink',
375
391
  focusEditoronEnter: true,
@@ -394,7 +410,10 @@ export const getSettingsButton = (intl, editorAnalyticsApi, userPreferencesLink)
394
410
  target: '_blank'
395
411
  };
396
412
  };
397
- const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state, cardOptions, currentAppearance) => {
413
+ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state, cardOptions, currentAppearance
414
+ // Ignored via go/ees005
415
+ // eslint-disable-next-line @typescript-eslint/max-params
416
+ ) => {
398
417
  var _node$attrs2;
399
418
  const toolbarItems = [];
400
419
  const canShowAppearanceSwitch = () => {
@@ -503,11 +522,17 @@ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hove
503
522
  });
504
523
  return toolbarItems;
505
524
  };
506
- export const shouldRenderToolbarPulse = (embedEnabled, appearance, status, isDiscoverabilityEnabled) => {
525
+ export const shouldRenderToolbarPulse = (embedEnabled, appearance, status, isDiscoverabilityEnabled
526
+ // Ignored via go/ees005
527
+ // eslint-disable-next-line @typescript-eslint/max-params
528
+ ) => {
507
529
  return embedEnabled && appearance === 'inline' && status === 'resolved' && isDiscoverabilityEnabled;
508
530
  };
509
531
  export const getStartingToolbarItems = (options, api) => {
510
- return (intl, link, onEditLink, metadata) => {
532
+ return (intl, link, onEditLink, metadata
533
+ // Ignored via go/ees005
534
+ // eslint-disable-next-line @typescript-eslint/max-params
535
+ ) => {
511
536
  const editLinkItem = options.allowDatasource ? [{
512
537
  type: 'custom',
513
538
  fallback: [],
@@ -21,6 +21,8 @@ import { createEventsQueue } from './ui/analytics/create-events-queue';
21
21
  import DatasourceModalWithState from './ui/DatasourceModal/ModalWithState';
22
22
  import { EditorLinkingPlatformAnalytics } from './ui/EditorLinkingPlatformAnalytics';
23
23
  import { EditorSmartCardEvents } from './ui/EditorSmartCardEvents';
24
+ // Ignored via go/ees005
25
+ // eslint-disable-next-line import/no-named-as-default
24
26
  import LayoutButton from './ui/LayoutButton';
25
27
  import { floatingToolbar, getEndingToolbarItems, getStartingToolbarItems } from './ui/toolbar';
26
28
  export var cardPlugin = function cardPlugin(_ref) {
@@ -26,6 +26,8 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
26
26
  var _this;
27
27
  _classCallCheck(this, BlockCardComponent);
28
28
  _this = _callSuper(this, BlockCardComponent, [props]);
29
+ // Ignored via go/ees005
30
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
29
31
  _defineProperty(_this, "onResolve", function (data) {
30
32
  var _this$props = _this.props,
31
33
  getPos = _this$props.getPos,
@@ -187,7 +189,10 @@ export var blockCardNodeView = function blockCardNodeView(_ref3) {
187
189
  onClickCallback = _ref3.onClickCallback,
188
190
  allowDatasource = _ref3.allowDatasource,
189
191
  inlineCardViewProducer = _ref3.inlineCardViewProducer;
190
- return function (node, view, getPos, decorations) {
192
+ return function (node, view, getPos, decorations
193
+ // Ignored via go/ees005
194
+ // eslint-disable-next-line @typescript-eslint/max-params
195
+ ) {
191
196
  var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
192
197
  eventDispatcher = pmPluginFactoryParams.eventDispatcher;
193
198
  var reactComponentProps = {
@@ -63,7 +63,10 @@ var CardInner = function CardInner(_ref) {
63
63
  richMediaWrapperHeight = heightAlone;
64
64
  richMediaWrapperWidth = undefined;
65
65
  }
66
- return /*#__PURE__*/React.createElement(RichMediaWrapper, _extends({}, cardProps, {
66
+ return /*#__PURE__*/React.createElement(RichMediaWrapper
67
+ // Ignored via go/ees005
68
+ // eslint-disable-next-line react/jsx-props-no-spreading
69
+ , _extends({}, cardProps, {
67
70
  height: richMediaWrapperHeight,
68
71
  width: richMediaWrapperWidth,
69
72
  nodeType: "embedCard",
@@ -80,7 +83,10 @@ var CardInner = function CardInner(_ref) {
80
83
  highlight: highlight
81
84
  });
82
85
  };
83
- return /*#__PURE__*/React.createElement(ResizableEmbedCard, _extends({}, cardProps, {
86
+ return /*#__PURE__*/React.createElement(ResizableEmbedCard
87
+ // Ignored via go/ees005
88
+ // eslint-disable-next-line react/jsx-props-no-spreading
89
+ , _extends({}, cardProps, {
84
90
  height: heightAlone,
85
91
  aspectRatio: aspectRatio,
86
92
  view: view,
@@ -91,6 +97,8 @@ var CardInner = function CardInner(_ref) {
91
97
  displayGrid: displayGrid,
92
98
  updateSize: updateSize,
93
99
  dispatchAnalyticsEvent: dispatchAnalyticsEvent
100
+ // Ignored via go/ees005
101
+ // eslint-disable-next-line react/jsx-props-no-spreading
94
102
  }, fg('platform_fix_embedded_card_re-rendering') && {
95
103
  isResizeDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
96
104
  }), smartCard);
@@ -101,6 +109,8 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
101
109
  var _this;
102
110
  _classCallCheck(this, EmbedCardComponent);
103
111
  _this = _callSuper(this, EmbedCardComponent, [props]);
112
+ // Ignored via go/ees005
113
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
104
114
  _defineProperty(_this, "embedIframeRef", /*#__PURE__*/React.createRef());
105
115
  _defineProperty(_this, "state", {
106
116
  hasPreview: true
@@ -117,6 +117,8 @@ export function Card(SmartCardComponent, UnsupportedComponent) {
117
117
  return /*#__PURE__*/React.createElement(SmartCardComponent, _extends({
118
118
  key: url,
119
119
  cardContext: cardContext
120
+ // Ignored via go/ees005
121
+ // eslint-disable-next-line react/jsx-props-no-spreading
120
122
  }, _this2.props, {
121
123
  onClick: onClick
122
124
  }));
@@ -28,7 +28,10 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
28
28
  var _node$attrs = node.attrs,
29
29
  url = _node$attrs.url,
30
30
  data = _node$attrs.data;
31
- var scrollContainer = useMemo(function () {
31
+ var scrollContainer = useMemo(
32
+ // Ignored via go/ees005
33
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
34
+ function () {
32
35
  return findOverflowScrollParent(view.dom) || undefined;
33
36
  }, [view.dom]);
34
37
  var onResolve = useCallback(function (data) {
@@ -149,11 +152,16 @@ export function InlineCardNodeView(props) {
149
152
  useAlternativePreloader: useAlternativePreloader,
150
153
  pluginInjectionApi: pluginInjectionApi,
151
154
  onClickCallback: onClickCallback
155
+ // Ignored via go/ees005
156
+ // eslint-disable-next-line react/jsx-props-no-spreading
152
157
  }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
153
158
  }
154
159
  export var inlineCardNodeView = function inlineCardNodeView(_ref2) {
155
160
  var inlineCardViewProducer = _ref2.inlineCardViewProducer;
156
- return function (node, view, getPos, decorations) {
161
+ return function (node, view, getPos, decorations
162
+ // Ignored via go/ees005
163
+ // eslint-disable-next-line @typescript-eslint/max-params
164
+ ) {
157
165
  return inlineCardViewProducer(node, view, getPos, decorations);
158
166
  };
159
167
  };
@@ -18,6 +18,8 @@ import { appearanceForNodeType, isDatasourceConfigEditable, isDatasourceNode, se
18
18
  /**
19
19
  * Attempt to replace the link into the respective card.
20
20
  */
21
+ // Ignored via go/ees005
22
+ // eslint-disable-next-line @typescript-eslint/max-params
21
23
  function replaceLinksToCards(tr, cardAdf, schema, request) {
22
24
  var inlineCard = schema.nodes.inlineCard;
23
25
  var url = request.url;
@@ -55,7 +57,10 @@ function replaceLinksToCards(tr, cardAdf, schema, request) {
55
57
  }
56
58
  return $pos.node($pos.depth - 1).type.name;
57
59
  }
58
- export var replaceQueuedUrlWithCard = function replaceQueuedUrlWithCard(url, cardData, analyticsAction, editorAnalyticsApi, createAnalyticsEvent) {
60
+ export var replaceQueuedUrlWithCard = function replaceQueuedUrlWithCard(url, cardData, analyticsAction, editorAnalyticsApi, createAnalyticsEvent
61
+ // Ignored via go/ees005
62
+ // eslint-disable-next-line @typescript-eslint/max-params
63
+ ) {
59
64
  return function (editorState, dispatch) {
60
65
  var state = pluginKey.getState(editorState);
61
66
  if (!state) {
@@ -193,7 +198,10 @@ export var queueCardsFromChangedTr = function queueCardsFromChangedTr(state, tr,
193
198
  export var queueCardFromChangedTr = function queueCardFromChangedTr(state, tr, source, analyticsAction) {
194
199
  var normalizeLinkText = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
195
200
  var sourceEvent = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : undefined;
196
- var previousAppearance = arguments.length > 6 ? arguments[6] : undefined;
201
+ var previousAppearance
202
+ // Ignored via go/ees005
203
+ // eslint-disable-next-line @typescript-eslint/max-params
204
+ = arguments.length > 6 ? arguments[6] : undefined;
197
205
  var schema = state.schema;
198
206
  var link = schema.marks.link;
199
207
  var requests = [];
@@ -253,7 +261,10 @@ export var convertHyperlinkToSmartCard = function convertHyperlinkToSmartCard(st
253
261
  });
254
262
  return queueCards(requests)(state.tr);
255
263
  };
256
- export var changeSelectedCardToLink = function changeSelectedCardToLink(text, href, sendAnalytics, node, pos, editorAnalyticsApi) {
264
+ export var changeSelectedCardToLink = function changeSelectedCardToLink(text, href, sendAnalytics, node, pos, editorAnalyticsApi
265
+ // Ignored via go/ees005
266
+ // eslint-disable-next-line @typescript-eslint/max-params
267
+ ) {
257
268
  return function (state, dispatch) {
258
269
  var selectedNode = state.selection instanceof NodeSelection ? state.selection.node : undefined;
259
270
  var tr;
@@ -282,7 +293,10 @@ export var changeSelectedCardToLink = function changeSelectedCardToLink(text, hr
282
293
  return true;
283
294
  };
284
295
  };
285
- export var changeSelectedCardToLinkFallback = function changeSelectedCardToLinkFallback(text, href, sendAnalytics, node, pos, editorAnalyticsApi) {
296
+ export var changeSelectedCardToLinkFallback = function changeSelectedCardToLinkFallback(text, href, sendAnalytics, node, pos, editorAnalyticsApi
297
+ // Ignored via go/ees005
298
+ // eslint-disable-next-line @typescript-eslint/max-params
299
+ ) {
286
300
  return function (state, dispatch) {
287
301
  var tr;
288
302
  if (node && pos) {
@@ -333,6 +347,9 @@ function cardToLinkWithTransaction(state, text, href) {
333
347
  })]), false);
334
348
  return tr;
335
349
  }
350
+
351
+ // Ignored via go/ees005
352
+ // eslint-disable-next-line @typescript-eslint/max-params
336
353
  function cardNodeToLinkWithTransaction(state, text, href, node, pos) {
337
354
  var link = state.schema.marks.link;
338
355
  var url = node.attrs.url || node.attrs.data.url;
@@ -498,7 +515,10 @@ export var updateCardViaDatasource = function updateCardViaDatasource(args) {
498
515
  }
499
516
  view.dispatch(tr.scrollIntoView());
500
517
  };
501
- export var insertDatasource = function insertDatasource(state, adf, view, sourceEvent) {
518
+ export var insertDatasource = function insertDatasource(state, adf, view, sourceEvent
519
+ // Ignored via go/ees005
520
+ // eslint-disable-next-line @typescript-eslint/max-params
521
+ ) {
502
522
  var tr = state.tr,
503
523
  from = state.selection.from,
504
524
  schemaNodes = state.schema.nodes;
@@ -51,7 +51,12 @@ export function cardKeymap(featureFlags) {
51
51
 
52
52
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1227468 introduced since Chrome 91
53
53
  if (browser.chrome && browser.chrome_version > 90) {
54
+ // Ignored via go/ees005
55
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
54
56
  bindKeymapWithCommand(moveUp.common, selectAboveBelowInlineCard('up'), list);
57
+
58
+ // Ignored via go/ees005
59
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
55
60
  bindKeymapWithCommand(moveDown.common, selectAboveBelowInlineCard('down'), list);
56
61
  }
57
62
  return keymap(list);
@@ -178,7 +178,11 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
178
178
  var isBlockCardSelected = selection instanceof NodeSelection && ((_selection$node = selection.node) === null || _selection$node === void 0 ? void 0 : _selection$node.type) === schema.nodes.blockCard;
179
179
  if (isBlockCardSelected) {
180
180
  var _findDomRefAtPos, _node$attrs;
181
- var datasourceTableRef = (_findDomRefAtPos = findDomRefAtPos(selection.from, domAtPos)) === null || _findDomRefAtPos === void 0 ? void 0 : _findDomRefAtPos.querySelector(".".concat(DATASOURCE_INNER_CONTAINER_CLASSNAME));
181
+ // Ignored via go/ees005
182
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
183
+ var datasourceTableRef = // Ignored via go/ees005
184
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
185
+ (_findDomRefAtPos = findDomRefAtPos(selection.from, domAtPos)) === null || _findDomRefAtPos === void 0 ? void 0 : _findDomRefAtPos.querySelector(".".concat(DATASOURCE_INNER_CONTAINER_CLASSNAME));
182
186
  var node = selection.node;
183
187
  var isDatasource = !!(node !== null && node !== void 0 && (_node$attrs = node.attrs) !== null && _node$attrs !== void 0 && _node$attrs.datasource);
184
188
  var shouldUpdateTableRef = datasourceTableRef && (currentState === null || currentState === void 0 ? void 0 : currentState.datasourceTableRef) !== datasourceTableRef;
@@ -28,7 +28,10 @@ var isFreshlyPastedOnNewLine = function isFreshlyPastedOnNewLine(view) {
28
28
  // ============================================================================ //
29
29
  // Used for all interactions with the EditorCardProvider.
30
30
  // ============================================================================ //
31
- export var resolveWithProvider = function resolveWithProvider(view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent) {
31
+ export var resolveWithProvider = function resolveWithProvider(view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent
32
+ // Ignored via go/ees005
33
+ // eslint-disable-next-line @typescript-eslint/max-params
34
+ ) {
32
35
  var isEmbedFriendlyLocation = fg('hardcoded-embeds-only-on-new-line') ? isFreshlyPastedOnNewLine(view) : true;
33
36
 
34
37
  // When user manually changes appearance from blue link to smart link, we should respect that,
@@ -58,7 +61,10 @@ var updateCardType = function updateCardType(resolvedCard, options) {
58
61
  resolvedCard.type = 'inlineCard';
59
62
  }
60
63
  };
61
- var handleResolved = function handleResolved(view, request, editorAnalyticsApi, createAnalyticsEvent, options) {
64
+ var handleResolved = function handleResolved(view, request, editorAnalyticsApi, createAnalyticsEvent, options
65
+ // Ignored via go/ees005
66
+ // eslint-disable-next-line @typescript-eslint/max-params
67
+ ) {
62
68
  return function (resolvedCard) {
63
69
  updateCardType(resolvedCard, options);
64
70
  replaceQueuedUrlWithCard(request.url, resolvedCard, request.analyticsAction, editorAnalyticsApi, createAnalyticsEvent)(view.state, view.dispatch);
@@ -50,7 +50,10 @@ export var findCardInfo = function findCardInfo(state) {
50
50
  return cardInfo.pos === state.selection.from;
51
51
  });
52
52
  };
53
- var isAppearanceSupportedInParent = function isAppearanceSupportedInParent(currentNodePosition, editorState, fragment, currentAppearance) {
53
+ var isAppearanceSupportedInParent = function isAppearanceSupportedInParent(currentNodePosition, editorState, fragment, currentAppearance
54
+ // Ignored via go/ees005
55
+ // eslint-disable-next-line @typescript-eslint/max-params
56
+ ) {
54
57
  var resolvedPosition = editorState.doc.resolve(currentNodePosition);
55
58
  var parent = currentAppearance === 'embed' || currentAppearance === 'block' ? resolvedPosition.node() : resolvedPosition.node(-1);
56
59
  return parent && parent.type.validContent(fragment);
@@ -9,6 +9,8 @@ var IconDatasourceGlyph = function IconDatasourceGlyph(props) {
9
9
  height: "15",
10
10
  viewBox: "0 0 15 15",
11
11
  fill: "none"
12
+ // Ignored via go/ees005
13
+ // eslint-disable-next-line react/jsx-props-no-spreading
12
14
  }, props), /*#__PURE__*/React.createElement("path", {
13
15
  fillRule: "evenodd",
14
16
  clipRule: "evenodd",
@@ -28,5 +30,7 @@ export var DatasourceIcon = function DatasourceIcon(props) {
28
30
  xcss: wrapperStyles
29
31
  }, /*#__PURE__*/React.createElement(Icon, _extends({
30
32
  glyph: IconDatasourceGlyph
33
+ // Ignored via go/ees005
34
+ // eslint-disable-next-line react/jsx-props-no-spreading
31
35
  }, props)));
32
36
  };
@@ -93,7 +93,10 @@ export var EditLinkToolbar = /*#__PURE__*/function (_React$Component) {
93
93
  // via the floating toolbar
94
94
  ,
95
95
  invokeMethod: INPUT_METHOD.FLOATING_TB,
96
- lpLinkPicker: lpLinkPicker,
96
+ lpLinkPicker: lpLinkPicker
97
+ // Ignored via go/ees005
98
+ // eslint-disable-next-line @typescript-eslint/max-params
99
+ ,
97
100
  onSubmit: function onSubmit(href, title, displayText, inputMethod, analytic) {
98
101
  _this.hideLinkToolbar();
99
102
  if (_onSubmit) {
@@ -164,7 +167,10 @@ export var buildEditLinkToolbar = function buildEditLinkToolbar(_ref2) {
164
167
  text: displayInfo.title || '',
165
168
  node: node,
166
169
  lpLinkPicker: lpLinkPicker,
167
- forceFocusSelector: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f === void 0 || (_pluginInjectionApi$f = _pluginInjectionApi$f.actions) === null || _pluginInjectionApi$f === void 0 ? void 0 : _pluginInjectionApi$f.forceFocusSelector,
170
+ forceFocusSelector: pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f === void 0 || (_pluginInjectionApi$f = _pluginInjectionApi$f.actions) === null || _pluginInjectionApi$f === void 0 ? void 0 : _pluginInjectionApi$f.forceFocusSelector
171
+ // Ignored via go/ees005
172
+ // eslint-disable-next-line @typescript-eslint/max-params
173
+ ,
168
174
  onSubmit: function onSubmit(newHref, newText, inputMethod, analytic) {
169
175
  var urlChanged = newHref !== displayInfo.url;
170
176
  var titleChanged = newText !== displayInfo.title;
@@ -61,7 +61,10 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
61
61
  }, jsx(Button, {
62
62
  testId: "edit-link",
63
63
  onClick: onEditLink
64
- }, jsx(FormattedMessage, linkToolbarMessages.editLink)), jsx(Separator, null));
64
+ }, jsx(FormattedMessage
65
+ // Ignored via go/ees005
66
+ // eslint-disable-next-line react/jsx-props-no-spreading
67
+ , linkToolbarMessages.editLink)), jsx(Separator, null));
65
68
  }
66
69
  case 'edit-datasource':
67
70
  {
@@ -71,7 +74,10 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
71
74
  testId: "edit-datasource",
72
75
  tooltipContent: intl.formatMessage(linkToolbarMessages.editDatasourceStandaloneTooltip),
73
76
  onClick: onEditDatasource
74
- }, jsx(FormattedMessage, linkToolbarMessages.editDatasourceStandalone)), jsx(Separator, null));
77
+ }, jsx(FormattedMessage
78
+ // Ignored via go/ees005
79
+ // eslint-disable-next-line react/jsx-props-no-spreading
80
+ , linkToolbarMessages.editDatasourceStandalone)), jsx(Separator, null));
75
81
  }
76
82
  case 'edit-dropdown':
77
83
  {
@@ -88,7 +94,10 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
88
94
  selected: isOpen,
89
95
  disabled: false,
90
96
  ariaHasPopup: true
91
- }, jsx(FormattedMessage, messages.editDropdownTriggerTitle)), jsx(Separator, null));
97
+ }, jsx(FormattedMessage
98
+ // Ignored via go/ees005
99
+ // eslint-disable-next-line react/jsx-props-no-spreading
100
+ , messages.editDropdownTriggerTitle)), jsx(Separator, null));
92
101
  return jsx(Flex, {
93
102
  ref: containerRef
94
103
  }, jsx(UiDropdown, {
@@ -105,11 +114,17 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
105
114
  key: "edit.link",
106
115
  onClick: onEditLink,
107
116
  testId: "edit-dropdown-edit-link-item"
108
- }, jsx(FormattedMessage, messages.editDropdownEditLinkTitle)), jsx(ButtonItem, {
117
+ }, jsx(FormattedMessage
118
+ // Ignored via go/ees005
119
+ // eslint-disable-next-line react/jsx-props-no-spreading
120
+ , messages.editDropdownEditLinkTitle)), jsx(ButtonItem, {
109
121
  key: "edit.datasource",
110
122
  onClick: onEditDatasource,
111
123
  testId: "edit-dropdown-edit-datasource-item"
112
- }, jsx(FormattedMessage, messages.editDropdownEditDatasourceTitle))));
124
+ }, jsx(FormattedMessage
125
+ // Ignored via go/ees005
126
+ // eslint-disable-next-line react/jsx-props-no-spreading
127
+ , messages.editDropdownEditDatasourceTitle))));
113
128
  }
114
129
  case 'none':
115
130
  default: