@atlaskit/editor-common 77.3.1 → 77.4.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 +18 -0
- package/afm-cc/tsconfig.json +12 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/media-inline/inline-image-card.js +63 -0
- package/dist/cjs/media-inline/inline-image-wrapper.js +12 -1
- package/dist/cjs/media-inline/media-inline-image-card.js +57 -18
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/index.js +7 -0
- package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -0
- package/dist/cjs/ui-menu/index.js +6 -0
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/media-inline/inline-image-card.js +56 -0
- package/dist/es2019/media-inline/inline-image-wrapper.js +14 -2
- package/dist/es2019/media-inline/media-inline-image-card.js +49 -19
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/index.js +2 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +2 -1
- package/dist/es2019/ui-menu/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/media-inline/inline-image-card.js +56 -0
- package/dist/esm/media-inline/inline-image-wrapper.js +14 -2
- package/dist/esm/media-inline/media-inline-image-card.js +58 -19
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/index.js +2 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +2 -1
- package/dist/esm/ui-menu/index.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/media-inline/inline-image-card.d.ts +16 -0
- package/dist/types/media-inline/types.d.ts +4 -0
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/ui-menu/DropdownMenu/index.d.ts +4 -1
- package/dist/types/ui-menu/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
- package/dist/types-ts4.5/media-inline/inline-image-card.d.ts +16 -0
- package/dist/types-ts4.5/media-inline/types.d.ts +4 -0
- package/dist/types-ts4.5/ui/index.d.ts +1 -0
- package/dist/types-ts4.5/ui-menu/DropdownMenu/index.d.ts +4 -1
- package/dist/types-ts4.5/ui-menu/index.d.ts +1 -1
- package/package.json +11 -7
- package/tsconfig.json +67 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 77.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#71201](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71201) [`1b48cdd3c074`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1b48cdd3c074) - ED-21767 fixed dom structure for inline images.
|
|
8
|
+
- [#69911](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69911) [`af0eee5ebf98`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/af0eee5ebf98) - Added DropdownMenuItem export from ui-menu, added DropList export from ui
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 77.3.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572) [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) - Upgrading @atlaskit/editor-prosemirror dependency
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 77.3.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -81,9 +81,21 @@
|
|
|
81
81
|
{
|
|
82
82
|
"path": "../../../media/media-client/afm-cc/tsconfig.json"
|
|
83
83
|
},
|
|
84
|
+
{
|
|
85
|
+
"path": "../../../media/media-client-react/afm-cc/tsconfig.json"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"path": "../../../media/media-common/afm-cc/tsconfig.json"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"path": "../../../media/media-file-preview/afm-cc/tsconfig.json"
|
|
92
|
+
},
|
|
84
93
|
{
|
|
85
94
|
"path": "../../../media/media-picker/afm-cc/tsconfig.json"
|
|
86
95
|
},
|
|
96
|
+
{
|
|
97
|
+
"path": "../../../media/media-ui/afm-cc/tsconfig.json"
|
|
98
|
+
},
|
|
87
99
|
{
|
|
88
100
|
"path": "../../../elements/mention/afm-cc/tsconfig.json"
|
|
89
101
|
},
|
|
@@ -292,6 +292,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
|
|
|
292
292
|
ACTION_SUBJECT_ID["MEDIA"] = "media";
|
|
293
293
|
ACTION_SUBJECT_ID["MEDIA_GROUP"] = "mediaGroup";
|
|
294
294
|
ACTION_SUBJECT_ID["MEDIA_INLINE"] = "mediaInline";
|
|
295
|
+
ACTION_SUBJECT_ID["MEDIA_INLINE_IMAGE"] = "mediaInlineImage";
|
|
295
296
|
ACTION_SUBJECT_ID["MEDIA_LINK"] = "mediaLink";
|
|
296
297
|
ACTION_SUBJECT_ID["MEDIA_SINGLE"] = "mediaSingle";
|
|
297
298
|
ACTION_SUBJECT_ID["MENTION"] = "mention";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InlineImageCard = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _react2 = require("@emotion/react");
|
|
9
|
+
var _mediaCommon = require("@atlaskit/media-common");
|
|
10
|
+
var _mediaFilePreview = require("@atlaskit/media-file-preview");
|
|
11
|
+
var _mediaUi = require("@atlaskit/media-ui");
|
|
12
|
+
var _loadingView = require("./views/loading-view");
|
|
13
|
+
/** @jsx jsx */
|
|
14
|
+
|
|
15
|
+
var InlineImageCard = exports.InlineImageCard = function InlineImageCard(_ref) {
|
|
16
|
+
var dimensions = _ref.dimensions,
|
|
17
|
+
identifier = _ref.identifier,
|
|
18
|
+
renderError = _ref.renderError,
|
|
19
|
+
alt = _ref.alt,
|
|
20
|
+
isLazy = _ref.isLazy,
|
|
21
|
+
ssr = _ref.ssr,
|
|
22
|
+
crop = _ref.crop,
|
|
23
|
+
stretch = _ref.stretch;
|
|
24
|
+
// Generate unique traceId for file
|
|
25
|
+
var traceContext = (0, _react.useMemo)(function () {
|
|
26
|
+
return {
|
|
27
|
+
traceId: (0, _mediaCommon.getRandomHex)(8)
|
|
28
|
+
};
|
|
29
|
+
}, []);
|
|
30
|
+
|
|
31
|
+
// TODO do we need to handle nonCriticalError
|
|
32
|
+
var _useFilePreview = (0, _mediaFilePreview.useFilePreview)({
|
|
33
|
+
identifier: identifier,
|
|
34
|
+
ssr: ssr,
|
|
35
|
+
dimensions: dimensions,
|
|
36
|
+
traceContext: traceContext
|
|
37
|
+
}),
|
|
38
|
+
preview = _useFilePreview.preview,
|
|
39
|
+
previewError = _useFilePreview.error,
|
|
40
|
+
onImageError = _useFilePreview.onImageError,
|
|
41
|
+
_onImageLoad = _useFilePreview.onImageLoad;
|
|
42
|
+
if (previewError) {
|
|
43
|
+
return renderError({
|
|
44
|
+
error: previewError
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (!preview) {
|
|
48
|
+
return (0, _react2.jsx)(_loadingView.InlineImageCardLoadingView, null);
|
|
49
|
+
}
|
|
50
|
+
return (0, _react2.jsx)(_mediaUi.MediaImage, {
|
|
51
|
+
dataURI: preview.dataURI,
|
|
52
|
+
alt: alt,
|
|
53
|
+
previewOrientation: preview.orientation,
|
|
54
|
+
onImageLoad: function onImageLoad() {
|
|
55
|
+
_onImageLoad(preview);
|
|
56
|
+
},
|
|
57
|
+
onImageError: onImageError,
|
|
58
|
+
loading: isLazy ? 'lazy' : undefined,
|
|
59
|
+
forceSyncDisplay: !!ssr,
|
|
60
|
+
crop: crop,
|
|
61
|
+
stretch: stretch
|
|
62
|
+
});
|
|
63
|
+
};
|
|
@@ -12,6 +12,15 @@ var _editorPalette = require("@atlaskit/editor-palette");
|
|
|
12
12
|
var _styles = require("./styles");
|
|
13
13
|
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; }
|
|
14
14
|
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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
|
|
15
|
+
// The MediaImage component needs to obtain its parent's dimensions.
|
|
16
|
+
// To achieve this, we have added an additional wrapper that allows
|
|
17
|
+
// for better interaction with the parent element. This is necessary
|
|
18
|
+
// because the parent size changes its box-sizing with the node border.
|
|
19
|
+
var sizeWrapperStyle = (0, _react.css)({
|
|
20
|
+
display: 'inline-flex',
|
|
21
|
+
width: '100%',
|
|
22
|
+
height: '100%'
|
|
23
|
+
});
|
|
15
24
|
var InlineImageWrapper = exports.InlineImageWrapper = function InlineImageWrapper(_ref) {
|
|
16
25
|
var _ref2;
|
|
17
26
|
var children = _ref.children,
|
|
@@ -30,6 +39,8 @@ var InlineImageWrapper = exports.InlineImageWrapper = function InlineImageWrappe
|
|
|
30
39
|
className: _styles.INLINE_IMAGE_WRAPPER_CLASS_NAME,
|
|
31
40
|
css: [_styles.wrapperStyle, borderSize && borderColor && _styles.borderStyle, isSelected && _styles.selectedStyle],
|
|
32
41
|
"data-testid": "inline-image-wrapper"
|
|
33
|
-
}, htmlAttrs),
|
|
42
|
+
}, htmlAttrs), (0, _react.jsx)("span", {
|
|
43
|
+
css: sizeWrapperStyle
|
|
44
|
+
}, children))
|
|
34
45
|
);
|
|
35
46
|
};
|
|
@@ -10,9 +10,13 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
|
+
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
13
14
|
var _mediaCard = require("@atlaskit/media-card");
|
|
15
|
+
var _mediaClient = require("@atlaskit/media-client");
|
|
16
|
+
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
14
17
|
var _mediaInlineCard = require("../messages/media-inline-card");
|
|
15
18
|
var _constants = require("./constants");
|
|
19
|
+
var _inlineImageCard = require("./inline-image-card");
|
|
16
20
|
var _inlineImageWrapper = require("./inline-image-wrapper");
|
|
17
21
|
var _errorView = require("./views/error-view");
|
|
18
22
|
var _loadingView = require("./views/loading-view");
|
|
@@ -38,10 +42,34 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
38
42
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
39
43
|
subscribeError = _useState4[0],
|
|
40
44
|
setSubscribeError = _useState4[1];
|
|
45
|
+
var _useState5 = (0, _react.useState)(false),
|
|
46
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
47
|
+
isFailedEventSent = _useState6[0],
|
|
48
|
+
setIsFailedEventSent = _useState6[1];
|
|
49
|
+
var _useState7 = (0, _react.useState)(false),
|
|
50
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
51
|
+
isSucceededEventSent = _useState8[0],
|
|
52
|
+
setIsSucceededEventSent = _useState8[1];
|
|
41
53
|
var _ref2 = intl || (0, _reactIntlNext.createIntl)({
|
|
42
54
|
locale: 'en'
|
|
43
55
|
}),
|
|
44
56
|
formatMessage = _ref2.formatMessage;
|
|
57
|
+
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
58
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
59
|
+
var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
|
|
60
|
+
var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new _mediaCard.MediaCardError('missing-error-data');
|
|
61
|
+
var failReason = arguments.length > 1 ? arguments[1] : undefined;
|
|
62
|
+
if (!isFailedEventSent && fileState) {
|
|
63
|
+
setIsFailedEventSent(true);
|
|
64
|
+
(0, _mediaCard.fireFailedMediaInlineEvent)(fileState, error, failReason, createAnalyticsEvent);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var fireSucceededOperationalEvent = function fireSucceededOperationalEvent() {
|
|
68
|
+
if (!isSucceededEventSent && fileState) {
|
|
69
|
+
setIsSucceededEventSent(true);
|
|
70
|
+
(0, _mediaCard.fireSucceededMediaInlineEvent)(fileState, createAnalyticsEvent);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
45
73
|
(0, _react.useEffect)(function () {
|
|
46
74
|
if (mediaClient) {
|
|
47
75
|
var subscription = mediaClient.file.getFileState(identifier.id, {
|
|
@@ -64,41 +92,52 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
64
92
|
if (subscribeError) {
|
|
65
93
|
var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
|
|
66
94
|
var errorMessage = isUploading ? _mediaInlineCard.messages.failedToUpload : _mediaInlineCard.messages.unableToLoadContent;
|
|
95
|
+
var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
|
|
96
|
+
fireFailedOperationalEvent(new _mediaCard.MediaCardError(errorReason, subscribeError));
|
|
67
97
|
return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
|
|
68
98
|
message: formatMessage(errorMessage)
|
|
69
99
|
});
|
|
70
100
|
}
|
|
71
|
-
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === '
|
|
101
|
+
if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
|
|
102
|
+
return (0, _react2.jsx)(_loadingView.InlineImageCardLoadingView, null);
|
|
103
|
+
}
|
|
104
|
+
if (fileState.status === 'error') {
|
|
105
|
+
var error = new _mediaCard.MediaCardError('error-file-state', new Error(fileState.message));
|
|
106
|
+
!isFailedEventSent && fireFailedOperationalEvent(error);
|
|
72
107
|
return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
|
|
73
108
|
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
74
109
|
});
|
|
75
|
-
}
|
|
76
|
-
|
|
110
|
+
} else if (fileState.status === 'failed-processing') {
|
|
111
|
+
!isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
|
|
77
112
|
return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
|
|
78
113
|
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
79
114
|
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
115
|
+
} else if (!fileState.name) {
|
|
116
|
+
var _error = new _mediaCard.MediaCardError('metadata-fetch', new _mediaClient.FileFetcherError('emptyFileName', fileState.id));
|
|
117
|
+
!isFailedEventSent && fireFailedOperationalEvent(_error);
|
|
83
118
|
return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
|
|
84
119
|
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
85
120
|
});
|
|
86
121
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return (0, _react2.jsx)(_loadingView.InlineImageCardLoadingView, null);
|
|
122
|
+
if (fileState.status === 'processed') {
|
|
123
|
+
fireSucceededOperationalEvent();
|
|
90
124
|
}
|
|
91
|
-
return (0, _react2.jsx)(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
identifier: identifier,
|
|
125
|
+
return (0, _react2.jsx)(_mediaClientReact.MediaClientContext.Provider, {
|
|
126
|
+
value: mediaClient
|
|
127
|
+
}, (0, _react2.jsx)(_inlineImageCard.InlineImageCard, {
|
|
95
128
|
dimensions: dimensions,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
129
|
+
identifier: identifier,
|
|
130
|
+
renderError: function renderError() {
|
|
131
|
+
return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
|
|
132
|
+
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
133
|
+
});
|
|
134
|
+
},
|
|
99
135
|
alt: alt,
|
|
100
|
-
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
101
|
-
|
|
136
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
137
|
+
isLazy: isLazy,
|
|
138
|
+
crop: true,
|
|
139
|
+
stretch: false
|
|
140
|
+
}));
|
|
102
141
|
};
|
|
103
142
|
var aspectRatio = (0, _react.useMemo)(function () {
|
|
104
143
|
return width && height ? width / height : undefined;
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
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; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "77.
|
|
19
|
+
var packageVersion = "77.4.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
22
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
23
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "77.
|
|
25
|
+
var packageVersion = "77.4.0";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -47,6 +47,12 @@ Object.defineProperty(exports, "ContextPanelWidthProvider", {
|
|
|
47
47
|
return _context.ContextPanelWidthProvider;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
+
Object.defineProperty(exports, "DropList", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _DropList.default;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
50
56
|
Object.defineProperty(exports, "EDIT_AREA_ID", {
|
|
51
57
|
enumerable: true,
|
|
52
58
|
get: function get() {
|
|
@@ -408,5 +414,6 @@ var _styles = require("./PanelTextInput/styles");
|
|
|
408
414
|
var _PanelTextInput = _interopRequireDefault(require("./PanelTextInput"));
|
|
409
415
|
var _announcer = _interopRequireDefault(require("./Announcer/announcer"));
|
|
410
416
|
var _Toolbar = require("./Toolbar");
|
|
417
|
+
var _DropList = _interopRequireDefault(require("./DropList"));
|
|
411
418
|
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); }
|
|
412
419
|
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; }
|
|
@@ -5,6 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
8
9
|
exports.default = exports.DropdownMenuWithKeyboardNavigation = void 0;
|
|
9
10
|
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
10
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -334,6 +335,7 @@ function DropdownMenuItem(_ref) {
|
|
|
334
335
|
var DropdownMenuWithKeyboardNavigation = exports.DropdownMenuWithKeyboardNavigation = /*#__PURE__*/_react.default.memo(function (_ref2) {
|
|
335
336
|
var props = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_ref2), _ref2));
|
|
336
337
|
var keyDownHandlerContext = (0, _react.useContext)(_ToolbarArrowKeyNavigationProvider.KeyDownHandlerContext);
|
|
338
|
+
|
|
337
339
|
// This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
338
340
|
// Default context has the void callbacks for above key events
|
|
339
341
|
return (0, _react2.jsx)(DropdownMenuWrapper, (0, _extends2.default)({
|
|
@@ -47,6 +47,12 @@ Object.defineProperty(exports, "DropdownMenu", {
|
|
|
47
47
|
return _DropdownMenu.default;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
+
Object.defineProperty(exports, "DropdownMenuItem", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _DropdownMenu.DropdownMenuItem;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
50
56
|
Object.defineProperty(exports, "DropdownMenuWithKeyboardNavigation", {
|
|
51
57
|
enumerable: true,
|
|
52
58
|
get: function get() {
|
|
@@ -286,6 +286,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
286
286
|
ACTION_SUBJECT_ID["MEDIA"] = "media";
|
|
287
287
|
ACTION_SUBJECT_ID["MEDIA_GROUP"] = "mediaGroup";
|
|
288
288
|
ACTION_SUBJECT_ID["MEDIA_INLINE"] = "mediaInline";
|
|
289
|
+
ACTION_SUBJECT_ID["MEDIA_INLINE_IMAGE"] = "mediaInlineImage";
|
|
289
290
|
ACTION_SUBJECT_ID["MEDIA_LINK"] = "mediaLink";
|
|
290
291
|
ACTION_SUBJECT_ID["MEDIA_SINGLE"] = "mediaSingle";
|
|
291
292
|
ACTION_SUBJECT_ID["MENTION"] = "mention";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { getRandomHex } from '@atlaskit/media-common';
|
|
5
|
+
import { useFilePreview } from '@atlaskit/media-file-preview';
|
|
6
|
+
import { MediaImage } from '@atlaskit/media-ui';
|
|
7
|
+
import { InlineImageCardLoadingView } from './views/loading-view';
|
|
8
|
+
export const InlineImageCard = ({
|
|
9
|
+
dimensions,
|
|
10
|
+
identifier,
|
|
11
|
+
renderError,
|
|
12
|
+
alt,
|
|
13
|
+
isLazy,
|
|
14
|
+
ssr,
|
|
15
|
+
crop,
|
|
16
|
+
stretch
|
|
17
|
+
}) => {
|
|
18
|
+
// Generate unique traceId for file
|
|
19
|
+
const traceContext = useMemo(() => ({
|
|
20
|
+
traceId: getRandomHex(8)
|
|
21
|
+
}), []);
|
|
22
|
+
|
|
23
|
+
// TODO do we need to handle nonCriticalError
|
|
24
|
+
const {
|
|
25
|
+
preview,
|
|
26
|
+
error: previewError,
|
|
27
|
+
onImageError,
|
|
28
|
+
onImageLoad
|
|
29
|
+
} = useFilePreview({
|
|
30
|
+
identifier,
|
|
31
|
+
ssr,
|
|
32
|
+
dimensions,
|
|
33
|
+
traceContext
|
|
34
|
+
});
|
|
35
|
+
if (previewError) {
|
|
36
|
+
return renderError({
|
|
37
|
+
error: previewError
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (!preview) {
|
|
41
|
+
return jsx(InlineImageCardLoadingView, null);
|
|
42
|
+
}
|
|
43
|
+
return jsx(MediaImage, {
|
|
44
|
+
dataURI: preview.dataURI,
|
|
45
|
+
alt: alt,
|
|
46
|
+
previewOrientation: preview.orientation,
|
|
47
|
+
onImageLoad: () => {
|
|
48
|
+
onImageLoad(preview);
|
|
49
|
+
},
|
|
50
|
+
onImageError: onImageError,
|
|
51
|
+
loading: isLazy ? 'lazy' : undefined,
|
|
52
|
+
forceSyncDisplay: !!ssr,
|
|
53
|
+
crop: crop,
|
|
54
|
+
stretch: stretch
|
|
55
|
+
});
|
|
56
|
+
};
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
6
6
|
import { borderStyle, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, INLINE_IMAGE_WRAPPER_CLASS_NAME, selectedStyle, wrapperStyle } from './styles';
|
|
7
|
+
|
|
8
|
+
// The MediaImage component needs to obtain its parent's dimensions.
|
|
9
|
+
// To achieve this, we have added an additional wrapper that allows
|
|
10
|
+
// for better interaction with the parent element. This is necessary
|
|
11
|
+
// because the parent size changes its box-sizing with the node border.
|
|
12
|
+
const sizeWrapperStyle = css({
|
|
13
|
+
display: 'inline-flex',
|
|
14
|
+
width: '100%',
|
|
15
|
+
height: '100%'
|
|
16
|
+
});
|
|
7
17
|
export const InlineImageWrapper = ({
|
|
8
18
|
children,
|
|
9
19
|
isSelected,
|
|
@@ -29,6 +39,8 @@ export const InlineImageWrapper = ({
|
|
|
29
39
|
className: INLINE_IMAGE_WRAPPER_CLASS_NAME,
|
|
30
40
|
css: [wrapperStyle, borderSize && borderColor && borderStyle, isSelected && selectedStyle],
|
|
31
41
|
"data-testid": "inline-image-wrapper"
|
|
32
|
-
}, htmlAttrs),
|
|
42
|
+
}, htmlAttrs), jsx("span", {
|
|
43
|
+
css: sizeWrapperStyle
|
|
44
|
+
}, children))
|
|
33
45
|
);
|
|
34
46
|
};
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
import { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import { createIntl, injectIntl } from 'react-intl-next';
|
|
6
|
-
import {
|
|
6
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
|
+
import { fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, MediaCardError } from '@atlaskit/media-card';
|
|
8
|
+
import { FileFetcherError } from '@atlaskit/media-client';
|
|
9
|
+
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
7
10
|
import { messages } from '../messages/media-inline-card';
|
|
8
11
|
import { referenceHeights } from './constants';
|
|
12
|
+
import { InlineImageCard } from './inline-image-card';
|
|
9
13
|
import { InlineImageWrapper } from './inline-image-wrapper';
|
|
10
14
|
import { InlineImageCardErrorView } from './views/error-view';
|
|
11
15
|
import { InlineImageCardLoadingView } from './views/loading-view';
|
|
@@ -24,11 +28,28 @@ export const MediaInlineImageCardInternal = ({
|
|
|
24
28
|
}) => {
|
|
25
29
|
const [fileState, setFileState] = useState();
|
|
26
30
|
const [subscribeError, setSubscribeError] = useState();
|
|
31
|
+
const [isFailedEventSent, setIsFailedEventSent] = useState(false);
|
|
32
|
+
const [isSucceededEventSent, setIsSucceededEventSent] = useState(false);
|
|
27
33
|
const {
|
|
28
34
|
formatMessage
|
|
29
35
|
} = intl || createIntl({
|
|
30
36
|
locale: 'en'
|
|
31
37
|
});
|
|
38
|
+
const {
|
|
39
|
+
createAnalyticsEvent
|
|
40
|
+
} = useAnalyticsEvents();
|
|
41
|
+
const fireFailedOperationalEvent = (error = new MediaCardError('missing-error-data'), failReason) => {
|
|
42
|
+
if (!isFailedEventSent && fileState) {
|
|
43
|
+
setIsFailedEventSent(true);
|
|
44
|
+
fireFailedMediaInlineEvent(fileState, error, failReason, createAnalyticsEvent);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const fireSucceededOperationalEvent = () => {
|
|
48
|
+
if (!isSucceededEventSent && fileState) {
|
|
49
|
+
setIsSucceededEventSent(true);
|
|
50
|
+
fireSucceededMediaInlineEvent(fileState, createAnalyticsEvent);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
32
53
|
useEffect(() => {
|
|
33
54
|
if (mediaClient) {
|
|
34
55
|
const subscription = mediaClient.file.getFileState(identifier.id, {
|
|
@@ -51,41 +72,50 @@ export const MediaInlineImageCardInternal = ({
|
|
|
51
72
|
if (subscribeError) {
|
|
52
73
|
const isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
|
|
53
74
|
const errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
|
|
75
|
+
const errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
|
|
76
|
+
fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
|
|
54
77
|
return jsx(InlineImageCardErrorView, {
|
|
55
78
|
message: formatMessage(errorMessage)
|
|
56
79
|
});
|
|
57
80
|
}
|
|
58
|
-
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === '
|
|
81
|
+
if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
|
|
82
|
+
return jsx(InlineImageCardLoadingView, null);
|
|
83
|
+
}
|
|
84
|
+
if (fileState.status === 'error') {
|
|
85
|
+
const error = new MediaCardError('error-file-state', new Error(fileState.message));
|
|
86
|
+
!isFailedEventSent && fireFailedOperationalEvent(error);
|
|
59
87
|
return jsx(InlineImageCardErrorView, {
|
|
60
88
|
message: formatMessage(messages.unableToLoadContent)
|
|
61
89
|
});
|
|
62
|
-
}
|
|
63
|
-
|
|
90
|
+
} else if (fileState.status === 'failed-processing') {
|
|
91
|
+
!isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
|
|
64
92
|
return jsx(InlineImageCardErrorView, {
|
|
65
93
|
message: formatMessage(messages.unableToLoadContent)
|
|
66
94
|
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
95
|
+
} else if (!fileState.name) {
|
|
96
|
+
const error = new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', fileState.id));
|
|
97
|
+
!isFailedEventSent && fireFailedOperationalEvent(error);
|
|
70
98
|
return jsx(InlineImageCardErrorView, {
|
|
71
99
|
message: formatMessage(messages.unableToLoadContent)
|
|
72
100
|
});
|
|
73
101
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return jsx(InlineImageCardLoadingView, null);
|
|
102
|
+
if (fileState.status === 'processed') {
|
|
103
|
+
fireSucceededOperationalEvent();
|
|
77
104
|
}
|
|
78
|
-
return jsx(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
identifier: identifier,
|
|
105
|
+
return jsx(MediaClientContext.Provider, {
|
|
106
|
+
value: mediaClient
|
|
107
|
+
}, jsx(InlineImageCard, {
|
|
82
108
|
dimensions: dimensions,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
109
|
+
identifier: identifier,
|
|
110
|
+
renderError: () => jsx(InlineImageCardErrorView, {
|
|
111
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
112
|
+
}),
|
|
86
113
|
alt: alt,
|
|
87
|
-
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
88
|
-
|
|
114
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
115
|
+
isLazy: isLazy,
|
|
116
|
+
crop: true,
|
|
117
|
+
stretch: false
|
|
118
|
+
}));
|
|
89
119
|
};
|
|
90
120
|
const aspectRatio = useMemo(() => width && height ? width / height : undefined, [width, height]);
|
|
91
121
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "77.
|
|
3
|
+
const packageVersion = "77.4.0";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "77.
|
|
10
|
+
const packageVersion = "77.4.0";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -28,4 +28,5 @@ export { wrapperStyle } from './ResizerLegacy/styled';
|
|
|
28
28
|
export { panelTextInput } from './PanelTextInput/styles';
|
|
29
29
|
export { default as PanelTextInput } from './PanelTextInput';
|
|
30
30
|
export { default as Announcer } from './Announcer/announcer';
|
|
31
|
-
export { EDIT_AREA_ID } from './Toolbar';
|
|
31
|
+
export { EDIT_AREA_ID } from './Toolbar';
|
|
32
|
+
export { default as DropList } from './DropList';
|
|
@@ -264,7 +264,7 @@ const DropdownMenuItemCustomComponent = /*#__PURE__*/React.forwardRef((props, re
|
|
|
264
264
|
}
|
|
265
265
|
}), children);
|
|
266
266
|
});
|
|
267
|
-
function DropdownMenuItem({
|
|
267
|
+
export function DropdownMenuItem({
|
|
268
268
|
item,
|
|
269
269
|
onItemActivated,
|
|
270
270
|
shouldUseDefaultRole,
|
|
@@ -328,6 +328,7 @@ export const DropdownMenuWithKeyboardNavigation = /*#__PURE__*/React.memo(({
|
|
|
328
328
|
...props
|
|
329
329
|
}) => {
|
|
330
330
|
const keyDownHandlerContext = useContext(KeyDownHandlerContext);
|
|
331
|
+
|
|
331
332
|
// This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
332
333
|
// Default context has the void callbacks for above key events
|
|
333
334
|
return jsx(DropdownMenuWrapper, _extends({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as DropdownMenu, DropdownMenuWithKeyboardNavigation } from './DropdownMenu';
|
|
1
|
+
export { default as DropdownMenu, DropdownMenuItem, DropdownMenuWithKeyboardNavigation } from './DropdownMenu';
|
|
2
2
|
export { default as ToolbarButton, TOOLBAR_BUTTON } from './ToolbarButton';
|
|
3
3
|
export { ArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider';
|
|
4
4
|
export { ToolbarArrowKeyNavigationProvider, KeyDownHandlerContext } from './ToolbarArrowKeyNavigationProvider';
|
|
@@ -286,6 +286,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
286
286
|
ACTION_SUBJECT_ID["MEDIA"] = "media";
|
|
287
287
|
ACTION_SUBJECT_ID["MEDIA_GROUP"] = "mediaGroup";
|
|
288
288
|
ACTION_SUBJECT_ID["MEDIA_INLINE"] = "mediaInline";
|
|
289
|
+
ACTION_SUBJECT_ID["MEDIA_INLINE_IMAGE"] = "mediaInlineImage";
|
|
289
290
|
ACTION_SUBJECT_ID["MEDIA_LINK"] = "mediaLink";
|
|
290
291
|
ACTION_SUBJECT_ID["MEDIA_SINGLE"] = "mediaSingle";
|
|
291
292
|
ACTION_SUBJECT_ID["MENTION"] = "mention";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { getRandomHex } from '@atlaskit/media-common';
|
|
5
|
+
import { useFilePreview } from '@atlaskit/media-file-preview';
|
|
6
|
+
import { MediaImage } from '@atlaskit/media-ui';
|
|
7
|
+
import { InlineImageCardLoadingView } from './views/loading-view';
|
|
8
|
+
export var InlineImageCard = function InlineImageCard(_ref) {
|
|
9
|
+
var dimensions = _ref.dimensions,
|
|
10
|
+
identifier = _ref.identifier,
|
|
11
|
+
renderError = _ref.renderError,
|
|
12
|
+
alt = _ref.alt,
|
|
13
|
+
isLazy = _ref.isLazy,
|
|
14
|
+
ssr = _ref.ssr,
|
|
15
|
+
crop = _ref.crop,
|
|
16
|
+
stretch = _ref.stretch;
|
|
17
|
+
// Generate unique traceId for file
|
|
18
|
+
var traceContext = useMemo(function () {
|
|
19
|
+
return {
|
|
20
|
+
traceId: getRandomHex(8)
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
// TODO do we need to handle nonCriticalError
|
|
25
|
+
var _useFilePreview = useFilePreview({
|
|
26
|
+
identifier: identifier,
|
|
27
|
+
ssr: ssr,
|
|
28
|
+
dimensions: dimensions,
|
|
29
|
+
traceContext: traceContext
|
|
30
|
+
}),
|
|
31
|
+
preview = _useFilePreview.preview,
|
|
32
|
+
previewError = _useFilePreview.error,
|
|
33
|
+
onImageError = _useFilePreview.onImageError,
|
|
34
|
+
_onImageLoad = _useFilePreview.onImageLoad;
|
|
35
|
+
if (previewError) {
|
|
36
|
+
return renderError({
|
|
37
|
+
error: previewError
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (!preview) {
|
|
41
|
+
return jsx(InlineImageCardLoadingView, null);
|
|
42
|
+
}
|
|
43
|
+
return jsx(MediaImage, {
|
|
44
|
+
dataURI: preview.dataURI,
|
|
45
|
+
alt: alt,
|
|
46
|
+
previewOrientation: preview.orientation,
|
|
47
|
+
onImageLoad: function onImageLoad() {
|
|
48
|
+
_onImageLoad(preview);
|
|
49
|
+
},
|
|
50
|
+
onImageError: onImageError,
|
|
51
|
+
loading: isLazy ? 'lazy' : undefined,
|
|
52
|
+
forceSyncDisplay: !!ssr,
|
|
53
|
+
crop: crop,
|
|
54
|
+
stretch: stretch
|
|
55
|
+
});
|
|
56
|
+
};
|
|
@@ -4,9 +4,19 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
4
4
|
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; }
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
9
9
|
import { borderStyle, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, INLINE_IMAGE_WRAPPER_CLASS_NAME, selectedStyle, wrapperStyle } from './styles';
|
|
10
|
+
|
|
11
|
+
// The MediaImage component needs to obtain its parent's dimensions.
|
|
12
|
+
// To achieve this, we have added an additional wrapper that allows
|
|
13
|
+
// for better interaction with the parent element. This is necessary
|
|
14
|
+
// because the parent size changes its box-sizing with the node border.
|
|
15
|
+
var sizeWrapperStyle = css({
|
|
16
|
+
display: 'inline-flex',
|
|
17
|
+
width: '100%',
|
|
18
|
+
height: '100%'
|
|
19
|
+
});
|
|
10
20
|
export var InlineImageWrapper = function InlineImageWrapper(_ref) {
|
|
11
21
|
var _ref2;
|
|
12
22
|
var children = _ref.children,
|
|
@@ -25,6 +35,8 @@ export var InlineImageWrapper = function InlineImageWrapper(_ref) {
|
|
|
25
35
|
className: INLINE_IMAGE_WRAPPER_CLASS_NAME,
|
|
26
36
|
css: [wrapperStyle, borderSize && borderColor && borderStyle, isSelected && selectedStyle],
|
|
27
37
|
"data-testid": "inline-image-wrapper"
|
|
28
|
-
}, htmlAttrs),
|
|
38
|
+
}, htmlAttrs), jsx("span", {
|
|
39
|
+
css: sizeWrapperStyle
|
|
40
|
+
}, children))
|
|
29
41
|
);
|
|
30
42
|
};
|
|
@@ -7,9 +7,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { useEffect, useMemo, useState } from 'react';
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import { createIntl, injectIntl } from 'react-intl-next';
|
|
10
|
-
import {
|
|
10
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
11
|
+
import { fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, MediaCardError } from '@atlaskit/media-card';
|
|
12
|
+
import { FileFetcherError } from '@atlaskit/media-client';
|
|
13
|
+
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
11
14
|
import { messages } from '../messages/media-inline-card';
|
|
12
15
|
import { referenceHeights } from './constants';
|
|
16
|
+
import { InlineImageCard } from './inline-image-card';
|
|
13
17
|
import { InlineImageWrapper } from './inline-image-wrapper';
|
|
14
18
|
import { InlineImageCardErrorView } from './views/error-view';
|
|
15
19
|
import { InlineImageCardLoadingView } from './views/loading-view';
|
|
@@ -33,10 +37,34 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
33
37
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
34
38
|
subscribeError = _useState4[0],
|
|
35
39
|
setSubscribeError = _useState4[1];
|
|
40
|
+
var _useState5 = useState(false),
|
|
41
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
|
+
isFailedEventSent = _useState6[0],
|
|
43
|
+
setIsFailedEventSent = _useState6[1];
|
|
44
|
+
var _useState7 = useState(false),
|
|
45
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
46
|
+
isSucceededEventSent = _useState8[0],
|
|
47
|
+
setIsSucceededEventSent = _useState8[1];
|
|
36
48
|
var _ref2 = intl || createIntl({
|
|
37
49
|
locale: 'en'
|
|
38
50
|
}),
|
|
39
51
|
formatMessage = _ref2.formatMessage;
|
|
52
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
53
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
54
|
+
var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
|
|
55
|
+
var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new MediaCardError('missing-error-data');
|
|
56
|
+
var failReason = arguments.length > 1 ? arguments[1] : undefined;
|
|
57
|
+
if (!isFailedEventSent && fileState) {
|
|
58
|
+
setIsFailedEventSent(true);
|
|
59
|
+
fireFailedMediaInlineEvent(fileState, error, failReason, createAnalyticsEvent);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var fireSucceededOperationalEvent = function fireSucceededOperationalEvent() {
|
|
63
|
+
if (!isSucceededEventSent && fileState) {
|
|
64
|
+
setIsSucceededEventSent(true);
|
|
65
|
+
fireSucceededMediaInlineEvent(fileState, createAnalyticsEvent);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
40
68
|
useEffect(function () {
|
|
41
69
|
if (mediaClient) {
|
|
42
70
|
var subscription = mediaClient.file.getFileState(identifier.id, {
|
|
@@ -59,41 +87,52 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
59
87
|
if (subscribeError) {
|
|
60
88
|
var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
|
|
61
89
|
var errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
|
|
90
|
+
var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
|
|
91
|
+
fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
|
|
62
92
|
return jsx(InlineImageCardErrorView, {
|
|
63
93
|
message: formatMessage(errorMessage)
|
|
64
94
|
});
|
|
65
95
|
}
|
|
66
|
-
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === '
|
|
96
|
+
if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
|
|
97
|
+
return jsx(InlineImageCardLoadingView, null);
|
|
98
|
+
}
|
|
99
|
+
if (fileState.status === 'error') {
|
|
100
|
+
var error = new MediaCardError('error-file-state', new Error(fileState.message));
|
|
101
|
+
!isFailedEventSent && fireFailedOperationalEvent(error);
|
|
67
102
|
return jsx(InlineImageCardErrorView, {
|
|
68
103
|
message: formatMessage(messages.unableToLoadContent)
|
|
69
104
|
});
|
|
70
|
-
}
|
|
71
|
-
|
|
105
|
+
} else if (fileState.status === 'failed-processing') {
|
|
106
|
+
!isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
|
|
72
107
|
return jsx(InlineImageCardErrorView, {
|
|
73
108
|
message: formatMessage(messages.unableToLoadContent)
|
|
74
109
|
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
110
|
+
} else if (!fileState.name) {
|
|
111
|
+
var _error = new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', fileState.id));
|
|
112
|
+
!isFailedEventSent && fireFailedOperationalEvent(_error);
|
|
78
113
|
return jsx(InlineImageCardErrorView, {
|
|
79
114
|
message: formatMessage(messages.unableToLoadContent)
|
|
80
115
|
});
|
|
81
116
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return jsx(InlineImageCardLoadingView, null);
|
|
117
|
+
if (fileState.status === 'processed') {
|
|
118
|
+
fireSucceededOperationalEvent();
|
|
85
119
|
}
|
|
86
|
-
return jsx(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
identifier: identifier,
|
|
120
|
+
return jsx(MediaClientContext.Provider, {
|
|
121
|
+
value: mediaClient
|
|
122
|
+
}, jsx(InlineImageCard, {
|
|
90
123
|
dimensions: dimensions,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
124
|
+
identifier: identifier,
|
|
125
|
+
renderError: function renderError() {
|
|
126
|
+
return jsx(InlineImageCardErrorView, {
|
|
127
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
128
|
+
});
|
|
129
|
+
},
|
|
94
130
|
alt: alt,
|
|
95
|
-
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
96
|
-
|
|
131
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
132
|
+
isLazy: isLazy,
|
|
133
|
+
crop: true,
|
|
134
|
+
stretch: false
|
|
135
|
+
}));
|
|
97
136
|
};
|
|
98
137
|
var aspectRatio = useMemo(function () {
|
|
99
138
|
return width && height ? width / height : undefined;
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
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
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "77.
|
|
9
|
+
var packageVersion = "77.4.0";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
17
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
18
|
import Layer from '../Layer';
|
|
19
19
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "77.
|
|
20
|
+
var packageVersion = "77.4.0";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -28,4 +28,5 @@ export { wrapperStyle } from './ResizerLegacy/styled';
|
|
|
28
28
|
export { panelTextInput } from './PanelTextInput/styles';
|
|
29
29
|
export { default as PanelTextInput } from './PanelTextInput';
|
|
30
30
|
export { default as Announcer } from './Announcer/announcer';
|
|
31
|
-
export { EDIT_AREA_ID } from './Toolbar';
|
|
31
|
+
export { EDIT_AREA_ID } from './Toolbar';
|
|
32
|
+
export { default as DropList } from './DropList';
|
|
@@ -253,7 +253,7 @@ var DropdownMenuItemCustomComponent = /*#__PURE__*/React.forwardRef(function (pr
|
|
|
253
253
|
}
|
|
254
254
|
}), children);
|
|
255
255
|
});
|
|
256
|
-
function DropdownMenuItem(_ref) {
|
|
256
|
+
export function DropdownMenuItem(_ref) {
|
|
257
257
|
var _item$key3;
|
|
258
258
|
var item = _ref.item,
|
|
259
259
|
onItemActivated = _ref.onItemActivated,
|
|
@@ -326,6 +326,7 @@ function DropdownMenuItem(_ref) {
|
|
|
326
326
|
export var DropdownMenuWithKeyboardNavigation = /*#__PURE__*/React.memo(function (_ref2) {
|
|
327
327
|
var props = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
328
328
|
var keyDownHandlerContext = useContext(KeyDownHandlerContext);
|
|
329
|
+
|
|
329
330
|
// This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
330
331
|
// Default context has the void callbacks for above key events
|
|
331
332
|
return jsx(DropdownMenuWrapper, _extends({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as DropdownMenu, DropdownMenuWithKeyboardNavigation } from './DropdownMenu';
|
|
1
|
+
export { default as DropdownMenu, DropdownMenuItem, DropdownMenuWithKeyboardNavigation } from './DropdownMenu';
|
|
2
2
|
export { default as ToolbarButton, TOOLBAR_BUTTON } from './ToolbarButton';
|
|
3
3
|
export { ArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider';
|
|
4
4
|
export { ToolbarArrowKeyNavigationProvider, KeyDownHandlerContext } from './ToolbarArrowKeyNavigationProvider';
|
|
@@ -289,6 +289,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
289
289
|
MEDIA = "media",
|
|
290
290
|
MEDIA_GROUP = "mediaGroup",
|
|
291
291
|
MEDIA_INLINE = "mediaInline",
|
|
292
|
+
MEDIA_INLINE_IMAGE = "mediaInlineImage",
|
|
292
293
|
MEDIA_LINK = "mediaLink",
|
|
293
294
|
MEDIA_SINGLE = "mediaSingle",
|
|
294
295
|
MENTION = "mention",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
3
|
+
import type { SSR } from '@atlaskit/media-common';
|
|
4
|
+
import type { Dimensions } from './types';
|
|
5
|
+
export declare const InlineImageCard: ({ dimensions, identifier, renderError, alt, isLazy, ssr, crop, stretch, }: {
|
|
6
|
+
identifier: FileIdentifier;
|
|
7
|
+
renderError: (props: {
|
|
8
|
+
error: Error;
|
|
9
|
+
}) => JSX.Element | null;
|
|
10
|
+
dimensions?: Dimensions | undefined;
|
|
11
|
+
isLazy?: boolean | undefined;
|
|
12
|
+
alt?: string | undefined;
|
|
13
|
+
ssr?: SSR | undefined;
|
|
14
|
+
crop?: boolean | undefined;
|
|
15
|
+
stretch?: boolean | undefined;
|
|
16
|
+
}) => JSX.Element | null;
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -39,5 +39,6 @@ export { panelTextInput } from './PanelTextInput/styles';
|
|
|
39
39
|
export { default as PanelTextInput } from './PanelTextInput';
|
|
40
40
|
export { default as Announcer } from './Announcer/announcer';
|
|
41
41
|
export { EDIT_AREA_ID } from './Toolbar';
|
|
42
|
+
export { default as DropList } from './DropList';
|
|
42
43
|
export type { UseStickyToolbarType } from './Toolbar';
|
|
43
44
|
export type { OpenChangedEvent } from './DropList';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { Props, State } from './types';
|
|
3
|
+
import type { MenuItem, Props, State } from './types';
|
|
4
4
|
export type { MenuItem } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
@@ -19,4 +19,7 @@ export default class DropdownMenuWrapper extends PureComponent<Props, State> {
|
|
|
19
19
|
render(): jsx.JSX.Element;
|
|
20
20
|
componentDidUpdate(previousProps: Props): void;
|
|
21
21
|
}
|
|
22
|
+
export declare function DropdownMenuItem({ item, onItemActivated, shouldUseDefaultRole, onMouseEnter, onMouseLeave, }: {
|
|
23
|
+
item: MenuItem;
|
|
24
|
+
} & Pick<Props, 'onItemActivated' | 'shouldUseDefaultRole' | 'onMouseEnter' | 'onMouseLeave'>): jsx.JSX.Element;
|
|
22
25
|
export declare const DropdownMenuWithKeyboardNavigation: React.FC<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as DropdownMenu, DropdownMenuWithKeyboardNavigation, } from './DropdownMenu';
|
|
1
|
+
export { default as DropdownMenu, DropdownMenuItem, DropdownMenuWithKeyboardNavigation, } from './DropdownMenu';
|
|
2
2
|
export type { MenuItem } from './DropdownMenu';
|
|
3
3
|
export { default as ToolbarButton, TOOLBAR_BUTTON } from './ToolbarButton';
|
|
4
4
|
export type { ToolbarButtonRef } from './ToolbarButton';
|
|
@@ -289,6 +289,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
289
289
|
MEDIA = "media",
|
|
290
290
|
MEDIA_GROUP = "mediaGroup",
|
|
291
291
|
MEDIA_INLINE = "mediaInline",
|
|
292
|
+
MEDIA_INLINE_IMAGE = "mediaInlineImage",
|
|
292
293
|
MEDIA_LINK = "mediaLink",
|
|
293
294
|
MEDIA_SINGLE = "mediaSingle",
|
|
294
295
|
MENTION = "mention",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
3
|
+
import type { SSR } from '@atlaskit/media-common';
|
|
4
|
+
import type { Dimensions } from './types';
|
|
5
|
+
export declare const InlineImageCard: ({ dimensions, identifier, renderError, alt, isLazy, ssr, crop, stretch, }: {
|
|
6
|
+
identifier: FileIdentifier;
|
|
7
|
+
renderError: (props: {
|
|
8
|
+
error: Error;
|
|
9
|
+
}) => JSX.Element | null;
|
|
10
|
+
dimensions?: Dimensions | undefined;
|
|
11
|
+
isLazy?: boolean | undefined;
|
|
12
|
+
alt?: string | undefined;
|
|
13
|
+
ssr?: SSR | undefined;
|
|
14
|
+
crop?: boolean | undefined;
|
|
15
|
+
stretch?: boolean | undefined;
|
|
16
|
+
}) => JSX.Element | null;
|
|
@@ -39,5 +39,6 @@ export { panelTextInput } from './PanelTextInput/styles';
|
|
|
39
39
|
export { default as PanelTextInput } from './PanelTextInput';
|
|
40
40
|
export { default as Announcer } from './Announcer/announcer';
|
|
41
41
|
export { EDIT_AREA_ID } from './Toolbar';
|
|
42
|
+
export { default as DropList } from './DropList';
|
|
42
43
|
export type { UseStickyToolbarType } from './Toolbar';
|
|
43
44
|
export type { OpenChangedEvent } from './DropList';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { Props, State } from './types';
|
|
3
|
+
import type { MenuItem, Props, State } from './types';
|
|
4
4
|
export type { MenuItem } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
@@ -19,4 +19,7 @@ export default class DropdownMenuWrapper extends PureComponent<Props, State> {
|
|
|
19
19
|
render(): jsx.JSX.Element;
|
|
20
20
|
componentDidUpdate(previousProps: Props): void;
|
|
21
21
|
}
|
|
22
|
+
export declare function DropdownMenuItem({ item, onItemActivated, shouldUseDefaultRole, onMouseEnter, onMouseLeave, }: {
|
|
23
|
+
item: MenuItem;
|
|
24
|
+
} & Pick<Props, 'onItemActivated' | 'shouldUseDefaultRole' | 'onMouseEnter' | 'onMouseLeave'>): jsx.JSX.Element;
|
|
22
25
|
export declare const DropdownMenuWithKeyboardNavigation: React.FC<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as DropdownMenu, DropdownMenuWithKeyboardNavigation, } from './DropdownMenu';
|
|
1
|
+
export { default as DropdownMenu, DropdownMenuItem, DropdownMenuWithKeyboardNavigation, } from './DropdownMenu';
|
|
2
2
|
export type { MenuItem } from './DropdownMenu';
|
|
3
3
|
export { default as ToolbarButton, TOOLBAR_BUTTON } from './ToolbarButton';
|
|
4
4
|
export type { ToolbarButtonRef } from './ToolbarButton';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "77.
|
|
3
|
+
"version": "77.4.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
"@atlaskit/button": "^17.3.0",
|
|
102
102
|
"@atlaskit/code": "^15.1.0",
|
|
103
103
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
104
|
-
"@atlaskit/custom-steps": "^0.0.
|
|
104
|
+
"@atlaskit/custom-steps": "^0.0.13",
|
|
105
105
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
106
106
|
"@atlaskit/editor-palette": "1.5.2",
|
|
107
|
-
"@atlaskit/editor-prosemirror": "
|
|
107
|
+
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
108
108
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
109
109
|
"@atlaskit/editor-tables": "^2.5.0",
|
|
110
110
|
"@atlaskit/emoji": "^67.6.0",
|
|
@@ -113,20 +113,24 @@
|
|
|
113
113
|
"@atlaskit/in-product-testing": "^0.2.0",
|
|
114
114
|
"@atlaskit/link-datasource": "^1.22.0",
|
|
115
115
|
"@atlaskit/link-picker": "^1.33.0",
|
|
116
|
-
"@atlaskit/media-card": "^77.
|
|
116
|
+
"@atlaskit/media-card": "^77.9.0",
|
|
117
117
|
"@atlaskit/media-client": "^26.1.0",
|
|
118
|
+
"@atlaskit/media-client-react": "^2.0.0",
|
|
119
|
+
"@atlaskit/media-common": "^11.0.0",
|
|
120
|
+
"@atlaskit/media-file-preview": "^0.4.0",
|
|
118
121
|
"@atlaskit/media-picker": "^66.2.0",
|
|
122
|
+
"@atlaskit/media-ui": "^25.0.0",
|
|
119
123
|
"@atlaskit/mention": "^22.1.0",
|
|
120
124
|
"@atlaskit/menu": "^2.1.0",
|
|
121
125
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
122
|
-
"@atlaskit/profilecard": "^19.
|
|
123
|
-
"@atlaskit/smart-card": "^26.
|
|
126
|
+
"@atlaskit/profilecard": "^19.10.0",
|
|
127
|
+
"@atlaskit/smart-card": "^26.47.0",
|
|
124
128
|
"@atlaskit/smart-user-picker": "^6.7.0",
|
|
125
129
|
"@atlaskit/spinner": "^16.0.0",
|
|
126
130
|
"@atlaskit/task-decision": "^17.9.0",
|
|
127
131
|
"@atlaskit/textfield": "^6.0.0",
|
|
128
132
|
"@atlaskit/theme": "^12.6.0",
|
|
129
|
-
"@atlaskit/tokens": "^1.
|
|
133
|
+
"@atlaskit/tokens": "^1.36.0",
|
|
130
134
|
"@atlaskit/tooltip": "^18.1.0",
|
|
131
135
|
"@atlaskit/ufo": "^0.2.0",
|
|
132
136
|
"@atlaskit/width-detector": "^4.1.0",
|
package/tsconfig.json
CHANGED
|
@@ -348,12 +348,78 @@
|
|
|
348
348
|
"@atlaskit/media-client-react": [
|
|
349
349
|
"../../media/media-client-react/src/index.ts"
|
|
350
350
|
],
|
|
351
|
+
"@atlaskit/media-common/downloadUrl": [
|
|
352
|
+
"../../media/media-common/src/downloadUrl.ts"
|
|
353
|
+
],
|
|
354
|
+
"@atlaskit/media-common/mediaFeatureFlags": [
|
|
355
|
+
"../../media/media-common/src/mediaFeatureFlags/index.ts"
|
|
356
|
+
],
|
|
357
|
+
"@atlaskit/media-common/analytics": [
|
|
358
|
+
"../../media/media-common/src/analytics/index.ts"
|
|
359
|
+
],
|
|
360
|
+
"@atlaskit/media-common/docs": [
|
|
361
|
+
"../../media/media-common/src/docs/index.ts"
|
|
362
|
+
],
|
|
363
|
+
"@atlaskit/media-common/mediaTypeUtils": [
|
|
364
|
+
"../../media/media-common/src/mediaTypeUtils/index.ts"
|
|
365
|
+
],
|
|
366
|
+
"@atlaskit/media-common/test-helpers": [
|
|
367
|
+
"../../media/media-common/src/test-helpers/index.ts"
|
|
368
|
+
],
|
|
369
|
+
"@atlaskit/media-common": [
|
|
370
|
+
"../../media/media-common/src/index.ts"
|
|
371
|
+
],
|
|
372
|
+
"@atlaskit/media-file-preview": [
|
|
373
|
+
"../../media/media-file-preview/src/index.ts"
|
|
374
|
+
],
|
|
351
375
|
"@atlaskit/media-picker/types": [
|
|
352
376
|
"../../media/media-picker/src/types.ts"
|
|
353
377
|
],
|
|
354
378
|
"@atlaskit/media-picker": [
|
|
355
379
|
"../../media/media-picker/src/index.ts"
|
|
356
380
|
],
|
|
381
|
+
"@atlaskit/media-ui/classNames": [
|
|
382
|
+
"../../media/media-ui/src/classNames.ts"
|
|
383
|
+
],
|
|
384
|
+
"@atlaskit/media-ui/media-type-icon": [
|
|
385
|
+
"../../media/media-ui/src/media-type-icon.tsx"
|
|
386
|
+
],
|
|
387
|
+
"@atlaskit/media-ui/mime-type-icon": [
|
|
388
|
+
"../../media/media-ui/src/mime-type-icon.tsx"
|
|
389
|
+
],
|
|
390
|
+
"@atlaskit/media-ui/truncateText": [
|
|
391
|
+
"../../media/media-ui/src/truncateText.tsx"
|
|
392
|
+
],
|
|
393
|
+
"@atlaskit/media-ui/messages": [
|
|
394
|
+
"../../media/media-ui/src/messages.ts"
|
|
395
|
+
],
|
|
396
|
+
"@atlaskit/media-ui/modalSpinner": [
|
|
397
|
+
"../../media/media-ui/src/modalSpinner.tsx"
|
|
398
|
+
],
|
|
399
|
+
"@atlaskit/media-ui/browser": [
|
|
400
|
+
"../../media/media-ui/src/browser.tsx"
|
|
401
|
+
],
|
|
402
|
+
"@atlaskit/media-ui/codeViewer": [
|
|
403
|
+
"../../media/media-ui/src/codeViewer.ts"
|
|
404
|
+
],
|
|
405
|
+
"@atlaskit/media-ui/util": [
|
|
406
|
+
"../../media/media-ui/src/util.ts"
|
|
407
|
+
],
|
|
408
|
+
"@atlaskit/media-ui/errorIcon": [
|
|
409
|
+
"../../media/media-ui/src/errorIcon.tsx"
|
|
410
|
+
],
|
|
411
|
+
"@atlaskit/media-ui/types": [
|
|
412
|
+
"../../media/media-ui/src/types.ts"
|
|
413
|
+
],
|
|
414
|
+
"@atlaskit/media-ui/formatDate": [
|
|
415
|
+
"../../media/media-ui/src/formatDate.ts"
|
|
416
|
+
],
|
|
417
|
+
"@atlaskit/media-ui/locales": [
|
|
418
|
+
"../../media/media-ui/src/locales.ts"
|
|
419
|
+
],
|
|
420
|
+
"@atlaskit/media-ui": [
|
|
421
|
+
"../../media/media-ui/src/index.ts"
|
|
422
|
+
],
|
|
357
423
|
"@atlaskit/mention/_constants": [
|
|
358
424
|
"../../elements/mention/src/_constants.ts"
|
|
359
425
|
],
|
|
@@ -921,9 +987,6 @@
|
|
|
921
987
|
"@atlaskit/editor-common/media-single": [
|
|
922
988
|
"src/media-single/index.ts"
|
|
923
989
|
],
|
|
924
|
-
"@atlaskit/editor-common/media": [
|
|
925
|
-
"src/media/index.ts"
|
|
926
|
-
],
|
|
927
990
|
"@atlaskit/editor-common/monitoring": [
|
|
928
991
|
"src/monitoring/index.ts"
|
|
929
992
|
],
|
|
@@ -997,4 +1060,4 @@
|
|
|
997
1060
|
"src/json-schema",
|
|
998
1061
|
"src/__tests_external__"
|
|
999
1062
|
]
|
|
1000
|
-
}
|
|
1063
|
+
}
|