@atlaskit/editor-plugin-media 10.0.10 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/mediaPlugin.js +6 -3
- package/dist/cjs/nodeviews/mediaGroup.js +6 -2
- package/dist/cjs/nodeviews/mediaGroupNext.js +1 -0
- package/dist/cjs/nodeviews/mediaInline.js +10 -4
- package/dist/cjs/nodeviews/mediaNodeView/index.js +3 -1
- package/dist/cjs/nodeviews/mediaNodeView/media.js +3 -1
- package/dist/cjs/nodeviews/mediaSingle.js +6 -2
- package/dist/cjs/pm-plugins/pixel-resizing/ui/index.js +12 -4
- package/dist/cjs/pm-plugins/pixel-resizing/ui/pixel-entry.js +79 -73
- package/dist/cjs/ui/CommentBadge/index.js +6 -2
- package/dist/cjs/ui/ImageBorder/index.js +121 -38
- package/dist/cjs/ui/MediaLinkingToolbar.js +18 -6
- package/dist/cjs/ui/MediaPicker/DropzoneWrapper.js +6 -2
- package/dist/cjs/ui/MediaPicker/PickerFacadeProvider.js +1 -0
- package/dist/cjs/ui/MediaViewer/MediaViewerContainer.js +3 -1
- package/dist/cjs/ui/MediaViewer/PortalWrapper.js +4 -2
- package/dist/cjs/ui/ResizableMediaSingle/index.js +1 -0
- package/dist/cjs/ui/toolbar/index.js +6 -2
- package/dist/cjs/ui/toolbar/layout-group.js +3 -1
- package/dist/cjs/ui/toolbar/linking.js +15 -5
- package/dist/cjs/ui/toolbar/mediaInline.js +6 -2
- package/dist/es2019/mediaPlugin.js +6 -3
- package/dist/es2019/nodeviews/mediaGroup.js +6 -2
- package/dist/es2019/nodeviews/mediaGroupNext.js +1 -0
- package/dist/es2019/nodeviews/mediaInline.js +11 -4
- package/dist/es2019/nodeviews/mediaNodeView/index.js +3 -1
- package/dist/es2019/nodeviews/mediaNodeView/media.js +3 -1
- package/dist/es2019/nodeviews/mediaSingle.js +6 -2
- package/dist/es2019/pm-plugins/pixel-resizing/ui/index.js +12 -4
- package/dist/es2019/pm-plugins/pixel-resizing/ui/pixel-entry.js +77 -71
- package/dist/es2019/ui/CommentBadge/index.js +6 -2
- package/dist/es2019/ui/ImageBorder/index.js +123 -36
- package/dist/es2019/ui/MediaLinkingToolbar.js +18 -6
- package/dist/es2019/ui/MediaPicker/DropzoneWrapper.js +6 -2
- package/dist/es2019/ui/MediaPicker/PickerFacadeProvider.js +1 -0
- package/dist/es2019/ui/MediaViewer/MediaViewerContainer.js +3 -1
- package/dist/es2019/ui/MediaViewer/PortalWrapper.js +4 -2
- package/dist/es2019/ui/ResizableMediaSingle/index.js +1 -0
- package/dist/es2019/ui/toolbar/index.js +6 -2
- package/dist/es2019/ui/toolbar/layout-group.js +3 -1
- package/dist/es2019/ui/toolbar/linking.js +15 -5
- package/dist/es2019/ui/toolbar/mediaInline.js +6 -2
- package/dist/esm/mediaPlugin.js +6 -3
- package/dist/esm/nodeviews/mediaGroup.js +6 -2
- package/dist/esm/nodeviews/mediaGroupNext.js +1 -0
- package/dist/esm/nodeviews/mediaInline.js +10 -4
- package/dist/esm/nodeviews/mediaNodeView/index.js +3 -1
- package/dist/esm/nodeviews/mediaNodeView/media.js +3 -1
- package/dist/esm/nodeviews/mediaSingle.js +6 -2
- package/dist/esm/pm-plugins/pixel-resizing/ui/index.js +12 -4
- package/dist/esm/pm-plugins/pixel-resizing/ui/pixel-entry.js +79 -73
- package/dist/esm/ui/CommentBadge/index.js +6 -2
- package/dist/esm/ui/ImageBorder/index.js +121 -38
- package/dist/esm/ui/MediaLinkingToolbar.js +18 -6
- package/dist/esm/ui/MediaPicker/DropzoneWrapper.js +6 -2
- package/dist/esm/ui/MediaPicker/PickerFacadeProvider.js +1 -0
- package/dist/esm/ui/MediaViewer/MediaViewerContainer.js +3 -1
- package/dist/esm/ui/MediaViewer/PortalWrapper.js +4 -2
- package/dist/esm/ui/ResizableMediaSingle/index.js +1 -0
- package/dist/esm/ui/toolbar/index.js +6 -2
- package/dist/esm/ui/toolbar/layout-group.js +3 -1
- package/dist/esm/ui/toolbar/linking.js +15 -5
- package/dist/esm/ui/toolbar/mediaInline.js +6 -2
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/ui/MediaViewer/MediaViewerContainer.d.ts +3 -1
- package/dist/types/ui/MediaViewer/PortalWrapper.d.ts +3 -1
- package/dist/types-ts4.5/types/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/MediaViewer/MediaViewerContainer.d.ts +3 -1
- package/dist/types-ts4.5/ui/MediaViewer/PortalWrapper.d.ts +3 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 10.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`6e25e8bbb01c3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e25e8bbb01c3) -
|
|
8
|
+
[ux] Adds mediaViewerExtensions prop to media-viewer/src/header and threads it through parents.
|
|
9
|
+
Allows callers to pass in additional buttons to the image / video preview'
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 10.0.11
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`0d04e250bdf4b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d04e250bdf4b) -
|
|
20
|
+
[ux] Making submenus for media (color/size) and table (background color) consistent with ADS and
|
|
21
|
+
fixing incorrect gate mocking in editor-plugin-ai-tests
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 10.0.10
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/cjs/mediaPlugin.js
CHANGED
|
@@ -81,7 +81,8 @@ var mediaViewerStateSelector = function mediaViewerStateSelector(states) {
|
|
|
81
81
|
};
|
|
82
82
|
var MediaViewerFunctionalComponent = function MediaViewerFunctionalComponent(_ref2) {
|
|
83
83
|
var api = _ref2.api,
|
|
84
|
-
editorView = _ref2.editorView
|
|
84
|
+
editorView = _ref2.editorView,
|
|
85
|
+
mediaViewerExtensions = _ref2.mediaViewerExtensions;
|
|
85
86
|
// Only traverse document once when media viewer is visible, media viewer items will not update
|
|
86
87
|
// when document changes are made while media viewer is open
|
|
87
88
|
var _useSharedPluginState2 = (0, _hooks.useSharedPluginStateWithSelector)(api, ['media'], mediaViewerStateSelector),
|
|
@@ -108,7 +109,8 @@ var MediaViewerFunctionalComponent = function MediaViewerFunctionalComponent(_re
|
|
|
108
109
|
mediaClientConfig: mediaClientConfig,
|
|
109
110
|
onClose: handleOnClose,
|
|
110
111
|
selectedNodeAttrs: mediaViewerSelectedMedia,
|
|
111
|
-
items: mediaItems
|
|
112
|
+
items: mediaItems,
|
|
113
|
+
extensions: mediaViewerExtensions
|
|
112
114
|
});
|
|
113
115
|
};
|
|
114
116
|
var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
@@ -342,7 +344,8 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
342
344
|
}
|
|
343
345
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(MediaViewerFunctionalComponent, {
|
|
344
346
|
api: api,
|
|
345
|
-
editorView: editorView
|
|
347
|
+
editorView: editorView,
|
|
348
|
+
mediaViewerExtensions: options === null || options === void 0 ? void 0 : options.mediaViewerExtensions
|
|
346
349
|
}), /*#__PURE__*/_react.default.createElement(MediaPickerFunctionalComponent, {
|
|
347
350
|
editorDomElement: editorView.dom,
|
|
348
351
|
appearance: appearance,
|
|
@@ -53,9 +53,13 @@ var MediaGroupNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
53
53
|
mediaOptions = props.mediaOptions,
|
|
54
54
|
pluginInjectionApi = props.pluginInjectionApi;
|
|
55
55
|
var getPos = this.getPos;
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders
|
|
57
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
58
|
+
, {
|
|
57
59
|
providers: ['contextIdentifierProvider'],
|
|
58
|
-
providerFactory: providerFactory
|
|
60
|
+
providerFactory: providerFactory
|
|
61
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
62
|
+
,
|
|
59
63
|
renderNode: function renderNode(_ref2) {
|
|
60
64
|
var contextIdentifierProvider = _ref2.contextIdentifierProvider;
|
|
61
65
|
var renderFn = function renderFn(_ref3) {
|
|
@@ -248,6 +248,7 @@ var MediaGroupNext = exports.MediaGroupNext = (0, _reactIntlNext.injectIntl)( /*
|
|
|
248
248
|
setViewMediaClientConfig(mediaClientConfig);
|
|
249
249
|
}, [mediaClientConfig]);
|
|
250
250
|
(0, _react.useEffect)(function () {
|
|
251
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
251
252
|
mediaNodesWithOffsets.forEach(function (_ref5) {
|
|
252
253
|
var node = _ref5.node,
|
|
253
254
|
offset = _ref5.offset;
|
|
@@ -200,7 +200,9 @@ var MediaInline = exports.MediaInline = function MediaInline(props) {
|
|
|
200
200
|
isSelected: props.isSelected,
|
|
201
201
|
alt: alt,
|
|
202
202
|
width: width,
|
|
203
|
-
height: height
|
|
203
|
+
height: height
|
|
204
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
205
|
+
,
|
|
204
206
|
border: {
|
|
205
207
|
borderSize: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size,
|
|
206
208
|
borderColor: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color
|
|
@@ -308,11 +310,15 @@ var MediaInlineNodeView = exports.MediaInlineNodeView = /*#__PURE__*/function (_
|
|
|
308
310
|
api = props.api;
|
|
309
311
|
var view = this.view;
|
|
310
312
|
var getPos = this.getPos;
|
|
311
|
-
return (0, _react2.jsx)(_providerFactory.WithProviders
|
|
313
|
+
return (0, _react2.jsx)(_providerFactory.WithProviders
|
|
314
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
315
|
+
, {
|
|
312
316
|
providers: ['contextIdentifierProvider'],
|
|
313
|
-
providerFactory: providerFactory
|
|
317
|
+
providerFactory: providerFactory
|
|
318
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
319
|
+
,
|
|
314
320
|
renderNode: function renderNode(_ref4) {
|
|
315
|
-
var
|
|
321
|
+
var _mediaProvider = _ref4.mediaProvider,
|
|
316
322
|
contextIdentifierProvider = _ref4.contextIdentifierProvider;
|
|
317
323
|
return (0, _react2.jsx)(MediaInlineSharedState, {
|
|
318
324
|
identifier: _this.node.attrs.id,
|
|
@@ -280,7 +280,9 @@ var MediaNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
|
280
280
|
key: "render",
|
|
281
281
|
value: function render() {
|
|
282
282
|
var providerFactory = this.reactComponentProps.providerFactory;
|
|
283
|
-
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders
|
|
283
|
+
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders
|
|
284
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
285
|
+
, {
|
|
284
286
|
providers: ['contextIdentifierProvider'],
|
|
285
287
|
providerFactory: providerFactory,
|
|
286
288
|
renderNode: this.renderMediaNodeWithProviders
|
|
@@ -366,7 +366,9 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
366
366
|
onContextMenu: this.selectMediaSingle,
|
|
367
367
|
borderWidth: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size,
|
|
368
368
|
selected: selected
|
|
369
|
-
}, /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext
|
|
369
|
+
}, /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext
|
|
370
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
371
|
+
, {
|
|
370
372
|
data: (0, _defineProperty2.default)({}, _analyticsNamespacedContext.MEDIA_CONTEXT, {
|
|
371
373
|
border: !!borderMark
|
|
372
374
|
})
|
|
@@ -253,9 +253,13 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
253
253
|
|
|
254
254
|
// getPos is a boolean for marks, since this is a node we know it must be a function
|
|
255
255
|
var getPos = this.getPos;
|
|
256
|
-
return (0, _react2.jsx)(_providerFactory.WithProviders
|
|
256
|
+
return (0, _react2.jsx)(_providerFactory.WithProviders
|
|
257
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
258
|
+
, {
|
|
257
259
|
providers: ['contextIdentifierProvider'],
|
|
258
|
-
providerFactory: providerFactory
|
|
260
|
+
providerFactory: providerFactory
|
|
261
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
262
|
+
,
|
|
259
263
|
renderNode: function renderNode(_ref2) {
|
|
260
264
|
var contextIdentifierProvider = _ref2.contextIdentifierProvider;
|
|
261
265
|
return (0, _react2.jsx)(MediaSingleNodeWrapper, {
|
|
@@ -79,14 +79,18 @@ var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
|
79
79
|
mediaWidth: mediaWidth || _mediaSingle.DEFAULT_IMAGE_WIDTH,
|
|
80
80
|
mediaHeight: mediaHeight || _mediaSingle.DEFAULT_IMAGE_HEIGHT,
|
|
81
81
|
minWidth: minWidth,
|
|
82
|
-
maxWidth: maxWidth
|
|
82
|
+
maxWidth: maxWidth
|
|
83
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
84
|
+
,
|
|
83
85
|
onChange: function onChange(valid) {
|
|
84
86
|
if (valid) {
|
|
85
87
|
hoverDecoration === null || hoverDecoration === void 0 || hoverDecoration(mediaSingle, true, 'warning')(editorView.state, dispatch, editorView);
|
|
86
88
|
} else {
|
|
87
89
|
hoverDecoration === null || hoverDecoration === void 0 || hoverDecoration(mediaSingle, false)(editorView.state, dispatch, editorView);
|
|
88
90
|
}
|
|
89
|
-
}
|
|
91
|
+
}
|
|
92
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
93
|
+
,
|
|
90
94
|
onSubmit: function onSubmit(_ref2) {
|
|
91
95
|
var width = _ref2.width,
|
|
92
96
|
validation = _ref2.validation;
|
|
@@ -94,7 +98,9 @@ var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
|
94
98
|
if (tr) {
|
|
95
99
|
dispatch(tr);
|
|
96
100
|
}
|
|
97
|
-
}
|
|
101
|
+
}
|
|
102
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
103
|
+
,
|
|
98
104
|
onMigrate: function onMigrate() {
|
|
99
105
|
var tr = state.tr.setNodeMarkup(selectedMediaSingleNode.pos, undefined, _objectSpread(_objectSpread({}, selectedMediaSingleNode.node.attrs), {}, {
|
|
100
106
|
width: pixelWidthFromElement,
|
|
@@ -107,7 +113,9 @@ var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
|
107
113
|
tr = newTr !== undefined ? newTr : tr;
|
|
108
114
|
}
|
|
109
115
|
dispatch(tr);
|
|
110
|
-
}
|
|
116
|
+
}
|
|
117
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
118
|
+
,
|
|
111
119
|
onCloseAndSave: function onCloseAndSave(_ref3, setFocus) {
|
|
112
120
|
var width = _ref3.width,
|
|
113
121
|
validation = _ref3.validation;
|
|
@@ -29,8 +29,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
29
29
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
31
31
|
|
|
32
|
-
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives
|
|
33
|
-
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives, @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
34
33
|
|
|
35
34
|
var pixelSizingLabel = (0, _primitives.xcss)({
|
|
36
35
|
gridArea: 'label',
|
|
@@ -210,7 +209,7 @@ var PixelEntryComponent = exports.PixelEntryComponent = function PixelEntryCompo
|
|
|
210
209
|
// Ignored via go/ees005
|
|
211
210
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
212
211
|
, (0, _extends2.default)({}, fieldProps, {
|
|
213
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/
|
|
212
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-unsafe-style-overrides, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
214
213
|
css: [_styles.pixelSizingWidthInput, _styles.pixelSizingInput],
|
|
215
214
|
appearance: "none",
|
|
216
215
|
isCompact: true,
|
|
@@ -237,7 +236,7 @@ var PixelEntryComponent = exports.PixelEntryComponent = function PixelEntryCompo
|
|
|
237
236
|
// Ignored via go/ees005
|
|
238
237
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
239
238
|
, (0, _extends2.default)({}, fieldProps, {
|
|
240
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/
|
|
239
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-unsafe-style-overrides, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
241
240
|
css: [_styles.pixelSizingHeightInput, _styles.pixelSizingInput],
|
|
242
241
|
appearance: "none",
|
|
243
242
|
isCompact: true,
|
|
@@ -312,73 +311,80 @@ var PixelEntryComponentNext = exports.PixelEntryComponentNext = function PixelEn
|
|
|
312
311
|
}, shouldSetFocus);
|
|
313
312
|
}
|
|
314
313
|
}, [computedWidth, computedHeight, handleCloseAndSave]);
|
|
315
|
-
return (
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
314
|
+
return (
|
|
315
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
316
|
+
(0, _react2.jsx)(_primitives.Box, {
|
|
317
|
+
xcss: [pixelEntryWrapperStyles, isViewMode && pixelEntryWrapperViewModeStyles]
|
|
318
|
+
}, (0, _react2.jsx)(_primitives.Inline, {
|
|
319
|
+
alignBlock: "center",
|
|
320
|
+
spread: "space-between"
|
|
321
|
+
}, (0, _react2.jsx)(_primitives.Box, {
|
|
322
|
+
paddingInlineStart: "space.100"
|
|
323
|
+
}, (0, _react2.jsx)(_primitives.Text, {
|
|
324
|
+
color: "color.text.subtlest"
|
|
325
|
+
}, formatMessage(_media.pixelEntryMessages.inputWidthLabel))), (0, _react2.jsx)("div", {
|
|
326
|
+
css: fieldStyles
|
|
327
|
+
}, (0, _react2.jsx)(_tooltip.default, {
|
|
328
|
+
hideTooltipOnMouseDown: true,
|
|
329
|
+
hideTooltipOnClick: true,
|
|
330
|
+
position: "top",
|
|
331
|
+
content: formatMessage(_media.pixelEntryMessages.inputWidthTooltip, {
|
|
332
|
+
maxWidth: maxWidth
|
|
333
|
+
})
|
|
334
|
+
}, (0, _react2.jsx)(_textfield.default, {
|
|
335
|
+
name: "inputWidth",
|
|
336
|
+
value: computedWidth,
|
|
337
|
+
ref: widthInputRef,
|
|
338
|
+
height: "var(--ds-space-250, 20px)",
|
|
339
|
+
appearance: "none",
|
|
340
|
+
pattern: "\\d*",
|
|
341
|
+
"aria-label": formatMessage(_media.pixelEntryMessages.inputWidthAriaLabel, {
|
|
342
|
+
maxWidth: maxWidth
|
|
343
|
+
}),
|
|
344
|
+
onChange: handleFieldChange('inputWidth'),
|
|
345
|
+
onKeyDown: handleKeyDown
|
|
346
|
+
}))), (0, _react2.jsx)(_primitives.Box, {
|
|
347
|
+
paddingInlineStart: "space.100"
|
|
348
|
+
}, (0, _react2.jsx)(_primitives.Text, {
|
|
349
|
+
color: "color.text.subtlest"
|
|
350
|
+
}, formatMessage(_media.pixelEntryMessages.inputHeightTooltip))), (0, _react2.jsx)("div", {
|
|
351
|
+
css: fieldStyles
|
|
352
|
+
}, (0, _react2.jsx)(_tooltip.default, {
|
|
353
|
+
hideTooltipOnMouseDown: true,
|
|
354
|
+
hideTooltipOnClick: true,
|
|
355
|
+
content: formatMessage(_media.pixelEntryMessages.inputHeightTooltip),
|
|
356
|
+
position: "top"
|
|
357
|
+
}, (0, _react2.jsx)(_textfield.default, {
|
|
358
|
+
name: "inputHeight",
|
|
359
|
+
value: computedHeight,
|
|
360
|
+
height: "var(--ds-space-250, 20px)",
|
|
361
|
+
appearance: "none",
|
|
362
|
+
pattern: "\\d*",
|
|
363
|
+
"aria-label": formatMessage(_media.pixelEntryMessages.inputHeightAriaLabel),
|
|
364
|
+
onChange: handleFieldChange('inputHeight'),
|
|
365
|
+
onKeyDown: handleKeyDown
|
|
366
|
+
}))), !isViewMode && (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_primitives.Box, {
|
|
367
|
+
xcss: dividerStyles
|
|
368
|
+
}), (0, _react2.jsx)(_new.IconButton
|
|
369
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
370
|
+
, {
|
|
371
|
+
icon: function icon() {
|
|
372
|
+
return (0, _react2.jsx)(_cross.default, {
|
|
373
|
+
label: "",
|
|
374
|
+
color: "var(--ds-icon-subtlest, #6B6E76)"
|
|
375
|
+
});
|
|
376
|
+
},
|
|
377
|
+
label: formatMessage(_media.pixelEntryMessages.closePixelEntry),
|
|
378
|
+
appearance: "subtle"
|
|
379
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
380
|
+
,
|
|
381
|
+
onClick: function onClick() {
|
|
382
|
+
handleCloseAndSave({
|
|
383
|
+
inputWidth: computedWidth,
|
|
384
|
+
inputHeight: computedHeight
|
|
385
|
+
});
|
|
386
|
+
},
|
|
387
|
+
onKeyDown: handleCloseButtonKeyDown
|
|
388
|
+
}))))
|
|
389
|
+
);
|
|
384
390
|
};
|
|
@@ -67,10 +67,14 @@ var CommentBadgeWrapper = exports.CommentBadgeWrapper = function CommentBadgeWra
|
|
|
67
67
|
return /*#__PURE__*/_react.default.createElement(_mediaSingle.CommentBadgeNext, {
|
|
68
68
|
onClick: onClick,
|
|
69
69
|
mediaSingleElement: mediaSingleElement,
|
|
70
|
-
status: entered ? 'entered' : status
|
|
70
|
+
status: entered ? 'entered' : status
|
|
71
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
72
|
+
,
|
|
71
73
|
onMouseEnter: function onMouseEnter() {
|
|
72
74
|
return setEntered(true);
|
|
73
|
-
}
|
|
75
|
+
}
|
|
76
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
77
|
+
,
|
|
74
78
|
onMouseLeave: function onMouseLeave() {
|
|
75
79
|
return setEntered(false);
|
|
76
80
|
}
|