@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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/mediaPlugin.js +2 -0
- package/dist/cjs/nodeviews/lazy-media-group.js +4 -1
- package/dist/cjs/nodeviews/lazy-media-inline.js +4 -1
- package/dist/cjs/nodeviews/lazy-media.js +4 -1
- package/dist/cjs/nodeviews/mediaGroup.js +7 -1
- package/dist/cjs/nodeviews/mediaInline.js +6 -1
- package/dist/cjs/nodeviews/mediaNodeView/index.js +6 -2
- package/dist/cjs/nodeviews/mediaNodeView/media.js +10 -0
- package/dist/cjs/nodeviews/mediaSingle.js +41 -8
- package/dist/cjs/nodeviews/toDOM-fixes/toDOMAttrs.js +7 -3
- package/dist/cjs/pm-plugins/alt-text/commands.js +2 -0
- package/dist/cjs/pm-plugins/alt-text/keymap.js +6 -0
- package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
- package/dist/cjs/pm-plugins/commands/captions.js +4 -1
- package/dist/cjs/pm-plugins/commands/linking.js +10 -2
- package/dist/cjs/pm-plugins/keymap-media.js +10 -0
- package/dist/cjs/pm-plugins/keymap.js +54 -7
- package/dist/cjs/pm-plugins/linking/keymap.js +3 -0
- package/dist/cjs/pm-plugins/main.js +24 -3
- package/dist/cjs/pm-plugins/mediaTaskManager.js +7 -0
- package/dist/cjs/pm-plugins/picker-facade.js +8 -0
- package/dist/cjs/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
- package/dist/cjs/pm-plugins/utils/media-files.js +8 -2
- package/dist/cjs/pm-plugins/utils/media-single.js +19 -4
- package/dist/cjs/ui/CaptionPlaceholder/index.js +8 -2
- package/dist/cjs/ui/ImageBorder/index.js +44 -38
- package/dist/cjs/ui/ImageBorder/styles.js +2 -0
- package/dist/cjs/ui/MediaLinkingToolbar.js +2 -1
- package/dist/cjs/ui/MediaPicker/DropzoneWrapper.js +2 -0
- package/dist/cjs/ui/MediaPicker/index.js +3 -0
- package/dist/cjs/ui/MediaViewer/PortalWrapper.js +8 -2
- package/dist/cjs/ui/PixelEntry/index.js +61 -51
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
- package/dist/cjs/ui/ResizableMediaSingle/index.js +6 -1
- package/dist/cjs/ui/ResizableMediaSingle/styles.js +3 -0
- package/dist/cjs/ui/toolbar/assets/commentWithDotIcon.js +2 -0
- package/dist/cjs/ui/toolbar/commands.js +4 -1
- package/dist/cjs/ui/toolbar/filePreviewItem.js +4 -1
- package/dist/cjs/ui/toolbar/index.js +21 -3
- package/dist/cjs/ui/toolbar/layout-group.js +8 -1
- package/dist/cjs/ui/toolbar/linking.js +4 -1
- package/dist/cjs/ui/toolbar/utils.js +2 -0
- package/dist/es2019/mediaPlugin.js +2 -0
- package/dist/es2019/nodeviews/lazy-media-group.js +4 -1
- package/dist/es2019/nodeviews/lazy-media-inline.js +4 -1
- package/dist/es2019/nodeviews/lazy-media-single.js +4 -1
- package/dist/es2019/nodeviews/lazy-media.js +4 -1
- package/dist/es2019/nodeviews/mediaGroup.js +7 -1
- package/dist/es2019/nodeviews/mediaInline.js +6 -1
- package/dist/es2019/nodeviews/mediaNodeView/index.js +6 -1
- package/dist/es2019/nodeviews/mediaNodeView/media.js +10 -0
- package/dist/es2019/nodeviews/mediaSingle.js +43 -8
- package/dist/es2019/nodeviews/toDOM-fixes/toDOMAttrs.js +4 -1
- package/dist/es2019/pm-plugins/alt-text/commands.js +2 -0
- package/dist/es2019/pm-plugins/alt-text/keymap.js +6 -0
- package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
- package/dist/es2019/pm-plugins/commands/captions.js +4 -1
- package/dist/es2019/pm-plugins/commands/linking.js +10 -2
- package/dist/es2019/pm-plugins/keymap-media.js +10 -0
- package/dist/es2019/pm-plugins/keymap.js +54 -7
- package/dist/es2019/pm-plugins/linking/keymap.js +3 -0
- package/dist/es2019/pm-plugins/main.js +24 -2
- package/dist/es2019/pm-plugins/mediaTaskManager.js +7 -0
- package/dist/es2019/pm-plugins/picker-facade.js +8 -0
- package/dist/es2019/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
- package/dist/es2019/pm-plugins/utils/media-files.js +8 -2
- package/dist/es2019/pm-plugins/utils/media-single.js +19 -4
- package/dist/es2019/ui/CaptionPlaceholder/index.js +8 -2
- package/dist/es2019/ui/ImageBorder/index.js +44 -38
- package/dist/es2019/ui/ImageBorder/styles.js +2 -0
- package/dist/es2019/ui/MediaLinkingToolbar.js +4 -2
- package/dist/es2019/ui/MediaPicker/DropzoneWrapper.js +2 -0
- package/dist/es2019/ui/MediaPicker/index.js +3 -0
- package/dist/es2019/ui/MediaViewer/PortalWrapper.js +8 -2
- package/dist/es2019/ui/PixelEntry/index.js +59 -49
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
- package/dist/es2019/ui/ResizableMediaSingle/index.js +6 -1
- package/dist/es2019/ui/ResizableMediaSingle/styles.js +3 -0
- package/dist/es2019/ui/toolbar/assets/commentWithDotIcon.js +2 -0
- package/dist/es2019/ui/toolbar/commands.js +4 -1
- package/dist/es2019/ui/toolbar/filePreviewItem.js +4 -1
- package/dist/es2019/ui/toolbar/index.js +21 -3
- package/dist/es2019/ui/toolbar/layout-group.js +8 -1
- package/dist/es2019/ui/toolbar/linking.js +4 -1
- package/dist/es2019/ui/toolbar/mediaInline.js +8 -2
- package/dist/es2019/ui/toolbar/utils.js +6 -1
- package/dist/esm/mediaPlugin.js +2 -0
- package/dist/esm/nodeviews/lazy-media-group.js +4 -1
- package/dist/esm/nodeviews/lazy-media-inline.js +4 -1
- package/dist/esm/nodeviews/lazy-media.js +4 -1
- package/dist/esm/nodeviews/mediaGroup.js +7 -1
- package/dist/esm/nodeviews/mediaInline.js +6 -1
- package/dist/esm/nodeviews/mediaNodeView/index.js +6 -1
- package/dist/esm/nodeviews/mediaNodeView/media.js +10 -0
- package/dist/esm/nodeviews/mediaSingle.js +41 -8
- package/dist/esm/nodeviews/toDOM-fixes/toDOMAttrs.js +7 -3
- package/dist/esm/pm-plugins/alt-text/commands.js +2 -0
- package/dist/esm/pm-plugins/alt-text/keymap.js +6 -0
- package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +4 -0
- package/dist/esm/pm-plugins/commands/captions.js +4 -1
- package/dist/esm/pm-plugins/commands/linking.js +10 -2
- package/dist/esm/pm-plugins/keymap-media.js +10 -0
- package/dist/esm/pm-plugins/keymap.js +54 -7
- package/dist/esm/pm-plugins/linking/keymap.js +3 -0
- package/dist/esm/pm-plugins/main.js +24 -2
- package/dist/esm/pm-plugins/mediaTaskManager.js +7 -0
- package/dist/esm/pm-plugins/picker-facade.js +8 -0
- package/dist/esm/pm-plugins/utils/batchMediaNodeAttrs.js +2 -0
- package/dist/esm/pm-plugins/utils/media-files.js +8 -2
- package/dist/esm/pm-plugins/utils/media-single.js +19 -4
- package/dist/esm/ui/CaptionPlaceholder/index.js +8 -2
- package/dist/esm/ui/ImageBorder/index.js +44 -38
- package/dist/esm/ui/ImageBorder/styles.js +2 -0
- package/dist/esm/ui/MediaLinkingToolbar.js +4 -2
- package/dist/esm/ui/MediaPicker/DropzoneWrapper.js +2 -0
- package/dist/esm/ui/MediaPicker/index.js +3 -0
- package/dist/esm/ui/MediaViewer/PortalWrapper.js +8 -2
- package/dist/esm/ui/PixelEntry/index.js +61 -51
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +10 -2
- package/dist/esm/ui/ResizableMediaSingle/index.js +6 -1
- package/dist/esm/ui/ResizableMediaSingle/styles.js +3 -0
- package/dist/esm/ui/toolbar/assets/commentWithDotIcon.js +2 -0
- package/dist/esm/ui/toolbar/commands.js +4 -1
- package/dist/esm/ui/toolbar/filePreviewItem.js +4 -1
- package/dist/esm/ui/toolbar/index.js +21 -3
- package/dist/esm/ui/toolbar/layout-group.js +8 -1
- package/dist/esm/ui/toolbar/linking.js +4 -1
- package/dist/esm/ui/toolbar/utils.js +2 -0
- package/dist/types/nodeviews/mediaNodeView/index.d.ts +1 -2
- package/dist/types/pm-plugins/utils/media-single.d.ts +1 -1
- package/dist/types/ui/toolbar/commands.d.ts +1 -2
- package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +1 -2
- package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/commands.d.ts +1 -2
- package/package.json +7 -7
|
@@ -18,9 +18,9 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
18
18
|
import { container, containerWithProvider, inputWrapper, RecentSearch } from '@atlaskit/editor-common/link';
|
|
19
19
|
import { mediaLinkToolbarMessages } from '@atlaskit/editor-common/media';
|
|
20
20
|
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
21
|
-
import { FloatingToolbarButton as Button, ErrorMessage, FloatingToolbarSeparator as Separator
|
|
21
|
+
import { FloatingToolbarButton as Button, ErrorMessage, FloatingToolbarSeparator as Separator,
|
|
22
22
|
// Common Translations will live here
|
|
23
|
-
|
|
23
|
+
PanelTextInput } from '@atlaskit/editor-common/ui';
|
|
24
24
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
25
25
|
import ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';
|
|
26
26
|
import EditorUnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
@@ -100,6 +100,8 @@ var LinkAddToolbar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
100
100
|
var formatLinkAddressText = formatMessage(mediaLinkToolbarMessages.backLink);
|
|
101
101
|
var formatUnlinkText = formatMessage(linkToolbarMessages.unlink);
|
|
102
102
|
var errorsList = _this.state.validationErrors.map(function (error, index) {
|
|
103
|
+
// Ignored via go/ees005
|
|
104
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
103
105
|
return jsx(ErrorMessage, {
|
|
104
106
|
key: index
|
|
105
107
|
}, error);
|
|
@@ -20,6 +20,8 @@ export var DropzoneWrapper = function DropzoneWrapper(_ref) {
|
|
|
20
20
|
pickerFacadeInstance = _ref2.pickerFacadeInstance;
|
|
21
21
|
var customDropzoneContainer = mediaState.options.customDropzoneContainer,
|
|
22
22
|
handleDrag = mediaState.handleDrag;
|
|
23
|
+
// Ignored via go/ees005
|
|
24
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
23
25
|
var editorHtmlElement = editorDomElement;
|
|
24
26
|
var scrollParent = appearance === 'full-page' && findOverflowScrollParent(editorHtmlElement);
|
|
25
27
|
var container = customDropzoneContainer || (scrollParent ? scrollParent : editorHtmlElement);
|
|
@@ -23,6 +23,9 @@ var MediaPicker = function MediaPicker(_ref) {
|
|
|
23
23
|
focusState = _useSharedPluginState.focusState,
|
|
24
24
|
connectivityState = _useSharedPluginState.connectivityState;
|
|
25
25
|
var featureFlags = mediaState.mediaOptions && mediaState.mediaOptions.featureFlags;
|
|
26
|
+
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
26
29
|
var editorDom = editorDomElement;
|
|
27
30
|
var editorParent = (_editorDom$parentElem = editorDom.parentElement) !== null && _editorDom$parentElem !== void 0 ? _editorDom$parentElem : undefined;
|
|
28
31
|
|
|
@@ -31,7 +31,10 @@ export var RenderMediaViewer = function RenderMediaViewer(_ref) {
|
|
|
31
31
|
var collectionName = isExternalMedia(selectedNodeAttrs) ? '' : selectedNodeAttrs.collection;
|
|
32
32
|
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(MediaViewer, {
|
|
33
33
|
collectionName: collectionName,
|
|
34
|
-
items: items
|
|
34
|
+
items: items
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
|
+
,
|
|
35
38
|
mediaClientConfig: mediaClientConfig,
|
|
36
39
|
selectedItem: _identifier,
|
|
37
40
|
onClose: onClose
|
|
@@ -48,7 +51,10 @@ export var RenderMediaViewer = function RenderMediaViewer(_ref) {
|
|
|
48
51
|
};
|
|
49
52
|
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(MediaViewer, {
|
|
50
53
|
collectionName: collection,
|
|
51
|
-
items: []
|
|
54
|
+
items: []
|
|
55
|
+
// Ignored via go/ees005
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
57
|
+
,
|
|
52
58
|
mediaClientConfig: mediaClientConfig,
|
|
53
59
|
selectedItem: identifier,
|
|
54
60
|
onClose: onClose
|
|
@@ -127,57 +127,67 @@ export var PixelEntry = function PixelEntry(_ref) {
|
|
|
127
127
|
onSubmit: handleOnSubmit
|
|
128
128
|
}, function (_ref2) {
|
|
129
129
|
var formProps = _ref2.formProps;
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
130
|
+
return (
|
|
131
|
+
// Ignored via go/ees005
|
|
132
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
133
|
+
jsx("form", formProps, jsx("div", {
|
|
134
|
+
css: pixelSizingWrapper
|
|
135
|
+
}, jsx(Field, {
|
|
136
|
+
key: "inputWidth",
|
|
137
|
+
name: "inputWidth",
|
|
138
|
+
defaultValue: computedWidth
|
|
139
|
+
}, function (_ref3) {
|
|
140
|
+
var fieldProps = _ref3.fieldProps;
|
|
141
|
+
return jsx(Tooltip, {
|
|
142
|
+
hideTooltipOnMouseDown: true,
|
|
143
|
+
content: formatMessage(messages.inputWidthTooltip, {
|
|
144
|
+
maxWidth: maxWidth
|
|
145
|
+
}),
|
|
146
|
+
position: "top"
|
|
147
|
+
}, jsx(Textfield
|
|
148
|
+
// Ignored via go/ees005
|
|
149
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
150
|
+
, _extends({}, fieldProps, {
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
152
|
+
css: [pixelSizingWidthInput, pixelSizingInput],
|
|
153
|
+
appearance: "none",
|
|
154
|
+
isCompact: true,
|
|
155
|
+
onChange: handleOnChange('inputWidth'),
|
|
156
|
+
pattern: "\\d*",
|
|
157
|
+
"aria-label": formatMessage(messages.inputWidthAriaLabel, {
|
|
158
|
+
maxWidth: maxWidth
|
|
159
|
+
})
|
|
160
|
+
})));
|
|
161
|
+
}), jsx(Box, {
|
|
162
|
+
as: "span",
|
|
163
|
+
xcss: pixelSizingLabel
|
|
164
|
+
}, "\xD7"), jsx(Field, {
|
|
165
|
+
key: "inputHeight",
|
|
166
|
+
name: "inputHeight",
|
|
167
|
+
defaultValue: computedHeight
|
|
168
|
+
}, function (_ref4) {
|
|
169
|
+
var fieldProps = _ref4.fieldProps;
|
|
170
|
+
return jsx(Tooltip, {
|
|
171
|
+
hideTooltipOnMouseDown: true,
|
|
172
|
+
content: formatMessage(messages.inputHeightTooltip),
|
|
173
|
+
position: "top"
|
|
174
|
+
}, jsx(Textfield
|
|
175
|
+
// Ignored via go/ees005
|
|
176
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
177
|
+
, _extends({}, fieldProps, {
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
179
|
+
css: [pixelSizingHeightInput, pixelSizingInput],
|
|
180
|
+
appearance: "none",
|
|
181
|
+
isCompact: true,
|
|
182
|
+
onChange: handleOnChange('inputHeight'),
|
|
183
|
+
pattern: "\\d*",
|
|
184
|
+
"aria-label": formatMessage(messages.inputHeightAriaLabel)
|
|
185
|
+
})));
|
|
186
|
+
}), jsx(Button, {
|
|
187
|
+
css: pixelEntryHiddenSubmit,
|
|
188
|
+
type: "submit"
|
|
189
|
+
}, formatMessage(messages.submitButtonText))))
|
|
190
|
+
);
|
|
181
191
|
}))
|
|
182
192
|
);
|
|
183
193
|
};
|
|
@@ -79,6 +79,8 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
|
|
|
79
79
|
}
|
|
80
80
|
return _this.calcUnwrappedLayout(newWidth, containerWidth || 0, lineLength, fullWidthMode, _this.isAdjacentMode());
|
|
81
81
|
});
|
|
82
|
+
// Ignored via go/ees005
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
82
84
|
_defineProperty(_this, "calcUnwrappedLayout", function (width, containerWidth, contentWidth, fullWidthMode, isNestedNode) {
|
|
83
85
|
if (isNestedNode) {
|
|
84
86
|
return 'center';
|
|
@@ -609,7 +611,10 @@ var setIsResizingPluginState = function setIsResizingPluginState(_ref4) {
|
|
|
609
611
|
return true;
|
|
610
612
|
};
|
|
611
613
|
};
|
|
612
|
-
var calcUnwrappedLayout = function calcUnwrappedLayout(width, containerWidth, contentWidth, fullWidthMode, isNestedNode
|
|
614
|
+
var calcUnwrappedLayout = function calcUnwrappedLayout(width, containerWidth, contentWidth, fullWidthMode, isNestedNode
|
|
615
|
+
// Ignored via go/ees005
|
|
616
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
617
|
+
) {
|
|
613
618
|
if (isNestedNode) {
|
|
614
619
|
return 'center';
|
|
615
620
|
}
|
|
@@ -653,7 +658,10 @@ var calcNewLayout = function calcNewLayout(_ref5) {
|
|
|
653
658
|
var calculateSizeState = function calculateSizeState(props) {
|
|
654
659
|
return function (size, delta) {
|
|
655
660
|
var onResizeStop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
656
|
-
var aspectRatio
|
|
661
|
+
var aspectRatio
|
|
662
|
+
// Ignored via go/ees005
|
|
663
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
664
|
+
= arguments.length > 3 ? arguments[3] : undefined;
|
|
657
665
|
var calculatedWidth = Math.round(size.width + delta.width);
|
|
658
666
|
var calculatedWidthWithLayout = calcNewLayout(props)(calculatedWidth, onResizeStop);
|
|
659
667
|
return {
|
|
@@ -291,6 +291,8 @@ var ResizableMediaSingle = /*#__PURE__*/function (_React$Component) {
|
|
|
291
291
|
return null;
|
|
292
292
|
}
|
|
293
293
|
var pos = this.props.getPos();
|
|
294
|
+
// Ignored via go/ees005
|
|
295
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
294
296
|
if (Number.isNaN(pos) || typeof pos !== 'number') {
|
|
295
297
|
return null;
|
|
296
298
|
}
|
|
@@ -394,7 +396,10 @@ var ResizableMediaSingle = /*#__PURE__*/function (_React$Component) {
|
|
|
394
396
|
fullWidthMode: fullWidthMode,
|
|
395
397
|
width: origWidth
|
|
396
398
|
})
|
|
397
|
-
}, jsx(Resizer
|
|
399
|
+
}, jsx(Resizer
|
|
400
|
+
// Ignored via go/ees005
|
|
401
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
402
|
+
, _extends({}, this.props, {
|
|
398
403
|
displayGrid: this.displayGrid,
|
|
399
404
|
ratio: ratio,
|
|
400
405
|
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
|
var NOTIFICATION_SIZE = 8;
|
|
5
8
|
var SPACE_FROM_EDGE = "var(--ds-space-100, 8px)";
|
|
@@ -62,5 +62,7 @@ var IconCommentConfluenceTypeWithDotGlyph = function IconCommentConfluenceTypeWi
|
|
|
62
62
|
export var CommentWithDotIcon = function 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
|
};
|
|
@@ -253,7 +253,10 @@ export var setBorderMark = function setBorderMark(editorAnalyticsAPI) {
|
|
|
253
253
|
};
|
|
254
254
|
};
|
|
255
255
|
export var updateMediaSingleWidth = function updateMediaSingleWidth(editorAnalyticsAPI) {
|
|
256
|
-
return function (width, validation, inputMethod, layout
|
|
256
|
+
return function (width, validation, inputMethod, layout
|
|
257
|
+
// Ignored via go/ees005
|
|
258
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
259
|
+
) {
|
|
257
260
|
return function (state, dispatch) {
|
|
258
261
|
var selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
259
262
|
if (!selectedMediaSingleNode) {
|
|
@@ -34,7 +34,10 @@ export var FilePreviewItem = function FilePreviewItem(_ref) {
|
|
|
34
34
|
LEGACY_fallbackIcon: FilePreviewIcon
|
|
35
35
|
}),
|
|
36
36
|
tooltipContent: tooltipContent
|
|
37
|
-
}), shouldRenderMediaViewer && /*#__PURE__*/React.createElement(RenderMediaViewer
|
|
37
|
+
}), shouldRenderMediaViewer && /*#__PURE__*/React.createElement(RenderMediaViewer
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
40
|
+
, {
|
|
38
41
|
mediaClientConfig: mediaPluginState.mediaClientConfig,
|
|
39
42
|
onClose: onMediaViewerClose,
|
|
40
43
|
selectedNodeAttrs: selectedNodeAttrs
|
|
@@ -86,7 +86,10 @@ export var handleShowMediaViewer = function handleShowMediaViewer(_ref) {
|
|
|
86
86
|
}
|
|
87
87
|
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 ? void 0 : api.media.commands.showMediaViewer(selectedNodeAttrs));
|
|
88
88
|
};
|
|
89
|
-
var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, editorAnalyticsAPI, forceFocusSelector, isViewOnly
|
|
89
|
+
var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, editorAnalyticsAPI, forceFocusSelector, isViewOnly
|
|
90
|
+
// Ignored via go/ees005
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
92
|
+
) {
|
|
90
93
|
if (isViewOnly) {
|
|
91
94
|
return [];
|
|
92
95
|
}
|
|
@@ -174,7 +177,10 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
174
177
|
}];
|
|
175
178
|
return items;
|
|
176
179
|
};
|
|
177
|
-
var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToolbar(state, intl, options, pluginState, mediaLinkingState, pluginInjectionApi
|
|
180
|
+
var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToolbar(state, intl, options, pluginState, mediaLinkingState, pluginInjectionApi
|
|
181
|
+
// Ignored via go/ees005
|
|
182
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
183
|
+
) {
|
|
178
184
|
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
179
185
|
var mediaSingle = state.schema.nodes.mediaSingle;
|
|
180
186
|
var allowResizing = options.allowResizing,
|
|
@@ -240,6 +246,8 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
240
246
|
render: function render(props) {
|
|
241
247
|
return /*#__PURE__*/React.createElement(LayoutGroup, _extends({
|
|
242
248
|
layoutButtons: layoutButtons
|
|
249
|
+
// Ignored via go/ees005
|
|
250
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
243
251
|
}, props));
|
|
244
252
|
},
|
|
245
253
|
width: 156,
|
|
@@ -556,7 +564,10 @@ var getMediaTypeMessage = function getMediaTypeMessage(selectedNodeTypeSingle) {
|
|
|
556
564
|
export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
557
565
|
var _pluginInjectionApi$d3, _pluginInjectionApi$d4;
|
|
558
566
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
559
|
-
var pluginInjectionApi
|
|
567
|
+
var pluginInjectionApi
|
|
568
|
+
// Ignored via go/ees005
|
|
569
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
570
|
+
= arguments.length > 3 ? arguments[3] : undefined;
|
|
560
571
|
var _state$schema$nodes = state.schema.nodes,
|
|
561
572
|
media = _state$schema$nodes.media,
|
|
562
573
|
mediaInline = _state$schema$nodes.mediaInline,
|
|
@@ -612,6 +623,8 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
612
623
|
baseToolbar.getDomRef = function () {
|
|
613
624
|
var _mediaPluginState$ele;
|
|
614
625
|
var selector = mediaFilmstripItemDOMSelector(mediaOffset);
|
|
626
|
+
// Ignored via go/ees005
|
|
627
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
615
628
|
return (_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(selector);
|
|
616
629
|
};
|
|
617
630
|
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f2 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f2 === void 0 || (_pluginInjectionApi$f2 = _pluginInjectionApi$f2.actions) === null || _pluginInjectionApi$f2 === void 0 ? void 0 : _pluginInjectionApi$f2.forceFocusSelector, isViewOnly);
|
|
@@ -620,11 +633,16 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
620
633
|
} else {
|
|
621
634
|
baseToolbar.getDomRef = function () {
|
|
622
635
|
var _mediaPluginState$ele2;
|
|
636
|
+
// Ignored via go/ees005
|
|
637
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
623
638
|
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(MediaSingleNodeSelector));
|
|
624
639
|
return element || mediaPluginState.element;
|
|
625
640
|
};
|
|
626
641
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
627
642
|
}
|
|
643
|
+
|
|
644
|
+
// Ignored via go/ees005
|
|
645
|
+
// eslint-disable-next-line no-var
|
|
628
646
|
var assistiveMessage = '';
|
|
629
647
|
var selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
630
648
|
if (selectedMediaSingleNode) {
|
|
@@ -19,12 +19,19 @@ export var LayoutGroup = function LayoutGroup(_ref) {
|
|
|
19
19
|
}, jsx(ButtonGroup, null, layoutButtons.map(function (item, idx) {
|
|
20
20
|
switch (item.type) {
|
|
21
21
|
case 'separator':
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
22
24
|
return jsx(FloatingToolbarSeparator, {
|
|
23
25
|
key: idx
|
|
24
26
|
});
|
|
25
27
|
case 'button':
|
|
28
|
+
// Ignored via go/ees005
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
30
|
var ButtonIcon = item.icon;
|
|
27
|
-
return jsx(Button
|
|
31
|
+
return jsx(Button
|
|
32
|
+
// Ignored via go/ees005
|
|
33
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
34
|
+
, {
|
|
28
35
|
key: idx,
|
|
29
36
|
icon: item.icon ? jsx(ButtonIcon, {
|
|
30
37
|
label: item.title
|
|
@@ -25,7 +25,10 @@ export function shouldShowMediaLinkToolbar(editorState) {
|
|
|
25
25
|
parent = _editorState$doc$reso.parent;
|
|
26
26
|
return parent && parent.type.allowsMarkType(link);
|
|
27
27
|
}
|
|
28
|
-
export var getLinkingToolbar = function getLinkingToolbar(toolbarBaseConfig, mediaLinkingState, state, intl, pluginInjectionApi, providerFactory
|
|
28
|
+
export var getLinkingToolbar = function getLinkingToolbar(toolbarBaseConfig, mediaLinkingState, state, intl, pluginInjectionApi, providerFactory
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
31
|
+
) {
|
|
29
32
|
var link = mediaLinkingState.link,
|
|
30
33
|
visible = mediaLinkingState.visible,
|
|
31
34
|
editing = mediaLinkingState.editable,
|
|
@@ -117,6 +117,8 @@ export var calcNewLayout = function calcNewLayout(width, layout, contentWidth) {
|
|
|
117
117
|
};
|
|
118
118
|
var maxToolbarFitWidth = 0;
|
|
119
119
|
export var getMaxToolbarWidth = function getMaxToolbarWidth() {
|
|
120
|
+
// Ignored via go/ees005
|
|
121
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
120
122
|
var toolbar = document.querySelector("div[aria-label=\"Media floating controls\"]");
|
|
121
123
|
var toolbarWidth = toolbar === null || toolbar === void 0 ? void 0 : toolbar.getBoundingClientRect().width;
|
|
122
124
|
if (!toolbar) {
|
|
@@ -4,8 +4,7 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
4
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
5
|
import type { ContextIdentifierProvider, MediaProvider, ProviderFactory, Providers } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
7
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
7
|
+
import type { ExtractInjectionAPI, EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
|
|
9
8
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
9
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
10
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI, InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { type InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { WidthPluginState } from '@atlaskit/editor-
|
|
3
|
+
import type { EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { MediaState } from '../../types';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { Command, EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
5
|
-
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
6
5
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
6
|
import type { EventInput } from '../../pm-plugins/types';
|
|
8
7
|
import type { PixelEntryValidation } from '../../ui/PixelEntry/types';
|
|
@@ -4,8 +4,7 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
4
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
5
|
import type { ContextIdentifierProvider, MediaProvider, ProviderFactory, Providers } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
7
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
7
|
+
import type { ExtractInjectionAPI, EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
|
|
9
8
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
9
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
10
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI, InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { type InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { WidthPluginState } from '@atlaskit/editor-
|
|
3
|
+
import type { EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { MediaState } from '../../types';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { Command, EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
5
|
-
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
6
5
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
6
|
import type { EventInput } from '../../pm-plugins/types';
|
|
8
7
|
import type { PixelEntryValidation } from '../../ui/PixelEntry/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.8",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
38
38
|
"@atlaskit/button": "^20.3.0",
|
|
39
|
-
"@atlaskit/editor-common": "^97.
|
|
39
|
+
"@atlaskit/editor-common": "^97.2.0",
|
|
40
40
|
"@atlaskit/editor-palette": "1.6.3",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
42
42
|
"@atlaskit/editor-plugin-annotation": "1.26.7",
|
|
@@ -49,19 +49,19 @@
|
|
|
49
49
|
"@atlaskit/editor-plugin-grid": "^1.2.0",
|
|
50
50
|
"@atlaskit/editor-plugin-guideline": "^1.2.0",
|
|
51
51
|
"@atlaskit/editor-plugin-selection": "^1.6.0",
|
|
52
|
-
"@atlaskit/editor-plugin-width": "^
|
|
52
|
+
"@atlaskit/editor-plugin-width": "^2.0.0",
|
|
53
53
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
54
54
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
55
55
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
56
56
|
"@atlaskit/form": "^11.0.0",
|
|
57
57
|
"@atlaskit/icon": "^23.1.0",
|
|
58
|
-
"@atlaskit/media-card": "^78.
|
|
59
|
-
"@atlaskit/media-client": "^
|
|
60
|
-
"@atlaskit/media-client-react": "^2.
|
|
58
|
+
"@atlaskit/media-card": "^78.17.0",
|
|
59
|
+
"@atlaskit/media-client": "^29.0.0",
|
|
60
|
+
"@atlaskit/media-client-react": "^2.5.0",
|
|
61
61
|
"@atlaskit/media-common": "^11.7.0",
|
|
62
62
|
"@atlaskit/media-filmstrip": "^48.1.0",
|
|
63
63
|
"@atlaskit/media-picker": "^67.0.0",
|
|
64
|
-
"@atlaskit/media-ui": "^27.
|
|
64
|
+
"@atlaskit/media-ui": "^27.2.0",
|
|
65
65
|
"@atlaskit/media-viewer": "^49.5.0",
|
|
66
66
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
67
67
|
"@atlaskit/primitives": "^13.3.0",
|