@atlaskit/editor-common 102.13.0 → 102.13.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 +22 -0
- package/dist/cjs/analytics/types/enums.js +0 -1
- package/dist/cjs/media-single/CommentBadgeNext.js +3 -8
- package/dist/cjs/media-single/ExternalImageBadge.js +7 -12
- package/dist/cjs/media-single/MediaBadges.js +5 -24
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/styled.js +1 -1
- package/dist/cjs/utils/calculate-toolbar-position.js +5 -6
- package/dist/cjs/utils/processRawValue.js +1 -1
- package/dist/es2019/analytics/types/enums.js +0 -1
- package/dist/es2019/media-single/CommentBadgeNext.js +3 -8
- package/dist/es2019/media-single/ExternalImageBadge.js +6 -11
- package/dist/es2019/media-single/MediaBadges.js +2 -18
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/styled.js +1 -1
- package/dist/es2019/utils/calculate-toolbar-position.js +5 -6
- package/dist/es2019/utils/processRawValue.js +1 -1
- package/dist/esm/analytics/types/enums.js +0 -1
- package/dist/esm/media-single/CommentBadgeNext.js +3 -8
- package/dist/esm/media-single/ExternalImageBadge.js +7 -12
- package/dist/esm/media-single/MediaBadges.js +5 -24
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/styled.js +1 -1
- package/dist/esm/utils/calculate-toolbar-position.js +5 -6
- package/dist/esm/utils/processRawValue.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -2
- package/dist/types/media-single/CommentBadgeNext.d.ts +1 -2
- package/dist/types/media-single/ExternalImageBadge.d.ts +3 -4
- package/dist/types/media-single/MediaBadges.d.ts +0 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -2
- package/dist/types-ts4.5/media-single/CommentBadgeNext.d.ts +1 -2
- package/dist/types-ts4.5/media-single/ExternalImageBadge.d.ts +3 -4
- package/dist/types-ts4.5/media-single/MediaBadges.d.ts +0 -1
- package/package.json +6 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 102.13.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#128664](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128664)
|
|
8
|
+
[`abca3266336d9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/abca3266336d9) -
|
|
9
|
+
[ED-23250] Remove form element from MediaFromUrl and consolidate experiments and feature flags in
|
|
10
|
+
prepartion for jira release
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 102.13.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#128179](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128179)
|
|
18
|
+
[`1ce5182d1a35f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1ce5182d1a35f) -
|
|
19
|
+
Clean up feature flag platform_editor_advanced_layouts_post_fix_patch_3
|
|
20
|
+
- [#130605](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/130605)
|
|
21
|
+
[`2f50b6db9e791`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f50b6db9e791) -
|
|
22
|
+
Clean up feature flag platform_editor_selection_toolbar_scroll_fix
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 102.13.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -209,7 +209,6 @@ var INPUT_METHOD = exports.INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
|
209
209
|
INPUT_METHOD["BROWSER"] = "browser";
|
|
210
210
|
INPUT_METHOD["DOUBLE_CLICK"] = "doubleClick";
|
|
211
211
|
INPUT_METHOD["INLINE_SUGGESTION_FLOATING_TB"] = "inlineSuggestionFloatingToolbar";
|
|
212
|
-
INPUT_METHOD["PAGE_OVERFLOW_MENU"] = "confluencePageOverflowMenu";
|
|
213
212
|
return INPUT_METHOD;
|
|
214
213
|
}({});
|
|
215
214
|
var INSERT_MEDIA_VIA = exports.INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
|
|
@@ -18,10 +18,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
18
18
|
var baseStyles = (0, _primitives.xcss)({
|
|
19
19
|
borderRadius: 'border.radius'
|
|
20
20
|
});
|
|
21
|
-
var smallBadgeStyles = (0, _primitives.xcss)({
|
|
22
|
-
height: 'space.200',
|
|
23
|
-
width: 'space.200'
|
|
24
|
-
});
|
|
25
21
|
var mediumBadgeStyles = (0, _primitives.xcss)({
|
|
26
22
|
height: 'space.300',
|
|
27
23
|
width: 'space.300'
|
|
@@ -31,8 +27,7 @@ var CommentBadgeNext = exports.CommentBadgeNext = function CommentBadgeNext(_ref
|
|
|
31
27
|
status = _ref$status === void 0 ? 'default' : _ref$status,
|
|
32
28
|
onClick = _ref.onClick,
|
|
33
29
|
onMouseEnter = _ref.onMouseEnter,
|
|
34
|
-
onMouseLeave = _ref.onMouseLeave
|
|
35
|
-
badgeSize = _ref.badgeSize;
|
|
30
|
+
onMouseLeave = _ref.onMouseLeave;
|
|
36
31
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
37
32
|
var title = intl.formatMessage(_media.commentMessages.viewCommentsOnMedia);
|
|
38
33
|
var colourToken = (0, _react.useMemo)(function () {
|
|
@@ -49,7 +44,7 @@ var CommentBadgeNext = exports.CommentBadgeNext = function CommentBadgeNext(_ref
|
|
|
49
44
|
position: "top",
|
|
50
45
|
content: title
|
|
51
46
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
52
|
-
xcss: [baseStyles,
|
|
47
|
+
xcss: [baseStyles, mediumBadgeStyles],
|
|
53
48
|
padding: "space.0",
|
|
54
49
|
onClick: onClick,
|
|
55
50
|
onMouseEnter: onMouseEnter,
|
|
@@ -59,7 +54,7 @@ var CommentBadgeNext = exports.CommentBadgeNext = function CommentBadgeNext(_ref
|
|
|
59
54
|
label: title,
|
|
60
55
|
spacing: "spacious",
|
|
61
56
|
color: "currentColor",
|
|
62
|
-
LEGACY_size:
|
|
57
|
+
LEGACY_size: "medium",
|
|
63
58
|
LEGACY_fallbackIcon: _comment2.default
|
|
64
59
|
})));
|
|
65
60
|
};
|
|
@@ -8,7 +8,6 @@ exports.isUnbadgedUrl = exports.ExternalImageBadge = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _info = _interopRequireDefault(require("@atlaskit/icon/glyph/info"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _primitives = require("@atlaskit/primitives");
|
|
13
12
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
13
|
var _media = require("../media");
|
|
@@ -19,9 +18,6 @@ var baseStyles = (0, _primitives.xcss)({
|
|
|
19
18
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
20
19
|
cursor: 'pointer'
|
|
21
20
|
});
|
|
22
|
-
|
|
23
|
-
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
24
|
-
|
|
25
21
|
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
26
22
|
var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
27
23
|
var hostname;
|
|
@@ -39,21 +35,20 @@ var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
|
39
35
|
}));
|
|
40
36
|
};
|
|
41
37
|
var ExternalImageBadge = exports.ExternalImageBadge = function ExternalImageBadge(_ref) {
|
|
42
|
-
var
|
|
43
|
-
type = _ref.type,
|
|
38
|
+
var type = _ref.type,
|
|
44
39
|
url = _ref.url;
|
|
45
40
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
46
41
|
var message = intl.formatMessage(_media.externalMediaMessages.externalMediaFile);
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
42
|
+
if (type !== 'external' || isUnbadgedUrl(url)) {
|
|
43
|
+
return null;
|
|
51
44
|
}
|
|
52
45
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
53
|
-
padding:
|
|
46
|
+
padding: "space.050",
|
|
54
47
|
xcss: baseStyles,
|
|
55
48
|
tabIndex: 0
|
|
56
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
+
"data-testid": "external-image-badge"
|
|
51
|
+
}), /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
57
52
|
content: message,
|
|
58
53
|
position: "top"
|
|
59
54
|
}, /*#__PURE__*/_react.default.createElement(_info.default, {
|
|
@@ -9,7 +9,6 @@ exports.MediaBadges = void 0;
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _primitives = require("@atlaskit/primitives");
|
|
14
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -39,17 +38,7 @@ var hackedZIndexStyles = (0, _primitives.xcss)({
|
|
|
39
38
|
var resizeOffsetStyles = (0, _primitives.xcss)({
|
|
40
39
|
right: 'space.150'
|
|
41
40
|
});
|
|
42
|
-
var smallBadgeStyles = (0, _primitives.xcss)({
|
|
43
|
-
margin: 'space.025'
|
|
44
|
-
});
|
|
45
|
-
var getBadgeSize = function getBadgeSize(width, height) {
|
|
46
|
-
// width is the original width of image, not resized or currently rendered to user. Defaulting to medium for now
|
|
47
|
-
return width && width < 70 || height && height < 70 ? 'small' : 'medium';
|
|
48
|
-
};
|
|
49
41
|
var getBadgeVisible = function getBadgeVisible(width, height) {
|
|
50
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_support_media_badge_visibility')) {
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
42
|
return width && width < MEDIA_BADGE_VISIBILITY_BREAKPOINT || height && height < MEDIA_BADGE_VISIBILITY_BREAKPOINT ? false : true;
|
|
54
43
|
};
|
|
55
44
|
var MediaBadges = exports.MediaBadges = function MediaBadges(_ref) {
|
|
@@ -60,14 +49,10 @@ var MediaBadges = exports.MediaBadges = function MediaBadges(_ref) {
|
|
|
60
49
|
extendedResizeOffset = _ref.extendedResizeOffset,
|
|
61
50
|
_ref$useMinimumZIndex = _ref.useMinimumZIndex,
|
|
62
51
|
useMinimumZIndex = _ref$useMinimumZIndex === void 0 ? false : _ref$useMinimumZIndex;
|
|
63
|
-
var _useState = (0, _react.useState)(
|
|
52
|
+
var _useState = (0, _react.useState)(getBadgeVisible(mediaWidth, mediaHeight)),
|
|
64
53
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var _useState3 = (0, _react.useState)(getBadgeVisible(mediaWidth, mediaHeight)),
|
|
68
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
69
|
-
visible = _useState4[0],
|
|
70
|
-
setVisible = _useState4[1];
|
|
54
|
+
visible = _useState2[0],
|
|
55
|
+
setVisible = _useState2[1];
|
|
71
56
|
(0, _react.useEffect)(function () {
|
|
72
57
|
var observer = new ResizeObserver((0, _debounce.default)(function (entries) {
|
|
73
58
|
var _entries = (0, _slicedToArray2.default)(entries, 1),
|
|
@@ -75,10 +60,7 @@ var MediaBadges = exports.MediaBadges = function MediaBadges(_ref) {
|
|
|
75
60
|
var _entry$contentRect = entry.contentRect,
|
|
76
61
|
width = _entry$contentRect.width,
|
|
77
62
|
height = _entry$contentRect.height;
|
|
78
|
-
|
|
79
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_support_media_badge_visibility')) {
|
|
80
|
-
setVisible(getBadgeVisible(width, height));
|
|
81
|
-
}
|
|
63
|
+
setVisible(getBadgeVisible(width, height));
|
|
82
64
|
}));
|
|
83
65
|
if (mediaElement) {
|
|
84
66
|
// Ignored via go/ees005
|
|
@@ -91,7 +73,6 @@ var MediaBadges = exports.MediaBadges = function MediaBadges(_ref) {
|
|
|
91
73
|
}, [mediaElement]);
|
|
92
74
|
if (typeof children === 'function') {
|
|
93
75
|
children = children({
|
|
94
|
-
badgeSize: badgeSize,
|
|
95
76
|
visible: visible
|
|
96
77
|
});
|
|
97
78
|
}
|
|
@@ -103,6 +84,6 @@ var MediaBadges = exports.MediaBadges = function MediaBadges(_ref) {
|
|
|
103
84
|
testId: "media-badges",
|
|
104
85
|
"data-media-badges": "true",
|
|
105
86
|
contentEditable: false,
|
|
106
|
-
xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles
|
|
87
|
+
xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles]
|
|
107
88
|
}, children);
|
|
108
89
|
};
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "102.13.
|
|
20
|
+
var packageVersion = "102.13.2";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// Ignored via go/ees007
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "102.13.
|
|
26
|
+
var packageVersion = "102.13.2";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -208,7 +208,7 @@ var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
|
|
|
208
208
|
|
|
209
209
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
210
210
|
var mediaWrapperStyle = exports.mediaWrapperStyle = function mediaWrapperStyle(props) {
|
|
211
|
-
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\tposition: relative;\n\n\t", "\n\n\t/* Editor */\n & > figure {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t// Comments on media project adds comment badge as child of the media wrapper,\n\t// thus we need to exclude it so that style is applied to intended div\n\t// remove [data-comment-badge='true'] when ff
|
|
211
|
+
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\tposition: relative;\n\n\t", "\n\n\t/* Editor */\n & > figure {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t// Comments on media project adds comment badge as child of the media wrapper,\n\t// thus we need to exclude it so that style is applied to intended div\n\t// remove [data-comment-badge='true'] when ff platform_editor_add_media_from_url_rollout is cleaned up\n\t& > div:not([data-comment-badge='true'], [data-media-badges='true']) {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t& * [data-mark-annotation-type='inlineComment'] {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t&[data-node-type='embedCard'] > div {\n\t\twidth: 100%;\n\t}\n\n\t/* Renderer */\n\t[data-node-type='media'] {\n\t\tposition: static !important;\n\n\t\t> div {\n\t\t\tposition: absolute;\n\t\t\theight: 100%;\n\t\t}\n\t}\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
|
|
212
212
|
};
|
|
213
213
|
var MediaWrapper = exports.MediaWrapper = function MediaWrapper(_ref3) {
|
|
214
214
|
var children = _ref3.children,
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.calculateToolbarPositionTrackHead = exports.calculateToolbarPositionOnCellSelection = exports.calculateToolbarPositionAboveSelection = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
8
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
9
|
-
var
|
|
9
|
+
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
10
|
+
|
|
10
11
|
/*
|
|
11
12
|
Calculates the position of the floating toolbar relative to the selection.
|
|
12
13
|
This is a re-implementation which closely matches the behaviour on Confluence renderer.
|
|
@@ -135,11 +136,9 @@ var calculateToolbarPositionTrackHead = exports.calculateToolbarPositionTrackHea
|
|
|
135
136
|
left = _getCoordsBelowSelect2.left;
|
|
136
137
|
}
|
|
137
138
|
var leftCoord = Math.max(0, left - wrapperBounds.left);
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + _scrollbarWidth));
|
|
142
|
-
}
|
|
139
|
+
if (leftCoord + toolbarRect.width > wrapperBounds.width) {
|
|
140
|
+
var _scrollbarWidth = MAXIMUM_BROWSER_SCROLLBAR_WIDTH;
|
|
141
|
+
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + _scrollbarWidth));
|
|
143
142
|
}
|
|
144
143
|
|
|
145
144
|
// remap positions from browser document to wrapperBounds
|
|
@@ -204,7 +204,7 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
|
|
|
204
204
|
var _transformNestedTable3 = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent);
|
|
205
205
|
transformedAdf = _transformNestedTable3.transformedAdf;
|
|
206
206
|
}
|
|
207
|
-
if (dispatchAnalyticsEvent
|
|
207
|
+
if (dispatchAnalyticsEvent) {
|
|
208
208
|
var _transformedAdf$conte;
|
|
209
209
|
var hasSingleColumnLayout = (_transformedAdf$conte = transformedAdf.content) === null || _transformedAdf$conte === void 0 ? void 0 : _transformedAdf$conte.some(function (node) {
|
|
210
210
|
var _node$content;
|
|
@@ -203,7 +203,6 @@ export let INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
|
203
203
|
INPUT_METHOD["BROWSER"] = "browser";
|
|
204
204
|
INPUT_METHOD["DOUBLE_CLICK"] = "doubleClick";
|
|
205
205
|
INPUT_METHOD["INLINE_SUGGESTION_FLOATING_TB"] = "inlineSuggestionFloatingToolbar";
|
|
206
|
-
INPUT_METHOD["PAGE_OVERFLOW_MENU"] = "confluencePageOverflowMenu";
|
|
207
206
|
return INPUT_METHOD;
|
|
208
207
|
}({});
|
|
209
208
|
export let INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
|
|
@@ -8,10 +8,6 @@ import { commentMessages as messages } from '../media';
|
|
|
8
8
|
const baseStyles = xcss({
|
|
9
9
|
borderRadius: 'border.radius'
|
|
10
10
|
});
|
|
11
|
-
const smallBadgeStyles = xcss({
|
|
12
|
-
height: 'space.200',
|
|
13
|
-
width: 'space.200'
|
|
14
|
-
});
|
|
15
11
|
const mediumBadgeStyles = xcss({
|
|
16
12
|
height: 'space.300',
|
|
17
13
|
width: 'space.300'
|
|
@@ -20,8 +16,7 @@ export const CommentBadgeNext = ({
|
|
|
20
16
|
status = 'default',
|
|
21
17
|
onClick,
|
|
22
18
|
onMouseEnter,
|
|
23
|
-
onMouseLeave
|
|
24
|
-
badgeSize
|
|
19
|
+
onMouseLeave
|
|
25
20
|
}) => {
|
|
26
21
|
const intl = useIntl();
|
|
27
22
|
const title = intl.formatMessage(messages.viewCommentsOnMedia);
|
|
@@ -39,7 +34,7 @@ export const CommentBadgeNext = ({
|
|
|
39
34
|
position: "top",
|
|
40
35
|
content: title
|
|
41
36
|
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
42
|
-
xcss: [baseStyles,
|
|
37
|
+
xcss: [baseStyles, mediumBadgeStyles],
|
|
43
38
|
padding: "space.0",
|
|
44
39
|
onClick: onClick,
|
|
45
40
|
onMouseEnter: onMouseEnter,
|
|
@@ -49,7 +44,7 @@ export const CommentBadgeNext = ({
|
|
|
49
44
|
label: title,
|
|
50
45
|
spacing: "spacious",
|
|
51
46
|
color: "currentColor",
|
|
52
|
-
LEGACY_size:
|
|
47
|
+
LEGACY_size: "medium",
|
|
53
48
|
LEGACY_fallbackIcon: LegacyCommentIcon
|
|
54
49
|
})));
|
|
55
50
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/glyph/info';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
6
|
import { externalMediaMessages } from '../media';
|
|
@@ -12,9 +11,6 @@ const baseStyles = xcss({
|
|
|
12
11
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
13
12
|
cursor: 'pointer'
|
|
14
13
|
});
|
|
15
|
-
|
|
16
|
-
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
17
|
-
|
|
18
14
|
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
19
15
|
export const isUnbadgedUrl = url => {
|
|
20
16
|
let hostname;
|
|
@@ -31,22 +27,21 @@ export const isUnbadgedUrl = url => {
|
|
|
31
27
|
NO_EXTERNAL_BADGE_HOSTS.some(host => hostname === host || hostname.endsWith(`.${host}`)));
|
|
32
28
|
};
|
|
33
29
|
export const ExternalImageBadge = ({
|
|
34
|
-
badgeSize,
|
|
35
30
|
type,
|
|
36
31
|
url
|
|
37
32
|
}) => {
|
|
38
33
|
const intl = useIntl();
|
|
39
34
|
const message = intl.formatMessage(externalMediaMessages.externalMediaFile);
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
35
|
+
if (type !== 'external' || isUnbadgedUrl(url)) {
|
|
36
|
+
return null;
|
|
44
37
|
}
|
|
45
38
|
return /*#__PURE__*/React.createElement(Box, {
|
|
46
|
-
padding:
|
|
39
|
+
padding: "space.050",
|
|
47
40
|
xcss: baseStyles,
|
|
48
41
|
tabIndex: 0
|
|
49
|
-
}, /*#__PURE__*/React.createElement(
|
|
42
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
"data-testid": "external-image-badge"
|
|
44
|
+
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
50
45
|
content: message,
|
|
51
46
|
position: "top"
|
|
52
47
|
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import debounce from 'lodash/debounce';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
4
|
const MEDIA_BADGE_VISIBILITY_BREAKPOINT = 200;
|
|
6
5
|
const containerStyles = xcss({
|
|
@@ -28,17 +27,7 @@ const hackedZIndexStyles = xcss({
|
|
|
28
27
|
const resizeOffsetStyles = xcss({
|
|
29
28
|
right: 'space.150'
|
|
30
29
|
});
|
|
31
|
-
const smallBadgeStyles = xcss({
|
|
32
|
-
margin: 'space.025'
|
|
33
|
-
});
|
|
34
|
-
const getBadgeSize = (width, height) => {
|
|
35
|
-
// width is the original width of image, not resized or currently rendered to user. Defaulting to medium for now
|
|
36
|
-
return width && width < 70 || height && height < 70 ? 'small' : 'medium';
|
|
37
|
-
};
|
|
38
30
|
const getBadgeVisible = (width, height) => {
|
|
39
|
-
if (!fg('platform_editor_support_media_badge_visibility')) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
31
|
return width && width < MEDIA_BADGE_VISIBILITY_BREAKPOINT || height && height < MEDIA_BADGE_VISIBILITY_BREAKPOINT ? false : true;
|
|
43
32
|
};
|
|
44
33
|
export const MediaBadges = ({
|
|
@@ -49,7 +38,6 @@ export const MediaBadges = ({
|
|
|
49
38
|
extendedResizeOffset,
|
|
50
39
|
useMinimumZIndex = false
|
|
51
40
|
}) => {
|
|
52
|
-
const [badgeSize, setBadgeSize] = useState(getBadgeSize(mediaWidth, mediaHeight));
|
|
53
41
|
const [visible, setVisible] = useState(getBadgeVisible(mediaWidth, mediaHeight));
|
|
54
42
|
useEffect(() => {
|
|
55
43
|
const observer = new ResizeObserver(debounce(entries => {
|
|
@@ -58,10 +46,7 @@ export const MediaBadges = ({
|
|
|
58
46
|
width,
|
|
59
47
|
height
|
|
60
48
|
} = entry.contentRect;
|
|
61
|
-
|
|
62
|
-
if (fg('platform_editor_support_media_badge_visibility')) {
|
|
63
|
-
setVisible(getBadgeVisible(width, height));
|
|
64
|
-
}
|
|
49
|
+
setVisible(getBadgeVisible(width, height));
|
|
65
50
|
}));
|
|
66
51
|
if (mediaElement) {
|
|
67
52
|
// Ignored via go/ees005
|
|
@@ -74,7 +59,6 @@ export const MediaBadges = ({
|
|
|
74
59
|
}, [mediaElement]);
|
|
75
60
|
if (typeof children === 'function') {
|
|
76
61
|
children = children({
|
|
77
|
-
badgeSize,
|
|
78
62
|
visible
|
|
79
63
|
});
|
|
80
64
|
}
|
|
@@ -86,6 +70,6 @@ export const MediaBadges = ({
|
|
|
86
70
|
testId: "media-badges",
|
|
87
71
|
"data-media-badges": "true",
|
|
88
72
|
contentEditable: false,
|
|
89
|
-
xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles
|
|
73
|
+
xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles]
|
|
90
74
|
}, children);
|
|
91
75
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "102.13.
|
|
4
|
+
const packageVersion = "102.13.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "102.13.
|
|
16
|
+
const packageVersion = "102.13.2";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -246,7 +246,7 @@ export const mediaWrapperStyle = props => css`
|
|
|
246
246
|
|
|
247
247
|
// Comments on media project adds comment badge as child of the media wrapper,
|
|
248
248
|
// thus we need to exclude it so that style is applied to intended div
|
|
249
|
-
// remove [data-comment-badge='true'] when ff
|
|
249
|
+
// remove [data-comment-badge='true'] when ff platform_editor_add_media_from_url_rollout is cleaned up
|
|
250
250
|
& > div:not([data-comment-badge='true'], [data-media-badges='true']) {
|
|
251
251
|
position: ${props.hasFallbackContainer ? 'absolute' : 'relative'};
|
|
252
252
|
height: 100%;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
-
|
|
3
|
+
const MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
4
|
+
|
|
4
5
|
/*
|
|
5
6
|
Calculates the position of the floating toolbar relative to the selection.
|
|
6
7
|
This is a re-implementation which closely matches the behaviour on Confluence renderer.
|
|
@@ -130,11 +131,9 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
|
|
|
130
131
|
} = getCoordsBelowSelection(bottomCoords, toolbarRect));
|
|
131
132
|
}
|
|
132
133
|
let leftCoord = Math.max(0, left - wrapperBounds.left);
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + scrollbarWidth));
|
|
137
|
-
}
|
|
134
|
+
if (leftCoord + toolbarRect.width > wrapperBounds.width) {
|
|
135
|
+
const scrollbarWidth = MAXIMUM_BROWSER_SCROLLBAR_WIDTH;
|
|
136
|
+
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + scrollbarWidth));
|
|
138
137
|
}
|
|
139
138
|
|
|
140
139
|
// remap positions from browser document to wrapperBounds
|
|
@@ -203,7 +203,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
203
203
|
transformedAdf
|
|
204
204
|
} = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent));
|
|
205
205
|
}
|
|
206
|
-
if (dispatchAnalyticsEvent
|
|
206
|
+
if (dispatchAnalyticsEvent) {
|
|
207
207
|
var _transformedAdf$conte;
|
|
208
208
|
const hasSingleColumnLayout = (_transformedAdf$conte = transformedAdf.content) === null || _transformedAdf$conte === void 0 ? void 0 : _transformedAdf$conte.some(node => {
|
|
209
209
|
var _node$content;
|
|
@@ -203,7 +203,6 @@ export var INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
|
203
203
|
INPUT_METHOD["BROWSER"] = "browser";
|
|
204
204
|
INPUT_METHOD["DOUBLE_CLICK"] = "doubleClick";
|
|
205
205
|
INPUT_METHOD["INLINE_SUGGESTION_FLOATING_TB"] = "inlineSuggestionFloatingToolbar";
|
|
206
|
-
INPUT_METHOD["PAGE_OVERFLOW_MENU"] = "confluencePageOverflowMenu";
|
|
207
206
|
return INPUT_METHOD;
|
|
208
207
|
}({});
|
|
209
208
|
export var INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
|
|
@@ -8,10 +8,6 @@ import { commentMessages as messages } from '../media';
|
|
|
8
8
|
var baseStyles = xcss({
|
|
9
9
|
borderRadius: 'border.radius'
|
|
10
10
|
});
|
|
11
|
-
var smallBadgeStyles = xcss({
|
|
12
|
-
height: 'space.200',
|
|
13
|
-
width: 'space.200'
|
|
14
|
-
});
|
|
15
11
|
var mediumBadgeStyles = xcss({
|
|
16
12
|
height: 'space.300',
|
|
17
13
|
width: 'space.300'
|
|
@@ -21,8 +17,7 @@ export var CommentBadgeNext = function CommentBadgeNext(_ref) {
|
|
|
21
17
|
status = _ref$status === void 0 ? 'default' : _ref$status,
|
|
22
18
|
onClick = _ref.onClick,
|
|
23
19
|
onMouseEnter = _ref.onMouseEnter,
|
|
24
|
-
onMouseLeave = _ref.onMouseLeave
|
|
25
|
-
badgeSize = _ref.badgeSize;
|
|
20
|
+
onMouseLeave = _ref.onMouseLeave;
|
|
26
21
|
var intl = useIntl();
|
|
27
22
|
var title = intl.formatMessage(messages.viewCommentsOnMedia);
|
|
28
23
|
var colourToken = useMemo(function () {
|
|
@@ -39,7 +34,7 @@ export var CommentBadgeNext = function CommentBadgeNext(_ref) {
|
|
|
39
34
|
position: "top",
|
|
40
35
|
content: title
|
|
41
36
|
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
42
|
-
xcss: [baseStyles,
|
|
37
|
+
xcss: [baseStyles, mediumBadgeStyles],
|
|
43
38
|
padding: "space.0",
|
|
44
39
|
onClick: onClick,
|
|
45
40
|
onMouseEnter: onMouseEnter,
|
|
@@ -49,7 +44,7 @@ export var CommentBadgeNext = function CommentBadgeNext(_ref) {
|
|
|
49
44
|
label: title,
|
|
50
45
|
spacing: "spacious",
|
|
51
46
|
color: "currentColor",
|
|
52
|
-
LEGACY_size:
|
|
47
|
+
LEGACY_size: "medium",
|
|
53
48
|
LEGACY_fallbackIcon: LegacyCommentIcon
|
|
54
49
|
})));
|
|
55
50
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/glyph/info';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
6
|
import { externalMediaMessages } from '../media';
|
|
@@ -12,9 +11,6 @@ var baseStyles = xcss({
|
|
|
12
11
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
13
12
|
cursor: 'pointer'
|
|
14
13
|
});
|
|
15
|
-
|
|
16
|
-
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
17
|
-
|
|
18
14
|
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
19
15
|
export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
20
16
|
var hostname;
|
|
@@ -32,21 +28,20 @@ export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
|
32
28
|
}));
|
|
33
29
|
};
|
|
34
30
|
export var ExternalImageBadge = function ExternalImageBadge(_ref) {
|
|
35
|
-
var
|
|
36
|
-
type = _ref.type,
|
|
31
|
+
var type = _ref.type,
|
|
37
32
|
url = _ref.url;
|
|
38
33
|
var intl = useIntl();
|
|
39
34
|
var message = intl.formatMessage(externalMediaMessages.externalMediaFile);
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
35
|
+
if (type !== 'external' || isUnbadgedUrl(url)) {
|
|
36
|
+
return null;
|
|
44
37
|
}
|
|
45
38
|
return /*#__PURE__*/React.createElement(Box, {
|
|
46
|
-
padding:
|
|
39
|
+
padding: "space.050",
|
|
47
40
|
xcss: baseStyles,
|
|
48
41
|
tabIndex: 0
|
|
49
|
-
}, /*#__PURE__*/React.createElement(
|
|
42
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
"data-testid": "external-image-badge"
|
|
44
|
+
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
50
45
|
content: message,
|
|
51
46
|
position: "top"
|
|
52
47
|
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import debounce from 'lodash/debounce';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
5
|
var MEDIA_BADGE_VISIBILITY_BREAKPOINT = 200;
|
|
7
6
|
var containerStyles = xcss({
|
|
@@ -29,17 +28,7 @@ var hackedZIndexStyles = xcss({
|
|
|
29
28
|
var resizeOffsetStyles = xcss({
|
|
30
29
|
right: 'space.150'
|
|
31
30
|
});
|
|
32
|
-
var smallBadgeStyles = xcss({
|
|
33
|
-
margin: 'space.025'
|
|
34
|
-
});
|
|
35
|
-
var getBadgeSize = function getBadgeSize(width, height) {
|
|
36
|
-
// width is the original width of image, not resized or currently rendered to user. Defaulting to medium for now
|
|
37
|
-
return width && width < 70 || height && height < 70 ? 'small' : 'medium';
|
|
38
|
-
};
|
|
39
31
|
var getBadgeVisible = function getBadgeVisible(width, height) {
|
|
40
|
-
if (!fg('platform_editor_support_media_badge_visibility')) {
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
32
|
return width && width < MEDIA_BADGE_VISIBILITY_BREAKPOINT || height && height < MEDIA_BADGE_VISIBILITY_BREAKPOINT ? false : true;
|
|
44
33
|
};
|
|
45
34
|
export var MediaBadges = function MediaBadges(_ref) {
|
|
@@ -50,14 +39,10 @@ export var MediaBadges = function MediaBadges(_ref) {
|
|
|
50
39
|
extendedResizeOffset = _ref.extendedResizeOffset,
|
|
51
40
|
_ref$useMinimumZIndex = _ref.useMinimumZIndex,
|
|
52
41
|
useMinimumZIndex = _ref$useMinimumZIndex === void 0 ? false : _ref$useMinimumZIndex;
|
|
53
|
-
var _useState = useState(
|
|
42
|
+
var _useState = useState(getBadgeVisible(mediaWidth, mediaHeight)),
|
|
54
43
|
_useState2 = _slicedToArray(_useState, 2),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var _useState3 = useState(getBadgeVisible(mediaWidth, mediaHeight)),
|
|
58
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
59
|
-
visible = _useState4[0],
|
|
60
|
-
setVisible = _useState4[1];
|
|
44
|
+
visible = _useState2[0],
|
|
45
|
+
setVisible = _useState2[1];
|
|
61
46
|
useEffect(function () {
|
|
62
47
|
var observer = new ResizeObserver(debounce(function (entries) {
|
|
63
48
|
var _entries = _slicedToArray(entries, 1),
|
|
@@ -65,10 +50,7 @@ export var MediaBadges = function MediaBadges(_ref) {
|
|
|
65
50
|
var _entry$contentRect = entry.contentRect,
|
|
66
51
|
width = _entry$contentRect.width,
|
|
67
52
|
height = _entry$contentRect.height;
|
|
68
|
-
|
|
69
|
-
if (fg('platform_editor_support_media_badge_visibility')) {
|
|
70
|
-
setVisible(getBadgeVisible(width, height));
|
|
71
|
-
}
|
|
53
|
+
setVisible(getBadgeVisible(width, height));
|
|
72
54
|
}));
|
|
73
55
|
if (mediaElement) {
|
|
74
56
|
// Ignored via go/ees005
|
|
@@ -81,7 +63,6 @@ export var MediaBadges = function MediaBadges(_ref) {
|
|
|
81
63
|
}, [mediaElement]);
|
|
82
64
|
if (typeof children === 'function') {
|
|
83
65
|
children = children({
|
|
84
|
-
badgeSize: badgeSize,
|
|
85
66
|
visible: visible
|
|
86
67
|
});
|
|
87
68
|
}
|
|
@@ -93,6 +74,6 @@ export var MediaBadges = function MediaBadges(_ref) {
|
|
|
93
74
|
testId: "media-badges",
|
|
94
75
|
"data-media-badges": "true",
|
|
95
76
|
contentEditable: false,
|
|
96
|
-
xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles
|
|
77
|
+
xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles]
|
|
97
78
|
}, children);
|
|
98
79
|
};
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "102.13.
|
|
10
|
+
var packageVersion = "102.13.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "102.13.
|
|
23
|
+
var packageVersion = "102.13.2";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -198,7 +198,7 @@ var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
|
|
|
198
198
|
|
|
199
199
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
200
200
|
export var mediaWrapperStyle = function mediaWrapperStyle(props) {
|
|
201
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tposition: relative;\n\n\t", "\n\n\t/* Editor */\n & > figure {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t// Comments on media project adds comment badge as child of the media wrapper,\n\t// thus we need to exclude it so that style is applied to intended div\n\t// remove [data-comment-badge='true'] when ff
|
|
201
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tposition: relative;\n\n\t", "\n\n\t/* Editor */\n & > figure {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t// Comments on media project adds comment badge as child of the media wrapper,\n\t// thus we need to exclude it so that style is applied to intended div\n\t// remove [data-comment-badge='true'] when ff platform_editor_add_media_from_url_rollout is cleaned up\n\t& > div:not([data-comment-badge='true'], [data-media-badges='true']) {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t& * [data-mark-annotation-type='inlineComment'] {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t&[data-node-type='embedCard'] > div {\n\t\twidth: 100%;\n\t}\n\n\t/* Renderer */\n\t[data-node-type='media'] {\n\t\tposition: static !important;\n\n\t\t> div {\n\t\t\tposition: absolute;\n\t\t\theight: 100%;\n\t\t}\n\t}\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
|
|
202
202
|
};
|
|
203
203
|
export var MediaWrapper = function MediaWrapper(_ref3) {
|
|
204
204
|
var children = _ref3.children,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
-
|
|
3
|
+
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
4
|
+
|
|
4
5
|
/*
|
|
5
6
|
Calculates the position of the floating toolbar relative to the selection.
|
|
6
7
|
This is a re-implementation which closely matches the behaviour on Confluence renderer.
|
|
@@ -129,11 +130,9 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
|
|
|
129
130
|
left = _getCoordsBelowSelect2.left;
|
|
130
131
|
}
|
|
131
132
|
var leftCoord = Math.max(0, left - wrapperBounds.left);
|
|
132
|
-
if (
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + _scrollbarWidth));
|
|
136
|
-
}
|
|
133
|
+
if (leftCoord + toolbarRect.width > wrapperBounds.width) {
|
|
134
|
+
var _scrollbarWidth = MAXIMUM_BROWSER_SCROLLBAR_WIDTH;
|
|
135
|
+
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + _scrollbarWidth));
|
|
137
136
|
}
|
|
138
137
|
|
|
139
138
|
// remap positions from browser document to wrapperBounds
|
|
@@ -196,7 +196,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
196
196
|
var _transformNestedTable3 = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent);
|
|
197
197
|
transformedAdf = _transformNestedTable3.transformedAdf;
|
|
198
198
|
}
|
|
199
|
-
if (dispatchAnalyticsEvent
|
|
199
|
+
if (dispatchAnalyticsEvent) {
|
|
200
200
|
var _transformedAdf$conte;
|
|
201
201
|
var hasSingleColumnLayout = (_transformedAdf$conte = transformedAdf.content) === null || _transformedAdf$conte === void 0 ? void 0 : _transformedAdf$conte.some(function (node) {
|
|
202
202
|
var _node$content;
|
|
@@ -219,8 +219,7 @@ export declare enum INPUT_METHOD {
|
|
|
219
219
|
MOUSE = "mouse",
|
|
220
220
|
BROWSER = "browser",
|
|
221
221
|
DOUBLE_CLICK = "doubleClick",
|
|
222
|
-
INLINE_SUGGESTION_FLOATING_TB = "inlineSuggestionFloatingToolbar"
|
|
223
|
-
PAGE_OVERFLOW_MENU = "confluencePageOverflowMenu"
|
|
222
|
+
INLINE_SUGGESTION_FLOATING_TB = "inlineSuggestionFloatingToolbar"
|
|
224
223
|
}
|
|
225
224
|
export declare enum INSERT_MEDIA_VIA {
|
|
226
225
|
LOCAL_UPLOAD = "localUpload",
|
|
@@ -5,7 +5,6 @@ type CommentBadgeProps = {
|
|
|
5
5
|
onClick: (e: React.MouseEvent) => void;
|
|
6
6
|
onMouseEnter?: (e: React.MouseEvent) => void;
|
|
7
7
|
onMouseLeave?: (e: React.MouseEvent) => void;
|
|
8
|
-
badgeSize: 'small' | 'medium';
|
|
9
8
|
};
|
|
10
|
-
export declare const CommentBadgeNext: ({ status, onClick, onMouseEnter, onMouseLeave,
|
|
9
|
+
export declare const CommentBadgeNext: ({ status, onClick, onMouseEnter, onMouseLeave, }: CommentBadgeProps) => React.JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type MediaType } from '@atlaskit/adf-schema';
|
|
3
3
|
type ExternalImageBadgeProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
url?: string | undefined;
|
|
4
|
+
type: MediaType;
|
|
5
|
+
url: string | undefined;
|
|
7
6
|
};
|
|
8
7
|
export declare const isUnbadgedUrl: (url: string | undefined) => boolean;
|
|
9
|
-
export declare const ExternalImageBadge: ({
|
|
8
|
+
export declare const ExternalImageBadge: ({ type, url }: ExternalImageBadgeProps) => React.JSX.Element | null;
|
|
10
9
|
export {};
|
|
@@ -219,8 +219,7 @@ export declare enum INPUT_METHOD {
|
|
|
219
219
|
MOUSE = "mouse",
|
|
220
220
|
BROWSER = "browser",
|
|
221
221
|
DOUBLE_CLICK = "doubleClick",
|
|
222
|
-
INLINE_SUGGESTION_FLOATING_TB = "inlineSuggestionFloatingToolbar"
|
|
223
|
-
PAGE_OVERFLOW_MENU = "confluencePageOverflowMenu"
|
|
222
|
+
INLINE_SUGGESTION_FLOATING_TB = "inlineSuggestionFloatingToolbar"
|
|
224
223
|
}
|
|
225
224
|
export declare enum INSERT_MEDIA_VIA {
|
|
226
225
|
LOCAL_UPLOAD = "localUpload",
|
|
@@ -5,7 +5,6 @@ type CommentBadgeProps = {
|
|
|
5
5
|
onClick: (e: React.MouseEvent) => void;
|
|
6
6
|
onMouseEnter?: (e: React.MouseEvent) => void;
|
|
7
7
|
onMouseLeave?: (e: React.MouseEvent) => void;
|
|
8
|
-
badgeSize: 'small' | 'medium';
|
|
9
8
|
};
|
|
10
|
-
export declare const CommentBadgeNext: ({ status, onClick, onMouseEnter, onMouseLeave,
|
|
9
|
+
export declare const CommentBadgeNext: ({ status, onClick, onMouseEnter, onMouseLeave, }: CommentBadgeProps) => React.JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type MediaType } from '@atlaskit/adf-schema';
|
|
3
3
|
type ExternalImageBadgeProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
url?: string | undefined;
|
|
4
|
+
type: MediaType;
|
|
5
|
+
url: string | undefined;
|
|
7
6
|
};
|
|
8
7
|
export declare const isUnbadgedUrl: (url: string | undefined) => boolean;
|
|
9
|
-
export declare const ExternalImageBadge: ({
|
|
8
|
+
export declare const ExternalImageBadge: ({ type, url }: ExternalImageBadgeProps) => React.JSX.Element | null;
|
|
10
9
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "102.13.
|
|
3
|
+
"version": "102.13.2",
|
|
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/"
|
|
@@ -153,14 +153,14 @@
|
|
|
153
153
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
154
154
|
"@atlaskit/popper": "^7.0.0",
|
|
155
155
|
"@atlaskit/primitives": "^14.2.0",
|
|
156
|
-
"@atlaskit/profilecard": "^23.
|
|
156
|
+
"@atlaskit/profilecard": "^23.5.0",
|
|
157
157
|
"@atlaskit/section-message": "^8.2.0",
|
|
158
158
|
"@atlaskit/smart-card": "^36.0.0",
|
|
159
159
|
"@atlaskit/smart-user-picker": "^8.0.0",
|
|
160
160
|
"@atlaskit/spinner": "^18.0.0",
|
|
161
161
|
"@atlaskit/task-decision": "^19.1.0",
|
|
162
162
|
"@atlaskit/textfield": "^8.0.0",
|
|
163
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
163
|
+
"@atlaskit/tmp-editor-statsig": "^4.3.0",
|
|
164
164
|
"@atlaskit/tokens": "^4.5.0",
|
|
165
165
|
"@atlaskit/tooltip": "^20.0.0",
|
|
166
166
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -274,15 +274,9 @@
|
|
|
274
274
|
"platform_editor_use_nested_table_pm_nodes": {
|
|
275
275
|
"type": "boolean"
|
|
276
276
|
},
|
|
277
|
-
"platform_editor_hide_external_media_badge": {
|
|
278
|
-
"type": "boolean"
|
|
279
|
-
},
|
|
280
277
|
"platform_editor_nested_tables_renderer_styles": {
|
|
281
278
|
"type": "boolean"
|
|
282
279
|
},
|
|
283
|
-
"platform_editor_selection_toolbar_scroll_fix": {
|
|
284
|
-
"type": "boolean"
|
|
285
|
-
},
|
|
286
280
|
"platform_editor_advanced_layouts_a11y": {
|
|
287
281
|
"type": "boolean"
|
|
288
282
|
},
|
|
@@ -292,18 +286,12 @@
|
|
|
292
286
|
"platform_editor_extension_fix_ssr_ref": {
|
|
293
287
|
"type": "boolean"
|
|
294
288
|
},
|
|
295
|
-
"platform_editor_advanced_layouts_post_fix_patch_3": {
|
|
296
|
-
"type": "boolean"
|
|
297
|
-
},
|
|
298
289
|
"platform_editor_breakoutresizer_remove_assertion": {
|
|
299
290
|
"type": "boolean"
|
|
300
291
|
},
|
|
301
292
|
"platform_editor_table_row_span_fix": {
|
|
302
293
|
"type": "boolean"
|
|
303
294
|
},
|
|
304
|
-
"platform_editor_support_media_badge_visibility": {
|
|
305
|
-
"type": "boolean"
|
|
306
|
-
},
|
|
307
295
|
"platform-component-visual-refresh": {
|
|
308
296
|
"type": "boolean"
|
|
309
297
|
},
|
|
@@ -331,6 +319,9 @@
|
|
|
331
319
|
"platform_editor_remove_quick_insert_priority_key": {
|
|
332
320
|
"type": "boolean"
|
|
333
321
|
},
|
|
322
|
+
"platform_editor_add_media_from_url_rollout": {
|
|
323
|
+
"type": "boolean"
|
|
324
|
+
},
|
|
334
325
|
"platform_editor_inline_node_virt_threshold_override": {
|
|
335
326
|
"type": "boolean"
|
|
336
327
|
},
|