@atlaskit/editor-common 87.5.1 → 87.6.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 +25 -0
- package/dist/cjs/analytics/types/enums.js +4 -0
- package/dist/cjs/analytics/types/upload-media-events.js +5 -0
- package/dist/cjs/lazy-node-view/replace-node-views.js +13 -4
- package/dist/cjs/messages/index.js +7 -0
- package/dist/cjs/messages/media-insert.js +44 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +4 -0
- package/dist/es2019/analytics/types/upload-media-events.js +1 -0
- package/dist/es2019/lazy-node-view/replace-node-views.js +13 -4
- package/dist/es2019/messages/index.js +1 -0
- package/dist/es2019/messages/media-insert.js +38 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +4 -0
- package/dist/esm/analytics/types/upload-media-events.js +1 -0
- package/dist/esm/lazy-node-view/replace-node-views.js +13 -4
- package/dist/esm/messages/index.js +1 -0
- package/dist/esm/messages/media-insert.js +38 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +5 -1
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/analytics/types/format-events.d.ts +2 -2
- package/dist/types/analytics/types/general-events.d.ts +2 -1
- package/dist/types/analytics/types/index.d.ts +1 -0
- package/dist/types/analytics/types/insert-events.d.ts +1 -1
- package/dist/types/analytics/types/upload-media-events.d.ts +10 -0
- package/dist/types/messages/index.d.ts +1 -0
- package/dist/types/messages/media-insert.d.ts +37 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +5 -1
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/format-events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/index.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/insert-events.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/upload-media-events.d.ts +10 -0
- package/dist/types-ts4.5/messages/index.d.ts +1 -0
- package/dist/types-ts4.5/messages/media-insert.d.ts +37 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 87.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#128347](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128347)
|
|
8
|
+
[`e33566cebd5d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e33566cebd5d1) -
|
|
9
|
+
[ED-24175] bump @atlaskit/adf-schema to 40.8.1 and @atlassian/adf-schema-json to 1.22.0 to
|
|
10
|
+
promotecodeblocks & media in quotes, and nested expands in expands to full schema, and allow
|
|
11
|
+
quotes in panels and decisions in lists in stage0 schema, and a validator spec change
|
|
12
|
+
- [#128527](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128527)
|
|
13
|
+
[`e9e003a733b63`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e9e003a733b63) -
|
|
14
|
+
Add media upload from URL and associated i18n, analytics and test packages
|
|
15
|
+
- [#128333](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128333)
|
|
16
|
+
[`4ad86751ab1d7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4ad86751ab1d7) -
|
|
17
|
+
[ED-24505] Implement onClick handler for Turn into dropdown options and update relevant insertion
|
|
18
|
+
analytics with inputMethod: floatingToolbar when an element is inserted via the dropdown
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#128105](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128105)
|
|
23
|
+
[`b55614e1ea801`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b55614e1ea801) -
|
|
24
|
+
added a timeout to the requestIdleCallback inside the LazyNode replacement debounce to ensure it
|
|
25
|
+
is called eventually, limiting potential issues with infinite re-rendering
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 87.5.1
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -145,6 +145,9 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
145
145
|
ACTION["UPDATE_PARAMETERS"] = "updateParameters";
|
|
146
146
|
ACTION["GET_CHILDERN"] = "getChildern";
|
|
147
147
|
ACTION["MOVED"] = "moved";
|
|
148
|
+
ACTION["UPLOAD_COMMENCED"] = "uploadCommenced";
|
|
149
|
+
ACTION["UPLOAD_SUCCEEDED"] = "uploadSucceeded";
|
|
150
|
+
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
148
151
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
149
152
|
return ACTION;
|
|
150
153
|
}({});
|
|
@@ -377,6 +380,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
|
|
|
377
380
|
ACTION_SUBJECT_ID["ON_UNSUPPORTED_INLINE"] = "onUnsupportedInline";
|
|
378
381
|
ACTION_SUBJECT_ID["ON_UNSUPPORTED_BLOCK"] = "onUnsupportedBlock";
|
|
379
382
|
ACTION_SUBJECT_ID["MULTI_BODIED_EXTENSION"] = "multiBodiedExtension";
|
|
383
|
+
ACTION_SUBJECT_ID["UPLOAD_MEDIA_FROM_URL"] = "uploadMediaFromUrl";
|
|
380
384
|
return ACTION_SUBJECT_ID;
|
|
381
385
|
}({});
|
|
382
386
|
var FLOATING_CONTROLS_TITLE = exports.FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -58,16 +58,25 @@ var debouncedReplaceNodeviews = exports.debouncedReplaceNodeviews = (0, _debounc
|
|
|
58
58
|
// From here, we will access the loaded node views by lexical scope
|
|
59
59
|
cache.set(view, {});
|
|
60
60
|
|
|
61
|
-
// eslint-disable-next-line compat/compat
|
|
62
|
-
var idle = window.requestIdleCallback;
|
|
63
|
-
|
|
64
61
|
/*
|
|
65
62
|
* For reasons that goes beyond my knowledge
|
|
66
63
|
* some Firefox versions aren't calling the requestIdleCallback.
|
|
67
64
|
*
|
|
68
65
|
* So, we need this check to make sure we use the requestAnimationFrame instead
|
|
66
|
+
*
|
|
67
|
+
* setting timeout to 2s to ensure this function is called, but not before prosemirror render
|
|
68
|
+
* and other important tasks are done - adjust this timeout based on user feedback
|
|
69
69
|
*/
|
|
70
|
-
var later =
|
|
70
|
+
var later = function later(callback) {
|
|
71
|
+
// eslint-disable-next-line compat/compat
|
|
72
|
+
if (isFirefox || !window.requestIdleCallback) {
|
|
73
|
+
return window.requestAnimationFrame(callback);
|
|
74
|
+
}
|
|
75
|
+
// eslint-disable-next-line compat/compat
|
|
76
|
+
window.requestIdleCallback(callback, {
|
|
77
|
+
timeout: 2000
|
|
78
|
+
});
|
|
79
|
+
};
|
|
71
80
|
later(function () {
|
|
72
81
|
var currentNodeViews = view.props.nodeViews;
|
|
73
82
|
var nextNodeViews = _objectSpread(_objectSpread({}, currentNodeViews), nodeViewsToReplace);
|
|
@@ -118,6 +118,12 @@ Object.defineProperty(exports, "mediaAndEmbedToolbarMessages", {
|
|
|
118
118
|
return _mediaAndEmbedToolbar.toolbarMessages;
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
+
Object.defineProperty(exports, "mediaInsertMessages", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function get() {
|
|
124
|
+
return _mediaInsert.mediaInsertMessages;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
121
127
|
Object.defineProperty(exports, "mentionMessages", {
|
|
122
128
|
enumerable: true,
|
|
123
129
|
get: function get() {
|
|
@@ -222,6 +228,7 @@ var _mentions = require("./mentions");
|
|
|
222
228
|
var _helpDialog = require("./help-dialog");
|
|
223
229
|
var _highlight = require("./highlight");
|
|
224
230
|
var _blockControls = require("./block-controls");
|
|
231
|
+
var _mediaInsert = require("./media-insert");
|
|
225
232
|
var _default = exports.default = (0, _reactIntlNext.defineMessages)({
|
|
226
233
|
layoutFixedWidth: {
|
|
227
234
|
id: 'fabric.editor.layoutFixedWidth',
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mediaInsertMessages = void 0;
|
|
7
|
+
var _reactIntlNext = require("react-intl-next");
|
|
8
|
+
var mediaInsertMessages = exports.mediaInsertMessages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
+
loadPreview: {
|
|
10
|
+
id: 'fabric.editor.media.insert.loadPreview',
|
|
11
|
+
defaultMessage: 'Load preview',
|
|
12
|
+
description: 'Text on a button that loads a preview of a media file that has been linked to from a URL'
|
|
13
|
+
},
|
|
14
|
+
insert: {
|
|
15
|
+
id: 'fabric.editor.media.insert.insert',
|
|
16
|
+
defaultMessage: 'Insert',
|
|
17
|
+
description: 'Text on the modal action button that inserts the linked media file into the editor document'
|
|
18
|
+
},
|
|
19
|
+
pasteLinkToUpload: {
|
|
20
|
+
id: 'fabric.editor.media.insert.pasteLinkToUpload',
|
|
21
|
+
defaultMessage: 'Paste link to upload',
|
|
22
|
+
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
23
|
+
},
|
|
24
|
+
cancel: {
|
|
25
|
+
id: 'fabric.editor.media.insert.cancel',
|
|
26
|
+
defaultMessage: 'Cancel',
|
|
27
|
+
description: 'Text on the modal action button that cancels the media file insertion and closes the modal'
|
|
28
|
+
},
|
|
29
|
+
errorMessage: {
|
|
30
|
+
id: 'fabric.editor.media.insert.errorMessage',
|
|
31
|
+
defaultMessage: 'Unfortunately, we can’t add this image link. Download the image, then drag and drop onto the page.',
|
|
32
|
+
description: 'Error message displayed when a user tries to insert an image from a URL that cannot be loaded. This may be because the URL is invalid, there is a network error or any other reason the preview upload does not succeed. When this occurs the suggestion is to attempt downloading the linked file manually and using a local upload instead.'
|
|
33
|
+
},
|
|
34
|
+
warning: {
|
|
35
|
+
id: 'fabric.editor.media.insert.warning',
|
|
36
|
+
defaultMessage: 'This image might not be visible to others due to source restrictions. Consider uploading the file instead.',
|
|
37
|
+
description: 'Warning message displayed when a user tries to insert an image from a URL that may not be visible to others due to source restrictions such as not having permissions/authentication to load the image. The suggestion is to upload the file instead.'
|
|
38
|
+
},
|
|
39
|
+
mediaAlt: {
|
|
40
|
+
id: 'fabric.editor.media.insert.mediaAlt',
|
|
41
|
+
defaultMessage: 'Preview for uploaded image or video file',
|
|
42
|
+
description: 'Alt text describing a preview of an image uploaded.'
|
|
43
|
+
}
|
|
44
|
+
});
|
|
@@ -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 && Object.prototype.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 = "87.
|
|
20
|
+
var packageVersion = "87.6.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -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 = "87.
|
|
26
|
+
var packageVersion = "87.6.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -139,6 +139,9 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
139
139
|
ACTION["UPDATE_PARAMETERS"] = "updateParameters";
|
|
140
140
|
ACTION["GET_CHILDERN"] = "getChildern";
|
|
141
141
|
ACTION["MOVED"] = "moved";
|
|
142
|
+
ACTION["UPLOAD_COMMENCED"] = "uploadCommenced";
|
|
143
|
+
ACTION["UPLOAD_SUCCEEDED"] = "uploadSucceeded";
|
|
144
|
+
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
142
145
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
143
146
|
return ACTION;
|
|
144
147
|
}({});
|
|
@@ -371,6 +374,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
371
374
|
ACTION_SUBJECT_ID["ON_UNSUPPORTED_INLINE"] = "onUnsupportedInline";
|
|
372
375
|
ACTION_SUBJECT_ID["ON_UNSUPPORTED_BLOCK"] = "onUnsupportedBlock";
|
|
373
376
|
ACTION_SUBJECT_ID["MULTI_BODIED_EXTENSION"] = "multiBodiedExtension";
|
|
377
|
+
ACTION_SUBJECT_ID["UPLOAD_MEDIA_FROM_URL"] = "uploadMediaFromUrl";
|
|
374
378
|
return ACTION_SUBJECT_ID;
|
|
375
379
|
}({});
|
|
376
380
|
export let FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -50,16 +50,25 @@ export const debouncedReplaceNodeviews = debounce((cache, view) => {
|
|
|
50
50
|
// From here, we will access the loaded node views by lexical scope
|
|
51
51
|
cache.set(view, {});
|
|
52
52
|
|
|
53
|
-
// eslint-disable-next-line compat/compat
|
|
54
|
-
const idle = window.requestIdleCallback;
|
|
55
|
-
|
|
56
53
|
/*
|
|
57
54
|
* For reasons that goes beyond my knowledge
|
|
58
55
|
* some Firefox versions aren't calling the requestIdleCallback.
|
|
59
56
|
*
|
|
60
57
|
* So, we need this check to make sure we use the requestAnimationFrame instead
|
|
58
|
+
*
|
|
59
|
+
* setting timeout to 2s to ensure this function is called, but not before prosemirror render
|
|
60
|
+
* and other important tasks are done - adjust this timeout based on user feedback
|
|
61
61
|
*/
|
|
62
|
-
const later =
|
|
62
|
+
const later = callback => {
|
|
63
|
+
// eslint-disable-next-line compat/compat
|
|
64
|
+
if (isFirefox || !window.requestIdleCallback) {
|
|
65
|
+
return window.requestAnimationFrame(callback);
|
|
66
|
+
}
|
|
67
|
+
// eslint-disable-next-line compat/compat
|
|
68
|
+
window.requestIdleCallback(callback, {
|
|
69
|
+
timeout: 2000
|
|
70
|
+
});
|
|
71
|
+
};
|
|
63
72
|
later(() => {
|
|
64
73
|
const currentNodeViews = view.props.nodeViews;
|
|
65
74
|
const nextNodeViews = {
|
|
@@ -30,6 +30,7 @@ export { mentionMessages } from './mentions';
|
|
|
30
30
|
export { helpDialogMessages } from './help-dialog';
|
|
31
31
|
export { highlightMessages } from './highlight';
|
|
32
32
|
export { messages as blockControlsMessages } from './block-controls';
|
|
33
|
+
export { mediaInsertMessages } from './media-insert';
|
|
33
34
|
export default defineMessages({
|
|
34
35
|
layoutFixedWidth: {
|
|
35
36
|
id: 'fabric.editor.layoutFixedWidth',
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const mediaInsertMessages = defineMessages({
|
|
3
|
+
loadPreview: {
|
|
4
|
+
id: 'fabric.editor.media.insert.loadPreview',
|
|
5
|
+
defaultMessage: 'Load preview',
|
|
6
|
+
description: 'Text on a button that loads a preview of a media file that has been linked to from a URL'
|
|
7
|
+
},
|
|
8
|
+
insert: {
|
|
9
|
+
id: 'fabric.editor.media.insert.insert',
|
|
10
|
+
defaultMessage: 'Insert',
|
|
11
|
+
description: 'Text on the modal action button that inserts the linked media file into the editor document'
|
|
12
|
+
},
|
|
13
|
+
pasteLinkToUpload: {
|
|
14
|
+
id: 'fabric.editor.media.insert.pasteLinkToUpload',
|
|
15
|
+
defaultMessage: 'Paste link to upload',
|
|
16
|
+
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
17
|
+
},
|
|
18
|
+
cancel: {
|
|
19
|
+
id: 'fabric.editor.media.insert.cancel',
|
|
20
|
+
defaultMessage: 'Cancel',
|
|
21
|
+
description: 'Text on the modal action button that cancels the media file insertion and closes the modal'
|
|
22
|
+
},
|
|
23
|
+
errorMessage: {
|
|
24
|
+
id: 'fabric.editor.media.insert.errorMessage',
|
|
25
|
+
defaultMessage: 'Unfortunately, we can’t add this image link. Download the image, then drag and drop onto the page.',
|
|
26
|
+
description: 'Error message displayed when a user tries to insert an image from a URL that cannot be loaded. This may be because the URL is invalid, there is a network error or any other reason the preview upload does not succeed. When this occurs the suggestion is to attempt downloading the linked file manually and using a local upload instead.'
|
|
27
|
+
},
|
|
28
|
+
warning: {
|
|
29
|
+
id: 'fabric.editor.media.insert.warning',
|
|
30
|
+
defaultMessage: 'This image might not be visible to others due to source restrictions. Consider uploading the file instead.',
|
|
31
|
+
description: 'Warning message displayed when a user tries to insert an image from a URL that may not be visible to others due to source restrictions such as not having permissions/authentication to load the image. The suggestion is to upload the file instead.'
|
|
32
|
+
},
|
|
33
|
+
mediaAlt: {
|
|
34
|
+
id: 'fabric.editor.media.insert.mediaAlt',
|
|
35
|
+
defaultMessage: 'Preview for uploaded image or video file',
|
|
36
|
+
description: 'Alt text describing a preview of an image uploaded.'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
@@ -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 = "87.
|
|
4
|
+
const packageVersion = "87.6.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -12,7 +12,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
12
12
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
13
13
|
import Layer from '../Layer';
|
|
14
14
|
const packageName = "@atlaskit/editor-common";
|
|
15
|
-
const packageVersion = "87.
|
|
15
|
+
const packageVersion = "87.6.0";
|
|
16
16
|
const halfFocusRing = 1;
|
|
17
17
|
const dropOffset = '0, 8';
|
|
18
18
|
class DropList extends Component {
|
|
@@ -139,6 +139,9 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
139
139
|
ACTION["UPDATE_PARAMETERS"] = "updateParameters";
|
|
140
140
|
ACTION["GET_CHILDERN"] = "getChildern";
|
|
141
141
|
ACTION["MOVED"] = "moved";
|
|
142
|
+
ACTION["UPLOAD_COMMENCED"] = "uploadCommenced";
|
|
143
|
+
ACTION["UPLOAD_SUCCEEDED"] = "uploadSucceeded";
|
|
144
|
+
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
142
145
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
143
146
|
return ACTION;
|
|
144
147
|
}({});
|
|
@@ -371,6 +374,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
371
374
|
ACTION_SUBJECT_ID["ON_UNSUPPORTED_INLINE"] = "onUnsupportedInline";
|
|
372
375
|
ACTION_SUBJECT_ID["ON_UNSUPPORTED_BLOCK"] = "onUnsupportedBlock";
|
|
373
376
|
ACTION_SUBJECT_ID["MULTI_BODIED_EXTENSION"] = "multiBodiedExtension";
|
|
377
|
+
ACTION_SUBJECT_ID["UPLOAD_MEDIA_FROM_URL"] = "uploadMediaFromUrl";
|
|
374
378
|
return ACTION_SUBJECT_ID;
|
|
375
379
|
}({});
|
|
376
380
|
export var FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -51,16 +51,25 @@ export var debouncedReplaceNodeviews = debounce(function (cache, view) {
|
|
|
51
51
|
// From here, we will access the loaded node views by lexical scope
|
|
52
52
|
cache.set(view, {});
|
|
53
53
|
|
|
54
|
-
// eslint-disable-next-line compat/compat
|
|
55
|
-
var idle = window.requestIdleCallback;
|
|
56
|
-
|
|
57
54
|
/*
|
|
58
55
|
* For reasons that goes beyond my knowledge
|
|
59
56
|
* some Firefox versions aren't calling the requestIdleCallback.
|
|
60
57
|
*
|
|
61
58
|
* So, we need this check to make sure we use the requestAnimationFrame instead
|
|
59
|
+
*
|
|
60
|
+
* setting timeout to 2s to ensure this function is called, but not before prosemirror render
|
|
61
|
+
* and other important tasks are done - adjust this timeout based on user feedback
|
|
62
62
|
*/
|
|
63
|
-
var later =
|
|
63
|
+
var later = function later(callback) {
|
|
64
|
+
// eslint-disable-next-line compat/compat
|
|
65
|
+
if (isFirefox || !window.requestIdleCallback) {
|
|
66
|
+
return window.requestAnimationFrame(callback);
|
|
67
|
+
}
|
|
68
|
+
// eslint-disable-next-line compat/compat
|
|
69
|
+
window.requestIdleCallback(callback, {
|
|
70
|
+
timeout: 2000
|
|
71
|
+
});
|
|
72
|
+
};
|
|
64
73
|
later(function () {
|
|
65
74
|
var currentNodeViews = view.props.nodeViews;
|
|
66
75
|
var nextNodeViews = _objectSpread(_objectSpread({}, currentNodeViews), nodeViewsToReplace);
|
|
@@ -30,6 +30,7 @@ export { mentionMessages } from './mentions';
|
|
|
30
30
|
export { helpDialogMessages } from './help-dialog';
|
|
31
31
|
export { highlightMessages } from './highlight';
|
|
32
32
|
export { messages as blockControlsMessages } from './block-controls';
|
|
33
|
+
export { mediaInsertMessages } from './media-insert';
|
|
33
34
|
export default defineMessages({
|
|
34
35
|
layoutFixedWidth: {
|
|
35
36
|
id: 'fabric.editor.layoutFixedWidth',
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var mediaInsertMessages = defineMessages({
|
|
3
|
+
loadPreview: {
|
|
4
|
+
id: 'fabric.editor.media.insert.loadPreview',
|
|
5
|
+
defaultMessage: 'Load preview',
|
|
6
|
+
description: 'Text on a button that loads a preview of a media file that has been linked to from a URL'
|
|
7
|
+
},
|
|
8
|
+
insert: {
|
|
9
|
+
id: 'fabric.editor.media.insert.insert',
|
|
10
|
+
defaultMessage: 'Insert',
|
|
11
|
+
description: 'Text on the modal action button that inserts the linked media file into the editor document'
|
|
12
|
+
},
|
|
13
|
+
pasteLinkToUpload: {
|
|
14
|
+
id: 'fabric.editor.media.insert.pasteLinkToUpload',
|
|
15
|
+
defaultMessage: 'Paste link to upload',
|
|
16
|
+
description: 'Placeholder text for the input field where a user can paste (as in copy-paste) a URL to upload a media file'
|
|
17
|
+
},
|
|
18
|
+
cancel: {
|
|
19
|
+
id: 'fabric.editor.media.insert.cancel',
|
|
20
|
+
defaultMessage: 'Cancel',
|
|
21
|
+
description: 'Text on the modal action button that cancels the media file insertion and closes the modal'
|
|
22
|
+
},
|
|
23
|
+
errorMessage: {
|
|
24
|
+
id: 'fabric.editor.media.insert.errorMessage',
|
|
25
|
+
defaultMessage: 'Unfortunately, we can’t add this image link. Download the image, then drag and drop onto the page.',
|
|
26
|
+
description: 'Error message displayed when a user tries to insert an image from a URL that cannot be loaded. This may be because the URL is invalid, there is a network error or any other reason the preview upload does not succeed. When this occurs the suggestion is to attempt downloading the linked file manually and using a local upload instead.'
|
|
27
|
+
},
|
|
28
|
+
warning: {
|
|
29
|
+
id: 'fabric.editor.media.insert.warning',
|
|
30
|
+
defaultMessage: 'This image might not be visible to others due to source restrictions. Consider uploading the file instead.',
|
|
31
|
+
description: 'Warning message displayed when a user tries to insert an image from a URL that may not be visible to others due to source restrictions such as not having permissions/authentication to load the image. The suggestion is to upload the file instead.'
|
|
32
|
+
},
|
|
33
|
+
mediaAlt: {
|
|
34
|
+
id: 'fabric.editor.media.insert.mediaAlt',
|
|
35
|
+
defaultMessage: 'Preview for uploaded image or video file',
|
|
36
|
+
description: 'Alt text describing a preview of an image uploaded.'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
@@ -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 = "87.
|
|
10
|
+
var packageVersion = "87.6.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -20,7 +20,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
20
20
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "87.
|
|
23
|
+
var packageVersion = "87.6.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -146,6 +146,9 @@ export declare enum ACTION {
|
|
|
146
146
|
UPDATE_PARAMETERS = "updateParameters",
|
|
147
147
|
GET_CHILDERN = "getChildern",
|
|
148
148
|
MOVED = "moved",
|
|
149
|
+
UPLOAD_COMMENCED = "uploadCommenced",
|
|
150
|
+
UPLOAD_SUCCEEDED = "uploadSucceeded",
|
|
151
|
+
UPLOAD_FAILED = "uploadFailed",
|
|
149
152
|
TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap"
|
|
150
153
|
}
|
|
151
154
|
export declare enum INPUT_METHOD {
|
|
@@ -373,7 +376,8 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
373
376
|
UNSUPPORTED_MARK = "unsupportedMark",
|
|
374
377
|
ON_UNSUPPORTED_INLINE = "onUnsupportedInline",
|
|
375
378
|
ON_UNSUPPORTED_BLOCK = "onUnsupportedBlock",
|
|
376
|
-
MULTI_BODIED_EXTENSION = "multiBodiedExtension"
|
|
379
|
+
MULTI_BODIED_EXTENSION = "multiBodiedExtension",
|
|
380
|
+
UPLOAD_MEDIA_FROM_URL = "uploadMediaFromUrl"
|
|
377
381
|
}
|
|
378
382
|
export declare enum FLOATING_CONTROLS_TITLE {
|
|
379
383
|
CODE_BLOCK = "codeBlockFloatingControls",
|
|
@@ -33,6 +33,7 @@ import type { SelectionEventPayload } from './selection-events';
|
|
|
33
33
|
import type { SubstituteEventPayload } from './substitute-events';
|
|
34
34
|
import type { TableEventPayload } from './table-events';
|
|
35
35
|
import type { TypeAheadPayload } from './type-ahead';
|
|
36
|
+
import type { MediaUploadEventPayload } from './upload-media-events';
|
|
36
37
|
import type { OperationalAEP, OperationalExposureAEP, TrackAEP } from './utils';
|
|
37
38
|
import type { ViewEventPayload } from './view-events';
|
|
38
39
|
type Dispatch<T = any> = (eventName: PluginKey | string, data: T) => void;
|
|
@@ -43,7 +44,7 @@ export type SimplifiedNode = {
|
|
|
43
44
|
marks?: string[];
|
|
44
45
|
content?: SimplifiedNode[];
|
|
45
46
|
};
|
|
46
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload;
|
|
47
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload;
|
|
47
48
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
48
49
|
previousColor: string;
|
|
49
50
|
newColor: string;
|
|
@@ -27,12 +27,12 @@ type FormatIndentationAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_INDENT, {
|
|
|
27
27
|
indentType: INDENT_TYPE.PARAGRAPH | INDENT_TYPE.LIST | INDENT_TYPE.HEADING | INDENT_TYPE.CODE_BLOCK | INDENT_TYPE.TASK_LIST;
|
|
28
28
|
}>;
|
|
29
29
|
type FormatHeadingAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_HEADING, {
|
|
30
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT;
|
|
30
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FLOATING_TB;
|
|
31
31
|
newHeadingLevel: HeadingLevelsAndNormalText;
|
|
32
32
|
previousHeadingLevel?: HeadingLevelsAndNormalText;
|
|
33
33
|
}>;
|
|
34
34
|
type FormatBlockQuoteAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_BLOCK_QUOTE, {
|
|
35
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT;
|
|
35
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FLOATING_TB;
|
|
36
36
|
}>;
|
|
37
37
|
type FormatClearAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_CLEAR, {
|
|
38
38
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
|
|
@@ -128,6 +128,7 @@ type ButtonHelpAEP = ButtonAEP<ACTION_SUBJECT_ID.BUTTON_HELP, {
|
|
|
128
128
|
inputMethod: INPUT_METHOD.SHORTCUT | INPUT_METHOD.TOOLBAR;
|
|
129
129
|
}>;
|
|
130
130
|
type ButtonFeedbackAEP = ButtonAEP<ACTION_SUBJECT_ID.BUTTON_FEEDBACK, undefined>;
|
|
131
|
+
type ButtonUploadMediaAEP = ButtonAEP<ACTION_SUBJECT_ID.UPLOAD_MEDIA_FROM_URL, undefined>;
|
|
131
132
|
type PickerEmojiAEP = PickerAEP<ACTION_SUBJECT_ID.PICKER_EMOJI, {
|
|
132
133
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD;
|
|
133
134
|
}>;
|
|
@@ -181,5 +182,5 @@ type CodeBlockWordWrapToggleAEP = TrackAEP<ACTION.TOGGLE_CODE_BLOCK_WRAP, ACTION
|
|
|
181
182
|
mode: MODE;
|
|
182
183
|
wordWrapEnabled: boolean;
|
|
183
184
|
}, undefined>;
|
|
184
|
-
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP;
|
|
185
|
+
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP;
|
|
185
186
|
export {};
|
|
@@ -37,3 +37,4 @@ export type { PluginMethodReport, PluginsReport, NodeCount, PluginPerformanceRep
|
|
|
37
37
|
export type { InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, } from './referentiality-events';
|
|
38
38
|
export type { ElementEventPayload } from './element-events';
|
|
39
39
|
export type { ViewInlineCommentsButtonEventAEP, ViewEventPayload } from './view-events';
|
|
40
|
+
export type { MediaUploadEventPayload } from './upload-media-events';
|
|
@@ -50,7 +50,7 @@ type InsertTableAEP = InsertAEP<ACTION_SUBJECT_ID.TABLE, {
|
|
|
50
50
|
localId?: string;
|
|
51
51
|
}, undefined>;
|
|
52
52
|
type InsertExpandAEP = InsertAEP<ACTION_SUBJECT_ID.EXPAND | ACTION_SUBJECT_ID.NESTED_EXPAND, {
|
|
53
|
-
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU;
|
|
53
|
+
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FLOATING_TB;
|
|
54
54
|
}, undefined>;
|
|
55
55
|
type InsertActionDecisionAEP = InsertAEP<ACTION_SUBJECT_ID.DECISION | ACTION_SUBJECT_ID.ACTION, {
|
|
56
56
|
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import type { OperationalAEP } from './utils';
|
|
3
|
+
type MediaUploadAEP<Action, Attributes> = OperationalAEP<Action, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.UPLOAD_MEDIA_FROM_URL, Attributes>;
|
|
4
|
+
type MediaUploadCommencedAEP = MediaUploadAEP<ACTION.UPLOAD_COMMENCED, undefined>;
|
|
5
|
+
type MediaUploadSuccessAEP = MediaUploadAEP<ACTION.UPLOAD_SUCCEEDED, undefined>;
|
|
6
|
+
type MediaUploadFailAEP = MediaUploadAEP<ACTION.UPLOAD_FAILED, {
|
|
7
|
+
reason: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type MediaUploadEventPayload = MediaUploadCommencedAEP | MediaUploadSuccessAEP | MediaUploadFailAEP;
|
|
10
|
+
export {};
|
|
@@ -29,6 +29,7 @@ export { mentionMessages } from './mentions';
|
|
|
29
29
|
export { helpDialogMessages } from './help-dialog';
|
|
30
30
|
export { highlightMessages } from './highlight';
|
|
31
31
|
export { messages as blockControlsMessages } from './block-controls';
|
|
32
|
+
export { mediaInsertMessages } from './media-insert';
|
|
32
33
|
declare const _default: {
|
|
33
34
|
layoutFixedWidth: {
|
|
34
35
|
id: string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const mediaInsertMessages: {
|
|
2
|
+
loadPreview: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
insert: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
pasteLinkToUpload: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
cancel: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
errorMessage: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
warning: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
mediaAlt: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -146,6 +146,9 @@ export declare enum ACTION {
|
|
|
146
146
|
UPDATE_PARAMETERS = "updateParameters",
|
|
147
147
|
GET_CHILDERN = "getChildern",
|
|
148
148
|
MOVED = "moved",
|
|
149
|
+
UPLOAD_COMMENCED = "uploadCommenced",
|
|
150
|
+
UPLOAD_SUCCEEDED = "uploadSucceeded",
|
|
151
|
+
UPLOAD_FAILED = "uploadFailed",
|
|
149
152
|
TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap"
|
|
150
153
|
}
|
|
151
154
|
export declare enum INPUT_METHOD {
|
|
@@ -373,7 +376,8 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
373
376
|
UNSUPPORTED_MARK = "unsupportedMark",
|
|
374
377
|
ON_UNSUPPORTED_INLINE = "onUnsupportedInline",
|
|
375
378
|
ON_UNSUPPORTED_BLOCK = "onUnsupportedBlock",
|
|
376
|
-
MULTI_BODIED_EXTENSION = "multiBodiedExtension"
|
|
379
|
+
MULTI_BODIED_EXTENSION = "multiBodiedExtension",
|
|
380
|
+
UPLOAD_MEDIA_FROM_URL = "uploadMediaFromUrl"
|
|
377
381
|
}
|
|
378
382
|
export declare enum FLOATING_CONTROLS_TITLE {
|
|
379
383
|
CODE_BLOCK = "codeBlockFloatingControls",
|
|
@@ -33,6 +33,7 @@ import type { SelectionEventPayload } from './selection-events';
|
|
|
33
33
|
import type { SubstituteEventPayload } from './substitute-events';
|
|
34
34
|
import type { TableEventPayload } from './table-events';
|
|
35
35
|
import type { TypeAheadPayload } from './type-ahead';
|
|
36
|
+
import type { MediaUploadEventPayload } from './upload-media-events';
|
|
36
37
|
import type { OperationalAEP, OperationalExposureAEP, TrackAEP } from './utils';
|
|
37
38
|
import type { ViewEventPayload } from './view-events';
|
|
38
39
|
type Dispatch<T = any> = (eventName: PluginKey | string, data: T) => void;
|
|
@@ -43,7 +44,7 @@ export type SimplifiedNode = {
|
|
|
43
44
|
marks?: string[];
|
|
44
45
|
content?: SimplifiedNode[];
|
|
45
46
|
};
|
|
46
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload;
|
|
47
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload;
|
|
47
48
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
48
49
|
previousColor: string;
|
|
49
50
|
newColor: string;
|
|
@@ -27,12 +27,12 @@ type FormatIndentationAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_INDENT, {
|
|
|
27
27
|
indentType: INDENT_TYPE.PARAGRAPH | INDENT_TYPE.LIST | INDENT_TYPE.HEADING | INDENT_TYPE.CODE_BLOCK | INDENT_TYPE.TASK_LIST;
|
|
28
28
|
}>;
|
|
29
29
|
type FormatHeadingAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_HEADING, {
|
|
30
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT;
|
|
30
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FLOATING_TB;
|
|
31
31
|
newHeadingLevel: HeadingLevelsAndNormalText;
|
|
32
32
|
previousHeadingLevel?: HeadingLevelsAndNormalText;
|
|
33
33
|
}>;
|
|
34
34
|
type FormatBlockQuoteAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_BLOCK_QUOTE, {
|
|
35
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT;
|
|
35
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FLOATING_TB;
|
|
36
36
|
}>;
|
|
37
37
|
type FormatClearAEP = FormatAEP<ACTION_SUBJECT_ID.FORMAT_CLEAR, {
|
|
38
38
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
|
|
@@ -128,6 +128,7 @@ type ButtonHelpAEP = ButtonAEP<ACTION_SUBJECT_ID.BUTTON_HELP, {
|
|
|
128
128
|
inputMethod: INPUT_METHOD.SHORTCUT | INPUT_METHOD.TOOLBAR;
|
|
129
129
|
}>;
|
|
130
130
|
type ButtonFeedbackAEP = ButtonAEP<ACTION_SUBJECT_ID.BUTTON_FEEDBACK, undefined>;
|
|
131
|
+
type ButtonUploadMediaAEP = ButtonAEP<ACTION_SUBJECT_ID.UPLOAD_MEDIA_FROM_URL, undefined>;
|
|
131
132
|
type PickerEmojiAEP = PickerAEP<ACTION_SUBJECT_ID.PICKER_EMOJI, {
|
|
132
133
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD;
|
|
133
134
|
}>;
|
|
@@ -181,5 +182,5 @@ type CodeBlockWordWrapToggleAEP = TrackAEP<ACTION.TOGGLE_CODE_BLOCK_WRAP, ACTION
|
|
|
181
182
|
mode: MODE;
|
|
182
183
|
wordWrapEnabled: boolean;
|
|
183
184
|
}, undefined>;
|
|
184
|
-
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP;
|
|
185
|
+
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP;
|
|
185
186
|
export {};
|
|
@@ -37,3 +37,4 @@ export type { PluginMethodReport, PluginsReport, NodeCount, PluginPerformanceRep
|
|
|
37
37
|
export type { InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, } from './referentiality-events';
|
|
38
38
|
export type { ElementEventPayload } from './element-events';
|
|
39
39
|
export type { ViewInlineCommentsButtonEventAEP, ViewEventPayload } from './view-events';
|
|
40
|
+
export type { MediaUploadEventPayload } from './upload-media-events';
|
|
@@ -50,7 +50,7 @@ type InsertTableAEP = InsertAEP<ACTION_SUBJECT_ID.TABLE, {
|
|
|
50
50
|
localId?: string;
|
|
51
51
|
}, undefined>;
|
|
52
52
|
type InsertExpandAEP = InsertAEP<ACTION_SUBJECT_ID.EXPAND | ACTION_SUBJECT_ID.NESTED_EXPAND, {
|
|
53
|
-
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU;
|
|
53
|
+
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FLOATING_TB;
|
|
54
54
|
}, undefined>;
|
|
55
55
|
type InsertActionDecisionAEP = InsertAEP<ACTION_SUBJECT_ID.DECISION | ACTION_SUBJECT_ID.ACTION, {
|
|
56
56
|
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import type { OperationalAEP } from './utils';
|
|
3
|
+
type MediaUploadAEP<Action, Attributes> = OperationalAEP<Action, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.UPLOAD_MEDIA_FROM_URL, Attributes>;
|
|
4
|
+
type MediaUploadCommencedAEP = MediaUploadAEP<ACTION.UPLOAD_COMMENCED, undefined>;
|
|
5
|
+
type MediaUploadSuccessAEP = MediaUploadAEP<ACTION.UPLOAD_SUCCEEDED, undefined>;
|
|
6
|
+
type MediaUploadFailAEP = MediaUploadAEP<ACTION.UPLOAD_FAILED, {
|
|
7
|
+
reason: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type MediaUploadEventPayload = MediaUploadCommencedAEP | MediaUploadSuccessAEP | MediaUploadFailAEP;
|
|
10
|
+
export {};
|
|
@@ -29,6 +29,7 @@ export { mentionMessages } from './mentions';
|
|
|
29
29
|
export { helpDialogMessages } from './help-dialog';
|
|
30
30
|
export { highlightMessages } from './highlight';
|
|
31
31
|
export { messages as blockControlsMessages } from './block-controls';
|
|
32
|
+
export { mediaInsertMessages } from './media-insert';
|
|
32
33
|
declare const _default: {
|
|
33
34
|
layoutFixedWidth: {
|
|
34
35
|
id: string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const mediaInsertMessages: {
|
|
2
|
+
loadPreview: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
insert: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
pasteLinkToUpload: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
cancel: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
errorMessage: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
warning: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
mediaAlt: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "87.
|
|
3
|
+
"version": "87.6.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/"
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
102
|
-
"@atlaskit/adf-schema": "^40.
|
|
103
|
-
"@atlaskit/adf-utils": "^19.
|
|
102
|
+
"@atlaskit/adf-schema": "^40.8.1",
|
|
103
|
+
"@atlaskit/adf-utils": "^19.7.0",
|
|
104
104
|
"@atlaskit/analytics-listeners": "^8.10.0",
|
|
105
105
|
"@atlaskit/analytics-namespaced-context": "^6.10.0",
|
|
106
106
|
"@atlaskit/analytics-next": "^10.0.0",
|
|
@@ -108,17 +108,17 @@
|
|
|
108
108
|
"@atlaskit/button": "^19.1.0",
|
|
109
109
|
"@atlaskit/code": "^15.4.0",
|
|
110
110
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
111
|
-
"@atlaskit/custom-steps": "^0.
|
|
111
|
+
"@atlaskit/custom-steps": "^0.7.0",
|
|
112
112
|
"@atlaskit/dropdown-menu": "^12.16.0",
|
|
113
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
113
|
+
"@atlaskit/editor-json-transformer": "^8.18.0",
|
|
114
114
|
"@atlaskit/editor-palette": "1.6.0",
|
|
115
115
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
116
116
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
117
117
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
118
118
|
"@atlaskit/emoji": "^67.7.0",
|
|
119
|
-
"@atlaskit/icon": "^22.
|
|
119
|
+
"@atlaskit/icon": "^22.11.0",
|
|
120
120
|
"@atlaskit/icon-object": "^6.4.0",
|
|
121
|
-
"@atlaskit/link-datasource": "^2.
|
|
121
|
+
"@atlaskit/link-datasource": "^2.10.0",
|
|
122
122
|
"@atlaskit/link-picker": "^1.41.0",
|
|
123
123
|
"@atlaskit/media-card": "^78.0.0",
|
|
124
124
|
"@atlaskit/media-client": "^27.3.0",
|