@atlaskit/editor-plugin-media 11.0.0 → 12.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 +33 -0
- package/dist/cjs/mediaPlugin.js +1 -1
- package/dist/cjs/nodeviews/lazy-media-inline.js +2 -2
- package/dist/cjs/nodeviews/mediaGroupNext.js +2 -2
- package/dist/cjs/nodeviews/mediaInline.js +13 -7
- package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +2 -2
- package/dist/cjs/pm-plugins/main.js +3 -3
- package/dist/cjs/ui/CaptionPlaceholder/index.js +4 -4
- package/dist/cjs/ui/Media/DropPlaceholder.js +2 -2
- package/dist/cjs/ui/ToolbarMedia/index.js +2 -2
- package/dist/es2019/mediaPlugin.js +1 -1
- package/dist/es2019/nodeviews/lazy-media-inline.js +2 -2
- package/dist/es2019/nodeviews/mediaGroupNext.js +1 -1
- package/dist/es2019/nodeviews/mediaInline.js +13 -7
- package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/es2019/ui/Media/DropPlaceholder.js +1 -1
- package/dist/es2019/ui/ToolbarMedia/index.js +1 -1
- package/dist/esm/mediaPlugin.js +1 -1
- package/dist/esm/nodeviews/lazy-media-inline.js +2 -2
- package/dist/esm/nodeviews/mediaGroupNext.js +1 -1
- package/dist/esm/nodeviews/mediaInline.js +13 -7
- package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/esm/ui/Media/DropPlaceholder.js +1 -1
- package/dist/esm/ui/ToolbarMedia/index.js +1 -1
- package/dist/types/nodeviews/lazy-media-inline.d.ts +1 -1
- package/dist/types/nodeviews/mediaGroupNext.d.ts +1 -1
- package/dist/types/nodeviews/mediaInline.d.ts +3 -1
- package/dist/types/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/pm-plugins/pixel-resizing/ui/index.d.ts +1 -1
- package/dist/types/pm-plugins/pixel-resizing/ui/types.d.ts +1 -1
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/ui/ImageBorder/index.d.ts +1 -1
- package/dist/types/ui/MediaLinkingToolbar.d.ts +1 -1
- package/dist/types/ui/ToolbarMedia/index.d.ts +1 -1
- package/dist/types/ui/toolbar/alt-text.d.ts +1 -1
- package/dist/types/ui/toolbar/comments.d.ts +1 -1
- package/dist/types/ui/toolbar/index.d.ts +1 -1
- package/dist/types/ui/toolbar/linking-toolbar-appearance.d.ts +1 -1
- package/dist/types/ui/toolbar/linking.d.ts +1 -1
- package/dist/types/ui/toolbar/mediaInline.d.ts +1 -1
- package/dist/types/ui/toolbar/pixel-resizing.d.ts +1 -1
- package/dist/types/ui/toolbar/utils.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/lazy-media-inline.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/mediaInline.d.ts +3 -1
- package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/types.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/ImageBorder/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/MediaLinkingToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/ToolbarMedia/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/alt-text.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/comments.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/linking-toolbar-appearance.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/linking.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/mediaInline.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/pixel-resizing.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/utils.d.ts +1 -1
- package/package.json +22 -19
- package/report.api.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 12.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b6bb07e5d72ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b6bb07e5d72ac) -
|
|
8
|
+
[ux] Fix for #hot-301450, add new media option for fallback media name fetcher to allow confluence
|
|
9
|
+
to use the attachment service instead of the media service to get filenames. After DC -> Cloud
|
|
10
|
+
migration filenames were not properly copied across to the media service causing inline media to
|
|
11
|
+
show an error.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 12.0.0
|
|
18
|
+
|
|
19
|
+
### Major Changes
|
|
20
|
+
|
|
21
|
+
- [`901c87a57486e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/901c87a57486e) -
|
|
22
|
+
Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
|
|
23
|
+
|
|
24
|
+
What changed: The `react-intl-next` npm alias (which resolved to `react-intl@^5`) has been
|
|
25
|
+
removed. All imports now reference `react-intl` directly, and `peerDependencies` have been updated
|
|
26
|
+
to `"^5.25.1 || ^6.0.0 || ^7.0.0"`.
|
|
27
|
+
|
|
28
|
+
How consumer should update their code: Ensure `react-intl` is installed at a version satisfying
|
|
29
|
+
`^5.25.1 || ^6.0.0 || ^7.0.0`. If your application was using `react-intl-next` as an npm alias, it
|
|
30
|
+
can be safely removed. Replace any remaining `react-intl-next` imports with `react-intl`.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
|
|
3
36
|
## 11.0.0
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
package/dist/cjs/mediaPlugin.js
CHANGED
|
@@ -242,7 +242,7 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
242
242
|
mediaGroup: (0, _lazyMediaGroup.lazyMediaGroupView)(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
243
243
|
mediaSingle: (0, _mediaSingle.ReactMediaSingleNode)(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options),
|
|
244
244
|
media: (0, _mediaNodeView.ReactMediaNode)(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
245
|
-
mediaInline: (0, _lazyMediaInline.lazyMediaInlineView)(portalProviderAPI, eventDispatcher, providerFactory, api)
|
|
245
|
+
mediaInline: (0, _lazyMediaInline.lazyMediaInlineView)(portalProviderAPI, eventDispatcher, providerFactory, api, undefined, options === null || options === void 0 ? void 0 : options.fallbackMediaNameFetcher)
|
|
246
246
|
},
|
|
247
247
|
errorReporter: errorReporter,
|
|
248
248
|
uploadErrorHandler: options && options.uploadErrorHandler,
|
|
@@ -8,7 +8,7 @@ exports.lazyMediaInlineView = void 0;
|
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
10
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
|
-
var lazyMediaInlineView = exports.lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
|
|
11
|
+
var lazyMediaInlineView = exports.lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher) {
|
|
12
12
|
return (0, _lazyNodeView.withLazyLoading)({
|
|
13
13
|
nodeName: 'mediaInline',
|
|
14
14
|
getNodeViewOptions: function getNodeViewOptions() {},
|
|
@@ -19,7 +19,7 @@ var lazyMediaInlineView = exports.lazyMediaInlineView = function lazyMediaInline
|
|
|
19
19
|
}).then(function (_ref) {
|
|
20
20
|
var ReactMediaInlineNode = _ref.ReactMediaInlineNode;
|
|
21
21
|
return function (node, view, getPos) {
|
|
22
|
-
return ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent)(node, view, getPos);
|
|
22
|
+
return ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher)(node, view, getPos);
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
25
|
return result;
|
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var
|
|
14
|
+
var _reactIntl = require("react-intl");
|
|
15
15
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
16
16
|
var _media = require("@atlaskit/editor-common/media");
|
|
17
17
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -173,7 +173,7 @@ var runMediaNodeUpdate = /*#__PURE__*/function () {
|
|
|
173
173
|
}();
|
|
174
174
|
var noop = function noop() {};
|
|
175
175
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
176
|
-
var MediaGroupNext = exports.MediaGroupNext = (0,
|
|
176
|
+
var MediaGroupNext = exports.MediaGroupNext = (0, _reactIntl.injectIntl)( /*#__PURE__*/_react.default.memo(function (props) {
|
|
177
177
|
var _props$mediaOptions = props.mediaOptions,
|
|
178
178
|
allowLazyLoading = _props$mediaOptions.allowLazyLoading,
|
|
179
179
|
allowMediaInlineImages = _props$mediaOptions.allowMediaInlineImages,
|
|
@@ -220,7 +220,8 @@ var MediaInline = exports.MediaInline = function MediaInline(props) {
|
|
|
220
220
|
}, (0, _react2.jsx)(_mediaCard.MediaInlineCard, {
|
|
221
221
|
isSelected: props.isSelected,
|
|
222
222
|
identifier: identifier,
|
|
223
|
-
mediaClientConfig: viewMediaClientConfig
|
|
223
|
+
mediaClientConfig: viewMediaClientConfig,
|
|
224
|
+
fallbackMediaNameFetcher: props.fallbackMediaNameFetcher
|
|
224
225
|
}));
|
|
225
226
|
};
|
|
226
227
|
var selector = function selector(states) {
|
|
@@ -243,7 +244,8 @@ var MediaInlineSharedState = function MediaInlineSharedState(_ref3) {
|
|
|
243
244
|
getPos = _ref3.getPos,
|
|
244
245
|
contextIdentifierProvider = _ref3.contextIdentifierProvider,
|
|
245
246
|
api = _ref3.api,
|
|
246
|
-
view = _ref3.view
|
|
247
|
+
view = _ref3.view,
|
|
248
|
+
fallbackMediaNameFetcher = _ref3.fallbackMediaNameFetcher;
|
|
247
249
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['editorViewMode', 'media'], selector),
|
|
248
250
|
mediaProvider = _useSharedPluginState.mediaProvider,
|
|
249
251
|
allowInlineImages = _useSharedPluginState.allowInlineImages,
|
|
@@ -273,7 +275,8 @@ var MediaInlineSharedState = function MediaInlineSharedState(_ref3) {
|
|
|
273
275
|
view: view,
|
|
274
276
|
getPos: getPos,
|
|
275
277
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
276
|
-
editorViewMode: viewMode === 'view'
|
|
278
|
+
editorViewMode: viewMode === 'view',
|
|
279
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
277
280
|
});
|
|
278
281
|
};
|
|
279
282
|
var MediaInlineNodeView = exports.MediaInlineNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
@@ -307,7 +310,8 @@ var MediaInlineNodeView = exports.MediaInlineNodeView = /*#__PURE__*/function (_
|
|
|
307
310
|
value: function render(props) {
|
|
308
311
|
var _this = this;
|
|
309
312
|
var providerFactory = props.providerFactory,
|
|
310
|
-
api = props.api
|
|
313
|
+
api = props.api,
|
|
314
|
+
fallbackMediaNameFetcher = props.fallbackMediaNameFetcher;
|
|
311
315
|
var view = this.view;
|
|
312
316
|
var getPos = this.getPos;
|
|
313
317
|
return (0, _react2.jsx)(_providerFactory.WithProviders
|
|
@@ -327,19 +331,21 @@ var MediaInlineNodeView = exports.MediaInlineNodeView = /*#__PURE__*/function (_
|
|
|
327
331
|
view: view,
|
|
328
332
|
getPos: getPos,
|
|
329
333
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
330
|
-
api: api
|
|
334
|
+
api: api,
|
|
335
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
331
336
|
});
|
|
332
337
|
}
|
|
333
338
|
});
|
|
334
339
|
}
|
|
335
340
|
}]);
|
|
336
341
|
}(_selectionBasedNodeView.SelectionBasedNodeView);
|
|
337
|
-
var ReactMediaInlineNode = exports.ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
|
|
342
|
+
var ReactMediaInlineNode = exports.ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher) {
|
|
338
343
|
return function (node, view, getPos) {
|
|
339
344
|
return new MediaInlineNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
340
345
|
providerFactory: providerFactory,
|
|
341
346
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
342
|
-
api: api
|
|
347
|
+
api: api,
|
|
348
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
343
349
|
}).init();
|
|
344
350
|
};
|
|
345
351
|
};
|
|
@@ -13,7 +13,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
|
-
var
|
|
16
|
+
var _reactIntl = require("react-intl");
|
|
17
17
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
18
18
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
19
19
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
@@ -275,5 +275,5 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
275
275
|
}
|
|
276
276
|
}]);
|
|
277
277
|
}(_react.default.Component);
|
|
278
|
-
var _default_1 = (0, _analyticsNext.withAnalyticsEvents)()((0,
|
|
278
|
+
var _default_1 = (0, _analyticsNext.withAnalyticsEvents)()((0, _reactIntl.injectIntl)(AltTextEditComponent));
|
|
279
279
|
var _default = exports.default = _default_1;
|
|
@@ -13,7 +13,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _assert = _interopRequireDefault(require("assert"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
var
|
|
16
|
+
var _reactIntl = require("react-intl");
|
|
17
17
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
18
18
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
19
19
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
@@ -57,7 +57,7 @@ var createDropPlaceholder = function createDropPlaceholder(intl, nodeViewPortalP
|
|
|
57
57
|
var createElement = _react.default.createElement;
|
|
58
58
|
if (allowDropLine) {
|
|
59
59
|
nodeViewPortalProviderAPI.render(function () {
|
|
60
|
-
return createElement(
|
|
60
|
+
return createElement(_reactIntl.RawIntlProvider, {
|
|
61
61
|
value: intl
|
|
62
62
|
}, createElement(_DropPlaceholder.default, {
|
|
63
63
|
type: 'single'
|
|
@@ -65,7 +65,7 @@ var createDropPlaceholder = function createDropPlaceholder(intl, nodeViewPortalP
|
|
|
65
65
|
}, dropPlaceholder, dropPlaceholderKey);
|
|
66
66
|
} else {
|
|
67
67
|
nodeViewPortalProviderAPI.render(function () {
|
|
68
|
-
return createElement(
|
|
68
|
+
return createElement(_reactIntl.RawIntlProvider, {
|
|
69
69
|
value: intl
|
|
70
70
|
}, createElement(_DropPlaceholder.default));
|
|
71
71
|
}, dropPlaceholder, dropPlaceholderKey);
|
|
@@ -9,7 +9,7 @@ exports.CaptionPlaceholderButton = exports.CaptionPlaceholder = void 0;
|
|
|
9
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var
|
|
12
|
+
var _reactIntl = require("react-intl");
|
|
13
13
|
var _media = require("@atlaskit/editor-common/media");
|
|
14
14
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -57,7 +57,7 @@ var CaptionPlaceholder = exports.CaptionPlaceholder = /*#__PURE__*/_react.defaul
|
|
|
57
57
|
id: (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? _mediaSingle.CAPTION_PLACEHOLDER_ID : undefined,
|
|
58
58
|
"data-id": _mediaSingle.CAPTION_PLACEHOLDER_ID,
|
|
59
59
|
"data-testid": "caption-placeholder"
|
|
60
|
-
}, (0, _react2.jsx)(
|
|
60
|
+
}, (0, _react2.jsx)(_reactIntl.FormattedMessage
|
|
61
61
|
// Ignored via go/ees005
|
|
62
62
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
63
63
|
, computedPlaceholderMessage))
|
|
@@ -66,7 +66,7 @@ var CaptionPlaceholder = exports.CaptionPlaceholder = /*#__PURE__*/_react.defaul
|
|
|
66
66
|
var CaptionPlaceholderButton = exports.CaptionPlaceholderButton = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
|
|
67
67
|
var onClick = _ref2.onClick,
|
|
68
68
|
placeholderMessage = _ref2.placeholderMessage;
|
|
69
|
-
var intl = (0,
|
|
69
|
+
var intl = (0, _reactIntl.useIntl)();
|
|
70
70
|
var handleMouseDown = (0, _react.useCallback)(function (e) {
|
|
71
71
|
// In firefox, button is focused when mouse down, which make editor lose focus
|
|
72
72
|
// Hence we want to disabled it so that user can type in caption directly after click
|
|
@@ -89,7 +89,7 @@ var CaptionPlaceholderButton = exports.CaptionPlaceholderButton = /*#__PURE__*/_
|
|
|
89
89
|
(0, _react2.jsx)("span", {
|
|
90
90
|
css: placeholderText,
|
|
91
91
|
id: _mediaSingle.CAPTION_PLACEHOLDER_ID
|
|
92
|
-
}, (0, _react2.jsx)(
|
|
92
|
+
}, (0, _react2.jsx)(_reactIntl.FormattedMessage
|
|
93
93
|
// Ignored via go/ees005
|
|
94
94
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
95
95
|
, computedPlaceholderMessage)) : (0, _react2.jsx)(_primitives.Text, {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
|
-
var
|
|
9
|
+
var _reactIntl = require("react-intl");
|
|
10
10
|
var _media = require("@atlaskit/editor-common/media");
|
|
11
11
|
var _file = _interopRequireDefault(require("@atlaskit/icon/core/file"));
|
|
12
12
|
var _media2 = require("../../nodeviews/mediaNodeView/media");
|
|
@@ -47,7 +47,7 @@ var IconWrapperComponent = function IconWrapperComponent(props) {
|
|
|
47
47
|
label: intl.formatMessage(dropPlaceholderLabel)
|
|
48
48
|
}));
|
|
49
49
|
};
|
|
50
|
-
var IntlIconWrapper = (0,
|
|
50
|
+
var IntlIconWrapper = (0, _reactIntl.injectIntl)(IconWrapperComponent);
|
|
51
51
|
var _default = exports.default = function _default(_ref) {
|
|
52
52
|
var _ref$type = _ref.type,
|
|
53
53
|
type = _ref$type === void 0 ? 'group' : _ref$type;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _reactIntl = require("react-intl");
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
11
|
var _media = require("@atlaskit/editor-common/media");
|
|
12
12
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
@@ -49,5 +49,5 @@ var ToolbarMedia = function ToolbarMedia(_ref) {
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
52
|
-
var _default_1 = (0,
|
|
52
|
+
var _default_1 = (0, _reactIntl.injectIntl)(ToolbarMedia);
|
|
53
53
|
var _default = exports.default = _default_1;
|
|
@@ -234,7 +234,7 @@ export const mediaPlugin = ({
|
|
|
234
234
|
mediaGroup: lazyMediaGroupView(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
235
235
|
mediaSingle: ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options),
|
|
236
236
|
media: ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
237
|
-
mediaInline: lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api)
|
|
237
|
+
mediaInline: lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, undefined, options === null || options === void 0 ? void 0 : options.fallbackMediaNameFetcher)
|
|
238
238
|
},
|
|
239
239
|
errorReporter,
|
|
240
240
|
uploadErrorHandler: options && options.uploadErrorHandler,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
export const lazyMediaInlineView = (portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) => {
|
|
2
|
+
export const lazyMediaInlineView = (portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher) => {
|
|
3
3
|
return withLazyLoading({
|
|
4
4
|
nodeName: 'mediaInline',
|
|
5
5
|
getNodeViewOptions: () => {},
|
|
@@ -9,7 +9,7 @@ export const lazyMediaInlineView = (portalProviderAPI, eventDispatcher, provider
|
|
|
9
9
|
ReactMediaInlineNode
|
|
10
10
|
}) => {
|
|
11
11
|
return (node, view, getPos) => {
|
|
12
|
-
return ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent)(node, view, getPos);
|
|
12
|
+
return ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher)(node, view, getPos);
|
|
13
13
|
};
|
|
14
14
|
});
|
|
15
15
|
return result;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { injectIntl } from 'react-intl
|
|
2
|
+
import { injectIntl } from 'react-intl';
|
|
3
3
|
import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
@@ -152,7 +152,8 @@ export const MediaInline = props => {
|
|
|
152
152
|
}, jsx(MediaInlineCard, {
|
|
153
153
|
isSelected: props.isSelected,
|
|
154
154
|
identifier: identifier,
|
|
155
|
-
mediaClientConfig: viewMediaClientConfig
|
|
155
|
+
mediaClientConfig: viewMediaClientConfig,
|
|
156
|
+
fallbackMediaNameFetcher: props.fallbackMediaNameFetcher
|
|
156
157
|
}));
|
|
157
158
|
};
|
|
158
159
|
const selector = states => {
|
|
@@ -175,7 +176,8 @@ const MediaInlineSharedState = ({
|
|
|
175
176
|
getPos,
|
|
176
177
|
contextIdentifierProvider,
|
|
177
178
|
api,
|
|
178
|
-
view
|
|
179
|
+
view,
|
|
180
|
+
fallbackMediaNameFetcher
|
|
179
181
|
}) => {
|
|
180
182
|
const {
|
|
181
183
|
mediaProvider,
|
|
@@ -205,7 +207,8 @@ const MediaInlineSharedState = ({
|
|
|
205
207
|
view: view,
|
|
206
208
|
getPos: getPos,
|
|
207
209
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
208
|
-
editorViewMode: viewMode === 'view'
|
|
210
|
+
editorViewMode: viewMode === 'view',
|
|
211
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
209
212
|
});
|
|
210
213
|
};
|
|
211
214
|
export class MediaInlineNodeView extends SelectionBasedNodeView {
|
|
@@ -226,7 +229,8 @@ export class MediaInlineNodeView extends SelectionBasedNodeView {
|
|
|
226
229
|
render(props) {
|
|
227
230
|
const {
|
|
228
231
|
providerFactory,
|
|
229
|
-
api
|
|
232
|
+
api,
|
|
233
|
+
fallbackMediaNameFetcher
|
|
230
234
|
} = props;
|
|
231
235
|
const {
|
|
232
236
|
view
|
|
@@ -250,16 +254,18 @@ export class MediaInlineNodeView extends SelectionBasedNodeView {
|
|
|
250
254
|
view: view,
|
|
251
255
|
getPos: getPos,
|
|
252
256
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
253
|
-
api: api
|
|
257
|
+
api: api,
|
|
258
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
254
259
|
});
|
|
255
260
|
}
|
|
256
261
|
});
|
|
257
262
|
}
|
|
258
263
|
}
|
|
259
|
-
export const ReactMediaInlineNode = (portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) => (node, view, getPos) => {
|
|
264
|
+
export const ReactMediaInlineNode = (portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher) => (node, view, getPos) => {
|
|
260
265
|
return new MediaInlineNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
261
266
|
providerFactory,
|
|
262
267
|
dispatchAnalyticsEvent,
|
|
263
|
-
api
|
|
268
|
+
api,
|
|
269
|
+
fallbackMediaNameFetcher
|
|
264
270
|
}).init();
|
|
265
271
|
};
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
|
-
import { injectIntl } from 'react-intl
|
|
11
|
+
import { injectIntl } from 'react-intl';
|
|
12
12
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
13
13
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
import { escape, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import assert from 'assert';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { RawIntlProvider } from 'react-intl
|
|
4
|
+
import { RawIntlProvider } from 'react-intl';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
6
6
|
import uuid from 'uuid';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -6,7 +6,7 @@ import React, { useCallback } from 'react';
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { FormattedMessage, useIntl } from 'react-intl
|
|
9
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
10
10
|
import { captionMessages as messages } from '@atlaskit/editor-common/media';
|
|
11
11
|
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { injectIntl } from 'react-intl
|
|
7
|
+
import { injectIntl } from 'react-intl';
|
|
8
8
|
import { dropPlaceholderMessages } from '@atlaskit/editor-common/media';
|
|
9
9
|
import DocumentFilledIcon from '@atlaskit/icon/core/file';
|
|
10
10
|
import { FILE_WIDTH, MEDIA_HEIGHT } from '../../nodeviews/mediaNodeView/media';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { injectIntl } from 'react-intl
|
|
2
|
+
import { injectIntl } from 'react-intl';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { toolbarMediaMessages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
package/dist/esm/mediaPlugin.js
CHANGED
|
@@ -233,7 +233,7 @@ export var mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
233
233
|
mediaGroup: lazyMediaGroupView(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
234
234
|
mediaSingle: ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options),
|
|
235
235
|
media: ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
236
|
-
mediaInline: lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api)
|
|
236
|
+
mediaInline: lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, undefined, options === null || options === void 0 ? void 0 : options.fallbackMediaNameFetcher)
|
|
237
237
|
},
|
|
238
238
|
errorReporter: errorReporter,
|
|
239
239
|
uploadErrorHandler: options && options.uploadErrorHandler,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
export var lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
|
|
2
|
+
export var lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher) {
|
|
3
3
|
return withLazyLoading({
|
|
4
4
|
nodeName: 'mediaInline',
|
|
5
5
|
getNodeViewOptions: function getNodeViewOptions() {},
|
|
@@ -8,7 +8,7 @@ export var lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI,
|
|
|
8
8
|
'./mediaInline').then(function (_ref) {
|
|
9
9
|
var ReactMediaInlineNode = _ref.ReactMediaInlineNode;
|
|
10
10
|
return function (node, view, getPos) {
|
|
11
|
-
return ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent)(node, view, getPos);
|
|
11
|
+
return ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher)(node, view, getPos);
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
14
|
return result;
|
|
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
|
-
import { injectIntl } from 'react-intl
|
|
8
|
+
import { injectIntl } from 'react-intl';
|
|
9
9
|
import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
10
10
|
import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
|
|
11
11
|
import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
@@ -216,7 +216,8 @@ export var MediaInline = function MediaInline(props) {
|
|
|
216
216
|
}, jsx(MediaInlineCard, {
|
|
217
217
|
isSelected: props.isSelected,
|
|
218
218
|
identifier: identifier,
|
|
219
|
-
mediaClientConfig: viewMediaClientConfig
|
|
219
|
+
mediaClientConfig: viewMediaClientConfig,
|
|
220
|
+
fallbackMediaNameFetcher: props.fallbackMediaNameFetcher
|
|
220
221
|
}));
|
|
221
222
|
};
|
|
222
223
|
var selector = function selector(states) {
|
|
@@ -239,7 +240,8 @@ var MediaInlineSharedState = function MediaInlineSharedState(_ref3) {
|
|
|
239
240
|
getPos = _ref3.getPos,
|
|
240
241
|
contextIdentifierProvider = _ref3.contextIdentifierProvider,
|
|
241
242
|
api = _ref3.api,
|
|
242
|
-
view = _ref3.view
|
|
243
|
+
view = _ref3.view,
|
|
244
|
+
fallbackMediaNameFetcher = _ref3.fallbackMediaNameFetcher;
|
|
243
245
|
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['editorViewMode', 'media'], selector),
|
|
244
246
|
mediaProvider = _useSharedPluginState.mediaProvider,
|
|
245
247
|
allowInlineImages = _useSharedPluginState.allowInlineImages,
|
|
@@ -269,7 +271,8 @@ var MediaInlineSharedState = function MediaInlineSharedState(_ref3) {
|
|
|
269
271
|
view: view,
|
|
270
272
|
getPos: getPos,
|
|
271
273
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
272
|
-
editorViewMode: viewMode === 'view'
|
|
274
|
+
editorViewMode: viewMode === 'view',
|
|
275
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
273
276
|
});
|
|
274
277
|
};
|
|
275
278
|
export var MediaInlineNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
@@ -303,7 +306,8 @@ export var MediaInlineNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
|
303
306
|
value: function render(props) {
|
|
304
307
|
var _this = this;
|
|
305
308
|
var providerFactory = props.providerFactory,
|
|
306
|
-
api = props.api
|
|
309
|
+
api = props.api,
|
|
310
|
+
fallbackMediaNameFetcher = props.fallbackMediaNameFetcher;
|
|
307
311
|
var view = this.view;
|
|
308
312
|
var getPos = this.getPos;
|
|
309
313
|
return jsx(WithProviders
|
|
@@ -323,19 +327,21 @@ export var MediaInlineNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
|
323
327
|
view: view,
|
|
324
328
|
getPos: getPos,
|
|
325
329
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
326
|
-
api: api
|
|
330
|
+
api: api,
|
|
331
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
327
332
|
});
|
|
328
333
|
}
|
|
329
334
|
});
|
|
330
335
|
}
|
|
331
336
|
}]);
|
|
332
337
|
}(SelectionBasedNodeView);
|
|
333
|
-
export var ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
|
|
338
|
+
export var ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, fallbackMediaNameFetcher) {
|
|
334
339
|
return function (node, view, getPos) {
|
|
335
340
|
return new MediaInlineNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
336
341
|
providerFactory: providerFactory,
|
|
337
342
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
338
|
-
api: api
|
|
343
|
+
api: api,
|
|
344
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
339
345
|
}).init();
|
|
340
346
|
};
|
|
341
347
|
};
|
|
@@ -15,7 +15,7 @@ import React from 'react';
|
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
17
17
|
import { css, jsx } from '@emotion/react';
|
|
18
|
-
import { injectIntl } from 'react-intl
|
|
18
|
+
import { injectIntl } from 'react-intl';
|
|
19
19
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
20
20
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
21
21
|
import { escape, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
@@ -10,7 +10,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
11
|
import assert from 'assert';
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { RawIntlProvider } from 'react-intl
|
|
13
|
+
import { RawIntlProvider } from 'react-intl';
|
|
14
14
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
15
15
|
import uuid from 'uuid';
|
|
16
16
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -8,7 +8,7 @@ import React, { useCallback } from 'react';
|
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
|
-
import { FormattedMessage, useIntl } from 'react-intl
|
|
11
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
12
12
|
import { captionMessages as messages } from '@atlaskit/editor-common/media';
|
|
13
13
|
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { injectIntl } from 'react-intl
|
|
7
|
+
import { injectIntl } from 'react-intl';
|
|
8
8
|
import { dropPlaceholderMessages } from '@atlaskit/editor-common/media';
|
|
9
9
|
import DocumentFilledIcon from '@atlaskit/icon/core/file';
|
|
10
10
|
import { FILE_WIDTH, MEDIA_HEIGHT } from '../../nodeviews/mediaNodeView/media';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { injectIntl } from 'react-intl
|
|
2
|
+
import { injectIntl } from 'react-intl';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { toolbarMediaMessages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -5,4 +5,4 @@ import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
8
|
-
export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => NodeViewConstructor;
|
|
8
|
+
export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, fallbackMediaNameFetcher?: (id: string) => Promise<string>) => NodeViewConstructor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -17,6 +17,7 @@ export interface MediaInlineProps {
|
|
|
17
17
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
18
18
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
19
19
|
editorViewMode?: boolean;
|
|
20
|
+
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
20
21
|
getPos: ProsemirrorGetPosHandler;
|
|
21
22
|
handleMediaNodeMount: (node: PMNode, getPos: ProsemirrorGetPosHandler) => void;
|
|
22
23
|
handleMediaNodeUnmount: (node: PMNode) => void;
|
|
@@ -33,6 +34,7 @@ export declare const MediaInline: (props: MediaInlineProps) => jsx.JSX.Element;
|
|
|
33
34
|
interface MediaInlineNodeViewProps {
|
|
34
35
|
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
35
36
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
37
|
+
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
36
38
|
providerFactory: ProviderFactory;
|
|
37
39
|
}
|
|
38
40
|
export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInlineNodeViewProps> {
|
|
@@ -41,5 +43,5 @@ export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInl
|
|
|
41
43
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
42
44
|
render(props: MediaInlineNodeViewProps): jsx.JSX.Element;
|
|
43
45
|
}
|
|
44
|
-
export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
46
|
+
export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, fallbackMediaNameFetcher?: (id: string) => Promise<string>) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
45
47
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { WrappedComponentProps } from 'react-intl
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl';
|
|
4
4
|
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
export declare const MAX_ALT_TEXT_LENGTH = 510;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl
|
|
2
|
+
import type { IntlShape } from 'react-intl';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
5
5
|
import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -69,6 +69,12 @@ export interface MediaPluginOptions {
|
|
|
69
69
|
editorAppearance?: EditorAppearance;
|
|
70
70
|
editorSelectionAPI?: EditorSelectionAPI;
|
|
71
71
|
enableDownloadButton?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Optional fallback fetcher to retrieve the media filename from another service
|
|
74
|
+
* Workaround for #hot-301450 where media service is missing filenames for DC -> Cloud migrated media
|
|
75
|
+
* Receives the file ID and should resolve to the filename string.
|
|
76
|
+
*/
|
|
77
|
+
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
72
78
|
featureFlags?: MediaFeatureFlags;
|
|
73
79
|
forceHandlePositioning?: HandlePositioning;
|
|
74
80
|
fullWidthEnabled?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl
|
|
2
|
+
import type { IntlShape } from 'react-intl';
|
|
3
3
|
import type { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
4
4
|
export interface ImageBorderProps {
|
|
5
5
|
borderMark?: BorderMarkAttributes;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { IntlShape, WrappedComponentProps } from 'react-intl
|
|
7
|
+
import type { IntlShape, WrappedComponentProps } from 'react-intl';
|
|
8
8
|
import type { RecentSearchInputTypes } from '@atlaskit/editor-common/link';
|
|
9
9
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
10
10
|
type Props = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
5
5
|
interface Props {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Command, FloatingToolbarButton, FloatingToolbarConfig, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { Command, ExtractInjectionAPI, FloatingToolbarButton } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { IntlShape } from 'react-intl
|
|
7
|
+
import type { IntlShape } from 'react-intl';
|
|
8
8
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import type { MediaLinkingState } from '../../pm-plugins/linking/types';
|
|
10
10
|
export interface LinkingToolbarProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarItem, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { Command, ExtractInjectionAPI, FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { FloatingToolbarConfig, FloatingToolbarOverflowDropdownOptions, Command } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type MemoizedFn } from 'memoize-one';
|
|
2
|
-
import type { IntlShape } from 'react-intl
|
|
2
|
+
import type { IntlShape } from 'react-intl';
|
|
3
3
|
import type { ExternalMediaAttributes, MediaADFAttrs, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
4
4
|
import type { LayoutIcon } from '@atlaskit/editor-common/card';
|
|
5
5
|
import type { Command, FloatingToolbarItem, FloatingToolbarDropdown, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
@@ -5,4 +5,4 @@ import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
8
|
-
export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => NodeViewConstructor;
|
|
8
|
+
export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, fallbackMediaNameFetcher?: (id: string) => Promise<string>) => NodeViewConstructor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -17,6 +17,7 @@ export interface MediaInlineProps {
|
|
|
17
17
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
18
18
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
19
19
|
editorViewMode?: boolean;
|
|
20
|
+
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
20
21
|
getPos: ProsemirrorGetPosHandler;
|
|
21
22
|
handleMediaNodeMount: (node: PMNode, getPos: ProsemirrorGetPosHandler) => void;
|
|
22
23
|
handleMediaNodeUnmount: (node: PMNode) => void;
|
|
@@ -33,6 +34,7 @@ export declare const MediaInline: (props: MediaInlineProps) => jsx.JSX.Element;
|
|
|
33
34
|
interface MediaInlineNodeViewProps {
|
|
34
35
|
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
35
36
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
37
|
+
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
36
38
|
providerFactory: ProviderFactory;
|
|
37
39
|
}
|
|
38
40
|
export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInlineNodeViewProps> {
|
|
@@ -41,5 +43,5 @@ export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInl
|
|
|
41
43
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
42
44
|
render(props: MediaInlineNodeViewProps): jsx.JSX.Element;
|
|
43
45
|
}
|
|
44
|
-
export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
46
|
+
export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, fallbackMediaNameFetcher?: (id: string) => Promise<string>) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
45
47
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { WrappedComponentProps } from 'react-intl
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl';
|
|
4
4
|
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
export declare const MAX_ALT_TEXT_LENGTH = 510;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl
|
|
2
|
+
import type { IntlShape } from 'react-intl';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
5
5
|
import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -69,6 +69,12 @@ export interface MediaPluginOptions {
|
|
|
69
69
|
editorAppearance?: EditorAppearance;
|
|
70
70
|
editorSelectionAPI?: EditorSelectionAPI;
|
|
71
71
|
enableDownloadButton?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Optional fallback fetcher to retrieve the media filename from another service
|
|
74
|
+
* Workaround for #hot-301450 where media service is missing filenames for DC -> Cloud migrated media
|
|
75
|
+
* Receives the file ID and should resolve to the filename string.
|
|
76
|
+
*/
|
|
77
|
+
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
72
78
|
featureFlags?: MediaFeatureFlags;
|
|
73
79
|
forceHandlePositioning?: HandlePositioning;
|
|
74
80
|
fullWidthEnabled?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl
|
|
2
|
+
import type { IntlShape } from 'react-intl';
|
|
3
3
|
import type { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
4
4
|
export interface ImageBorderProps {
|
|
5
5
|
borderMark?: BorderMarkAttributes;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { IntlShape, WrappedComponentProps } from 'react-intl
|
|
7
|
+
import type { IntlShape, WrappedComponentProps } from 'react-intl';
|
|
8
8
|
import type { RecentSearchInputTypes } from '@atlaskit/editor-common/link';
|
|
9
9
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
10
10
|
type Props = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
5
5
|
interface Props {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Command, FloatingToolbarButton, FloatingToolbarConfig, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { Command, ExtractInjectionAPI, FloatingToolbarButton } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { IntlShape } from 'react-intl
|
|
7
|
+
import type { IntlShape } from 'react-intl';
|
|
8
8
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import type { MediaLinkingState } from '../../pm-plugins/linking/types';
|
|
10
10
|
export interface LinkingToolbarProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarItem, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { Command, ExtractInjectionAPI, FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl
|
|
1
|
+
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { FloatingToolbarConfig, FloatingToolbarOverflowDropdownOptions, Command } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type MemoizedFn } from 'memoize-one';
|
|
2
|
-
import type { IntlShape } from 'react-intl
|
|
2
|
+
import type { IntlShape } from 'react-intl';
|
|
3
3
|
import type { ExternalMediaAttributes, MediaADFAttrs, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
4
4
|
import type { LayoutIcon } from '@atlaskit/editor-common/card';
|
|
5
5
|
import type { Command, FloatingToolbarItem, FloatingToolbarDropdown, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,27 +34,27 @@
|
|
|
34
34
|
"@atlaskit/analytics-next": "^11.2.0",
|
|
35
35
|
"@atlaskit/button": "^23.11.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
38
|
-
"@atlaskit/editor-plugin-annotation": "^
|
|
39
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
40
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
41
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
42
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
43
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^
|
|
44
|
-
"@atlaskit/editor-plugin-focus": "^
|
|
45
|
-
"@atlaskit/editor-plugin-grid": "^
|
|
46
|
-
"@atlaskit/editor-plugin-guideline": "^
|
|
47
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
48
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
49
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
50
|
-
"@atlaskit/editor-plugin-width": "^
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^10.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-annotation": "^10.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-connectivity": "^10.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-decorations": "^10.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-editor-disabled": "^10.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^12.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^12.0.0",
|
|
44
|
+
"@atlaskit/editor-plugin-focus": "^9.0.0",
|
|
45
|
+
"@atlaskit/editor-plugin-grid": "^10.0.0",
|
|
46
|
+
"@atlaskit/editor-plugin-guideline": "^10.0.0",
|
|
47
|
+
"@atlaskit/editor-plugin-interaction": "^19.0.0",
|
|
48
|
+
"@atlaskit/editor-plugin-selection": "^10.0.0",
|
|
49
|
+
"@atlaskit/editor-plugin-toolbar": "^7.0.0",
|
|
50
|
+
"@atlaskit/editor-plugin-width": "^11.0.0",
|
|
51
51
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
52
52
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
53
53
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
54
54
|
"@atlaskit/form": "^15.5.0",
|
|
55
55
|
"@atlaskit/icon": "^34.2.0",
|
|
56
56
|
"@atlaskit/icon-lab": "^6.5.0",
|
|
57
|
-
"@atlaskit/media-card": "^80.
|
|
57
|
+
"@atlaskit/media-card": "^80.1.0",
|
|
58
58
|
"@atlaskit/media-client": "^36.0.0",
|
|
59
59
|
"@atlaskit/media-client-react": "^5.0.0",
|
|
60
60
|
"@atlaskit/media-common": "^13.0.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
66
66
|
"@atlaskit/primitives": "^19.0.0",
|
|
67
67
|
"@atlaskit/textfield": "^8.3.0",
|
|
68
|
-
"@atlaskit/tmp-editor-statsig": "^62.
|
|
68
|
+
"@atlaskit/tmp-editor-statsig": "^62.8.0",
|
|
69
69
|
"@atlaskit/tokens": "^13.0.0",
|
|
70
70
|
"@atlaskit/tooltip": "^21.1.0",
|
|
71
71
|
"@babel/runtime": "^7.0.0",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"uuid": "^3.1.0"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@atlaskit/editor-common": "^
|
|
80
|
+
"@atlaskit/editor-common": "^114.1.0",
|
|
81
81
|
"@atlaskit/media-core": "^37.0.0",
|
|
82
82
|
"react": "^18.2.0",
|
|
83
83
|
"react-dom": "^18.2.0",
|
|
84
|
-
"react-intl
|
|
84
|
+
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
85
85
|
},
|
|
86
86
|
"techstack": {
|
|
87
87
|
"@atlassian/frontend": {
|
|
@@ -167,5 +167,8 @@
|
|
|
167
167
|
"no-unused-dependencies": {
|
|
168
168
|
"checkDevDependencies": true
|
|
169
169
|
}
|
|
170
|
+
},
|
|
171
|
+
"devDependencies": {
|
|
172
|
+
"react-intl": "^6.6.2"
|
|
170
173
|
}
|
|
171
174
|
}
|
package/report.api.md
CHANGED