@atlaskit/renderer 108.1.1 → 108.1.2
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 +7 -0
- package/dist/cjs/i18n/en_ZZ.js +4 -4
- package/dist/cjs/react/nodes/mediaInline.js +131 -46
- package/dist/cjs/ui/MediaCard.js +2 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/en_ZZ.js +4 -4
- package/dist/es2019/react/nodes/mediaInline.js +85 -39
- package/dist/es2019/ui/MediaCard.js +0 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/en_ZZ.js +4 -4
- package/dist/esm/react/nodes/mediaInline.js +132 -47
- package/dist/esm/ui/MediaCard.js +0 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/i18n/en_ZZ.d.ts +2 -2
- package/dist/types/react/nodes/mediaInline.d.ts +15 -5
- package/dist/types/ui/MediaCard.d.ts +8 -7
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +2 -2
- package/dist/types-ts4.5/react/nodes/mediaInline.d.ts +15 -5
- package/dist/types-ts4.5/ui/MediaCard.d.ts +8 -7
- package/package.json +10 -10
- package/report.api.md +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 108.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f0b51f8f06c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f0b51f8f06c) - Fix copy paste file state for Inline Files
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 108.1.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/cjs/i18n/en_ZZ.js
CHANGED
|
@@ -13,16 +13,16 @@ exports.default = void 0;
|
|
|
13
13
|
*/
|
|
14
14
|
//
|
|
15
15
|
var _default = {
|
|
16
|
+
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Copied!',
|
|
17
|
+
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Copy',
|
|
16
18
|
'fabric.editor.headingLink.ascOrderLabel': 'Sort column Z to A',
|
|
17
19
|
'fabric.editor.headingLink.ascSortingLabel': 'ascending',
|
|
18
20
|
'fabric.editor.headingLink.copied': 'Copied!',
|
|
19
21
|
'fabric.editor.headingLink.copyAnchorLink': 'Copy link to heading',
|
|
20
22
|
'fabric.editor.headingLink.copyAriaLabel': 'Copy',
|
|
21
|
-
'fabric.editor.headingLink.descOrderLabel': '
|
|
22
|
-
'fabric.editor.headingLink.descSortingLabel': 'descending',
|
|
23
|
+
'fabric.editor.headingLink.descOrderLabel': "⚠️ You can't sort a table with merged cell",
|
|
23
24
|
'fabric.editor.headingLink.failedToCopy': 'Copy failed',
|
|
24
|
-
'fabric.editor.headingLink.invalidLabel': "⚠️ You can't sort a table with merged cells",
|
|
25
25
|
'fabric.editor.headingLink.noOrderLabel': 'Sort column A to Z',
|
|
26
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
26
|
+
'fabric.editor.headingLink.noneSortingLabel': 'descending'
|
|
27
27
|
};
|
|
28
28
|
exports.default = _default;
|
|
@@ -14,43 +14,119 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _mediaCard = require("@atlaskit/media-card");
|
|
15
15
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
16
16
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
17
|
+
var _mediaClient = require("@atlaskit/media-client");
|
|
17
18
|
var _MediaCard = require("../../ui/MediaCard");
|
|
18
19
|
var _reactIntlNext = require("react-intl-next");
|
|
19
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
var RenderMediaInline = function RenderMediaInline(
|
|
22
|
-
var
|
|
23
|
-
|
|
22
|
+
var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
23
|
+
var rendererAppearance = _ref.rendererAppearance,
|
|
24
|
+
intl = _ref.intl,
|
|
25
|
+
clipboardAttrs = _ref.clipboardAttrs,
|
|
26
|
+
mediaInlineProviders = _ref.mediaInlineProviders,
|
|
27
|
+
collectionName = _ref.collection,
|
|
28
|
+
featureFlags = _ref.featureFlags,
|
|
29
|
+
eventHandlers = _ref.eventHandlers,
|
|
30
|
+
identifier = _ref.identifier;
|
|
24
31
|
var _useState = (0, _react.useState)(),
|
|
25
32
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
contextIdentifierProvider = _useState2[0],
|
|
34
|
+
setContextIdentifierProvider = _useState2[1];
|
|
35
|
+
var _useState3 = (0, _react.useState)(),
|
|
36
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
37
|
+
viewMediaClientConfigState = _useState4[0],
|
|
38
|
+
setViewMediaClientConfigState = _useState4[1];
|
|
39
|
+
var _useState5 = (0, _react.useState)(),
|
|
40
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
41
|
+
fileState = _useState6[0],
|
|
42
|
+
setFileState = _useState6[1];
|
|
43
|
+
var updateContext = /*#__PURE__*/function () {
|
|
44
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(contextIdentifierProvider) {
|
|
45
|
+
var resolvedContextID;
|
|
46
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
47
|
+
while (1) switch (_context.prev = _context.next) {
|
|
48
|
+
case 0:
|
|
49
|
+
if (!contextIdentifierProvider) {
|
|
50
|
+
_context.next = 5;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
_context.next = 3;
|
|
54
|
+
return contextIdentifierProvider;
|
|
55
|
+
case 3:
|
|
56
|
+
resolvedContextID = _context.sent;
|
|
57
|
+
setContextIdentifierProvider(resolvedContextID);
|
|
58
|
+
case 5:
|
|
59
|
+
case "end":
|
|
60
|
+
return _context.stop();
|
|
61
|
+
}
|
|
62
|
+
}, _callee);
|
|
63
|
+
}));
|
|
64
|
+
return function updateContext(_x) {
|
|
65
|
+
return _ref2.apply(this, arguments);
|
|
66
|
+
};
|
|
67
|
+
}();
|
|
68
|
+
var updateFileState = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
69
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id, mediaClientConfig) {
|
|
70
|
+
var mediaClient, options, _fileState;
|
|
71
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
72
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
73
|
+
case 0:
|
|
74
|
+
mediaClient = (0, _mediaClient.getMediaClient)(mediaClientConfig, featureFlags);
|
|
75
|
+
options = {
|
|
76
|
+
collectionName: collectionName
|
|
77
|
+
};
|
|
78
|
+
_context2.prev = 2;
|
|
79
|
+
_context2.next = 5;
|
|
80
|
+
return mediaClient.file.getCurrentState(id, options);
|
|
81
|
+
case 5:
|
|
82
|
+
_fileState = _context2.sent;
|
|
83
|
+
setFileState(_fileState);
|
|
84
|
+
_context2.next = 11;
|
|
85
|
+
break;
|
|
86
|
+
case 9:
|
|
87
|
+
_context2.prev = 9;
|
|
88
|
+
_context2.t0 = _context2["catch"](2);
|
|
89
|
+
case 11:
|
|
90
|
+
case "end":
|
|
91
|
+
return _context2.stop();
|
|
92
|
+
}
|
|
93
|
+
}, _callee2, null, [[2, 9]]);
|
|
94
|
+
}));
|
|
95
|
+
return function (_x2, _x3) {
|
|
96
|
+
return _ref3.apply(this, arguments);
|
|
97
|
+
};
|
|
98
|
+
}(), [collectionName, featureFlags]);
|
|
28
99
|
(0, _react.useEffect)(function () {
|
|
100
|
+
var mediaProvider = mediaInlineProviders.mediaProvider,
|
|
101
|
+
contextIdentifierProvider = mediaInlineProviders.contextIdentifierProvider;
|
|
102
|
+
var id = clipboardAttrs.id;
|
|
29
103
|
updateViewMediaClientConfigState(mediaProvider);
|
|
30
|
-
|
|
104
|
+
updateContext(contextIdentifierProvider);
|
|
105
|
+
id && viewMediaClientConfigState && updateFileState(id, viewMediaClientConfigState);
|
|
106
|
+
}, [mediaInlineProviders, contextIdentifierProvider, clipboardAttrs, viewMediaClientConfigState, updateFileState]);
|
|
31
107
|
var updateViewMediaClientConfigState = /*#__PURE__*/function () {
|
|
32
|
-
var
|
|
108
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(mediaProvider) {
|
|
33
109
|
var mediaClientConfig;
|
|
34
|
-
return _regenerator.default.wrap(function
|
|
35
|
-
while (1) switch (
|
|
110
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
111
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
36
112
|
case 0:
|
|
37
113
|
if (!mediaProvider) {
|
|
38
|
-
|
|
114
|
+
_context3.next = 5;
|
|
39
115
|
break;
|
|
40
116
|
}
|
|
41
|
-
|
|
117
|
+
_context3.next = 3;
|
|
42
118
|
return mediaProvider;
|
|
43
119
|
case 3:
|
|
44
|
-
mediaClientConfig =
|
|
120
|
+
mediaClientConfig = _context3.sent;
|
|
45
121
|
setViewMediaClientConfigState(mediaClientConfig.viewMediaClientConfig);
|
|
46
122
|
case 5:
|
|
47
123
|
case "end":
|
|
48
|
-
return
|
|
124
|
+
return _context3.stop();
|
|
49
125
|
}
|
|
50
|
-
},
|
|
126
|
+
}, _callee3);
|
|
51
127
|
}));
|
|
52
|
-
return function updateViewMediaClientConfigState(
|
|
53
|
-
return
|
|
128
|
+
return function updateViewMediaClientConfigState(_x4) {
|
|
129
|
+
return _ref4.apply(this, arguments);
|
|
54
130
|
};
|
|
55
131
|
}();
|
|
56
132
|
|
|
@@ -65,60 +141,69 @@ var RenderMediaInline = function RenderMediaInline(props) {
|
|
|
65
141
|
});
|
|
66
142
|
}
|
|
67
143
|
var handleMediaInlineClick = function handleMediaInlineClick(result) {
|
|
68
|
-
var
|
|
69
|
-
if (
|
|
70
|
-
var
|
|
71
|
-
|
|
144
|
+
var _eventHandlers$media;
|
|
145
|
+
if (eventHandlers !== null && eventHandlers !== void 0 && (_eventHandlers$media = eventHandlers.media) !== null && _eventHandlers$media !== void 0 && _eventHandlers$media.onClick) {
|
|
146
|
+
var _eventHandlers$media2;
|
|
147
|
+
eventHandlers === null || eventHandlers === void 0 ? void 0 : (_eventHandlers$media2 = eventHandlers.media) === null || _eventHandlers$media2 === void 0 ? void 0 : _eventHandlers$media2.onClick(result);
|
|
72
148
|
}
|
|
73
149
|
};
|
|
74
150
|
var shouldOpenMediaViewer = rendererAppearance !== 'mobile';
|
|
75
151
|
var shouldDisplayToolTip = rendererAppearance !== 'mobile';
|
|
76
|
-
|
|
77
|
-
|
|
152
|
+
var mediaProvider = mediaInlineProviders.mediaProvider;
|
|
153
|
+
var id = clipboardAttrs.id,
|
|
154
|
+
collection = clipboardAttrs.collection;
|
|
155
|
+
return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, (0, _MediaCard.getClipboardAttrs)({
|
|
156
|
+
id: id,
|
|
157
|
+
collection: collection,
|
|
158
|
+
contextIdentifierProvider: contextIdentifierProvider,
|
|
159
|
+
fileState: fileState
|
|
160
|
+
}), {
|
|
161
|
+
"data-node-type": "mediaInline"
|
|
162
|
+
}), mediaProvider ? /*#__PURE__*/_react.default.createElement(_mediaCard.MediaInlineCard, {
|
|
163
|
+
identifier: identifier,
|
|
78
164
|
onClick: handleMediaInlineClick,
|
|
79
165
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
80
166
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
81
167
|
mediaClientConfig: viewMediaClientConfigState
|
|
82
|
-
})
|
|
168
|
+
}) : /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
|
|
169
|
+
message: (intl || (0, _reactIntlNext.createIntl)({
|
|
170
|
+
locale: 'en'
|
|
171
|
+
})).formatMessage(_mediaUi.messages.couldnt_load_file)
|
|
172
|
+
}));
|
|
83
173
|
};
|
|
84
174
|
exports.RenderMediaInline = RenderMediaInline;
|
|
85
175
|
var MediaInline = function MediaInline(props) {
|
|
86
176
|
var collection = props.collection,
|
|
87
177
|
id = props.id,
|
|
88
|
-
|
|
178
|
+
providerFactory = props.providers,
|
|
89
179
|
intl = props.intl,
|
|
90
|
-
rendererAppearance = props.rendererAppearance
|
|
180
|
+
rendererAppearance = props.rendererAppearance,
|
|
181
|
+
featureFlags = props.featureFlags;
|
|
182
|
+
var clipboardAttrs = {
|
|
183
|
+
id: id,
|
|
184
|
+
collection: collection
|
|
185
|
+
};
|
|
91
186
|
var identifier = {
|
|
92
187
|
id: id,
|
|
93
188
|
mediaItemType: 'file',
|
|
94
189
|
collectionName: collection
|
|
95
190
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
id: id,
|
|
101
|
-
collection: collection
|
|
102
|
-
}), {
|
|
103
|
-
"data-node-type": "mediaInline"
|
|
104
|
-
}), /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders, {
|
|
105
|
-
providers: ['mediaProvider'],
|
|
106
|
-
providerFactory: providers,
|
|
107
|
-
renderNode: function renderNode(providers) {
|
|
108
|
-
var mediaProvider = providers.mediaProvider;
|
|
109
|
-
if (!mediaProvider) {
|
|
110
|
-
return /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
|
|
111
|
-
message: (intl || defaultIntl).formatMessage(_mediaUi.messages.couldnt_load_file)
|
|
112
|
-
});
|
|
113
|
-
}
|
|
191
|
+
return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders, {
|
|
192
|
+
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
193
|
+
providerFactory: providerFactory,
|
|
194
|
+
renderNode: function renderNode(mediaInlineProviders) {
|
|
114
195
|
return /*#__PURE__*/_react.default.createElement(RenderMediaInline, {
|
|
115
196
|
identifier: identifier,
|
|
116
|
-
|
|
197
|
+
clipboardAttrs: clipboardAttrs,
|
|
117
198
|
eventHandlers: props.eventHandlers,
|
|
118
|
-
rendererAppearance: rendererAppearance
|
|
199
|
+
rendererAppearance: rendererAppearance,
|
|
200
|
+
intl: intl,
|
|
201
|
+
mediaInlineProviders: mediaInlineProviders,
|
|
202
|
+
collection: collection,
|
|
203
|
+
featureFlags: featureFlags
|
|
119
204
|
});
|
|
120
205
|
}
|
|
121
|
-
})
|
|
206
|
+
});
|
|
122
207
|
};
|
|
123
208
|
var _default = (0, _reactIntlNext.injectIntl)(MediaInline);
|
|
124
209
|
exports.default = _default;
|
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -329,8 +329,9 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
329
329
|
}
|
|
330
330
|
}]);
|
|
331
331
|
return MediaCardInternal;
|
|
332
|
-
}(_react.Component);
|
|
332
|
+
}(_react.Component);
|
|
333
333
|
exports.MediaCardInternal = MediaCardInternal;
|
|
334
|
+
// Needed for copy & paste
|
|
334
335
|
var getClipboardAttrs = function getClipboardAttrs(_ref2) {
|
|
335
336
|
var id = _ref2.id,
|
|
336
337
|
alt = _ref2.alt,
|
|
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
|
|
|
55
55
|
var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "108.1.
|
|
58
|
+
var packageVersion = "108.1.2";
|
|
59
59
|
var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
package/dist/cjs/version.json
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
//
|
|
9
9
|
export default {
|
|
10
|
+
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Copied!',
|
|
11
|
+
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Copy',
|
|
10
12
|
'fabric.editor.headingLink.ascOrderLabel': 'Sort column Z to A',
|
|
11
13
|
'fabric.editor.headingLink.ascSortingLabel': 'ascending',
|
|
12
14
|
'fabric.editor.headingLink.copied': 'Copied!',
|
|
13
15
|
'fabric.editor.headingLink.copyAnchorLink': 'Copy link to heading',
|
|
14
16
|
'fabric.editor.headingLink.copyAriaLabel': 'Copy',
|
|
15
|
-
'fabric.editor.headingLink.descOrderLabel': '
|
|
16
|
-
'fabric.editor.headingLink.descSortingLabel': 'descending',
|
|
17
|
+
'fabric.editor.headingLink.descOrderLabel': "⚠️ You can't sort a table with merged cell",
|
|
17
18
|
'fabric.editor.headingLink.failedToCopy': 'Copy failed',
|
|
18
|
-
'fabric.editor.headingLink.invalidLabel': "⚠️ You can't sort a table with merged cells",
|
|
19
19
|
'fabric.editor.headingLink.noOrderLabel': 'Sort column A to Z',
|
|
20
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
20
|
+
'fabric.editor.headingLink.noneSortingLabel': 'descending'
|
|
21
21
|
};
|
|
@@ -1,19 +1,54 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import React, { useEffect, useState, useCallback } from 'react';
|
|
3
3
|
import { MediaInlineCard } from '@atlaskit/media-card';
|
|
4
4
|
import { MediaInlineCardErroredView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
|
|
5
5
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
+
import { getMediaClient } from '@atlaskit/media-client';
|
|
6
7
|
import { getClipboardAttrs } from '../../ui/MediaCard';
|
|
7
8
|
import { createIntl, injectIntl } from 'react-intl-next';
|
|
8
|
-
export const RenderMediaInline =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export const RenderMediaInline = ({
|
|
10
|
+
rendererAppearance,
|
|
11
|
+
intl,
|
|
12
|
+
clipboardAttrs,
|
|
13
|
+
mediaInlineProviders,
|
|
14
|
+
collection: collectionName,
|
|
15
|
+
featureFlags,
|
|
16
|
+
eventHandlers,
|
|
17
|
+
identifier
|
|
18
|
+
}) => {
|
|
19
|
+
const [contextIdentifierProvider, setContextIdentifierProvider] = useState();
|
|
13
20
|
const [viewMediaClientConfigState, setViewMediaClientConfigState] = useState();
|
|
21
|
+
const [fileState, setFileState] = useState();
|
|
22
|
+
const updateContext = async contextIdentifierProvider => {
|
|
23
|
+
if (contextIdentifierProvider) {
|
|
24
|
+
const resolvedContextID = await contextIdentifierProvider;
|
|
25
|
+
setContextIdentifierProvider(resolvedContextID);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const updateFileState = useCallback(async (id, mediaClientConfig) => {
|
|
29
|
+
const mediaClient = getMediaClient(mediaClientConfig, featureFlags);
|
|
30
|
+
const options = {
|
|
31
|
+
collectionName
|
|
32
|
+
};
|
|
33
|
+
try {
|
|
34
|
+
const fileState = await mediaClient.file.getCurrentState(id, options);
|
|
35
|
+
setFileState(fileState);
|
|
36
|
+
} catch (error) {
|
|
37
|
+
// do not set state on error
|
|
38
|
+
}
|
|
39
|
+
}, [collectionName, featureFlags]);
|
|
14
40
|
useEffect(() => {
|
|
41
|
+
const {
|
|
42
|
+
mediaProvider,
|
|
43
|
+
contextIdentifierProvider
|
|
44
|
+
} = mediaInlineProviders;
|
|
45
|
+
const {
|
|
46
|
+
id
|
|
47
|
+
} = clipboardAttrs;
|
|
15
48
|
updateViewMediaClientConfigState(mediaProvider);
|
|
16
|
-
|
|
49
|
+
updateContext(contextIdentifierProvider);
|
|
50
|
+
id && viewMediaClientConfigState && updateFileState(id, viewMediaClientConfigState);
|
|
51
|
+
}, [mediaInlineProviders, contextIdentifierProvider, clipboardAttrs, viewMediaClientConfigState, updateFileState]);
|
|
17
52
|
const updateViewMediaClientConfigState = async mediaProvider => {
|
|
18
53
|
if (mediaProvider) {
|
|
19
54
|
const mediaClientConfig = await mediaProvider;
|
|
@@ -32,62 +67,73 @@ export const RenderMediaInline = props => {
|
|
|
32
67
|
});
|
|
33
68
|
}
|
|
34
69
|
const handleMediaInlineClick = result => {
|
|
35
|
-
var
|
|
36
|
-
if (
|
|
37
|
-
var
|
|
38
|
-
|
|
70
|
+
var _eventHandlers$media;
|
|
71
|
+
if (eventHandlers !== null && eventHandlers !== void 0 && (_eventHandlers$media = eventHandlers.media) !== null && _eventHandlers$media !== void 0 && _eventHandlers$media.onClick) {
|
|
72
|
+
var _eventHandlers$media2;
|
|
73
|
+
eventHandlers === null || eventHandlers === void 0 ? void 0 : (_eventHandlers$media2 = eventHandlers.media) === null || _eventHandlers$media2 === void 0 ? void 0 : _eventHandlers$media2.onClick(result);
|
|
39
74
|
}
|
|
40
75
|
};
|
|
41
76
|
const shouldOpenMediaViewer = rendererAppearance !== 'mobile';
|
|
42
77
|
const shouldDisplayToolTip = rendererAppearance !== 'mobile';
|
|
43
|
-
|
|
44
|
-
|
|
78
|
+
const {
|
|
79
|
+
mediaProvider
|
|
80
|
+
} = mediaInlineProviders;
|
|
81
|
+
const {
|
|
82
|
+
id,
|
|
83
|
+
collection
|
|
84
|
+
} = clipboardAttrs;
|
|
85
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, getClipboardAttrs({
|
|
86
|
+
id,
|
|
87
|
+
collection,
|
|
88
|
+
contextIdentifierProvider,
|
|
89
|
+
fileState
|
|
90
|
+
}), {
|
|
91
|
+
"data-node-type": "mediaInline"
|
|
92
|
+
}), mediaProvider ? /*#__PURE__*/React.createElement(MediaInlineCard, {
|
|
93
|
+
identifier: identifier,
|
|
45
94
|
onClick: handleMediaInlineClick,
|
|
46
95
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
47
96
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
48
97
|
mediaClientConfig: viewMediaClientConfigState
|
|
49
|
-
})
|
|
98
|
+
}) : /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
99
|
+
message: (intl || createIntl({
|
|
100
|
+
locale: 'en'
|
|
101
|
+
})).formatMessage(messages.couldnt_load_file)
|
|
102
|
+
}));
|
|
50
103
|
};
|
|
51
104
|
const MediaInline = props => {
|
|
52
105
|
const {
|
|
53
106
|
collection,
|
|
54
107
|
id,
|
|
55
|
-
providers,
|
|
108
|
+
providers: providerFactory,
|
|
56
109
|
intl,
|
|
57
|
-
rendererAppearance
|
|
110
|
+
rendererAppearance,
|
|
111
|
+
featureFlags
|
|
58
112
|
} = props;
|
|
113
|
+
const clipboardAttrs = {
|
|
114
|
+
id,
|
|
115
|
+
collection
|
|
116
|
+
};
|
|
59
117
|
const identifier = {
|
|
60
118
|
id,
|
|
61
119
|
mediaItemType: 'file',
|
|
62
120
|
collectionName: collection
|
|
63
121
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
id,
|
|
69
|
-
collection
|
|
70
|
-
}), {
|
|
71
|
-
"data-node-type": "mediaInline"
|
|
72
|
-
}), /*#__PURE__*/React.createElement(WithProviders, {
|
|
73
|
-
providers: ['mediaProvider'],
|
|
74
|
-
providerFactory: providers,
|
|
75
|
-
renderNode: providers => {
|
|
76
|
-
const {
|
|
77
|
-
mediaProvider
|
|
78
|
-
} = providers;
|
|
79
|
-
if (!mediaProvider) {
|
|
80
|
-
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
81
|
-
message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file)
|
|
82
|
-
});
|
|
83
|
-
}
|
|
122
|
+
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
123
|
+
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
124
|
+
providerFactory: providerFactory,
|
|
125
|
+
renderNode: mediaInlineProviders => {
|
|
84
126
|
return /*#__PURE__*/React.createElement(RenderMediaInline, {
|
|
85
127
|
identifier: identifier,
|
|
86
|
-
|
|
128
|
+
clipboardAttrs: clipboardAttrs,
|
|
87
129
|
eventHandlers: props.eventHandlers,
|
|
88
|
-
rendererAppearance: rendererAppearance
|
|
130
|
+
rendererAppearance: rendererAppearance,
|
|
131
|
+
intl: intl,
|
|
132
|
+
mediaInlineProviders: mediaInlineProviders,
|
|
133
|
+
collection: collection,
|
|
134
|
+
featureFlags: featureFlags
|
|
89
135
|
});
|
|
90
136
|
}
|
|
91
|
-
})
|
|
137
|
+
});
|
|
92
138
|
};
|
|
93
139
|
export default injectIntl(MediaInline);
|
|
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
35
35
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
36
36
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
37
37
|
const packageName = "@atlaskit/renderer";
|
|
38
|
-
const packageVersion = "108.1.
|
|
38
|
+
const packageVersion = "108.1.2";
|
|
39
39
|
export class Renderer extends PureComponent {
|
|
40
40
|
constructor(props) {
|
|
41
41
|
super(props);
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/i18n/en_ZZ.js
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
//
|
|
9
9
|
export default {
|
|
10
|
+
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Copied!',
|
|
11
|
+
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Copy',
|
|
10
12
|
'fabric.editor.headingLink.ascOrderLabel': 'Sort column Z to A',
|
|
11
13
|
'fabric.editor.headingLink.ascSortingLabel': 'ascending',
|
|
12
14
|
'fabric.editor.headingLink.copied': 'Copied!',
|
|
13
15
|
'fabric.editor.headingLink.copyAnchorLink': 'Copy link to heading',
|
|
14
16
|
'fabric.editor.headingLink.copyAriaLabel': 'Copy',
|
|
15
|
-
'fabric.editor.headingLink.descOrderLabel': '
|
|
16
|
-
'fabric.editor.headingLink.descSortingLabel': 'descending',
|
|
17
|
+
'fabric.editor.headingLink.descOrderLabel': "⚠️ You can't sort a table with merged cell",
|
|
17
18
|
'fabric.editor.headingLink.failedToCopy': 'Copy failed',
|
|
18
|
-
'fabric.editor.headingLink.invalidLabel': "⚠️ You can't sort a table with merged cells",
|
|
19
19
|
'fabric.editor.headingLink.noOrderLabel': 'Sort column A to Z',
|
|
20
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
20
|
+
'fabric.editor.headingLink.noneSortingLabel': 'descending'
|
|
21
21
|
};
|
|
@@ -2,45 +2,121 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
-
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import React, { useEffect, useState, useCallback } from 'react';
|
|
6
6
|
import { MediaInlineCard } from '@atlaskit/media-card';
|
|
7
7
|
import { MediaInlineCardErroredView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
|
|
8
8
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
9
|
+
import { getMediaClient } from '@atlaskit/media-client';
|
|
9
10
|
import { getClipboardAttrs } from '../../ui/MediaCard';
|
|
10
11
|
import { createIntl, injectIntl } from 'react-intl-next';
|
|
11
|
-
export var RenderMediaInline = function RenderMediaInline(
|
|
12
|
-
var
|
|
13
|
-
|
|
12
|
+
export var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
13
|
+
var rendererAppearance = _ref.rendererAppearance,
|
|
14
|
+
intl = _ref.intl,
|
|
15
|
+
clipboardAttrs = _ref.clipboardAttrs,
|
|
16
|
+
mediaInlineProviders = _ref.mediaInlineProviders,
|
|
17
|
+
collectionName = _ref.collection,
|
|
18
|
+
featureFlags = _ref.featureFlags,
|
|
19
|
+
eventHandlers = _ref.eventHandlers,
|
|
20
|
+
identifier = _ref.identifier;
|
|
14
21
|
var _useState = useState(),
|
|
15
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
contextIdentifierProvider = _useState2[0],
|
|
24
|
+
setContextIdentifierProvider = _useState2[1];
|
|
25
|
+
var _useState3 = useState(),
|
|
26
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
+
viewMediaClientConfigState = _useState4[0],
|
|
28
|
+
setViewMediaClientConfigState = _useState4[1];
|
|
29
|
+
var _useState5 = useState(),
|
|
30
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
31
|
+
fileState = _useState6[0],
|
|
32
|
+
setFileState = _useState6[1];
|
|
33
|
+
var updateContext = /*#__PURE__*/function () {
|
|
34
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(contextIdentifierProvider) {
|
|
35
|
+
var resolvedContextID;
|
|
36
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37
|
+
while (1) switch (_context.prev = _context.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
if (!contextIdentifierProvider) {
|
|
40
|
+
_context.next = 5;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
_context.next = 3;
|
|
44
|
+
return contextIdentifierProvider;
|
|
45
|
+
case 3:
|
|
46
|
+
resolvedContextID = _context.sent;
|
|
47
|
+
setContextIdentifierProvider(resolvedContextID);
|
|
48
|
+
case 5:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
51
|
+
}
|
|
52
|
+
}, _callee);
|
|
53
|
+
}));
|
|
54
|
+
return function updateContext(_x) {
|
|
55
|
+
return _ref2.apply(this, arguments);
|
|
56
|
+
};
|
|
57
|
+
}();
|
|
58
|
+
var updateFileState = useCallback( /*#__PURE__*/function () {
|
|
59
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, mediaClientConfig) {
|
|
60
|
+
var mediaClient, options, _fileState;
|
|
61
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
62
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
mediaClient = getMediaClient(mediaClientConfig, featureFlags);
|
|
65
|
+
options = {
|
|
66
|
+
collectionName: collectionName
|
|
67
|
+
};
|
|
68
|
+
_context2.prev = 2;
|
|
69
|
+
_context2.next = 5;
|
|
70
|
+
return mediaClient.file.getCurrentState(id, options);
|
|
71
|
+
case 5:
|
|
72
|
+
_fileState = _context2.sent;
|
|
73
|
+
setFileState(_fileState);
|
|
74
|
+
_context2.next = 11;
|
|
75
|
+
break;
|
|
76
|
+
case 9:
|
|
77
|
+
_context2.prev = 9;
|
|
78
|
+
_context2.t0 = _context2["catch"](2);
|
|
79
|
+
case 11:
|
|
80
|
+
case "end":
|
|
81
|
+
return _context2.stop();
|
|
82
|
+
}
|
|
83
|
+
}, _callee2, null, [[2, 9]]);
|
|
84
|
+
}));
|
|
85
|
+
return function (_x2, _x3) {
|
|
86
|
+
return _ref3.apply(this, arguments);
|
|
87
|
+
};
|
|
88
|
+
}(), [collectionName, featureFlags]);
|
|
18
89
|
useEffect(function () {
|
|
90
|
+
var mediaProvider = mediaInlineProviders.mediaProvider,
|
|
91
|
+
contextIdentifierProvider = mediaInlineProviders.contextIdentifierProvider;
|
|
92
|
+
var id = clipboardAttrs.id;
|
|
19
93
|
updateViewMediaClientConfigState(mediaProvider);
|
|
20
|
-
|
|
94
|
+
updateContext(contextIdentifierProvider);
|
|
95
|
+
id && viewMediaClientConfigState && updateFileState(id, viewMediaClientConfigState);
|
|
96
|
+
}, [mediaInlineProviders, contextIdentifierProvider, clipboardAttrs, viewMediaClientConfigState, updateFileState]);
|
|
21
97
|
var updateViewMediaClientConfigState = /*#__PURE__*/function () {
|
|
22
|
-
var
|
|
98
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(mediaProvider) {
|
|
23
99
|
var mediaClientConfig;
|
|
24
|
-
return _regeneratorRuntime.wrap(function
|
|
25
|
-
while (1) switch (
|
|
100
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
101
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
26
102
|
case 0:
|
|
27
103
|
if (!mediaProvider) {
|
|
28
|
-
|
|
104
|
+
_context3.next = 5;
|
|
29
105
|
break;
|
|
30
106
|
}
|
|
31
|
-
|
|
107
|
+
_context3.next = 3;
|
|
32
108
|
return mediaProvider;
|
|
33
109
|
case 3:
|
|
34
|
-
mediaClientConfig =
|
|
110
|
+
mediaClientConfig = _context3.sent;
|
|
35
111
|
setViewMediaClientConfigState(mediaClientConfig.viewMediaClientConfig);
|
|
36
112
|
case 5:
|
|
37
113
|
case "end":
|
|
38
|
-
return
|
|
114
|
+
return _context3.stop();
|
|
39
115
|
}
|
|
40
|
-
},
|
|
116
|
+
}, _callee3);
|
|
41
117
|
}));
|
|
42
|
-
return function updateViewMediaClientConfigState(
|
|
43
|
-
return
|
|
118
|
+
return function updateViewMediaClientConfigState(_x4) {
|
|
119
|
+
return _ref4.apply(this, arguments);
|
|
44
120
|
};
|
|
45
121
|
}();
|
|
46
122
|
|
|
@@ -55,58 +131,67 @@ export var RenderMediaInline = function RenderMediaInline(props) {
|
|
|
55
131
|
});
|
|
56
132
|
}
|
|
57
133
|
var handleMediaInlineClick = function handleMediaInlineClick(result) {
|
|
58
|
-
var
|
|
59
|
-
if (
|
|
60
|
-
var
|
|
61
|
-
|
|
134
|
+
var _eventHandlers$media;
|
|
135
|
+
if (eventHandlers !== null && eventHandlers !== void 0 && (_eventHandlers$media = eventHandlers.media) !== null && _eventHandlers$media !== void 0 && _eventHandlers$media.onClick) {
|
|
136
|
+
var _eventHandlers$media2;
|
|
137
|
+
eventHandlers === null || eventHandlers === void 0 ? void 0 : (_eventHandlers$media2 = eventHandlers.media) === null || _eventHandlers$media2 === void 0 ? void 0 : _eventHandlers$media2.onClick(result);
|
|
62
138
|
}
|
|
63
139
|
};
|
|
64
140
|
var shouldOpenMediaViewer = rendererAppearance !== 'mobile';
|
|
65
141
|
var shouldDisplayToolTip = rendererAppearance !== 'mobile';
|
|
66
|
-
|
|
67
|
-
|
|
142
|
+
var mediaProvider = mediaInlineProviders.mediaProvider;
|
|
143
|
+
var id = clipboardAttrs.id,
|
|
144
|
+
collection = clipboardAttrs.collection;
|
|
145
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, getClipboardAttrs({
|
|
146
|
+
id: id,
|
|
147
|
+
collection: collection,
|
|
148
|
+
contextIdentifierProvider: contextIdentifierProvider,
|
|
149
|
+
fileState: fileState
|
|
150
|
+
}), {
|
|
151
|
+
"data-node-type": "mediaInline"
|
|
152
|
+
}), mediaProvider ? /*#__PURE__*/React.createElement(MediaInlineCard, {
|
|
153
|
+
identifier: identifier,
|
|
68
154
|
onClick: handleMediaInlineClick,
|
|
69
155
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
70
156
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
71
157
|
mediaClientConfig: viewMediaClientConfigState
|
|
72
|
-
})
|
|
158
|
+
}) : /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
159
|
+
message: (intl || createIntl({
|
|
160
|
+
locale: 'en'
|
|
161
|
+
})).formatMessage(messages.couldnt_load_file)
|
|
162
|
+
}));
|
|
73
163
|
};
|
|
74
164
|
var MediaInline = function MediaInline(props) {
|
|
75
165
|
var collection = props.collection,
|
|
76
166
|
id = props.id,
|
|
77
|
-
|
|
167
|
+
providerFactory = props.providers,
|
|
78
168
|
intl = props.intl,
|
|
79
|
-
rendererAppearance = props.rendererAppearance
|
|
169
|
+
rendererAppearance = props.rendererAppearance,
|
|
170
|
+
featureFlags = props.featureFlags;
|
|
171
|
+
var clipboardAttrs = {
|
|
172
|
+
id: id,
|
|
173
|
+
collection: collection
|
|
174
|
+
};
|
|
80
175
|
var identifier = {
|
|
81
176
|
id: id,
|
|
82
177
|
mediaItemType: 'file',
|
|
83
178
|
collectionName: collection
|
|
84
179
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
id: id,
|
|
90
|
-
collection: collection
|
|
91
|
-
}), {
|
|
92
|
-
"data-node-type": "mediaInline"
|
|
93
|
-
}), /*#__PURE__*/React.createElement(WithProviders, {
|
|
94
|
-
providers: ['mediaProvider'],
|
|
95
|
-
providerFactory: providers,
|
|
96
|
-
renderNode: function renderNode(providers) {
|
|
97
|
-
var mediaProvider = providers.mediaProvider;
|
|
98
|
-
if (!mediaProvider) {
|
|
99
|
-
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
100
|
-
message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file)
|
|
101
|
-
});
|
|
102
|
-
}
|
|
180
|
+
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
181
|
+
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
182
|
+
providerFactory: providerFactory,
|
|
183
|
+
renderNode: function renderNode(mediaInlineProviders) {
|
|
103
184
|
return /*#__PURE__*/React.createElement(RenderMediaInline, {
|
|
104
185
|
identifier: identifier,
|
|
105
|
-
|
|
186
|
+
clipboardAttrs: clipboardAttrs,
|
|
106
187
|
eventHandlers: props.eventHandlers,
|
|
107
|
-
rendererAppearance: rendererAppearance
|
|
188
|
+
rendererAppearance: rendererAppearance,
|
|
189
|
+
intl: intl,
|
|
190
|
+
mediaInlineProviders: mediaInlineProviders,
|
|
191
|
+
collection: collection,
|
|
192
|
+
featureFlags: featureFlags
|
|
108
193
|
});
|
|
109
194
|
}
|
|
110
|
-
})
|
|
195
|
+
});
|
|
111
196
|
};
|
|
112
197
|
export default injectIntl(MediaInline);
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
45
45
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
var packageName = "@atlaskit/renderer";
|
|
48
|
-
var packageVersion = "108.1.
|
|
48
|
+
var packageVersion = "108.1.2";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
package/dist/esm/version.json
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
7
|
declare const _default: {
|
|
8
|
+
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
9
|
+
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
8
10
|
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
9
11
|
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
10
12
|
'fabric.editor.headingLink.copied': string;
|
|
11
13
|
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
12
14
|
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
13
15
|
'fabric.editor.headingLink.descOrderLabel': string;
|
|
14
|
-
'fabric.editor.headingLink.descSortingLabel': string;
|
|
15
16
|
'fabric.editor.headingLink.failedToCopy': string;
|
|
16
|
-
'fabric.editor.headingLink.invalidLabel': string;
|
|
17
17
|
'fabric.editor.headingLink.noOrderLabel': string;
|
|
18
18
|
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
19
19
|
};
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
import { ContextIdentifierProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { FileIdentifier } from '@atlaskit/media-client';
|
|
4
|
-
import { MediaProvider } from '../../ui/MediaCard';
|
|
5
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import { MediaProvider, ClipboardAttrs } from '../../ui/MediaCard';
|
|
5
|
+
import { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
6
6
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { RendererAppearance } from '../../ui/Renderer/types';
|
|
8
|
+
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
9
|
+
type MediaInlineProviders = {
|
|
10
|
+
mediaProvider?: Promise<MediaProvider>;
|
|
11
|
+
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
12
|
+
};
|
|
8
13
|
export type RenderMediaInlineProps = {
|
|
9
14
|
identifier: FileIdentifier;
|
|
10
|
-
|
|
15
|
+
clipboardAttrs: ClipboardAttrs;
|
|
16
|
+
mediaInlineProviders: MediaInlineProviders;
|
|
17
|
+
intl?: IntlShape;
|
|
11
18
|
children?: React.ReactNode;
|
|
19
|
+
collection?: string;
|
|
12
20
|
eventHandlers?: EventHandlers;
|
|
13
21
|
rendererAppearance?: RendererAppearance;
|
|
22
|
+
featureFlags?: MediaFeatureFlags;
|
|
14
23
|
};
|
|
15
24
|
export type MediaInlineProps = {
|
|
16
25
|
id: string;
|
|
17
|
-
collection?: string;
|
|
18
26
|
providers: ProviderFactory;
|
|
27
|
+
collection?: string;
|
|
19
28
|
eventHandlers?: EventHandlers;
|
|
20
29
|
rendererAppearance?: RendererAppearance;
|
|
30
|
+
featureFlags?: MediaFeatureFlags;
|
|
21
31
|
};
|
|
22
32
|
export declare const RenderMediaInline: React.FC<RenderMediaInlineProps>;
|
|
23
33
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl">>> & {
|
|
@@ -64,14 +64,15 @@ export declare class MediaCardInternal extends Component<MediaCardProps, State>
|
|
|
64
64
|
private getOnCardClickCallback;
|
|
65
65
|
render(): JSX.Element | null;
|
|
66
66
|
}
|
|
67
|
-
export
|
|
67
|
+
export type ClipboardAttrs = {
|
|
68
68
|
id: string;
|
|
69
|
-
alt?: string
|
|
70
|
-
collection?: string
|
|
71
|
-
contextIdentifierProvider?: ContextIdentifierProvider
|
|
72
|
-
originalDimensions?: NumericalCardDimensions
|
|
73
|
-
fileState?: FileState
|
|
74
|
-
}
|
|
69
|
+
alt?: string;
|
|
70
|
+
collection?: string;
|
|
71
|
+
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
72
|
+
originalDimensions?: NumericalCardDimensions;
|
|
73
|
+
fileState?: FileState;
|
|
74
|
+
};
|
|
75
|
+
export declare const getClipboardAttrs: ({ id, alt, collection, contextIdentifierProvider, originalDimensions, fileState, }: ClipboardAttrs) => {
|
|
75
76
|
[key: string]: string | number | undefined;
|
|
76
77
|
};
|
|
77
78
|
export declare const MediaCard: React.ComponentClass<MediaCardProps & import("@atlaskit/editor-common/utils").ImageLoaderProps, any>;
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
7
|
declare const _default: {
|
|
8
|
+
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
9
|
+
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
8
10
|
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
9
11
|
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
10
12
|
'fabric.editor.headingLink.copied': string;
|
|
11
13
|
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
12
14
|
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
13
15
|
'fabric.editor.headingLink.descOrderLabel': string;
|
|
14
|
-
'fabric.editor.headingLink.descSortingLabel': string;
|
|
15
16
|
'fabric.editor.headingLink.failedToCopy': string;
|
|
16
|
-
'fabric.editor.headingLink.invalidLabel': string;
|
|
17
17
|
'fabric.editor.headingLink.noOrderLabel': string;
|
|
18
18
|
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
19
19
|
};
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
import { ContextIdentifierProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { FileIdentifier } from '@atlaskit/media-client';
|
|
4
|
-
import { MediaProvider } from '../../ui/MediaCard';
|
|
5
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import { MediaProvider, ClipboardAttrs } from '../../ui/MediaCard';
|
|
5
|
+
import { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
6
6
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { RendererAppearance } from '../../ui/Renderer/types';
|
|
8
|
+
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
9
|
+
type MediaInlineProviders = {
|
|
10
|
+
mediaProvider?: Promise<MediaProvider>;
|
|
11
|
+
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
12
|
+
};
|
|
8
13
|
export type RenderMediaInlineProps = {
|
|
9
14
|
identifier: FileIdentifier;
|
|
10
|
-
|
|
15
|
+
clipboardAttrs: ClipboardAttrs;
|
|
16
|
+
mediaInlineProviders: MediaInlineProviders;
|
|
17
|
+
intl?: IntlShape;
|
|
11
18
|
children?: React.ReactNode;
|
|
19
|
+
collection?: string;
|
|
12
20
|
eventHandlers?: EventHandlers;
|
|
13
21
|
rendererAppearance?: RendererAppearance;
|
|
22
|
+
featureFlags?: MediaFeatureFlags;
|
|
14
23
|
};
|
|
15
24
|
export type MediaInlineProps = {
|
|
16
25
|
id: string;
|
|
17
|
-
collection?: string;
|
|
18
26
|
providers: ProviderFactory;
|
|
27
|
+
collection?: string;
|
|
19
28
|
eventHandlers?: EventHandlers;
|
|
20
29
|
rendererAppearance?: RendererAppearance;
|
|
30
|
+
featureFlags?: MediaFeatureFlags;
|
|
21
31
|
};
|
|
22
32
|
export declare const RenderMediaInline: React.FC<RenderMediaInlineProps>;
|
|
23
33
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl">>> & {
|
|
@@ -64,14 +64,15 @@ export declare class MediaCardInternal extends Component<MediaCardProps, State>
|
|
|
64
64
|
private getOnCardClickCallback;
|
|
65
65
|
render(): JSX.Element | null;
|
|
66
66
|
}
|
|
67
|
-
export
|
|
67
|
+
export type ClipboardAttrs = {
|
|
68
68
|
id: string;
|
|
69
|
-
alt?: string
|
|
70
|
-
collection?: string
|
|
71
|
-
contextIdentifierProvider?: ContextIdentifierProvider
|
|
72
|
-
originalDimensions?: NumericalCardDimensions
|
|
73
|
-
fileState?: FileState
|
|
74
|
-
}
|
|
69
|
+
alt?: string;
|
|
70
|
+
collection?: string;
|
|
71
|
+
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
72
|
+
originalDimensions?: NumericalCardDimensions;
|
|
73
|
+
fileState?: FileState;
|
|
74
|
+
};
|
|
75
|
+
export declare const getClipboardAttrs: ({ id, alt, collection, contextIdentifierProvider, originalDimensions, fileState, }: ClipboardAttrs) => {
|
|
75
76
|
[key: string]: string | number | undefined;
|
|
76
77
|
};
|
|
77
78
|
export declare const MediaCard: React.ComponentClass<MediaCardProps & import("@atlaskit/editor-common/utils").ImageLoaderProps, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "108.1.
|
|
3
|
+
"version": "108.1.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,27 +32,27 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^25.
|
|
35
|
+
"@atlaskit/adf-schema": "^25.7.0",
|
|
36
36
|
"@atlaskit/adf-utils": "^18.2.0",
|
|
37
37
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
38
38
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
39
39
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
40
40
|
"@atlaskit/button": "^16.7.0",
|
|
41
41
|
"@atlaskit/code": "^14.6.0",
|
|
42
|
-
"@atlaskit/editor-common": "^74.
|
|
42
|
+
"@atlaskit/editor-common": "^74.2.0",
|
|
43
43
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
44
44
|
"@atlaskit/editor-palette": "1.4.2",
|
|
45
45
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
46
46
|
"@atlaskit/emoji": "^67.4.0",
|
|
47
47
|
"@atlaskit/icon": "^21.12.0",
|
|
48
|
-
"@atlaskit/media-card": "^
|
|
48
|
+
"@atlaskit/media-card": "^76.0.0",
|
|
49
49
|
"@atlaskit/media-client": "^22.0.0",
|
|
50
|
-
"@atlaskit/media-common": "^
|
|
50
|
+
"@atlaskit/media-common": "^5.0.0",
|
|
51
51
|
"@atlaskit/media-filmstrip": "^47.0.0",
|
|
52
52
|
"@atlaskit/media-ui": "^23.0.0",
|
|
53
53
|
"@atlaskit/media-viewer": "^48.0.0",
|
|
54
54
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
55
|
-
"@atlaskit/smart-card": "^26.
|
|
55
|
+
"@atlaskit/smart-card": "^26.3.0",
|
|
56
56
|
"@atlaskit/status": "^1.3.0",
|
|
57
57
|
"@atlaskit/task-decision": "^17.6.0",
|
|
58
58
|
"@atlaskit/theme": "^12.5.0",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"@atlaskit/avatar": "^21.3.0",
|
|
81
81
|
"@atlaskit/css-reset": "^6.5.0",
|
|
82
82
|
"@atlaskit/docs": "*",
|
|
83
|
-
"@atlaskit/editor-core": "^
|
|
84
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
83
|
+
"@atlaskit/editor-core": "^184.0.0",
|
|
84
|
+
"@atlaskit/editor-test-helpers": "^18.4.0",
|
|
85
85
|
"@atlaskit/link-provider": "^1.6.0",
|
|
86
|
-
"@atlaskit/link-test-helpers": "^
|
|
86
|
+
"@atlaskit/link-test-helpers": "^4.0.0",
|
|
87
87
|
"@atlaskit/logo": "^13.14.0",
|
|
88
88
|
"@atlaskit/media-core": "^34.1.0",
|
|
89
89
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@atlaskit/mention": "^22.1.0",
|
|
92
92
|
"@atlaskit/navigation-next": "^9.0.0",
|
|
93
93
|
"@atlaskit/profilecard": "^19.3.0",
|
|
94
|
-
"@atlaskit/radio": "^5.
|
|
94
|
+
"@atlaskit/radio": "^5.6.0",
|
|
95
95
|
"@atlaskit/range": "^7.1.0",
|
|
96
96
|
"@atlaskit/ssr": "*",
|
|
97
97
|
"@atlaskit/util-data-test": "^17.8.0",
|
package/report.api.md
CHANGED
|
@@ -757,8 +757,8 @@ type VisitMediaLinkAEP = AEP<
|
|
|
757
757
|
|
|
758
758
|
```json
|
|
759
759
|
{
|
|
760
|
-
"@atlaskit/link-provider": "^1.6.
|
|
761
|
-
"@atlaskit/media-core": "^34.1.
|
|
760
|
+
"@atlaskit/link-provider": "^1.6.2",
|
|
761
|
+
"@atlaskit/media-core": "^34.1.2",
|
|
762
762
|
"react": "^16.8.0",
|
|
763
763
|
"react-dom": "^16.8.0"
|
|
764
764
|
}
|