@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
|
@@ -1,119 +0,0 @@
|
|
|
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[]>;
|
|
53
|
-
}
|
|
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
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EditorViewProps } from './ReactEditorViewInternal';
|
|
3
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare function ReactEditorViewEditor<T = {}>(props: EditorViewProps & WrappedComponentProps & T): JSX.Element;
|
|
5
|
-
declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps<"intl">>> & {
|
|
6
|
-
WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps<"intl">>;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { Dispatch } from '../../event-dispatcher';
|
|
4
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
5
|
-
export declare function createPlugin(eventDispatch: Dispatch, onSave?: (editorView: EditorView) => void): SafePlugin | undefined;
|
|
6
|
-
type Config = (editorView: EditorView) => void;
|
|
7
|
-
declare const saveOnEnterPlugin: NextEditorPlugin<'saveOnEnter', {
|
|
8
|
-
pluginConfiguration: Config | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
export default saveOnEnterPlugin;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
/**
|
|
4
|
-
* Plugin to scroll the user's selection into view whenever the user updates
|
|
5
|
-
* the document eg. inserting, deleting, formatting
|
|
6
|
-
*
|
|
7
|
-
* Behaviour is on by default, can be explicitly opted out of for a transaction by
|
|
8
|
-
* setting scrollIntoView=false meta
|
|
9
|
-
* We ignore collab transactions, appended transactions, transactions without steps,
|
|
10
|
-
* transactions with addToHistory=false meta and typeahead trigger transactions
|
|
11
|
-
*/
|
|
12
|
-
export declare const scrollIntoViewPluginKey: PluginKey<any>;
|
|
13
|
-
declare const scrollIntoViewPlugin: NextEditorPlugin<'scrollIntoView'>;
|
|
14
|
-
export default scrollIntoViewPlugin;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import type { TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { StatusType, ClosingPayload } from './types';
|
|
7
|
-
export declare const DEFAULT_STATUS: StatusType;
|
|
8
|
-
export declare const createStatus: (showStatusPickerAtOffset?: number) => (insert: (node: Node | Object | string, opts: {
|
|
9
|
-
selectInlineNode: boolean;
|
|
10
|
-
}) => Transaction, state: EditorState) => Transaction;
|
|
11
|
-
export declare const updateStatus: (status?: StatusType) => Command;
|
|
12
|
-
export type UpdateStatus = (inputMethod: TOOLBAR_MENU_TYPE, status?: StatusType) => Command;
|
|
13
|
-
export declare const updateStatusWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: TOOLBAR_MENU_TYPE, status?: StatusType) => Command;
|
|
14
|
-
export declare const setStatusPickerAt: (showStatusPickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
15
|
-
export declare const removeStatus: (showStatusPickerAt: number) => Command;
|
|
16
|
-
export declare const commitStatusPicker: (closingPayload?: ClosingPayload) => (editorView: EditorView) => void;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
export declare const FABRIC_CHANNEL = "fabric-elements";
|
|
3
|
-
export declare const createStatusAnalyticsAndFire: (createAnalyticsEvent?: CreateUIAnalyticsEvent) => (payload: AnalyticsEventPayload) => void;
|
|
4
|
-
export declare const analyticsState: (isNew: boolean | undefined) => "update" | "new";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { UpdateStatus } from './actions';
|
|
3
|
-
import { commitStatusPicker } from './actions';
|
|
4
|
-
import type { StatusPluginOptions } from './types';
|
|
5
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
-
export type StatusPlugin = NextEditorPlugin<'status', {
|
|
7
|
-
dependencies: [
|
|
8
|
-
OptionalPlugin<AnalyticsPlugin>
|
|
9
|
-
];
|
|
10
|
-
pluginConfiguration: StatusPluginOptions | undefined;
|
|
11
|
-
actions: {
|
|
12
|
-
commitStatusPicker: typeof commitStatusPicker;
|
|
13
|
-
updateStatus: UpdateStatus;
|
|
14
|
-
};
|
|
15
|
-
}>;
|
|
16
|
-
declare const statusPlugin: StatusPlugin;
|
|
17
|
-
export default statusPlugin;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { IntlShape } from 'react-intl-next';
|
|
6
|
-
import type { Color, StatusStyle } from '@atlaskit/status/element';
|
|
7
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
|
-
import type { InlineNodeViewComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
9
|
-
import type { StatusPluginOptions } from '../types';
|
|
10
|
-
export interface ContainerProps {
|
|
11
|
-
view: EditorView;
|
|
12
|
-
intl: IntlShape;
|
|
13
|
-
text?: string;
|
|
14
|
-
color: Color;
|
|
15
|
-
style?: StatusStyle;
|
|
16
|
-
localId?: string;
|
|
17
|
-
eventDispatcher?: EventDispatcher;
|
|
18
|
-
}
|
|
19
|
-
export declare const IntlStatusContainerView: React.FC<import("react-intl-next").WithIntlProps<ContainerProps>> & {
|
|
20
|
-
WrappedComponent: React.ComponentType<ContainerProps>;
|
|
21
|
-
};
|
|
22
|
-
export type Props = InlineNodeViewComponentProps & {
|
|
23
|
-
options: StatusPluginOptions | undefined;
|
|
24
|
-
};
|
|
25
|
-
export declare const StatusNodeView: (props: Props) => jsx.JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { StatusPluginOptions } from './types';
|
|
4
|
-
export { pluginKey, pluginKeyName } from './plugin-key';
|
|
5
|
-
export type { StatusState, StatusType, ClosingPayload } from './types';
|
|
6
|
-
declare const createPlugin: (pmPluginFactoryParams: PMPluginFactoryParams, options?: StatusPluginOptions) => SafePlugin<any>;
|
|
7
|
-
export default createPlugin;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Color as ColorType } from '@atlaskit/status/element';
|
|
2
|
-
import type { closingMethods } from './ui/statusPicker';
|
|
3
|
-
export type StatusType = {
|
|
4
|
-
color: ColorType;
|
|
5
|
-
text: string;
|
|
6
|
-
localId?: string;
|
|
7
|
-
};
|
|
8
|
-
export type StatusState = {
|
|
9
|
-
isNew: boolean;
|
|
10
|
-
showStatusPickerAt: number | null;
|
|
11
|
-
};
|
|
12
|
-
export interface StatusPluginOptions {
|
|
13
|
-
menuDisabled: boolean;
|
|
14
|
-
allowZeroWidthSpaceAfter?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export type ClosingPayload = {
|
|
17
|
-
closingMethod: closingMethods;
|
|
18
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import type { ColorType as Color } from '@atlaskit/status/picker';
|
|
5
|
-
import type { StatusType, ClosingPayload } from '../plugin';
|
|
6
|
-
export declare enum InputMethod {
|
|
7
|
-
blur = "blur",
|
|
8
|
-
escKey = "escKey",
|
|
9
|
-
enterKey = "enterKey"
|
|
10
|
-
}
|
|
11
|
-
export declare enum closingMethods {
|
|
12
|
-
ArrowLeft = "arrowLeft",
|
|
13
|
-
ArrowRight = "arrowRight"
|
|
14
|
-
}
|
|
15
|
-
export interface Props {
|
|
16
|
-
target: HTMLElement | null;
|
|
17
|
-
closeStatusPicker: (closingPayload?: ClosingPayload) => void;
|
|
18
|
-
onSelect: (status: StatusType) => void;
|
|
19
|
-
onTextChanged: (status: StatusType, isNew: boolean) => void;
|
|
20
|
-
onEnter: (status: StatusType) => void;
|
|
21
|
-
isNew?: boolean;
|
|
22
|
-
defaultText?: string;
|
|
23
|
-
defaultColor?: Color;
|
|
24
|
-
defaultLocalId?: string;
|
|
25
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
26
|
-
mountTo?: HTMLElement;
|
|
27
|
-
boundariesElement?: HTMLElement;
|
|
28
|
-
scrollableElement?: HTMLElement;
|
|
29
|
-
}
|
|
30
|
-
export interface State {
|
|
31
|
-
color: Color;
|
|
32
|
-
text: string;
|
|
33
|
-
localId?: string;
|
|
34
|
-
isNew?: boolean;
|
|
35
|
-
}
|
|
36
|
-
export declare class StatusPickerWithoutAnalytcs extends React.Component<Props, State> {
|
|
37
|
-
private startTime;
|
|
38
|
-
private inputMethod?;
|
|
39
|
-
private createStatusAnalyticsAndFireFunc;
|
|
40
|
-
private popupBodyWrapper;
|
|
41
|
-
private focusTimeout;
|
|
42
|
-
constructor(props: Props);
|
|
43
|
-
private fireStatusPopupOpenedAnalytics;
|
|
44
|
-
private fireStatusPopupClosedAnalytics;
|
|
45
|
-
private reset;
|
|
46
|
-
componentDidMount(): void;
|
|
47
|
-
componentWillUnmount(): void;
|
|
48
|
-
componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<State>, _snapshot?: any): void;
|
|
49
|
-
private extractStateFromProps;
|
|
50
|
-
handleClickOutside: (event: Event) => void;
|
|
51
|
-
private handleEscapeKeydown;
|
|
52
|
-
private handleTabPress;
|
|
53
|
-
private handleArrow;
|
|
54
|
-
private onKeyDown;
|
|
55
|
-
render(): jsx.JSX.Element | null;
|
|
56
|
-
private onColorHover;
|
|
57
|
-
private onColorClick;
|
|
58
|
-
private onTextChanged;
|
|
59
|
-
private onEnter;
|
|
60
|
-
private handlePopupClick;
|
|
61
|
-
}
|
|
62
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
63
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { StatusType } from './types';
|
|
3
|
-
export declare const mayGetStatusAtSelection: (selection: Selection) => StatusType | null;
|
|
4
|
-
export declare const isEmptyStatus: (node: StatusType) => boolean;
|
|
5
|
-
export declare const setNodeSelectionNearPos: (tr: Transaction, pos: number) => Transaction;
|