@atlaskit/editor-common 102.13.5 → 102.13.6
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 +10 -0
- package/dist/cjs/media/messages/pixelEntry.js +5 -0
- package/dist/cjs/media-inline/media-inline-image-card.js +12 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/media/messages/pixelEntry.js +5 -0
- package/dist/es2019/media-inline/media-inline-image-card.js +12 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/media/messages/pixelEntry.js +5 -0
- package/dist/esm/media-inline/media-inline-image-card.js +12 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/media/messages/pixelEntry.d.ts +5 -0
- package/dist/types/media-inline/media-inline-image-card.d.ts +2 -1
- package/dist/types-ts4.5/media/messages/pixelEntry.d.ts +5 -0
- package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 102.13.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#131280](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131280)
|
|
8
|
+
[`9ff92ea2432f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ff92ea2432f2) -
|
|
9
|
+
[ED-27082] Fix media overflow toolbar to show correct options + update separators between button
|
|
10
|
+
groups
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 102.13.5
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -60,5 +60,10 @@ var pixelEntryMessages = exports.pixelEntryMessages = (0, _reactIntlNext.defineM
|
|
|
60
60
|
id: 'fabric.editor.media.pixelEntry.closePixelEntry',
|
|
61
61
|
defaultMessage: 'Close',
|
|
62
62
|
description: 'The text give to the close button used to close the pixel inputs and go back to main toolbar'
|
|
63
|
+
},
|
|
64
|
+
resizeOption: {
|
|
65
|
+
id: 'fabric.editor.media.pixelEntry.ResizeOption',
|
|
66
|
+
defaultMessage: 'Resize',
|
|
67
|
+
description: 'The text give to the resize option in the overflow dropdown for images'
|
|
63
68
|
}
|
|
64
69
|
});
|
|
@@ -16,6 +16,7 @@ var _mediaCard = require("@atlaskit/media-card");
|
|
|
16
16
|
var _mediaClient = require("@atlaskit/media-client");
|
|
17
17
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
18
18
|
var _mediaViewer = require("@atlaskit/media-viewer");
|
|
19
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
20
|
var _mediaInlineCard = require("../messages/media-inline-card");
|
|
20
21
|
var _constants = require("./constants");
|
|
21
22
|
var _inlineImageCard = require("./inline-image-card");
|
|
@@ -39,7 +40,8 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
39
40
|
border = _ref.border,
|
|
40
41
|
ssr = _ref.ssr,
|
|
41
42
|
serializeDataAttrs = _ref.serializeDataAttrs,
|
|
42
|
-
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer
|
|
43
|
+
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer,
|
|
44
|
+
isViewOnly = _ref.isViewOnly;
|
|
43
45
|
var _useState = (0, _react.useState)(),
|
|
44
46
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
45
47
|
fileState = _useState2[0],
|
|
@@ -194,11 +196,18 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
194
196
|
}
|
|
195
197
|
return {};
|
|
196
198
|
}, [alt, fileState, height, identifier, width, serializeDataAttrs]);
|
|
197
|
-
var onMediaInlineImageClick = (0, _react.useCallback)(function () {
|
|
199
|
+
var onMediaInlineImageClick = (0, _react.useCallback)(function (e) {
|
|
198
200
|
if (shouldOpenMediaViewer) {
|
|
199
201
|
setMediaViewerVisible(true);
|
|
200
202
|
}
|
|
201
|
-
|
|
203
|
+
|
|
204
|
+
// In edit mode (node content wrapper has contenteditable set to true), link redirection is disabled by default
|
|
205
|
+
// We need to call "stopPropagation" here in order to prevent in editor view mode, the browser from navigating to
|
|
206
|
+
// another URL if the media node is wrapped in a link mark.
|
|
207
|
+
if (isViewOnly && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
208
|
+
e.preventDefault();
|
|
209
|
+
}
|
|
210
|
+
}, [shouldOpenMediaViewer, isViewOnly]);
|
|
202
211
|
var onMediaInlinePreviewClose = (0, _react.useCallback)(function () {
|
|
203
212
|
setMediaViewerVisible(false);
|
|
204
213
|
}, []);
|
|
@@ -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.6";
|
|
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.6";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -54,5 +54,10 @@ export const pixelEntryMessages = defineMessages({
|
|
|
54
54
|
id: 'fabric.editor.media.pixelEntry.closePixelEntry',
|
|
55
55
|
defaultMessage: 'Close',
|
|
56
56
|
description: 'The text give to the close button used to close the pixel inputs and go back to main toolbar'
|
|
57
|
+
},
|
|
58
|
+
resizeOption: {
|
|
59
|
+
id: 'fabric.editor.media.pixelEntry.ResizeOption',
|
|
60
|
+
defaultMessage: 'Resize',
|
|
61
|
+
description: 'The text give to the resize option in the overflow dropdown for images'
|
|
57
62
|
}
|
|
58
63
|
});
|
|
@@ -13,6 +13,7 @@ import { fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, MediaCardErr
|
|
|
13
13
|
import { FileFetcherError } from '@atlaskit/media-client';
|
|
14
14
|
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
15
15
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
16
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
17
|
import { messages } from '../messages/media-inline-card';
|
|
17
18
|
import { referenceHeights } from './constants';
|
|
18
19
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -31,7 +32,8 @@ export const MediaInlineImageCardInternal = ({
|
|
|
31
32
|
border,
|
|
32
33
|
ssr,
|
|
33
34
|
serializeDataAttrs,
|
|
34
|
-
shouldOpenMediaViewer
|
|
35
|
+
shouldOpenMediaViewer,
|
|
36
|
+
isViewOnly
|
|
35
37
|
}) => {
|
|
36
38
|
const [fileState, setFileState] = useState();
|
|
37
39
|
const [subscribeError, setSubscribeError] = useState();
|
|
@@ -169,11 +171,18 @@ export const MediaInlineImageCardInternal = ({
|
|
|
169
171
|
}
|
|
170
172
|
return {};
|
|
171
173
|
}, [alt, fileState, height, identifier, width, serializeDataAttrs]);
|
|
172
|
-
const onMediaInlineImageClick = useCallback(
|
|
174
|
+
const onMediaInlineImageClick = useCallback(e => {
|
|
173
175
|
if (shouldOpenMediaViewer) {
|
|
174
176
|
setMediaViewerVisible(true);
|
|
175
177
|
}
|
|
176
|
-
|
|
178
|
+
|
|
179
|
+
// In edit mode (node content wrapper has contenteditable set to true), link redirection is disabled by default
|
|
180
|
+
// We need to call "stopPropagation" here in order to prevent in editor view mode, the browser from navigating to
|
|
181
|
+
// another URL if the media node is wrapped in a link mark.
|
|
182
|
+
if (isViewOnly && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
183
|
+
e.preventDefault();
|
|
184
|
+
}
|
|
185
|
+
}, [shouldOpenMediaViewer, isViewOnly]);
|
|
177
186
|
const onMediaInlinePreviewClose = useCallback(() => {
|
|
178
187
|
setMediaViewerVisible(false);
|
|
179
188
|
}, []);
|
|
@@ -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.6";
|
|
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.6";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -54,5 +54,10 @@ export var pixelEntryMessages = defineMessages({
|
|
|
54
54
|
id: 'fabric.editor.media.pixelEntry.closePixelEntry',
|
|
55
55
|
defaultMessage: 'Close',
|
|
56
56
|
description: 'The text give to the close button used to close the pixel inputs and go back to main toolbar'
|
|
57
|
+
},
|
|
58
|
+
resizeOption: {
|
|
59
|
+
id: 'fabric.editor.media.pixelEntry.ResizeOption',
|
|
60
|
+
defaultMessage: 'Resize',
|
|
61
|
+
description: 'The text give to the resize option in the overflow dropdown for images'
|
|
57
62
|
}
|
|
58
63
|
});
|
|
@@ -17,6 +17,7 @@ import { fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, MediaCardErr
|
|
|
17
17
|
import { FileFetcherError } from '@atlaskit/media-client';
|
|
18
18
|
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
19
19
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
20
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
21
|
import { messages } from '../messages/media-inline-card';
|
|
21
22
|
import { referenceHeights } from './constants';
|
|
22
23
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -35,7 +36,8 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
35
36
|
border = _ref.border,
|
|
36
37
|
ssr = _ref.ssr,
|
|
37
38
|
serializeDataAttrs = _ref.serializeDataAttrs,
|
|
38
|
-
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer
|
|
39
|
+
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer,
|
|
40
|
+
isViewOnly = _ref.isViewOnly;
|
|
39
41
|
var _useState = useState(),
|
|
40
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
41
43
|
fileState = _useState2[0],
|
|
@@ -190,11 +192,18 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
190
192
|
}
|
|
191
193
|
return {};
|
|
192
194
|
}, [alt, fileState, height, identifier, width, serializeDataAttrs]);
|
|
193
|
-
var onMediaInlineImageClick = useCallback(function () {
|
|
195
|
+
var onMediaInlineImageClick = useCallback(function (e) {
|
|
194
196
|
if (shouldOpenMediaViewer) {
|
|
195
197
|
setMediaViewerVisible(true);
|
|
196
198
|
}
|
|
197
|
-
|
|
199
|
+
|
|
200
|
+
// In edit mode (node content wrapper has contenteditable set to true), link redirection is disabled by default
|
|
201
|
+
// We need to call "stopPropagation" here in order to prevent in editor view mode, the browser from navigating to
|
|
202
|
+
// another URL if the media node is wrapped in a link mark.
|
|
203
|
+
if (isViewOnly && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
204
|
+
e.preventDefault();
|
|
205
|
+
}
|
|
206
|
+
}, [shouldOpenMediaViewer, isViewOnly]);
|
|
198
207
|
var onMediaInlinePreviewClose = useCallback(function () {
|
|
199
208
|
setMediaViewerVisible(false);
|
|
200
209
|
}, []);
|
|
@@ -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.6";
|
|
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.6";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -15,6 +15,7 @@ export interface MediaInlineImageCardProps {
|
|
|
15
15
|
};
|
|
16
16
|
ssr?: MediaSSR;
|
|
17
17
|
shouldOpenMediaViewer?: boolean;
|
|
18
|
+
isViewOnly?: boolean;
|
|
18
19
|
}
|
|
19
|
-
export declare const MediaInlineImageCardInternal: ({ mediaClient, identifier, isSelected, intl, alt, isLazy, width, height, border, ssr, serializeDataAttrs, shouldOpenMediaViewer, }: MediaInlineImageCardProps & WrappedComponentProps & MediaInlineAttrs) => jsx.JSX.Element;
|
|
20
|
+
export declare const MediaInlineImageCardInternal: ({ mediaClient, identifier, isSelected, intl, alt, isLazy, width, height, border, ssr, serializeDataAttrs, shouldOpenMediaViewer, isViewOnly, }: MediaInlineImageCardProps & WrappedComponentProps & MediaInlineAttrs) => jsx.JSX.Element;
|
|
20
21
|
export declare const MediaInlineImageCard: React.ComponentType<React.PropsWithChildren<MediaInlineImageCardProps & MediaInlineAttrs>>;
|
|
@@ -15,6 +15,7 @@ export interface MediaInlineImageCardProps {
|
|
|
15
15
|
};
|
|
16
16
|
ssr?: MediaSSR;
|
|
17
17
|
shouldOpenMediaViewer?: boolean;
|
|
18
|
+
isViewOnly?: boolean;
|
|
18
19
|
}
|
|
19
|
-
export declare const MediaInlineImageCardInternal: ({ mediaClient, identifier, isSelected, intl, alt, isLazy, width, height, border, ssr, serializeDataAttrs, shouldOpenMediaViewer, }: MediaInlineImageCardProps & WrappedComponentProps & MediaInlineAttrs) => jsx.JSX.Element;
|
|
20
|
+
export declare const MediaInlineImageCardInternal: ({ mediaClient, identifier, isSelected, intl, alt, isLazy, width, height, border, ssr, serializeDataAttrs, shouldOpenMediaViewer, isViewOnly, }: MediaInlineImageCardProps & WrappedComponentProps & MediaInlineAttrs) => jsx.JSX.Element;
|
|
20
21
|
export declare const MediaInlineImageCard: React.ComponentType<React.PropsWithChildren<MediaInlineImageCardProps & MediaInlineAttrs>>;
|
package/package.json
CHANGED