@atlaskit/editor-core 188.8.0 → 188.9.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 +13 -0
- package/dist/cjs/composable-editor/editor-internal.js +2 -2
- package/dist/cjs/create-editor/ReactEditorView.js +796 -8
- package/dist/cjs/labs/next/presets/universal.js +7 -4
- package/dist/cjs/plugins/index.js +0 -21
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +753 -2
- package/dist/es2019/labs/next/presets/universal.js +4 -1
- package/dist/es2019/plugins/index.js +0 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +797 -8
- package/dist/esm/labs/next/presets/universal.js +4 -1
- package/dist/esm/plugins/index.js +0 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +119 -5
- package/dist/types/plugins/index.d.ts +0 -3
- package/dist/types/plugins/insert-block/types.d.ts +1 -1
- package/dist/types/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +119 -5
- package/dist/types-ts4.5/plugins/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
- package/package.json +5 -3
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +0 -812
- package/dist/cjs/create-editor/ReactEditorViewNext.js +0 -15
- package/dist/cjs/plugins/save-on-enter/index.js +0 -70
- package/dist/cjs/plugins/scroll-into-view/index.js +0 -55
- package/dist/cjs/plugins/status/actions.js +0 -158
- package/dist/cjs/plugins/status/analytics.js +0 -31
- package/dist/cjs/plugins/status/index.js +0 -143
- package/dist/cjs/plugins/status/keymap.js +0 -22
- package/dist/cjs/plugins/status/nodeviews/status.js +0 -58
- package/dist/cjs/plugins/status/plugin-key.js +0 -9
- package/dist/cjs/plugins/status/plugin.js +0 -133
- package/dist/cjs/plugins/status/types.js +0 -5
- package/dist/cjs/plugins/status/ui/statusPicker.js +0 -314
- package/dist/cjs/plugins/status/utils.js +0 -22
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +0 -753
- package/dist/es2019/create-editor/ReactEditorViewNext.js +0 -7
- package/dist/es2019/plugins/save-on-enter/index.js +0 -63
- package/dist/es2019/plugins/scroll-into-view/index.js +0 -44
- package/dist/es2019/plugins/status/actions.js +0 -144
- package/dist/es2019/plugins/status/analytics.js +0 -18
- package/dist/es2019/plugins/status/index.js +0 -135
- package/dist/es2019/plugins/status/keymap.js +0 -13
- package/dist/es2019/plugins/status/nodeviews/status.js +0 -60
- package/dist/es2019/plugins/status/plugin-key.js +0 -3
- package/dist/es2019/plugins/status/plugin.js +0 -113
- package/dist/es2019/plugins/status/types.js +0 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +0 -293
- package/dist/es2019/plugins/status/utils.js +0 -12
- package/dist/esm/create-editor/ReactEditorViewInternal.js +0 -806
- package/dist/esm/create-editor/ReactEditorViewNext.js +0 -7
- package/dist/esm/plugins/save-on-enter/index.js +0 -63
- package/dist/esm/plugins/scroll-into-view/index.js +0 -50
- package/dist/esm/plugins/status/actions.js +0 -151
- package/dist/esm/plugins/status/analytics.js +0 -24
- package/dist/esm/plugins/status/index.js +0 -136
- package/dist/esm/plugins/status/keymap.js +0 -15
- package/dist/esm/plugins/status/nodeviews/status.js +0 -51
- package/dist/esm/plugins/status/plugin-key.js +0 -3
- package/dist/esm/plugins/status/plugin.js +0 -115
- package/dist/esm/plugins/status/types.js +0 -1
- package/dist/esm/plugins/status/ui/statusPicker.js +0 -308
- package/dist/esm/plugins/status/utils.js +0 -16
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -119
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +0 -8
- package/dist/types/plugins/save-on-enter/index.d.ts +0 -10
- package/dist/types/plugins/scroll-into-view/index.d.ts +0 -14
- package/dist/types/plugins/status/actions.d.ts +0 -16
- package/dist/types/plugins/status/analytics.d.ts +0 -4
- package/dist/types/plugins/status/index.d.ts +0 -15
- package/dist/types/plugins/status/keymap.d.ts +0 -3
- package/dist/types/plugins/status/nodeviews/status.d.ts +0 -25
- package/dist/types/plugins/status/plugin-key.d.ts +0 -4
- package/dist/types/plugins/status/plugin.d.ts +0 -7
- package/dist/types/plugins/status/types.d.ts +0 -18
- package/dist/types/plugins/status/ui/statusPicker.d.ts +0 -63
- package/dist/types/plugins/status/utils.d.ts +0 -5
- package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -119
- package/dist/types-ts4.5/create-editor/ReactEditorViewNext.d.ts +0 -8
- package/dist/types-ts4.5/plugins/save-on-enter/index.d.ts +0 -10
- package/dist/types-ts4.5/plugins/scroll-into-view/index.d.ts +0 -14
- package/dist/types-ts4.5/plugins/status/actions.d.ts +0 -16
- package/dist/types-ts4.5/plugins/status/analytics.d.ts +0 -4
- package/dist/types-ts4.5/plugins/status/index.d.ts +0 -17
- package/dist/types-ts4.5/plugins/status/keymap.d.ts +0 -3
- package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +0 -25
- package/dist/types-ts4.5/plugins/status/plugin-key.d.ts +0 -4
- package/dist/types-ts4.5/plugins/status/plugin.d.ts +0 -7
- package/dist/types-ts4.5/plugins/status/types.d.ts +0 -18
- package/dist/types-ts4.5/plugins/status/ui/statusPicker.d.ts +0 -63
- package/dist/types-ts4.5/plugins/status/utils.d.ts +0 -5
|
@@ -2,7 +2,8 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin,
|
|
5
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../../../plugins';
|
|
6
|
+
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
6
7
|
import { datePlugin } from '../../../plugins/date';
|
|
7
8
|
import { captionPlugin } from '@atlaskit/editor-plugin-caption';
|
|
8
9
|
import { borderPlugin } from '@atlaskit/editor-plugin-border';
|
|
@@ -19,6 +20,8 @@ import { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
|
19
20
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
20
21
|
import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
21
22
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
23
|
+
import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
24
|
+
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
22
25
|
import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
|
|
23
26
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
24
27
|
import { createDefaultPreset } from './default';
|
|
@@ -15,12 +15,10 @@ export { default as mentionsPlugin } from './mentions';
|
|
|
15
15
|
export { default as panelPlugin } from './panel';
|
|
16
16
|
export { default as pastePlugin } from './paste';
|
|
17
17
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
18
|
-
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
19
18
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
20
19
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
21
20
|
export { default as textColorPlugin } from './text-color';
|
|
22
21
|
export { default as typeAheadPlugin } from './type-ahead';
|
|
23
|
-
export { default as statusPlugin } from './status';
|
|
24
22
|
export { default as breakoutPlugin } from './breakout';
|
|
25
23
|
export { default as alignmentPlugin } from './alignment';
|
|
26
24
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
@@ -32,7 +30,6 @@ export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
|
32
30
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
33
31
|
export { default as historyPlugin } from './history';
|
|
34
32
|
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
35
|
-
export { default as scrollIntoViewPlugin } from './scroll-into-view';
|
|
36
33
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
37
34
|
export { default as findReplacePlugin } from './find-replace';
|
|
38
35
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
@@ -1,8 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
8
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
9
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
10
|
+
import type { ErrorReporter, SEVERITY } from '@atlaskit/editor-common/utils';
|
|
11
|
+
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
12
|
+
import type { Transformer, AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
|
|
13
|
+
import type { Dispatch } from '../event-dispatcher';
|
|
14
|
+
import { EventDispatcher } from '../event-dispatcher';
|
|
15
|
+
import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
|
|
16
|
+
import type { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
|
|
17
|
+
import type { EditorNextProps } from '../types/editor-props';
|
|
18
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
19
|
+
import type { SetEditorAPI } from '../presets/context';
|
|
20
|
+
import { TransactionTracker } from '../utils/performance/track-transactions';
|
|
21
|
+
import type { FireAnalyticsCallback, AnalyticsEventPayload, DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
22
|
+
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
23
|
+
export interface EditorViewProps {
|
|
24
|
+
editorProps: EditorProps | EditorNextProps;
|
|
25
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
26
|
+
providerFactory: ProviderFactory;
|
|
27
|
+
portalProviderAPI: PortalProviderAPI;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
experienceStore?: ExperienceStore;
|
|
30
|
+
setEditorApi?: SetEditorAPI;
|
|
31
|
+
render?: (props: {
|
|
32
|
+
editor: JSX.Element;
|
|
33
|
+
view?: EditorView;
|
|
34
|
+
config: EditorConfig;
|
|
35
|
+
eventDispatcher: EventDispatcher;
|
|
36
|
+
transformer?: Transformer<string>;
|
|
37
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
38
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
39
|
+
}) => JSX.Element;
|
|
40
|
+
onEditorCreated: (instance: {
|
|
41
|
+
view: EditorView;
|
|
42
|
+
config: EditorConfig;
|
|
43
|
+
eventDispatcher: EventDispatcher;
|
|
44
|
+
transformer?: Transformer<string>;
|
|
45
|
+
}) => void;
|
|
46
|
+
onEditorDestroyed: (instance: {
|
|
47
|
+
view: EditorView;
|
|
48
|
+
config: EditorConfig;
|
|
49
|
+
eventDispatcher: EventDispatcher;
|
|
50
|
+
transformer?: Transformer<string>;
|
|
51
|
+
}) => void;
|
|
52
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
4
53
|
}
|
|
5
|
-
|
|
6
|
-
|
|
54
|
+
interface CreateEditorStateOptions {
|
|
55
|
+
props: EditorViewProps;
|
|
56
|
+
context: EditorReactContext;
|
|
57
|
+
doc?: string | Object | PMNode;
|
|
58
|
+
resetting?: boolean;
|
|
59
|
+
selectionAtStart?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare class ReactEditorView<T = {}> extends React.Component<EditorViewProps & WrappedComponentProps & T, {}, EditorReactContext> {
|
|
62
|
+
view?: EditorView;
|
|
63
|
+
eventDispatcher: EventDispatcher;
|
|
64
|
+
contentTransformer?: Transformer<string>;
|
|
65
|
+
config: EditorConfig;
|
|
66
|
+
editorState: EditorState;
|
|
67
|
+
errorReporter: ErrorReporter;
|
|
68
|
+
dispatch: Dispatch;
|
|
69
|
+
proseMirrorRenderedSeverity?: SEVERITY;
|
|
70
|
+
transactionTracker: TransactionTracker;
|
|
71
|
+
validTransactionCount: number;
|
|
72
|
+
experienceStore?: ExperienceStore;
|
|
73
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
74
|
+
static contextTypes: {
|
|
75
|
+
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
76
|
+
};
|
|
77
|
+
private canDispatchTransactions;
|
|
78
|
+
private focusTimeoutId?;
|
|
79
|
+
private reliabilityInterval?;
|
|
80
|
+
private pluginPerformanceObserver;
|
|
81
|
+
private featureFlags;
|
|
82
|
+
private pluginInjectionAPI;
|
|
83
|
+
private onPluginObservation;
|
|
84
|
+
get transactionTracking(): import("@atlaskit/editor-common/types").TransactionTracking;
|
|
85
|
+
private getPluginNames;
|
|
86
|
+
private countNodes;
|
|
87
|
+
private isTransactionTrackingExplicitlyDisabled;
|
|
88
|
+
constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
|
|
89
|
+
getEditorState: () => EditorState | undefined;
|
|
90
|
+
getEditorView: () => EditorView | undefined;
|
|
91
|
+
UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
|
|
92
|
+
formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
|
|
93
|
+
resetEditorState: ({ doc, shouldScrollToBottom, }: {
|
|
94
|
+
doc: string;
|
|
95
|
+
shouldScrollToBottom: boolean;
|
|
96
|
+
}) => void;
|
|
97
|
+
blur: () => void;
|
|
98
|
+
reconfigureState(props: EditorViewProps): void;
|
|
99
|
+
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
100
|
+
componentDidMount(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Clean up any non-PM resources when the editor is unmounted
|
|
103
|
+
*/
|
|
104
|
+
componentWillUnmount(): void;
|
|
105
|
+
private editorPlugins;
|
|
106
|
+
getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
|
|
107
|
+
createEditorState: (options: CreateEditorStateOptions) => EditorState;
|
|
108
|
+
private onEditorViewStateUpdated;
|
|
109
|
+
private trackValidTransactions;
|
|
110
|
+
private dispatchTransaction;
|
|
111
|
+
getDirectEditorProps: (state?: EditorState) => DirectEditorProps;
|
|
112
|
+
private createEditorView;
|
|
113
|
+
handleEditorViewRef: (node: HTMLDivElement) => void;
|
|
114
|
+
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
|
115
|
+
private createEditor;
|
|
116
|
+
private editor;
|
|
117
|
+
render(): JSX.Element;
|
|
118
|
+
}
|
|
119
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps<"intl">>> & {
|
|
120
|
+
WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps<"intl">>;
|
|
7
121
|
};
|
|
8
122
|
export default _default;
|
|
@@ -15,12 +15,10 @@ export { default as mentionsPlugin } from './mentions';
|
|
|
15
15
|
export { default as panelPlugin } from './panel';
|
|
16
16
|
export { default as pastePlugin } from './paste';
|
|
17
17
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
18
|
-
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
19
18
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
20
19
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
21
20
|
export { default as textColorPlugin } from './text-color';
|
|
22
21
|
export { default as typeAheadPlugin } from './type-ahead';
|
|
23
|
-
export { default as statusPlugin } from './status';
|
|
24
22
|
export { default as breakoutPlugin } from './breakout';
|
|
25
23
|
export { default as alignmentPlugin } from './alignment';
|
|
26
24
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
@@ -32,7 +30,6 @@ export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
|
32
30
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
33
31
|
export { default as historyPlugin } from './history';
|
|
34
32
|
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
35
|
-
export { default as scrollIntoViewPlugin } from './scroll-into-view';
|
|
36
33
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
37
34
|
export { default as findReplacePlugin } from './find-replace';
|
|
38
35
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
@@ -14,7 +14,7 @@ import type panelPlugin from '../panel';
|
|
|
14
14
|
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
15
15
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
16
16
|
import type { MentionPlugin } from '../mentions';
|
|
17
|
-
import type { StatusPlugin } from '
|
|
17
|
+
import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
|
|
18
18
|
export type InsertBlockPluginDependencies = [
|
|
19
19
|
FeatureFlagsPlugin,
|
|
20
20
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { DatePluginSharedState } from '../../date';
|
|
3
3
|
import type { ConfigWithNodeInfo } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
4
|
-
import type { StatusState } from '
|
|
4
|
+
import type { StatusState } from '@atlaskit/editor-plugin-status';
|
|
5
5
|
type SubscribeToToolbarAndPickerUpdatesCallbackArgs = {
|
|
6
6
|
dateState?: DatePluginSharedState;
|
|
7
7
|
statusState?: StatusState;
|
|
@@ -1,8 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
8
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
9
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
10
|
+
import type { ErrorReporter, SEVERITY } from '@atlaskit/editor-common/utils';
|
|
11
|
+
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
12
|
+
import type { Transformer, AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
|
|
13
|
+
import type { Dispatch } from '../event-dispatcher';
|
|
14
|
+
import { EventDispatcher } from '../event-dispatcher';
|
|
15
|
+
import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
|
|
16
|
+
import type { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
|
|
17
|
+
import type { EditorNextProps } from '../types/editor-props';
|
|
18
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
19
|
+
import type { SetEditorAPI } from '../presets/context';
|
|
20
|
+
import { TransactionTracker } from '../utils/performance/track-transactions';
|
|
21
|
+
import type { FireAnalyticsCallback, AnalyticsEventPayload, DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
22
|
+
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
23
|
+
export interface EditorViewProps {
|
|
24
|
+
editorProps: EditorProps | EditorNextProps;
|
|
25
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
26
|
+
providerFactory: ProviderFactory;
|
|
27
|
+
portalProviderAPI: PortalProviderAPI;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
experienceStore?: ExperienceStore;
|
|
30
|
+
setEditorApi?: SetEditorAPI;
|
|
31
|
+
render?: (props: {
|
|
32
|
+
editor: JSX.Element;
|
|
33
|
+
view?: EditorView;
|
|
34
|
+
config: EditorConfig;
|
|
35
|
+
eventDispatcher: EventDispatcher;
|
|
36
|
+
transformer?: Transformer<string>;
|
|
37
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
38
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
39
|
+
}) => JSX.Element;
|
|
40
|
+
onEditorCreated: (instance: {
|
|
41
|
+
view: EditorView;
|
|
42
|
+
config: EditorConfig;
|
|
43
|
+
eventDispatcher: EventDispatcher;
|
|
44
|
+
transformer?: Transformer<string>;
|
|
45
|
+
}) => void;
|
|
46
|
+
onEditorDestroyed: (instance: {
|
|
47
|
+
view: EditorView;
|
|
48
|
+
config: EditorConfig;
|
|
49
|
+
eventDispatcher: EventDispatcher;
|
|
50
|
+
transformer?: Transformer<string>;
|
|
51
|
+
}) => void;
|
|
52
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
4
53
|
}
|
|
5
|
-
|
|
6
|
-
|
|
54
|
+
interface CreateEditorStateOptions {
|
|
55
|
+
props: EditorViewProps;
|
|
56
|
+
context: EditorReactContext;
|
|
57
|
+
doc?: string | Object | PMNode;
|
|
58
|
+
resetting?: boolean;
|
|
59
|
+
selectionAtStart?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare class ReactEditorView<T = {}> extends React.Component<EditorViewProps & WrappedComponentProps & T, {}, EditorReactContext> {
|
|
62
|
+
view?: EditorView;
|
|
63
|
+
eventDispatcher: EventDispatcher;
|
|
64
|
+
contentTransformer?: Transformer<string>;
|
|
65
|
+
config: EditorConfig;
|
|
66
|
+
editorState: EditorState;
|
|
67
|
+
errorReporter: ErrorReporter;
|
|
68
|
+
dispatch: Dispatch;
|
|
69
|
+
proseMirrorRenderedSeverity?: SEVERITY;
|
|
70
|
+
transactionTracker: TransactionTracker;
|
|
71
|
+
validTransactionCount: number;
|
|
72
|
+
experienceStore?: ExperienceStore;
|
|
73
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
74
|
+
static contextTypes: {
|
|
75
|
+
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
76
|
+
};
|
|
77
|
+
private canDispatchTransactions;
|
|
78
|
+
private focusTimeoutId?;
|
|
79
|
+
private reliabilityInterval?;
|
|
80
|
+
private pluginPerformanceObserver;
|
|
81
|
+
private featureFlags;
|
|
82
|
+
private pluginInjectionAPI;
|
|
83
|
+
private onPluginObservation;
|
|
84
|
+
get transactionTracking(): import("@atlaskit/editor-common/types").TransactionTracking;
|
|
85
|
+
private getPluginNames;
|
|
86
|
+
private countNodes;
|
|
87
|
+
private isTransactionTrackingExplicitlyDisabled;
|
|
88
|
+
constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
|
|
89
|
+
getEditorState: () => EditorState | undefined;
|
|
90
|
+
getEditorView: () => EditorView | undefined;
|
|
91
|
+
UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
|
|
92
|
+
formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
|
|
93
|
+
resetEditorState: ({ doc, shouldScrollToBottom, }: {
|
|
94
|
+
doc: string;
|
|
95
|
+
shouldScrollToBottom: boolean;
|
|
96
|
+
}) => void;
|
|
97
|
+
blur: () => void;
|
|
98
|
+
reconfigureState(props: EditorViewProps): void;
|
|
99
|
+
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
100
|
+
componentDidMount(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Clean up any non-PM resources when the editor is unmounted
|
|
103
|
+
*/
|
|
104
|
+
componentWillUnmount(): void;
|
|
105
|
+
private editorPlugins;
|
|
106
|
+
getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
|
|
107
|
+
createEditorState: (options: CreateEditorStateOptions) => EditorState;
|
|
108
|
+
private onEditorViewStateUpdated;
|
|
109
|
+
private trackValidTransactions;
|
|
110
|
+
private dispatchTransaction;
|
|
111
|
+
getDirectEditorProps: (state?: EditorState) => DirectEditorProps;
|
|
112
|
+
private createEditorView;
|
|
113
|
+
handleEditorViewRef: (node: HTMLDivElement) => void;
|
|
114
|
+
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
|
115
|
+
private createEditor;
|
|
116
|
+
private editor;
|
|
117
|
+
render(): JSX.Element;
|
|
118
|
+
}
|
|
119
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps<"intl">>> & {
|
|
120
|
+
WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps<"intl">>;
|
|
7
121
|
};
|
|
8
122
|
export default _default;
|
|
@@ -15,12 +15,10 @@ export { default as mentionsPlugin } from './mentions';
|
|
|
15
15
|
export { default as panelPlugin } from './panel';
|
|
16
16
|
export { default as pastePlugin } from './paste';
|
|
17
17
|
export { default as placeholderTextPlugin } from './placeholder-text';
|
|
18
|
-
export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
19
18
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
20
19
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
21
20
|
export { default as textColorPlugin } from './text-color';
|
|
22
21
|
export { default as typeAheadPlugin } from './type-ahead';
|
|
23
|
-
export { default as statusPlugin } from './status';
|
|
24
22
|
export { default as breakoutPlugin } from './breakout';
|
|
25
23
|
export { default as alignmentPlugin } from './alignment';
|
|
26
24
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
@@ -32,7 +30,6 @@ export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
|
32
30
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
33
31
|
export { default as historyPlugin } from './history';
|
|
34
32
|
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
35
|
-
export { default as scrollIntoViewPlugin } from './scroll-into-view';
|
|
36
33
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
37
34
|
export { default as findReplacePlugin } from './find-replace';
|
|
38
35
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
@@ -14,7 +14,7 @@ import type panelPlugin from '../panel';
|
|
|
14
14
|
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
15
15
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
16
16
|
import type { MentionPlugin } from '../mentions';
|
|
17
|
-
import type { StatusPlugin } from '
|
|
17
|
+
import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
|
|
18
18
|
export type InsertBlockPluginDependencies = [
|
|
19
19
|
FeatureFlagsPlugin,
|
|
20
20
|
OptionalPlugin<typeof tablesPlugin>,
|
package/dist/types-ts4.5/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { DatePluginSharedState } from '../../date';
|
|
3
3
|
import type { ConfigWithNodeInfo } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
4
|
-
import type { StatusState } from '
|
|
4
|
+
import type { StatusState } from '@atlaskit/editor-plugin-status';
|
|
5
5
|
type SubscribeToToolbarAndPickerUpdatesCallbackArgs = {
|
|
6
6
|
dateState?: DatePluginSharedState;
|
|
7
7
|
statusState?: StatusState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "188.
|
|
3
|
+
"version": "188.9.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -87,7 +87,10 @@
|
|
|
87
87
|
"@atlaskit/editor-plugin-placeholder": "^0.1.0",
|
|
88
88
|
"@atlaskit/editor-plugin-quick-insert": "^0.2.0",
|
|
89
89
|
"@atlaskit/editor-plugin-rule": "^0.1.0",
|
|
90
|
+
"@atlaskit/editor-plugin-save-on-enter": "^0.1.0",
|
|
91
|
+
"@atlaskit/editor-plugin-scroll-into-view": "^0.1.0",
|
|
90
92
|
"@atlaskit/editor-plugin-selection": "^0.1.0",
|
|
93
|
+
"@atlaskit/editor-plugin-status": "^0.1.0",
|
|
91
94
|
"@atlaskit/editor-plugin-table": "^5.2.0",
|
|
92
95
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
93
96
|
"@atlaskit/editor-plugin-type-ahead": "^0.6.0",
|
|
@@ -116,7 +119,6 @@
|
|
|
116
119
|
"@atlaskit/smart-card": "^26.34.0",
|
|
117
120
|
"@atlaskit/smart-user-picker": "^6.3.0",
|
|
118
121
|
"@atlaskit/spinner": "^15.6.0",
|
|
119
|
-
"@atlaskit/status": "^1.4.0",
|
|
120
122
|
"@atlaskit/tabs": "^13.4.0",
|
|
121
123
|
"@atlaskit/task-decision": "^17.9.0",
|
|
122
124
|
"@atlaskit/textarea": "^4.7.0",
|
|
@@ -155,7 +157,7 @@
|
|
|
155
157
|
"@af/integration-testing": "*",
|
|
156
158
|
"@af/visual-regression": "*",
|
|
157
159
|
"@atlaskit/collab-provider": "9.15.1",
|
|
158
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
160
|
+
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
159
161
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
160
162
|
"@atlaskit/flag": "^15.2.0",
|
|
161
163
|
"@atlaskit/icon-object": "^6.3.0",
|