@atlaskit/editor-plugin-media 1.43.7 → 1.43.8

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 (136) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/mediaPlugin.js +2 -0
  3. package/dist/cjs/nodeviews/lazy-media-group.js +4 -1
  4. package/dist/cjs/nodeviews/lazy-media-inline.js +4 -1
  5. package/dist/cjs/nodeviews/lazy-media.js +4 -1
  6. package/dist/cjs/nodeviews/mediaGroup.js +7 -1
  7. package/dist/cjs/nodeviews/mediaInline.js +6 -1
  8. package/dist/cjs/nodeviews/mediaNodeView/index.js +6 -2
  9. package/dist/cjs/nodeviews/mediaNodeView/media.js +10 -0
  10. package/dist/cjs/nodeviews/mediaSingle.js +41 -8
  11. package/dist/cjs/nodeviews/toDOM-fixes/toDOMAttrs.js +7 -3
  12. package/dist/cjs/pm-plugins/alt-text/commands.js +2 -0
  13. package/dist/cjs/pm-plugins/alt-text/keymap.js +6 -0
  14. package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
  15. package/dist/cjs/pm-plugins/commands/captions.js +4 -1
  16. package/dist/cjs/pm-plugins/commands/linking.js +10 -2
  17. package/dist/cjs/pm-plugins/keymap-media.js +10 -0
  18. package/dist/cjs/pm-plugins/keymap.js +54 -7
  19. package/dist/cjs/pm-plugins/linking/keymap.js +3 -0
  20. package/dist/cjs/pm-plugins/main.js +24 -3
  21. package/dist/cjs/pm-plugins/mediaTaskManager.js +7 -0
  22. package/dist/cjs/pm-plugins/picker-facade.js +8 -0
  23. package/dist/cjs/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
  24. package/dist/cjs/pm-plugins/utils/media-files.js +8 -2
  25. package/dist/cjs/pm-plugins/utils/media-single.js +19 -4
  26. package/dist/cjs/ui/CaptionPlaceholder/index.js +8 -2
  27. package/dist/cjs/ui/ImageBorder/index.js +44 -38
  28. package/dist/cjs/ui/ImageBorder/styles.js +2 -0
  29. package/dist/cjs/ui/MediaLinkingToolbar.js +2 -1
  30. package/dist/cjs/ui/MediaPicker/DropzoneWrapper.js +2 -0
  31. package/dist/cjs/ui/MediaPicker/index.js +3 -0
  32. package/dist/cjs/ui/MediaViewer/PortalWrapper.js +8 -2
  33. package/dist/cjs/ui/PixelEntry/index.js +61 -51
  34. package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
  35. package/dist/cjs/ui/ResizableMediaSingle/index.js +6 -1
  36. package/dist/cjs/ui/ResizableMediaSingle/styles.js +3 -0
  37. package/dist/cjs/ui/toolbar/assets/commentWithDotIcon.js +2 -0
  38. package/dist/cjs/ui/toolbar/commands.js +4 -1
  39. package/dist/cjs/ui/toolbar/filePreviewItem.js +4 -1
  40. package/dist/cjs/ui/toolbar/index.js +21 -3
  41. package/dist/cjs/ui/toolbar/layout-group.js +8 -1
  42. package/dist/cjs/ui/toolbar/linking.js +4 -1
  43. package/dist/cjs/ui/toolbar/utils.js +2 -0
  44. package/dist/es2019/mediaPlugin.js +2 -0
  45. package/dist/es2019/nodeviews/lazy-media-group.js +4 -1
  46. package/dist/es2019/nodeviews/lazy-media-inline.js +4 -1
  47. package/dist/es2019/nodeviews/lazy-media-single.js +4 -1
  48. package/dist/es2019/nodeviews/lazy-media.js +4 -1
  49. package/dist/es2019/nodeviews/mediaGroup.js +7 -1
  50. package/dist/es2019/nodeviews/mediaInline.js +6 -1
  51. package/dist/es2019/nodeviews/mediaNodeView/index.js +6 -1
  52. package/dist/es2019/nodeviews/mediaNodeView/media.js +10 -0
  53. package/dist/es2019/nodeviews/mediaSingle.js +43 -8
  54. package/dist/es2019/nodeviews/toDOM-fixes/toDOMAttrs.js +4 -1
  55. package/dist/es2019/pm-plugins/alt-text/commands.js +2 -0
  56. package/dist/es2019/pm-plugins/alt-text/keymap.js +6 -0
  57. package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
  58. package/dist/es2019/pm-plugins/commands/captions.js +4 -1
  59. package/dist/es2019/pm-plugins/commands/linking.js +10 -2
  60. package/dist/es2019/pm-plugins/keymap-media.js +10 -0
  61. package/dist/es2019/pm-plugins/keymap.js +54 -7
  62. package/dist/es2019/pm-plugins/linking/keymap.js +3 -0
  63. package/dist/es2019/pm-plugins/main.js +24 -2
  64. package/dist/es2019/pm-plugins/mediaTaskManager.js +7 -0
  65. package/dist/es2019/pm-plugins/picker-facade.js +8 -0
  66. package/dist/es2019/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
  67. package/dist/es2019/pm-plugins/utils/media-files.js +8 -2
  68. package/dist/es2019/pm-plugins/utils/media-single.js +19 -4
  69. package/dist/es2019/ui/CaptionPlaceholder/index.js +8 -2
  70. package/dist/es2019/ui/ImageBorder/index.js +44 -38
  71. package/dist/es2019/ui/ImageBorder/styles.js +2 -0
  72. package/dist/es2019/ui/MediaLinkingToolbar.js +4 -2
  73. package/dist/es2019/ui/MediaPicker/DropzoneWrapper.js +2 -0
  74. package/dist/es2019/ui/MediaPicker/index.js +3 -0
  75. package/dist/es2019/ui/MediaViewer/PortalWrapper.js +8 -2
  76. package/dist/es2019/ui/PixelEntry/index.js +59 -49
  77. package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
  78. package/dist/es2019/ui/ResizableMediaSingle/index.js +6 -1
  79. package/dist/es2019/ui/ResizableMediaSingle/styles.js +3 -0
  80. package/dist/es2019/ui/toolbar/assets/commentWithDotIcon.js +2 -0
  81. package/dist/es2019/ui/toolbar/commands.js +4 -1
  82. package/dist/es2019/ui/toolbar/filePreviewItem.js +4 -1
  83. package/dist/es2019/ui/toolbar/index.js +21 -3
  84. package/dist/es2019/ui/toolbar/layout-group.js +8 -1
  85. package/dist/es2019/ui/toolbar/linking.js +4 -1
  86. package/dist/es2019/ui/toolbar/mediaInline.js +8 -2
  87. package/dist/es2019/ui/toolbar/utils.js +6 -1
  88. package/dist/esm/mediaPlugin.js +2 -0
  89. package/dist/esm/nodeviews/lazy-media-group.js +4 -1
  90. package/dist/esm/nodeviews/lazy-media-inline.js +4 -1
  91. package/dist/esm/nodeviews/lazy-media.js +4 -1
  92. package/dist/esm/nodeviews/mediaGroup.js +7 -1
  93. package/dist/esm/nodeviews/mediaInline.js +6 -1
  94. package/dist/esm/nodeviews/mediaNodeView/index.js +6 -1
  95. package/dist/esm/nodeviews/mediaNodeView/media.js +10 -0
  96. package/dist/esm/nodeviews/mediaSingle.js +41 -8
  97. package/dist/esm/nodeviews/toDOM-fixes/toDOMAttrs.js +7 -3
  98. package/dist/esm/pm-plugins/alt-text/commands.js +2 -0
  99. package/dist/esm/pm-plugins/alt-text/keymap.js +6 -0
  100. package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
  101. package/dist/esm/pm-plugins/commands/captions.js +4 -1
  102. package/dist/esm/pm-plugins/commands/linking.js +10 -2
  103. package/dist/esm/pm-plugins/keymap-media.js +10 -0
  104. package/dist/esm/pm-plugins/keymap.js +54 -7
  105. package/dist/esm/pm-plugins/linking/keymap.js +3 -0
  106. package/dist/esm/pm-plugins/main.js +24 -2
  107. package/dist/esm/pm-plugins/mediaTaskManager.js +7 -0
  108. package/dist/esm/pm-plugins/picker-facade.js +8 -0
  109. package/dist/esm/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
  110. package/dist/esm/pm-plugins/utils/media-files.js +8 -2
  111. package/dist/esm/pm-plugins/utils/media-single.js +19 -4
  112. package/dist/esm/ui/CaptionPlaceholder/index.js +8 -2
  113. package/dist/esm/ui/ImageBorder/index.js +44 -38
  114. package/dist/esm/ui/ImageBorder/styles.js +2 -0
  115. package/dist/esm/ui/MediaLinkingToolbar.js +4 -2
  116. package/dist/esm/ui/MediaPicker/DropzoneWrapper.js +2 -0
  117. package/dist/esm/ui/MediaPicker/index.js +3 -0
  118. package/dist/esm/ui/MediaViewer/PortalWrapper.js +8 -2
  119. package/dist/esm/ui/PixelEntry/index.js +61 -51
  120. package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
  121. package/dist/esm/ui/ResizableMediaSingle/index.js +6 -1
  122. package/dist/esm/ui/ResizableMediaSingle/styles.js +3 -0
  123. package/dist/esm/ui/toolbar/assets/commentWithDotIcon.js +2 -0
  124. package/dist/esm/ui/toolbar/commands.js +4 -1
  125. package/dist/esm/ui/toolbar/filePreviewItem.js +4 -1
  126. package/dist/esm/ui/toolbar/index.js +21 -3
  127. package/dist/esm/ui/toolbar/layout-group.js +8 -1
  128. package/dist/esm/ui/toolbar/linking.js +4 -1
  129. package/dist/esm/ui/toolbar/utils.js +2 -0
  130. package/dist/types/nodeviews/mediaNodeView/index.d.ts +1 -2
  131. package/dist/types/pm-plugins/utils/media-single.d.ts +1 -1
  132. package/dist/types/ui/toolbar/commands.d.ts +1 -2
  133. package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +1 -2
  134. package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +1 -1
  135. package/dist/types-ts4.5/ui/toolbar/commands.d.ts +1 -2
  136. package/package.json +7 -7
@@ -122,55 +122,65 @@ export const PixelEntry = ({
122
122
  }, ({
123
123
  formProps
124
124
  }) => {
125
- return jsx("form", formProps, jsx("div", {
126
- css: pixelSizingWrapper
127
- }, jsx(Field, {
128
- key: "inputWidth",
129
- name: "inputWidth",
130
- defaultValue: computedWidth
131
- }, ({
132
- fieldProps
133
- }) => jsx(Tooltip, {
134
- hideTooltipOnMouseDown: true,
135
- content: formatMessage(messages.inputWidthTooltip, {
136
- maxWidth
137
- }),
138
- position: "top"
139
- }, jsx(Textfield, _extends({}, fieldProps, {
140
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
141
- css: [pixelSizingWidthInput, pixelSizingInput],
142
- appearance: "none",
143
- isCompact: true,
144
- onChange: handleOnChange('inputWidth'),
145
- pattern: "\\d*",
146
- "aria-label": formatMessage(messages.inputWidthAriaLabel, {
147
- maxWidth
148
- })
149
- })))), jsx(Box, {
150
- as: "span",
151
- xcss: pixelSizingLabel
152
- }, "\xD7"), jsx(Field, {
153
- key: "inputHeight",
154
- name: "inputHeight",
155
- defaultValue: computedHeight
156
- }, ({
157
- fieldProps
158
- }) => jsx(Tooltip, {
159
- hideTooltipOnMouseDown: true,
160
- content: formatMessage(messages.inputHeightTooltip),
161
- position: "top"
162
- }, jsx(Textfield, _extends({}, fieldProps, {
163
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
164
- css: [pixelSizingHeightInput, pixelSizingInput],
165
- appearance: "none",
166
- isCompact: true,
167
- onChange: handleOnChange('inputHeight'),
168
- pattern: "\\d*",
169
- "aria-label": formatMessage(messages.inputHeightAriaLabel)
170
- })))), jsx(Button, {
171
- css: pixelEntryHiddenSubmit,
172
- type: "submit"
173
- }, formatMessage(messages.submitButtonText))));
125
+ return (
126
+ // Ignored via go/ees005
127
+ // eslint-disable-next-line react/jsx-props-no-spreading
128
+ jsx("form", formProps, jsx("div", {
129
+ css: pixelSizingWrapper
130
+ }, jsx(Field, {
131
+ key: "inputWidth",
132
+ name: "inputWidth",
133
+ defaultValue: computedWidth
134
+ }, ({
135
+ fieldProps
136
+ }) => jsx(Tooltip, {
137
+ hideTooltipOnMouseDown: true,
138
+ content: formatMessage(messages.inputWidthTooltip, {
139
+ maxWidth
140
+ }),
141
+ position: "top"
142
+ }, jsx(Textfield
143
+ // Ignored via go/ees005
144
+ // eslint-disable-next-line react/jsx-props-no-spreading
145
+ , _extends({}, fieldProps, {
146
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
147
+ css: [pixelSizingWidthInput, pixelSizingInput],
148
+ appearance: "none",
149
+ isCompact: true,
150
+ onChange: handleOnChange('inputWidth'),
151
+ pattern: "\\d*",
152
+ "aria-label": formatMessage(messages.inputWidthAriaLabel, {
153
+ maxWidth
154
+ })
155
+ })))), jsx(Box, {
156
+ as: "span",
157
+ xcss: pixelSizingLabel
158
+ }, "\xD7"), jsx(Field, {
159
+ key: "inputHeight",
160
+ name: "inputHeight",
161
+ defaultValue: computedHeight
162
+ }, ({
163
+ fieldProps
164
+ }) => jsx(Tooltip, {
165
+ hideTooltipOnMouseDown: true,
166
+ content: formatMessage(messages.inputHeightTooltip),
167
+ position: "top"
168
+ }, jsx(Textfield
169
+ // Ignored via go/ees005
170
+ // eslint-disable-next-line react/jsx-props-no-spreading
171
+ , _extends({}, fieldProps, {
172
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
173
+ css: [pixelSizingHeightInput, pixelSizingInput],
174
+ appearance: "none",
175
+ isCompact: true,
176
+ onChange: handleOnChange('inputHeight'),
177
+ pattern: "\\d*",
178
+ "aria-label": formatMessage(messages.inputHeightAriaLabel)
179
+ })))), jsx(Button, {
180
+ css: pixelEntryHiddenSubmit,
181
+ type: "submit"
182
+ }, formatMessage(messages.submitButtonText))))
183
+ );
174
184
  }))
175
185
  );
176
186
  };
@@ -69,6 +69,8 @@ class ResizableMediaSingleNext extends React.Component {
69
69
  }
70
70
  return this.calcUnwrappedLayout(newWidth, containerWidth || 0, lineLength, fullWidthMode, this.isAdjacentMode());
71
71
  });
72
+ // Ignored via go/ees005
73
+ // eslint-disable-next-line @typescript-eslint/max-params
72
74
  _defineProperty(this, "calcUnwrappedLayout", (width, containerWidth, contentWidth, fullWidthMode, isNestedNode) => {
73
75
  if (isNestedNode) {
74
76
  return 'center';
@@ -532,7 +534,10 @@ const setIsResizingPluginState = ({
532
534
  }
533
535
  return true;
534
536
  };
535
- const calcUnwrappedLayout = (width, containerWidth, contentWidth, fullWidthMode, isNestedNode) => {
537
+ const calcUnwrappedLayout = (width, containerWidth, contentWidth, fullWidthMode, isNestedNode
538
+ // Ignored via go/ees005
539
+ // eslint-disable-next-line @typescript-eslint/max-params
540
+ ) => {
536
541
  if (isNestedNode) {
537
542
  return 'center';
538
543
  }
@@ -572,7 +577,10 @@ const calcNewLayout = ({
572
577
  }
573
578
  return calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode, isNestedNode);
574
579
  };
575
- const calculateSizeState = props => (size, delta, onResizeStop = false, aspectRatio) => {
580
+ const calculateSizeState = props => (size, delta, onResizeStop = false, aspectRatio
581
+ // Ignored via go/ees005
582
+ // eslint-disable-next-line @typescript-eslint/max-params
583
+ ) => {
576
584
  const calculatedWidth = Math.round(size.width + delta.width);
577
585
  const calculatedWidthWithLayout = calcNewLayout(props)(calculatedWidth, onResizeStop);
578
586
  return {
@@ -227,6 +227,8 @@ export default class ResizableMediaSingle extends React.Component {
227
227
  return null;
228
228
  }
229
229
  const pos = this.props.getPos();
230
+ // Ignored via go/ees005
231
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
230
232
  if (Number.isNaN(pos) || typeof pos !== 'number') {
231
233
  return null;
232
234
  }
@@ -328,7 +330,10 @@ export default class ResizableMediaSingle extends React.Component {
328
330
  fullWidthMode,
329
331
  width: origWidth
330
332
  })
331
- }, jsx(Resizer, _extends({}, this.props, {
333
+ }, jsx(Resizer
334
+ // Ignored via go/ees005
335
+ // eslint-disable-next-line react/jsx-props-no-spreading
336
+ , _extends({}, this.props, {
332
337
  displayGrid: this.displayGrid,
333
338
  ratio: ratio,
334
339
  width: initialWidth,
@@ -1,5 +1,8 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
+
4
+ // Ignored via go/ees005
5
+ // eslint-disable-next-line import/no-namespace
3
6
  import * as colors from '@atlaskit/theme/colors';
4
7
  const NOTIFICATION_SIZE = 8;
5
8
  const SPACE_FROM_EDGE = "var(--ds-space-100, 8px)";
@@ -62,5 +62,7 @@ const IconCommentConfluenceTypeWithDotGlyph = () => {
62
62
  export const CommentWithDotIcon = props => {
63
63
  return /*#__PURE__*/React.createElement(Icon, _extends({
64
64
  glyph: fg('platform_editor_media_interaction_improvements') ? IconCommentConfluenceTypeWithDotGlyph : IconCommentWithDotGlyph
65
+ // Ignored via go/ees005
66
+ // eslint-disable-next-line react/jsx-props-no-spreading
65
67
  }, props));
66
68
  };
@@ -239,7 +239,10 @@ export const setBorderMark = editorAnalyticsAPI => attrs => (state, dispatch) =>
239
239
  }
240
240
  return true;
241
241
  };
242
- export const updateMediaSingleWidth = editorAnalyticsAPI => (width, validation, inputMethod, layout) => (state, dispatch) => {
242
+ export const updateMediaSingleWidth = editorAnalyticsAPI => (width, validation, inputMethod, layout
243
+ // Ignored via go/ees005
244
+ // eslint-disable-next-line @typescript-eslint/max-params
245
+ ) => (state, dispatch) => {
243
246
  const selectedMediaSingleNode = getSelectedMediaSingle(state);
244
247
  if (!selectedMediaSingleNode) {
245
248
  return false;
@@ -31,7 +31,10 @@ export const FilePreviewItem = ({
31
31
  LEGACY_fallbackIcon: FilePreviewIcon
32
32
  }),
33
33
  tooltipContent: tooltipContent
34
- }), shouldRenderMediaViewer && /*#__PURE__*/React.createElement(RenderMediaViewer, {
34
+ }), shouldRenderMediaViewer && /*#__PURE__*/React.createElement(RenderMediaViewer
35
+ // Ignored via go/ees005
36
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
37
+ , {
35
38
  mediaClientConfig: mediaPluginState.mediaClientConfig,
36
39
  onClose: onMediaViewerClose,
37
40
  selectedNodeAttrs: selectedNodeAttrs
@@ -83,7 +83,10 @@ export const handleShowMediaViewer = ({
83
83
  }
84
84
  api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : api.media.commands.showMediaViewer(selectedNodeAttrs));
85
85
  };
86
- const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, editorAnalyticsAPI, forceFocusSelector, isViewOnly) => {
86
+ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, editorAnalyticsAPI, forceFocusSelector, isViewOnly
87
+ // Ignored via go/ees005
88
+ // eslint-disable-next-line @typescript-eslint/max-params
89
+ ) => {
87
90
  if (isViewOnly) {
88
91
  return [];
89
92
  }
@@ -171,7 +174,10 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
171
174
  }];
172
175
  return items;
173
176
  };
174
- const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, mediaLinkingState, pluginInjectionApi) => {
177
+ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, mediaLinkingState, pluginInjectionApi
178
+ // Ignored via go/ees005
179
+ // eslint-disable-next-line @typescript-eslint/max-params
180
+ ) => {
175
181
  var _pluginInjectionApi$d, _pluginInjectionApi$d2;
176
182
  const {
177
183
  mediaSingle
@@ -244,6 +250,8 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
244
250
  render: props => {
245
251
  return /*#__PURE__*/React.createElement(LayoutGroup, _extends({
246
252
  layoutButtons: layoutButtons
253
+ // Ignored via go/ees005
254
+ // eslint-disable-next-line react/jsx-props-no-spreading
247
255
  }, props));
248
256
  },
249
257
  width: 156,
@@ -565,7 +573,10 @@ const getMediaTypeMessage = selectedNodeTypeSingle => {
565
573
  const mediaType = Object.keys(mediaTypeMessages).find(key => selectedNodeTypeSingle === null || selectedNodeTypeSingle === void 0 ? void 0 : selectedNodeTypeSingle.includes(key));
566
574
  return mediaType ? mediaTypeMessages[mediaType] : messages.file_unknown_is_selected;
567
575
  };
568
- export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) => {
576
+ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi
577
+ // Ignored via go/ees005
578
+ // eslint-disable-next-line @typescript-eslint/max-params
579
+ ) => {
569
580
  var _pluginInjectionApi$d3, _pluginInjectionApi$d4;
570
581
  const {
571
582
  media,
@@ -624,6 +635,8 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
624
635
  baseToolbar.getDomRef = () => {
625
636
  var _mediaPluginState$ele;
626
637
  const selector = mediaFilmstripItemDOMSelector(mediaOffset);
638
+ // Ignored via go/ees005
639
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
627
640
  return (_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(selector);
628
641
  };
629
642
  items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f3 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f3 === void 0 ? void 0 : (_pluginInjectionApi$f4 = _pluginInjectionApi$f3.actions) === null || _pluginInjectionApi$f4 === void 0 ? void 0 : _pluginInjectionApi$f4.forceFocusSelector, isViewOnly);
@@ -632,11 +645,16 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
632
645
  } else {
633
646
  baseToolbar.getDomRef = () => {
634
647
  var _mediaPluginState$ele2;
648
+ // Ignored via go/ees005
649
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
635
650
  const element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(`.${MediaSingleNodeSelector}`);
636
651
  return element || mediaPluginState.element;
637
652
  };
638
653
  items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
639
654
  }
655
+
656
+ // Ignored via go/ees005
657
+ // eslint-disable-next-line no-var
640
658
  var assistiveMessage = '';
641
659
  const selectedMediaSingleNode = getSelectedMediaSingle(state);
642
660
  if (selectedMediaSingleNode) {
@@ -20,12 +20,19 @@ export const LayoutGroup = ({
20
20
  }, jsx(ButtonGroup, null, layoutButtons.map((item, idx) => {
21
21
  switch (item.type) {
22
22
  case 'separator':
23
+ // Ignored via go/ees005
24
+ // eslint-disable-next-line react/no-array-index-key
23
25
  return jsx(FloatingToolbarSeparator, {
24
26
  key: idx
25
27
  });
26
28
  case 'button':
29
+ // Ignored via go/ees005
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
31
  const ButtonIcon = item.icon;
28
- return jsx(Button, {
32
+ return jsx(Button
33
+ // Ignored via go/ees005
34
+ // eslint-disable-next-line react/no-array-index-key
35
+ , {
29
36
  key: idx,
30
37
  icon: item.icon ? jsx(ButtonIcon, {
31
38
  label: item.title
@@ -27,7 +27,10 @@ export function shouldShowMediaLinkToolbar(editorState) {
27
27
  } = editorState.doc.resolve(mediaLinkingState.mediaPos);
28
28
  return parent && parent.type.allowsMarkType(link);
29
29
  }
30
- export const getLinkingToolbar = (toolbarBaseConfig, mediaLinkingState, state, intl, pluginInjectionApi, providerFactory) => {
30
+ export const getLinkingToolbar = (toolbarBaseConfig, mediaLinkingState, state, intl, pluginInjectionApi, providerFactory
31
+ // Ignored via go/ees005
32
+ // eslint-disable-next-line @typescript-eslint/max-params
33
+ ) => {
31
34
  const {
32
35
  link,
33
36
  visible,
@@ -24,7 +24,10 @@ import { shouldShowImageBorder } from './imageBorder';
24
24
  import { LinkToolbarAppearance } from './linking-toolbar-appearance';
25
25
  import { downloadMedia } from './utils';
26
26
  import { generateFilePreviewItem, handleShowMediaViewer } from './index';
27
- export const generateMediaInlineFloatingToolbar = (state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options = {}) => {
27
+ export const generateMediaInlineFloatingToolbar = (state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options = {}
28
+ // Ignored via go/ees005
29
+ // eslint-disable-next-line @typescript-eslint/max-params
30
+ ) => {
28
31
  var _pluginInjectionApi$a, _pluginInjectionApi$f, _pluginInjectionApi$f2;
29
32
  const editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
30
33
  const forceFocusSelector = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f === void 0 ? void 0 : (_pluginInjectionApi$f2 = _pluginInjectionApi$f.actions) === null || _pluginInjectionApi$f2 === void 0 ? void 0 : _pluginInjectionApi$f2.forceFocusSelector;
@@ -116,7 +119,10 @@ export const generateMediaInlineFloatingToolbar = (state, intl, mediaPluginState
116
119
  }];
117
120
  return items;
118
121
  };
119
- const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecoration, editorAnalyticsAPI, pluginInjectionApi, mediaLinkingState, options = {}) => {
122
+ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecoration, editorAnalyticsAPI, pluginInjectionApi, mediaLinkingState, options = {}
123
+ // Ignored via go/ees005
124
+ // eslint-disable-next-line @typescript-eslint/max-params
125
+ ) => {
120
126
  var _pluginInjectionApi$w, _pluginInjectionApi$f3, _pluginInjectionApi$f4;
121
127
  const {
122
128
  mediaInline
@@ -79,7 +79,10 @@ export const getPixelWidthOfElement = memoizeOne((editorView, pos, mediaWidth) =
79
79
  }
80
80
  return mediaWidth;
81
81
  });
82
- export const calcNewLayout = (width, layout, contentWidth, fullWidthMode = false, isNested = false) => {
82
+ export const calcNewLayout = (width, layout, contentWidth, fullWidthMode = false, isNested = false
83
+ // Ignored via go/ees005
84
+ // eslint-disable-next-line @typescript-eslint/max-params
85
+ ) => {
83
86
  const isWrappedLayout = wrappedLayouts.indexOf(layout) > -1;
84
87
 
85
88
  //See flowchart for layout logic: https://hello.atlassian.net/wiki/spaces/TWPCP/whiteboard/2969594044
@@ -99,6 +102,8 @@ export const calcNewLayout = (width, layout, contentWidth, fullWidthMode = false
99
102
  };
100
103
  let maxToolbarFitWidth = 0;
101
104
  export const getMaxToolbarWidth = () => {
105
+ // Ignored via go/ees005
106
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
102
107
  const toolbar = document.querySelector(`div[aria-label="Media floating controls"]`);
103
108
  const toolbarWidth = toolbar === null || toolbar === void 0 ? void 0 : toolbar.getBoundingClientRect().width;
104
109
  if (!toolbar) {
@@ -93,6 +93,8 @@ export var mediaPlugin = function mediaPlugin(_ref3) {
93
93
  return stateKey.getState(editorState) || null;
94
94
  },
95
95
  actions: {
96
+ // Ignored via go/ees005
97
+ // eslint-disable-next-line @typescript-eslint/max-params
96
98
  insertMediaAsMediaSingle: function insertMediaAsMediaSingle(view, node, inputMethod, isNestingInQuoteSupported, insertMediaVia) {
97
99
  var _api$analytics;
98
100
  return _insertMediaAsMediaSingle(view, node, inputMethod, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, isNestingInQuoteSupported, insertMediaVia);
@@ -3,7 +3,10 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  import { ReactMediaGroupNode } from './mediaGroup';
4
4
  export var lazyMediaGroupView = function lazyMediaGroupView(portalProviderAPI, eventDispatcher, providerFactory) {
5
5
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
6
- var api = arguments.length > 4 ? arguments[4] : undefined;
6
+ var api
7
+ // Ignored via go/ees005
8
+ // eslint-disable-next-line @typescript-eslint/max-params
9
+ = arguments.length > 4 ? arguments[4] : undefined;
7
10
  if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
8
11
  return ReactMediaGroupNode(portalProviderAPI, eventDispatcher, providerFactory, options, api);
9
12
  }
@@ -1,7 +1,10 @@
1
1
  import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
2
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  import { ReactMediaInlineNode } from './mediaInline';
4
- export var lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
4
+ export var lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent
5
+ // Ignored via go/ees005
6
+ // eslint-disable-next-line @typescript-eslint/max-params
7
+ ) {
5
8
  if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
6
9
  return ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent);
7
10
  }
@@ -3,7 +3,10 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  import { ReactMediaNode } from './mediaNodeView';
4
4
  export var lazyMediaView = function lazyMediaView(portalProviderAPI, eventDispatcher, providerFactory) {
5
5
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
6
- var api = arguments.length > 4 ? arguments[4] : undefined;
6
+ var api
7
+ // Ignored via go/ees005
8
+ // eslint-disable-next-line @typescript-eslint/max-params
9
+ = arguments.length > 4 ? arguments[4] : undefined;
7
10
  if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
8
11
  return ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api);
9
12
  }
@@ -260,6 +260,9 @@ var MediaGroup = /*#__PURE__*/function (_React$Component) {
260
260
  var _this$mediaPluginStat2;
261
261
  (_this$mediaPluginStat2 = this.mediaPluginState) === null || _this$mediaPluginStat2 === void 0 || _this$mediaPluginStat2.handleMediaGroupUpdate(this.mediaNodes, []);
262
262
  }
263
+
264
+ // Ignored via go/ees005
265
+ // eslint-disable-next-line react/no-unsafe
263
266
  }, {
264
267
  key: "UNSAFE_componentWillReceiveProps",
265
268
  value: function UNSAFE_componentWillReceiveProps(props) {
@@ -381,7 +384,10 @@ var MediaGroupNodeView = /*#__PURE__*/function (_ReactNodeView) {
381
384
  }(ReactNodeView);
382
385
  export var ReactMediaGroupNode = function ReactMediaGroupNode(portalProviderAPI, eventDispatcher, providerFactory) {
383
386
  var mediaOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
384
- var pluginInjectionApi = arguments.length > 4 ? arguments[4] : undefined;
387
+ var pluginInjectionApi
388
+ // Ignored via go/ees005
389
+ // eslint-disable-next-line @typescript-eslint/max-params
390
+ = arguments.length > 4 ? arguments[4] : undefined;
385
391
  return function (node, view, getPos) {
386
392
  return new MediaGroupNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
387
393
  providerFactory: providerFactory,
@@ -167,6 +167,8 @@ export var MediaInline = function MediaInline(props) {
167
167
  var identifier = {
168
168
  id: id,
169
169
  mediaItemType: 'file',
170
+ // Ignored via go/ees005
171
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
170
172
  collectionName: collection
171
173
  };
172
174
 
@@ -295,7 +297,10 @@ export var MediaInlineNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
295
297
  }
296
298
  }]);
297
299
  }(SelectionBasedNodeView);
298
- export var ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
300
+ export var ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent
301
+ // Ignored via go/ees005
302
+ // eslint-disable-next-line @typescript-eslint/max-params
303
+ ) {
299
304
  return function (node, view, getPos) {
300
305
  return new MediaInlineNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
301
306
  providerFactory: providerFactory,
@@ -20,6 +20,8 @@ import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-
20
20
  import { getAttrsFromUrl } from '@atlaskit/media-client';
21
21
  import { updateCurrentMediaNodeAttrs } from '../../pm-plugins/commands/helpers';
22
22
  import { isMediaBlobUrlFromAttrs } from '../../pm-plugins/utils/media-common';
23
+ // Ignored via go/ees005
24
+ // eslint-disable-next-line import/no-named-as-default
23
25
  import MediaNode from './media';
24
26
  var MediaNodeWithProviders = function MediaNodeWithProviders(_ref) {
25
27
  var pluginInjectionApi = _ref.pluginInjectionApi,
@@ -181,7 +183,10 @@ var MediaNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
181
183
  }(SelectionBasedNodeView);
182
184
  export var ReactMediaNode = function ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory) {
183
185
  var mediaOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
184
- var pluginInjectionApi = arguments.length > 4 ? arguments[4] : undefined;
186
+ var pluginInjectionApi
187
+ // Ignored via go/ees005
188
+ // eslint-disable-next-line @typescript-eslint/max-params
189
+ = arguments.length > 4 ? arguments[4] : undefined;
185
190
  return function (node, view, getPos) {
186
191
  return new MediaNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
187
192
  eventDispatcher: eventDispatcher,
@@ -182,7 +182,11 @@ export var MediaNode = /*#__PURE__*/function (_Component) {
182
182
  var lastElement;
183
183
  var focusableElements = (_this2$videoControlsW = _this2.videoControlsWrapperRef) === null || _this2$videoControlsW === void 0 || (_this2$videoControlsW = _this2$videoControlsW.current) === null || _this2$videoControlsW === void 0 ? void 0 : _this2$videoControlsW.querySelectorAll('button, input, [tabindex]:not([tabindex="-1"])');
184
184
  if (focusableElements && focusableElements.length) {
185
+ // Ignored via go/ees005
186
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
185
187
  firstElement = focusableElements[0];
188
+ // Ignored via go/ees005
189
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
186
190
  lastElement = focusableElements[focusableElements.length - 1];
187
191
  if (event.shiftKey && document.activeElement === firstElement) {
188
192
  event.preventDefault();
@@ -237,12 +241,16 @@ export var MediaNode = /*#__PURE__*/function (_Component) {
237
241
  }
238
242
  var contextId = contextIdentifierProvider && contextIdentifierProvider.objectId;
239
243
  var identifier = type === 'external' ? {
244
+ // Ignored via go/ees005
245
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
240
246
  dataURI: url,
241
247
  name: url,
242
248
  mediaItemType: 'external-image'
243
249
  } : {
244
250
  id: id,
245
251
  mediaItemType: 'file',
252
+ // Ignored via go/ees005
253
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
246
254
  collectionName: collection
247
255
  };
248
256
 
@@ -250,6 +258,8 @@ export var MediaNode = /*#__PURE__*/function (_Component) {
250
258
  // there is a possibility mediaClientConfig will be part of a identifier,
251
259
  // so this might be not an issue
252
260
  var mediaClientConfig = viewMediaClientConfig || {
261
+ // Ignored via go/ees005
262
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
253
263
  authProvider: function authProvider() {
254
264
  return {};
255
265
  }
@@ -141,6 +141,8 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
141
141
  _context2.next = 16;
142
142
  break;
143
143
  }
144
+ // Ignored via go/ees005
145
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
144
146
  updatingNode = _this.mediaNodeUpdater.handleExternalMedia(_this.props.getPos);
145
147
  addPendingTask(updatingNode);
146
148
  _context2.next = 15;
@@ -168,6 +170,8 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
168
170
  isCopying: true
169
171
  });
170
172
  _context2.prev = 25;
173
+ // Ignored via go/ees005
174
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
171
175
  copyNode = _this.mediaNodeUpdater.copyNode({
172
176
  traceId: node.attrs.__mediaTraceId
173
177
  });
@@ -271,7 +275,10 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
271
275
  _inherits(MediaSingleNode, _Component);
272
276
  return _createClass(MediaSingleNode, [{
273
277
  key: "UNSAFE_componentWillReceiveProps",
274
- value: function UNSAFE_componentWillReceiveProps(nextProps) {
278
+ value:
279
+ // Ignored via go/ees005
280
+ // eslint-disable-next-line react/no-unsafe
281
+ function UNSAFE_componentWillReceiveProps(nextProps) {
275
282
  if (!this.mediaNodeUpdater) {
276
283
  this.createOrUpdateMediaNodeUpdater(nextProps);
277
284
  }
@@ -520,12 +527,21 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
520
527
  ref: this.captionPlaceHolderRef,
521
528
  onClick: this.clickPlaceholder
522
529
  })));
523
- return jsx(Fragment, null, canResize ? fg('platform_editor_media_extended_resize_experience') ? jsx(ResizableMediaSingleNext, _extends({}, resizableMediaSingleProps, {
530
+ return jsx(Fragment, null, canResize ? fg('platform_editor_media_extended_resize_experience') ? jsx(ResizableMediaSingleNext
531
+ // Ignored via go/ees005
532
+ // eslint-disable-next-line react/jsx-props-no-spreading
533
+ , _extends({}, resizableMediaSingleProps, {
524
534
  showLegacyNotification: widthType !== 'pixel'
525
- }), MediaChildren) : jsx(ResizableMediaSingle, _extends({}, resizableMediaSingleProps, {
535
+ }), MediaChildren) : jsx(ResizableMediaSingle
536
+ // Ignored via go/ees005
537
+ // eslint-disable-next-line react/jsx-props-no-spreading
538
+ , _extends({}, resizableMediaSingleProps, {
526
539
  lineLength: contentWidthForLegacyExperience,
527
540
  pctWidth: mediaSingleWidthAttribute
528
- }), MediaChildren) : jsx(MediaSingle, _extends({}, mediaSingleProps, {
541
+ }), MediaChildren) : jsx(MediaSingle
542
+ // Ignored via go/ees005
543
+ // eslint-disable-next-line react/jsx-props-no-spreading
544
+ , _extends({}, mediaSingleProps, {
529
545
  pctWidth: mediaSingleWidthAttribute,
530
546
  size: {
531
547
  width: mediaSingleWidthAttribute,
@@ -585,8 +601,14 @@ var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref6) {
585
601
  editorAppearance: editorAppearance
586
602
  });
587
603
  }
588
- return jsx(MediaSingleNode, {
589
- width: widthState.width,
604
+ return jsx(MediaSingleNode
605
+ // Ignored via go/ees005
606
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
607
+ , {
608
+ width: widthState.width
609
+ // Ignored via go/ees005
610
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
611
+ ,
590
612
  lineLength: widthState.lineLength,
591
613
  node: node,
592
614
  getPos: getPos,
@@ -732,6 +754,9 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
732
754
  }
733
755
  return false;
734
756
  }
757
+
758
+ // Ignored via go/ees005
759
+ // eslint-disable-next-line @typescript-eslint/max-params
735
760
  }, {
736
761
  key: "update",
737
762
  value: function update(node, decorations, _innerDecorations, isValidUpdate) {
@@ -772,8 +797,14 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
772
797
  view: _this5.view,
773
798
  fullWidthMode: fullWidthMode,
774
799
  selected: _this5.isNodeSelected,
775
- eventDispatcher: eventDispatcher,
776
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
800
+ eventDispatcher: eventDispatcher
801
+ // Ignored via go/ees005
802
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
803
+ ,
804
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent
805
+ // Ignored via go/ees005
806
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
807
+ ,
777
808
  forwardRef: forwardRef,
778
809
  editorAppearance: editorAppearance
779
810
  });
@@ -785,6 +816,8 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
785
816
  value: function ignoreMutation() {
786
817
  // DOM has changed; recalculate if we need to re-render
787
818
  if (this.dom) {
819
+ // Ignored via go/ees005
820
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
788
821
  var offsetLeft = this.dom.offsetLeft;
789
822
  if (offsetLeft !== this.lastOffsetLeft) {
790
823
  this.lastOffsetLeft = offsetLeft;