@atlaskit/editor-common 102.0.0 → 102.1.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 +16 -0
- package/dist/cjs/ai-messages/ai.js +5 -0
- package/dist/cjs/analytics/types/general-events.js +1 -1
- package/dist/cjs/collab/index.js +2 -0
- package/dist/cjs/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +26 -52
- package/dist/cjs/extensibility/MultiBodiedExtension/action-api.js +2 -0
- package/dist/cjs/insert/index.js +2 -0
- package/dist/cjs/keymaps/keymap.js +4 -2
- package/dist/cjs/lazy-node-view/index.js +1 -1
- package/dist/cjs/media-inline/inline-image-card.js +2 -0
- package/dist/cjs/messages/annotation.js +2 -0
- package/dist/cjs/messages/help-dialog.js +2 -0
- package/dist/cjs/monitoring/environment.js +2 -0
- package/dist/cjs/monitoring/error.js +3 -1
- package/dist/cjs/node-width/index.js +0 -1
- package/dist/cjs/quick-insert/assets/datasource-assets-objects.js +1 -1
- package/dist/cjs/quick-insert/assets/datasource-jira-issue.js +1 -1
- package/dist/cjs/quick-insert/assets/feedback.js +1 -1
- package/dist/cjs/quick-insert/assets/quote.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +1 -1
- package/dist/cjs/react-node-view/index.js +1 -1
- package/dist/cjs/selection/gap-cursor/selection.js +1 -1
- package/dist/cjs/styles/shared/annotation.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Layer/index.js +0 -1
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +13 -4
- package/dist/cjs/utils/calculate-toolbar-position.js +4 -0
- package/dist/cjs/utils/compareNodes.js +0 -1
- package/dist/cjs/utils/get-performance-options.js +0 -1
- package/dist/cjs/utils/is-text-input.js +0 -2
- package/dist/cjs/utils/table.js +2 -0
- package/dist/cjs/utils/validate-using-spec.js +2 -0
- package/dist/cjs/with-plugin-state/index.js +0 -1
- package/dist/es2019/ai-messages/ai.js +5 -0
- package/dist/es2019/analytics/types/general-events.js +1 -3
- package/dist/es2019/collab/index.js +2 -0
- package/dist/es2019/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +28 -54
- package/dist/es2019/extensibility/MultiBodiedExtension/action-api.js +2 -0
- package/dist/es2019/insert/index.js +2 -0
- package/dist/es2019/keymaps/keymap.js +4 -2
- package/dist/es2019/lazy-node-view/index.js +1 -1
- package/dist/es2019/media-inline/inline-image-card.js +2 -0
- package/dist/es2019/messages/annotation.js +2 -0
- package/dist/es2019/messages/help-dialog.js +2 -0
- package/dist/es2019/monitoring/environment.js +2 -0
- package/dist/es2019/monitoring/error.js +3 -1
- package/dist/es2019/node-width/index.js +0 -1
- package/dist/es2019/quick-insert/assets/datasource-assets-objects.js +1 -1
- package/dist/es2019/quick-insert/assets/datasource-jira-issue.js +1 -1
- package/dist/es2019/quick-insert/assets/feedback.js +1 -1
- package/dist/es2019/quick-insert/assets/quote.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +1 -1
- package/dist/es2019/react-node-view/index.js +1 -1
- package/dist/es2019/selection/gap-cursor/selection.js +1 -1
- package/dist/es2019/styles/shared/annotation.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Layer/index.js +0 -1
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/es2019/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +12 -3
- package/dist/es2019/utils/calculate-toolbar-position.js +4 -0
- package/dist/es2019/utils/compareNodes.js +0 -1
- package/dist/es2019/utils/get-performance-options.js +0 -1
- package/dist/es2019/utils/is-text-input.js +0 -2
- package/dist/es2019/utils/table.js +2 -0
- package/dist/es2019/utils/validate-using-spec.js +2 -0
- package/dist/es2019/with-plugin-state/index.js +0 -1
- package/dist/esm/ai-messages/ai.js +5 -0
- package/dist/esm/analytics/types/general-events.js +1 -3
- package/dist/esm/collab/index.js +2 -0
- package/dist/esm/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +27 -52
- package/dist/esm/extensibility/MultiBodiedExtension/action-api.js +2 -0
- package/dist/esm/insert/index.js +2 -0
- package/dist/esm/keymaps/keymap.js +4 -2
- package/dist/esm/lazy-node-view/index.js +1 -1
- package/dist/esm/media-inline/inline-image-card.js +2 -0
- package/dist/esm/messages/annotation.js +2 -0
- package/dist/esm/messages/help-dialog.js +2 -0
- package/dist/esm/monitoring/environment.js +2 -0
- package/dist/esm/monitoring/error.js +3 -1
- package/dist/esm/node-width/index.js +0 -1
- package/dist/esm/quick-insert/assets/datasource-assets-objects.js +1 -1
- package/dist/esm/quick-insert/assets/datasource-jira-issue.js +1 -1
- package/dist/esm/quick-insert/assets/feedback.js +1 -1
- package/dist/esm/quick-insert/assets/quote.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +1 -1
- package/dist/esm/react-node-view/index.js +1 -1
- package/dist/esm/selection/gap-cursor/selection.js +1 -1
- package/dist/esm/styles/shared/annotation.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Layer/index.js +0 -1
- package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/esm/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +13 -4
- package/dist/esm/utils/calculate-toolbar-position.js +4 -0
- package/dist/esm/utils/compareNodes.js +0 -1
- package/dist/esm/utils/get-performance-options.js +0 -1
- package/dist/esm/utils/is-text-input.js +0 -2
- package/dist/esm/utils/table.js +2 -0
- package/dist/esm/utils/validate-using-spec.js +2 -0
- package/dist/esm/with-plugin-state/index.js +0 -1
- package/dist/types/ai-messages/ai.d.ts +5 -0
- package/dist/types/types/annotation/index.d.ts +0 -3
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +6 -0
- package/dist/types-ts4.5/ai-messages/ai.d.ts +5 -0
- package/dist/types-ts4.5/types/annotation/index.d.ts +0 -3
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +6 -0
- package/package.json +1 -4
|
@@ -34,9 +34,11 @@ export function keymap(bindings) {
|
|
|
34
34
|
var isDeadKey = name === 'Dead';
|
|
35
35
|
if (isModKeyPressed && (isNonLatinKey || isDeadKey)) {
|
|
36
36
|
keyboardEvent = new KeyboardEvent(event.type, {
|
|
37
|
+
// Ignored via go/ees007
|
|
38
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
37
39
|
// FIXME: The event.keyCode is deprecated (see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode),
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
+
// and could be removed in any time, but the w3c-keyname library doesn't provide a way to get
|
|
41
|
+
// a key by event.code.
|
|
40
42
|
key: base[event.keyCode],
|
|
41
43
|
code: event.code,
|
|
42
44
|
ctrlKey: event.ctrlKey,
|
|
@@ -177,7 +177,7 @@ export var withLazyLoading = function withLazyLoading(_ref) {
|
|
|
177
177
|
});
|
|
178
178
|
requestedNodes.set(nodeName, loaderPromise);
|
|
179
179
|
if (typeof ((_node$type = node.type) === null || _node$type === void 0 || (_node$type = _node$type.spec) === null || _node$type === void 0 ? void 0 : _node$type.toDOM) !== 'function') {
|
|
180
|
-
// TODO:
|
|
180
|
+
// TODO: ED-23982 - Analytics
|
|
181
181
|
// dispatchAnalyticsEvent({
|
|
182
182
|
// action: ACTION.LAZY_NODE_VIEW_ERROR,
|
|
183
183
|
// actionSubject: ACTION_SUBJECT.LAZY_NODE_VIEW,
|
|
@@ -26,6 +26,8 @@ export var InlineImageCard = function InlineImageCard(_ref) {
|
|
|
26
26
|
};
|
|
27
27
|
}, []);
|
|
28
28
|
|
|
29
|
+
// Ignored via go/ees007
|
|
30
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
29
31
|
// TODO do we need to handle nonCriticalError
|
|
30
32
|
var _useFilePreview = useFilePreview({
|
|
31
33
|
identifier: identifier,
|
|
@@ -5,6 +5,8 @@ export var annotationMessages = defineMessages({
|
|
|
5
5
|
defaultMessage: 'Comment',
|
|
6
6
|
description: 'Create/add an inline comment based on the users selection'
|
|
7
7
|
},
|
|
8
|
+
// Ignored via go/ees007
|
|
9
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
8
10
|
// TODO: Remove this message when the editor_inline_comments_on_inline_nodes FF is removed
|
|
9
11
|
createCommentInvalid: {
|
|
10
12
|
id: 'fabric.editor.createCommentInvalid',
|
|
@@ -85,6 +85,8 @@ export var helpDialogMessages = defineMessages({
|
|
|
85
85
|
defaultMessage: 'Close help dialog',
|
|
86
86
|
description: ''
|
|
87
87
|
},
|
|
88
|
+
// Ignored via go/ees007
|
|
89
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
88
90
|
// TODO: Move it inside quick insert plugin
|
|
89
91
|
quickInsert: {
|
|
90
92
|
id: 'fabric.editor.quickInsert',
|
|
@@ -3,6 +3,8 @@ var FEDRAMP_MODERATE = 'fedramp-moderate';
|
|
|
3
3
|
// To determine whether an instance is a FedRAMP instance
|
|
4
4
|
// Copied from platform/packages/uip/atl-context/src/services/is-fedramp/index.tsx
|
|
5
5
|
// We cannot import the same-named function from @atlassian/atl-context due to editor-common being a public package (and atl-context being private)
|
|
6
|
+
// Ignored via go/ees007
|
|
7
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
6
8
|
// TODO: Seek alternatives
|
|
7
9
|
export function isFedRamp() {
|
|
8
10
|
var _global$location;
|
|
@@ -7,9 +7,11 @@ 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.
|
|
10
|
+
var packageVersion = "102.1.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
|
+
// Ignored via go/ees007
|
|
14
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
13
15
|
// TODO: Sanitise the URL instead of just removing it
|
|
14
16
|
if (data.request) {
|
|
15
17
|
delete data.request.url;
|
|
@@ -35,7 +35,6 @@ export var getParentNodeWidth = function getParentNodeWidth(pos, state, containe
|
|
|
35
35
|
}
|
|
36
36
|
var parentWidth = calcBreakoutNodeWidth(layout, containerWidth, isFullWidthModeEnabled);
|
|
37
37
|
|
|
38
|
-
// TODO: ED-15663
|
|
39
38
|
// Please, do not copy or use this kind of code below
|
|
40
39
|
// @ts-ignore
|
|
41
40
|
var contextPanelPluginKey = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// TODO:
|
|
1
|
+
// TODO: DSP-4138 - migrate to @atlaskit/design-system
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export default function IconDatasourceAssetsObjects() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// TODO:
|
|
1
|
+
// TODO: DSP-4138 - Migrate to @atlaskit/design-system
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export default function IconDatasourceJiraIssue() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// TODO:
|
|
1
|
+
// TODO: DSP-4138 - Migrate to @atlaskit/design-system
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useIconThemed } from '../use-icon-themed';
|
|
@@ -267,7 +267,7 @@ function getPortalChildren(_ref2) {
|
|
|
267
267
|
className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
|
|
268
268
|
}), ZERO_WIDTH_SPACE), jsx(Component, _extends({
|
|
269
269
|
view: nodeViewParams.view
|
|
270
|
-
// TODO:
|
|
270
|
+
// TODO: ED-13910 - Remove the boolean to fix the prosemirror view type
|
|
271
271
|
// Ignored via go/ees005
|
|
272
272
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
273
273
|
,
|
|
@@ -221,7 +221,7 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
221
221
|
|
|
222
222
|
// View should not process a re-render if this is false.
|
|
223
223
|
// We dont want to destroy the view, so we return true.
|
|
224
|
-
// TODO: ED-13910 Fix viewShouldUpdate readonly decoration array
|
|
224
|
+
// TODO: ED-13910 - Fix viewShouldUpdate readonly decoration array
|
|
225
225
|
if (!this.viewShouldUpdate(node, decorations)) {
|
|
226
226
|
this.node = node;
|
|
227
227
|
return true;
|
|
@@ -87,7 +87,7 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
|
87
87
|
}
|
|
88
88
|
var pos = $pos.pos;
|
|
89
89
|
|
|
90
|
-
// TODO: Fix any, potential issue.
|
|
90
|
+
// TODO: ED-5048 - Fix any, potential issue.
|
|
91
91
|
// Ignored via go/ees005
|
|
92
92
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
93
|
var next = null;
|
|
@@ -61,7 +61,7 @@ export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
|
|
|
61
61
|
// emotion and token look up
|
|
62
62
|
background: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
|
|
63
63
|
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, #B38600)"),
|
|
64
|
-
// TODO:
|
|
64
|
+
// TODO: DSP-4147 - Annotation shadow
|
|
65
65
|
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
|
|
66
66
|
cursor: 'pointer'
|
|
67
67
|
}),
|
|
@@ -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.
|
|
23
|
+
var packageVersion = "102.1.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -51,7 +51,7 @@ var colorPickerButtonStyle = css({
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
// Control the size of color picker buttons and preview
|
|
54
|
-
// TODO:
|
|
54
|
+
// TODO: DSP-4134 - Color picking UI
|
|
55
55
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
56
56
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
57
57
|
var colorPickerWrapper = function colorPickerWrapper() {
|
|
@@ -9,6 +9,8 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
9
9
|
// Ignored via go/ees005
|
|
10
10
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
11
11
|
}, props, {
|
|
12
|
+
// Ignored via go/ees007
|
|
13
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
12
14
|
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
13
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
14
16
|
style: {
|
|
@@ -6,10 +6,11 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
var _excluded = ["handleClickOutside", "handleEnterKeydown", "handleEscapeKeydown", "closeOnTab"];
|
|
9
|
+
var _excluded = ["handleClickOutside", "handleEnterKeydown", "handleEscapeKeydown", "closeOnTab", "captureClick"];
|
|
10
10
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
14
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
14
15
|
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
15
16
|
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
@@ -68,9 +69,12 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
68
69
|
key: "componentDidMount",
|
|
69
70
|
value: function componentDidMount() {
|
|
70
71
|
if (this.props.handleClickOutside) {
|
|
72
|
+
var options = this.props.captureClick && editorExperiment('platform_editor_controls', 'variant1') ? {
|
|
73
|
+
capture: true
|
|
74
|
+
} : false;
|
|
71
75
|
// Ignored via go/ees005
|
|
72
76
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
73
|
-
document.addEventListener('click', this.handleClick,
|
|
77
|
+
document.addEventListener('click', this.handleClick, options);
|
|
74
78
|
}
|
|
75
79
|
if (this.props.handleEscapeKeydown) {
|
|
76
80
|
var _this$props$editorRef;
|
|
@@ -88,9 +92,12 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
88
92
|
key: "componentWillUnmount",
|
|
89
93
|
value: function componentWillUnmount() {
|
|
90
94
|
if (this.props.handleClickOutside) {
|
|
95
|
+
var options = this.props.captureClick && editorExperiment('platform_editor_controls', 'variant1') ? {
|
|
96
|
+
capture: true
|
|
97
|
+
} : false;
|
|
91
98
|
// Ignored via go/ees005
|
|
92
99
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
93
|
-
document.removeEventListener('click', this.handleClick,
|
|
100
|
+
document.removeEventListener('click', this.handleClick, options);
|
|
94
101
|
}
|
|
95
102
|
if (this.props.handleEscapeKeydown) {
|
|
96
103
|
var _this$props$editorRef2;
|
|
@@ -121,6 +128,7 @@ export default function withReactEditorViewOuterListeners(Component) {
|
|
|
121
128
|
handleEnterKeydown = _ref.handleEnterKeydown,
|
|
122
129
|
handleEscapeKeydown = _ref.handleEscapeKeydown,
|
|
123
130
|
closeOnTab = _ref.closeOnTab,
|
|
131
|
+
captureClick = _ref.captureClick,
|
|
124
132
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
125
133
|
var isActiveProp = hasIsOpen(props) ? props.isOpen : true;
|
|
126
134
|
var _useState = useState(false),
|
|
@@ -152,7 +160,8 @@ export default function withReactEditorViewOuterListeners(Component) {
|
|
|
152
160
|
handleClickOutside: handleClickOutside,
|
|
153
161
|
handleEnterKeydown: handleEnterKeydown,
|
|
154
162
|
handleEscapeKeydown: handleEscapeKeydown,
|
|
155
|
-
closeOnTab: closeOnTab
|
|
163
|
+
closeOnTab: closeOnTab,
|
|
164
|
+
captureClick: captureClick
|
|
156
165
|
}, /*#__PURE__*/React.createElement(Component
|
|
157
166
|
// Ignored via go/ees005
|
|
158
167
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -18,6 +18,8 @@ export var calculateToolbarPositionAboveSelection = function calculateToolbarPos
|
|
|
18
18
|
return nextPos;
|
|
19
19
|
}
|
|
20
20
|
// scroll wrapper for full page, fall back to document body
|
|
21
|
+
// Ignored via go/ees007
|
|
22
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
21
23
|
// TODO: look into using getScrollGutterOptions()
|
|
22
24
|
var scrollWrapper = editorView.dom.closest('.fabric-editor-popup-scroll-parent') || document.body;
|
|
23
25
|
var wrapperBounds = scrollWrapper.getBoundingClientRect();
|
|
@@ -92,6 +94,8 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
|
|
|
92
94
|
return nextPos;
|
|
93
95
|
}
|
|
94
96
|
// scroll wrapper for full page, fall back to document body
|
|
97
|
+
// Ignored via go/ees007
|
|
98
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
95
99
|
// TODO: look into using getScrollGutterOptions()
|
|
96
100
|
var scrollWrapper = editorView.dom.closest('.fabric-editor-popup-scroll-parent') || document.body;
|
|
97
101
|
var wrapperBounds = scrollWrapper.getBoundingClientRect();
|
|
@@ -157,7 +157,6 @@ function getMetaFromNode(node, options, normalizeTextParser) {
|
|
|
157
157
|
}
|
|
158
158
|
case 'mention':
|
|
159
159
|
{
|
|
160
|
-
// TODO: Check what should be the fallback when mention does not have a text
|
|
161
160
|
var _text2 = firstChild.attrs.text || '';
|
|
162
161
|
return {
|
|
163
162
|
type: ContentType.MENTION,
|
|
@@ -8,7 +8,6 @@ var DEFAULT_SAMPLING_RATE = 100;
|
|
|
8
8
|
var DEFAULT_SLOW_THRESHOLD = 7;
|
|
9
9
|
export function getPerformanceOptions(view) {
|
|
10
10
|
var _nodeViewTracking$sam, _nodeViewTracking$slo;
|
|
11
|
-
// TODO: ED-15663
|
|
12
11
|
// Please, do not copy or use this kind of code below
|
|
13
12
|
// @ts-ignore
|
|
14
13
|
var fakePluginKey = {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
// TODO: remove from editor-core utils, re-export from editor-common
|
|
3
|
-
|
|
4
2
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
3
|
export var isTextInput = function isTextInput(tr) {
|
|
6
4
|
var _tr$steps = _slicedToArray(tr.steps, 1),
|
package/dist/esm/utils/table.js
CHANGED
|
@@ -33,6 +33,8 @@ export function getColumnWidths(node) {
|
|
|
33
33
|
return tableColumnWidths;
|
|
34
34
|
}
|
|
35
35
|
export function calcTableColumnWidths(node) {
|
|
36
|
+
// Ignored via go/ees007
|
|
37
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
36
38
|
// TODO: replaced with getColumnWidths, which correctly scans entire table for column widths
|
|
37
39
|
if (fg('platform_editor_table_row_span_fix')) {
|
|
38
40
|
var _firstRow = node.firstChild;
|
|
@@ -42,6 +42,8 @@ export var validationErrorHandler = function validationErrorHandler(entity, erro
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// Ignored via go/ees007
|
|
46
|
+
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
45
47
|
// TODO: We can repair missing content like `panel` without a `paragraph`.
|
|
46
48
|
if (error.code === 'INVALID_CONTENT_LENGTH') {
|
|
47
49
|
if (error.meta && options.allowUnsupportedBlock && entity.content) {
|
|
@@ -4,6 +4,11 @@ export declare const aiMessages: {
|
|
|
4
4
|
defaultMessage: string;
|
|
5
5
|
description: string;
|
|
6
6
|
};
|
|
7
|
+
eventHubfallbackSuggestedTitlePrefix: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
7
12
|
aiToolbarTitle: {
|
|
8
13
|
id: string;
|
|
9
14
|
defaultMessage: string;
|
|
@@ -84,9 +84,6 @@ export type InlineCommentViewComponentProps = {
|
|
|
84
84
|
* for annotation with given ID.
|
|
85
85
|
*
|
|
86
86
|
* The `undefined` will be returned if `editor_inline_comments_on_inline_nodes` is off.
|
|
87
|
-
*
|
|
88
|
-
* @todo: Do not forget to remove `undefined` when the
|
|
89
|
-
* `editor_inline_comments_on_inline_nodes` is removed.
|
|
90
87
|
*/
|
|
91
88
|
getInlineNodeTypes: (annotationId: string) => string[] | undefined;
|
|
92
89
|
};
|
|
@@ -7,6 +7,12 @@ export interface WithOutsideClickProps {
|
|
|
7
7
|
handleEnterKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
8
8
|
targetRef?: any;
|
|
9
9
|
closeOnTab?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Use when you want the click handler to call on the capture phase instead of during bubbling.
|
|
12
|
+
* This is useful when you're in a popup with interative UI elements that may disappear on click
|
|
13
|
+
* like when toggling UI states
|
|
14
|
+
*/
|
|
15
|
+
captureClick?: boolean;
|
|
10
16
|
}
|
|
11
17
|
export default function withReactEditorViewOuterListeners<P extends Object>(Component: React.ComponentType<React.PropsWithChildren<P>>): React.ComponentType<React.PropsWithChildren<P & WithOutsideClickProps>>;
|
|
12
18
|
export {};
|
|
@@ -4,6 +4,11 @@ export declare const aiMessages: {
|
|
|
4
4
|
defaultMessage: string;
|
|
5
5
|
description: string;
|
|
6
6
|
};
|
|
7
|
+
eventHubfallbackSuggestedTitlePrefix: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
7
12
|
aiToolbarTitle: {
|
|
8
13
|
id: string;
|
|
9
14
|
defaultMessage: string;
|
|
@@ -84,9 +84,6 @@ export type InlineCommentViewComponentProps = {
|
|
|
84
84
|
* for annotation with given ID.
|
|
85
85
|
*
|
|
86
86
|
* The `undefined` will be returned if `editor_inline_comments_on_inline_nodes` is off.
|
|
87
|
-
*
|
|
88
|
-
* @todo: Do not forget to remove `undefined` when the
|
|
89
|
-
* `editor_inline_comments_on_inline_nodes` is removed.
|
|
90
87
|
*/
|
|
91
88
|
getInlineNodeTypes: (annotationId: string) => string[] | undefined;
|
|
92
89
|
};
|
|
@@ -7,6 +7,12 @@ export interface WithOutsideClickProps {
|
|
|
7
7
|
handleEnterKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
8
8
|
targetRef?: any;
|
|
9
9
|
closeOnTab?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Use when you want the click handler to call on the capture phase instead of during bubbling.
|
|
12
|
+
* This is useful when you're in a popup with interative UI elements that may disappear on click
|
|
13
|
+
* like when toggling UI states
|
|
14
|
+
*/
|
|
15
|
+
captureClick?: boolean;
|
|
10
16
|
}
|
|
11
17
|
export default function withReactEditorViewOuterListeners<P extends Object>(Component: React.ComponentType<React.PropsWithChildren<P>>): React.ComponentType<React.PropsWithChildren<P & WithOutsideClickProps>>;
|
|
12
18
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "102.
|
|
3
|
+
"version": "102.1.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/"
|
|
@@ -256,9 +256,6 @@
|
|
|
256
256
|
"platform_editor_react18_phase2_v2": {
|
|
257
257
|
"type": "boolean"
|
|
258
258
|
},
|
|
259
|
-
"platform_editor_is_disabled_state_element_browser": {
|
|
260
|
-
"type": "boolean"
|
|
261
|
-
},
|
|
262
259
|
"platform_editor_allow_annotation_triple_click": {
|
|
263
260
|
"type": "boolean"
|
|
264
261
|
},
|