@atlaskit/editor-common 102.0.0 → 102.2.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 +37 -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 -1
- 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/messages/panel.js +5 -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/provider-factory/with-providers.js +7 -28
- 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/ugc-tokens/editor-ugc-token-names.js +21 -21
- 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 -2
- 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/messages/panel.js +5 -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/provider-factory/with-providers.js +2 -21
- 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/ugc-tokens/editor-ugc-token-names.js +21 -21
- 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 -2
- 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/messages/panel.js +5 -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/provider-factory/with-providers.js +7 -28
- 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/ugc-tokens/editor-ugc-token-names.js +21 -21
- 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/collab/index.d.ts +12 -2
- package/dist/types/messages/panel.d.ts +5 -0
- package/dist/types/provider-factory/with-providers.d.ts +0 -1
- 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/collab/index.d.ts +12 -2
- package/dist/types-ts4.5/messages/panel.d.ts +5 -0
- package/dist/types-ts4.5/provider-factory/with-providers.d.ts +0 -1
- 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
|
@@ -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.2.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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import { type BatchAttrsStep, type OverrideDocumentStepJSON as OverrideDocumentStep } from '@atlaskit/adf-schema/steps';
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import type { Node as PMNode, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
7
7
|
import { token } from '@atlaskit/tokens';
|
|
@@ -409,7 +409,17 @@ export type UserPermitType = {
|
|
|
409
409
|
isPermittedToEdit: boolean;
|
|
410
410
|
};
|
|
411
411
|
export type CollabPermissionEventPayload = UserPermitType;
|
|
412
|
-
export
|
|
412
|
+
export type ConflictChange = {
|
|
413
|
+
from: number;
|
|
414
|
+
to: number;
|
|
415
|
+
local: Slice;
|
|
416
|
+
remote: Slice;
|
|
417
|
+
};
|
|
418
|
+
export type ConflictChanges = {
|
|
419
|
+
inserted: ConflictChange[];
|
|
420
|
+
deleted: ConflictChange[];
|
|
421
|
+
};
|
|
422
|
+
export interface CollabEventConflictPayload extends ConflictChanges {
|
|
413
423
|
offlineDoc: PMNode;
|
|
414
424
|
}
|
|
415
425
|
export interface CollabEvents {
|
|
@@ -13,7 +13,6 @@ export declare class WithProviders extends PureComponent<Props, {
|
|
|
13
13
|
mounted: boolean;
|
|
14
14
|
constructor(props: Props);
|
|
15
15
|
componentDidMount(): void;
|
|
16
|
-
UNSAFE_componentWillMount(): void;
|
|
17
16
|
componentWillUnmount(): void;
|
|
18
17
|
handleProviderIfMounted: (name: string, provider?: Promise<any>) => void;
|
|
19
18
|
handleProvider: (name: string, provider?: Promise<any>) => void;
|
|
@@ -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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import { type BatchAttrsStep, type OverrideDocumentStepJSON as OverrideDocumentStep } from '@atlaskit/adf-schema/steps';
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import type { Node as PMNode, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
7
7
|
import { token } from '@atlaskit/tokens';
|
|
@@ -409,7 +409,17 @@ export type UserPermitType = {
|
|
|
409
409
|
isPermittedToEdit: boolean;
|
|
410
410
|
};
|
|
411
411
|
export type CollabPermissionEventPayload = UserPermitType;
|
|
412
|
-
export
|
|
412
|
+
export type ConflictChange = {
|
|
413
|
+
from: number;
|
|
414
|
+
to: number;
|
|
415
|
+
local: Slice;
|
|
416
|
+
remote: Slice;
|
|
417
|
+
};
|
|
418
|
+
export type ConflictChanges = {
|
|
419
|
+
inserted: ConflictChange[];
|
|
420
|
+
deleted: ConflictChange[];
|
|
421
|
+
};
|
|
422
|
+
export interface CollabEventConflictPayload extends ConflictChanges {
|
|
413
423
|
offlineDoc: PMNode;
|
|
414
424
|
}
|
|
415
425
|
export interface CollabEvents {
|
|
@@ -13,7 +13,6 @@ export declare class WithProviders extends PureComponent<Props, {
|
|
|
13
13
|
mounted: boolean;
|
|
14
14
|
constructor(props: Props);
|
|
15
15
|
componentDidMount(): void;
|
|
16
|
-
UNSAFE_componentWillMount(): void;
|
|
17
16
|
componentWillUnmount(): void;
|
|
18
17
|
handleProviderIfMounted: (name: string, provider?: Promise<any>) => void;
|
|
19
18
|
handleProvider: (name: string, provider?: Promise<any>) => void;
|
|
@@ -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.2.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
|
},
|