@atlaskit/editor-core 185.13.0 → 185.14.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/create-editor/create-plugins-list.js +4 -4
- package/dist/cjs/editor-next/index.js +29 -41
- package/dist/cjs/editor.js +3 -29
- package/dist/cjs/labs/next/presets/universal.js +6 -14
- package/dist/cjs/labs/next/presets/useUniversalPreset.js +2 -5
- package/dist/cjs/plugins/analytics/plugin.js +13 -7
- package/dist/cjs/plugins/card/pm-plugins/doc.js +2 -2
- package/dist/cjs/plugins/card/pm-plugins/main.js +27 -22
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -4
- package/dist/cjs/plugins/card/toolbar.js +8 -5
- package/dist/cjs/plugins/collab-edit/analytics.js +8 -6
- package/dist/cjs/plugins/collab-edit/events/handlers.js +4 -4
- package/dist/cjs/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/cjs/plugins/collab-edit/index.js +3 -2
- package/dist/cjs/plugins/collab-edit/plugin.js +7 -4
- package/dist/cjs/plugins/emoji/index.js +17 -7
- package/dist/cjs/plugins/mentions/index.js +14 -12
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +4 -4
- package/dist/es2019/editor-next/index.js +25 -39
- package/dist/es2019/editor.js +2 -25
- package/dist/es2019/labs/next/presets/universal.js +6 -16
- package/dist/es2019/labs/next/presets/useUniversalPreset.js +2 -6
- package/dist/es2019/plugins/analytics/plugin.js +13 -9
- package/dist/es2019/plugins/card/pm-plugins/doc.js +2 -3
- package/dist/es2019/plugins/card/pm-plugins/main.js +27 -22
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -4
- package/dist/es2019/plugins/card/toolbar.js +8 -5
- package/dist/es2019/plugins/collab-edit/analytics.js +17 -13
- package/dist/es2019/plugins/collab-edit/events/handlers.js +4 -4
- package/dist/es2019/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/es2019/plugins/collab-edit/index.js +3 -2
- package/dist/es2019/plugins/collab-edit/plugin.js +7 -4
- package/dist/es2019/plugins/emoji/index.js +17 -7
- package/dist/es2019/plugins/mentions/index.js +7 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +4 -4
- package/dist/esm/editor-next/index.js +28 -42
- package/dist/esm/editor.js +3 -29
- package/dist/esm/labs/next/presets/universal.js +6 -14
- package/dist/esm/labs/next/presets/useUniversalPreset.js +2 -5
- package/dist/esm/plugins/analytics/plugin.js +13 -7
- package/dist/esm/plugins/card/pm-plugins/doc.js +2 -3
- package/dist/esm/plugins/card/pm-plugins/main.js +27 -22
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -4
- package/dist/esm/plugins/card/toolbar.js +8 -5
- package/dist/esm/plugins/collab-edit/analytics.js +8 -6
- package/dist/esm/plugins/collab-edit/events/handlers.js +4 -4
- package/dist/esm/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/esm/plugins/collab-edit/index.js +3 -2
- package/dist/esm/plugins/collab-edit/plugin.js +7 -4
- package/dist/esm/plugins/emoji/index.js +17 -7
- package/dist/esm/plugins/mentions/index.js +14 -12
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/create-plugins-list.d.ts +2 -2
- package/dist/types/editor-next/index.d.ts +1 -0
- package/dist/types/editor.d.ts +0 -1
- package/dist/types/labs/next/presets/universal.d.ts +2 -2
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +2 -1
- package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +2 -1
- package/dist/types/plugins/card/pm-plugins/util/state.d.ts +0 -1
- package/dist/types/plugins/card/types.d.ts +1 -3
- package/dist/types/plugins/collab-edit/analytics.d.ts +4 -3
- package/dist/types/plugins/collab-edit/events/handlers.d.ts +3 -2
- package/dist/types/plugins/collab-edit/events/initialize.d.ts +4 -2
- package/dist/types/plugins/collab-edit/index.d.ts +6 -2
- package/dist/types/plugins/collab-edit/plugin.d.ts +3 -1
- package/dist/types/plugins/collab-edit/types.d.ts +0 -2
- package/dist/types/plugins/emoji/index.d.ts +3 -1
- package/dist/types/plugins/emoji/types.d.ts +1 -3
- package/dist/types/plugins/mentions/types.d.ts +2 -4
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +2 -2
- package/dist/types-ts4.5/editor-next/index.d.ts +1 -0
- package/dist/types-ts4.5/editor.d.ts +0 -1
- package/dist/types-ts4.5/labs/next/presets/universal.d.ts +2 -2
- package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +2 -1
- package/dist/types-ts4.5/plugins/card/pm-plugins/util/resolve.d.ts +2 -1
- package/dist/types-ts4.5/plugins/card/pm-plugins/util/state.d.ts +0 -1
- package/dist/types-ts4.5/plugins/card/types.d.ts +1 -3
- package/dist/types-ts4.5/plugins/collab-edit/analytics.d.ts +4 -3
- package/dist/types-ts4.5/plugins/collab-edit/events/handlers.d.ts +3 -2
- package/dist/types-ts4.5/plugins/collab-edit/events/initialize.d.ts +4 -2
- package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +4 -2
- package/dist/types-ts4.5/plugins/collab-edit/plugin.d.ts +3 -1
- package/dist/types-ts4.5/plugins/collab-edit/types.d.ts +0 -2
- package/dist/types-ts4.5/plugins/emoji/index.d.ts +5 -1
- package/dist/types-ts4.5/plugins/emoji/types.d.ts +1 -3
- package/dist/types-ts4.5/plugins/mentions/types.d.ts +2 -4
- package/package.json +10 -7
- package/report.api.md +2 -2
- package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +0 -79
- package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +0 -69
- package/dist/esm/labs/next/presets/create-stub-internal-apis.js +0 -72
- package/dist/types/labs/next/presets/create-stub-internal-apis.d.ts +0 -13
- package/dist/types-ts4.5/labs/next/presets/create-stub-internal-apis.d.ts +0 -13
- package/tmp/api-report-tmp.d.ts +0 -2364
|
@@ -16,10 +16,12 @@ export { mentionPluginKey };
|
|
|
16
16
|
var mentionsPlugin = function mentionsPlugin(options, api) {
|
|
17
17
|
var sessionId = uuid();
|
|
18
18
|
var fireEvent = function fireEvent(payload) {
|
|
19
|
-
|
|
19
|
+
var _api$dependencies$ana, _api$dependencies$ana2;
|
|
20
|
+
var _ref = (_api$dependencies$ana = api === null || api === void 0 ? void 0 : (_api$dependencies$ana2 = api.dependencies.analytics) === null || _api$dependencies$ana2 === void 0 ? void 0 : _api$dependencies$ana2.sharedState.currentState()) !== null && _api$dependencies$ana !== void 0 ? _api$dependencies$ana : {},
|
|
21
|
+
createAnalyticsEvent = _ref.createAnalyticsEvent;
|
|
22
|
+
if (!createAnalyticsEvent) {
|
|
20
23
|
return;
|
|
21
24
|
}
|
|
22
|
-
var createAnalyticsEvent = options.createAnalyticsEvent;
|
|
23
25
|
if (payload.attributes && !payload.attributes.sessionId) {
|
|
24
26
|
payload.attributes.sessionId = sessionId;
|
|
25
27
|
}
|
|
@@ -47,17 +49,17 @@ var mentionsPlugin = function mentionsPlugin(options, api) {
|
|
|
47
49
|
}
|
|
48
50
|
}];
|
|
49
51
|
},
|
|
50
|
-
secondaryToolbarComponent: function secondaryToolbarComponent(
|
|
51
|
-
var editorView =
|
|
52
|
-
disabled =
|
|
52
|
+
secondaryToolbarComponent: function secondaryToolbarComponent(_ref2) {
|
|
53
|
+
var editorView = _ref2.editorView,
|
|
54
|
+
disabled = _ref2.disabled;
|
|
53
55
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
54
56
|
editorView: editorView,
|
|
55
57
|
plugins: {
|
|
56
58
|
mentionState: mentionPluginKey
|
|
57
59
|
},
|
|
58
|
-
render: function render(
|
|
59
|
-
var
|
|
60
|
-
mentionState =
|
|
60
|
+
render: function render(_ref3) {
|
|
61
|
+
var _ref3$mentionState = _ref3.mentionState,
|
|
62
|
+
mentionState = _ref3$mentionState === void 0 ? {} : _ref3$mentionState;
|
|
61
63
|
return !mentionState.mentionProvider ? null : /*#__PURE__*/React.createElement(ToolbarMention, {
|
|
62
64
|
editorView: editorView,
|
|
63
65
|
isDisabled: disabled || isTypeAheadAllowed(editorView.state)
|
|
@@ -66,8 +68,8 @@ var mentionsPlugin = function mentionsPlugin(options, api) {
|
|
|
66
68
|
});
|
|
67
69
|
},
|
|
68
70
|
pluginsOptions: {
|
|
69
|
-
quickInsert: function quickInsert(
|
|
70
|
-
var formatMessage =
|
|
71
|
+
quickInsert: function quickInsert(_ref4) {
|
|
72
|
+
var formatMessage = _ref4.formatMessage;
|
|
71
73
|
return [{
|
|
72
74
|
id: 'mention',
|
|
73
75
|
title: formatMessage(messages.mention),
|
|
@@ -79,13 +81,13 @@ var mentionsPlugin = function mentionsPlugin(options, api) {
|
|
|
79
81
|
return /*#__PURE__*/React.createElement(IconMention, null);
|
|
80
82
|
},
|
|
81
83
|
action: function action(insert, state) {
|
|
82
|
-
var _api$dependencies$
|
|
84
|
+
var _api$dependencies$ana3;
|
|
83
85
|
var tr = insert(undefined);
|
|
84
86
|
openTypeAheadAtCursor({
|
|
85
87
|
triggerHandler: typeAhead,
|
|
86
88
|
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
87
89
|
})(tr);
|
|
88
|
-
api === null || api === void 0 ? void 0 : (_api$dependencies$
|
|
90
|
+
api === null || api === void 0 ? void 0 : (_api$dependencies$ana3 = api.dependencies.analytics) === null || _api$dependencies$ana3 === void 0 ? void 0 : _api$dependencies$ana3.actions.attachAnalyticsEvent({
|
|
89
91
|
action: ACTION.INVOKED,
|
|
90
92
|
actionSubject: ACTION_SUBJECT.TYPEAHEAD,
|
|
91
93
|
actionSubjectId: ACTION_SUBJECT_ID.TYPEAHEAD_MENTION,
|
package/dist/esm/version.json
CHANGED
|
@@ -13,5 +13,5 @@ export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProp
|
|
|
13
13
|
* Note: The order that presets are added determines
|
|
14
14
|
* their placement in the editor toolbar
|
|
15
15
|
*/
|
|
16
|
-
export default function createPluginsList(props: EditorProps, prevProps?: EditorProps
|
|
17
|
-
export declare function createPreset(props: EditorProps, prevProps?: EditorProps
|
|
16
|
+
export default function createPluginsList(props: EditorProps, prevProps?: EditorProps): EditorPlugin[];
|
|
17
|
+
export declare function createPreset(props: EditorProps, prevProps?: EditorProps): EditorPresetBuilder<any, any>;
|
|
@@ -18,6 +18,7 @@ export default class EditorNext extends React.Component<EditorNextProps> {
|
|
|
18
18
|
};
|
|
19
19
|
private editorActions;
|
|
20
20
|
private createAnalyticsEvent?;
|
|
21
|
+
private editorSessionId;
|
|
21
22
|
private experienceStore?;
|
|
22
23
|
private startTime?;
|
|
23
24
|
constructor(props: EditorNextProps, context: Context);
|
package/dist/types/editor.d.ts
CHANGED
|
@@ -5,6 +5,5 @@ import { EditorProps } from './types/editor-props';
|
|
|
5
5
|
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp, FeedbackInfo, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PluginsOptions, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
|
|
6
6
|
export default class Editor extends React.Component<EditorProps> {
|
|
7
7
|
static defaultProps: EditorProps;
|
|
8
|
-
private editorSessionId;
|
|
9
8
|
render(): jsx.JSX.Element;
|
|
10
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
1
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { DefaultPresetPluginOptions } from './default';
|
|
4
4
|
import { EditorPresetProps } from './types';
|
|
@@ -18,5 +18,5 @@ type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & Edi
|
|
|
18
18
|
* @param prevAppearance The appearance of the editor in the previous render
|
|
19
19
|
* @returns a full featured preset configured according to the provided props - basis for create-plugins-list
|
|
20
20
|
*/
|
|
21
|
-
export default function createUniversalPreset(appearance: EditorAppearance | undefined, props: UniversalPresetProps, featureFlags: FeatureFlags, prevAppearance?: EditorAppearance,
|
|
21
|
+
export default function createUniversalPreset(appearance: EditorAppearance | undefined, props: UniversalPresetProps, featureFlags: FeatureFlags, prevAppearance?: EditorAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetBuilder<any, any>;
|
|
22
22
|
export {};
|
|
@@ -8,7 +8,8 @@ import type { Command } from '@atlaskit/editor-common/types';
|
|
|
8
8
|
import type { InlineCardAdf } from '@atlaskit/smart-card';
|
|
9
9
|
import { Request } from '../types';
|
|
10
10
|
import type { CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
11
|
-
|
|
11
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
12
|
+
export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf | DatasourceAdf, analyticsAction?: ACTION, editorAnalyticsApi?: EditorAnalyticsAPI, createAnalyticsEvent?: CreateUIAnalyticsEvent) => Command;
|
|
12
13
|
export declare const handleFallbackWithAnalytics: (request: Request, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
13
14
|
export declare const queueCardsFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined) => Transaction;
|
|
14
15
|
export declare const queueCardFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, previousAppearance?: CardAppearance | 'url') => Transaction;
|
|
@@ -3,5 +3,6 @@ import { EditorView } from 'prosemirror-view';
|
|
|
3
3
|
import { Request } from '../../types';
|
|
4
4
|
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
5
5
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
|
|
6
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
7
|
+
export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf | DatasourceAdf>;
|
|
7
8
|
export declare const handleProvider: (_: 'cardProvider', provider: Promise<CardProvider> | undefined, view: EditorView) => void;
|
|
@@ -22,7 +22,6 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
22
22
|
showLinkingToolbar: boolean;
|
|
23
23
|
smartLinkEvents?: import("@atlaskit/smart-card").SmartLinkEvents | undefined;
|
|
24
24
|
smartLinkEventsNext?: import("../../types").SmartLinkEventsNext | undefined;
|
|
25
|
-
createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
|
|
26
25
|
editorAppearance?: import("@atlaskit/editor-common/types").EditorAppearance | undefined;
|
|
27
26
|
showDatasourceModal: boolean;
|
|
28
27
|
datasourceTableRef?: HTMLElement | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { CardProvider, CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
4
|
-
import {
|
|
4
|
+
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import type { CardOptions, CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
6
6
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
7
7
|
import { LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
@@ -99,7 +99,6 @@ export type CardPluginState = {
|
|
|
99
99
|
showLinkingToolbar: boolean;
|
|
100
100
|
smartLinkEvents?: SmartLinkEvents;
|
|
101
101
|
smartLinkEventsNext?: SmartLinkEventsNext;
|
|
102
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
103
102
|
editorAppearance?: EditorAppearance;
|
|
104
103
|
showDatasourceModal: boolean;
|
|
105
104
|
datasourceTableRef?: HTMLElement;
|
|
@@ -109,7 +108,6 @@ export type CardPluginOptions = CardOptions & {
|
|
|
109
108
|
editorAppearance?: EditorAppearance;
|
|
110
109
|
platform: 'mobile' | 'web';
|
|
111
110
|
fullWidthMode?: boolean;
|
|
112
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
113
111
|
linkPicker?: LinkPickerOptions;
|
|
114
112
|
};
|
|
115
113
|
export type SetProvider = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
-
|
|
2
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export declare const addSynchronyErrorAnalytics: (state: EditorState, tr: Transaction, featureFlags: FeatureFlags, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => (error: Error) => Transaction;
|
|
4
5
|
export type EntityEventType = 'error' | 'disconnected';
|
|
5
|
-
export declare const addSynchronyEntityAnalytics: (state: EditorState, tr: Transaction) => (type: EntityEventType) => Transaction;
|
|
6
|
+
export declare const addSynchronyEntityAnalytics: (state: EditorState, tr: Transaction) => (type: EntityEventType, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Transaction;
|
|
@@ -2,7 +2,8 @@ import { EditorView } from 'prosemirror-view';
|
|
|
2
2
|
import type { CollabEventInitData, CollabEventConnectionData, CollabEventPresenceData, CollabTelepointerPayload, CollabEventRemoteData, CollabEventLocalStepData, CollabEditProvider } from '@atlaskit/collab-provider';
|
|
3
3
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import { PrivateCollabEditOptions } from '../types';
|
|
5
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
7
|
export type SynchronyEntity = {
|
|
7
8
|
on: (evt: 'disconnected' | 'error', handler: (...args: any) => void) => void;
|
|
8
9
|
off: (evt: 'disconnected' | 'error', handler: (...args: any) => void) => void;
|
|
@@ -20,4 +21,4 @@ export interface CollabHandlers {
|
|
|
20
21
|
}) => void;
|
|
21
22
|
}
|
|
22
23
|
export type Cleanup = () => void;
|
|
23
|
-
export declare const subscribe: (currentDeps_0: EditorView, currentDeps_1: CollabEditProvider<import("@atlaskit/collab-provider").CollabEvents>, currentDeps_2: PrivateCollabEditOptions, currentDeps_3: FeatureFlags, currentDeps_4?: ProviderFactory | undefined) => Cleanup;
|
|
24
|
+
export declare const subscribe: (currentDeps_0: EditorView, currentDeps_1: CollabEditProvider<import("@atlaskit/collab-provider").CollabEvents>, currentDeps_2: PrivateCollabEditOptions, currentDeps_3: FeatureFlags, currentDeps_4?: ProviderFactory | undefined, currentDeps_5?: EditorAnalyticsAPI | undefined) => Cleanup;
|
|
@@ -3,12 +3,14 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
3
3
|
import type { CollabEditProvider } from '@atlaskit/collab-provider';
|
|
4
4
|
import { PrivateCollabEditOptions } from '../types';
|
|
5
5
|
import { Cleanup } from './handlers';
|
|
6
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
8
|
type Props = {
|
|
8
9
|
view: EditorView;
|
|
9
10
|
options: PrivateCollabEditOptions;
|
|
10
11
|
providerFactory: ProviderFactory;
|
|
11
12
|
featureFlags: FeatureFlags;
|
|
13
|
+
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
12
14
|
};
|
|
13
|
-
export declare const initialize: ({ options, providerFactory, view, featureFlags }: Props) => (provider: CollabEditProvider) => Cleanup;
|
|
15
|
+
export declare const initialize: ({ options, providerFactory, view, featureFlags, editorAnalyticsApi, }: Props) => (provider: CollabEditProvider) => Cleanup;
|
|
14
16
|
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { pluginKey } from './plugin';
|
|
3
3
|
import { CollabEditOptions, PrivateCollabEditOptions } from './types';
|
|
4
4
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
6
|
export { pluginKey };
|
|
6
7
|
export type { CollabEditOptions };
|
|
7
8
|
declare const collabEditPlugin: NextEditorPlugin<'collabEdit', {
|
|
8
9
|
pluginConfiguration: PrivateCollabEditOptions;
|
|
9
|
-
dependencies: [
|
|
10
|
+
dependencies: [
|
|
11
|
+
typeof featureFlagsPlugin,
|
|
12
|
+
OptionalPlugin<typeof analyticsPlugin>
|
|
13
|
+
];
|
|
10
14
|
}>;
|
|
11
15
|
export default collabEditPlugin;
|
|
@@ -6,5 +6,7 @@ import { PluginState } from './plugin-state';
|
|
|
6
6
|
import { pluginKey } from './plugin-key';
|
|
7
7
|
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
8
|
import type { CollabEditProvider } from '@atlaskit/collab-provider/types';
|
|
9
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type collabEditPlugin from './index';
|
|
9
11
|
export { PluginState, pluginKey };
|
|
10
|
-
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, providerResolver: (value: CollabEditProvider) => void, collabProviderCallback: ProviderCallback, options: PrivateCollabEditOptions, featureFlags: FeatureFlags) => SafePlugin<PluginState>;
|
|
12
|
+
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, providerResolver: (value: CollabEditProvider) => void, collabProviderCallback: ProviderCallback, options: PrivateCollabEditOptions, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<typeof collabEditPlugin> | undefined) => SafePlugin<PluginState>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { CollabEditProvider, SyncUpErrorFunction } from '@atlaskit/collab-provider';
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
5
4
|
export type InviteToEditComponentProps = {
|
|
6
5
|
children: ReactElement<InviteToEditButtonProps>;
|
|
7
6
|
};
|
|
@@ -27,7 +26,6 @@ export type CollabEditOptions = {
|
|
|
27
26
|
} & CollabInviteToEditProps & CollabAnalyticsProps;
|
|
28
27
|
export type PrivateCollabEditOptions = CollabEditOptions & {
|
|
29
28
|
sanitizePrivateContent?: boolean;
|
|
30
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
31
29
|
onSyncUpError?: SyncUpErrorFunction;
|
|
32
30
|
};
|
|
33
31
|
export type ProviderCallback = <ReturnType>(codeToExecute: (provider: CollabEditProvider) => ReturnType | undefined, onError?: (err: Error) => void) => Promise<ReturnType | undefined> | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { EditorState, PluginKey } from 'prosemirror-state';
|
|
3
3
|
import { EmojiDescription, EmojiProvider } from '@atlaskit/emoji';
|
|
4
|
-
import type { Command, NextEditorPlugin, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { Command, NextEditorPlugin, PMPluginFactoryParams, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { TypeAheadItem } from '../type-ahead/types';
|
|
6
6
|
import { EmojiPluginOptions, EmojiPluginState } from './types';
|
|
7
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
8
|
export declare const emojiToTypeaheadItem: (emoji: EmojiDescription, emojiProvider?: EmojiProvider) => TypeAheadItem;
|
|
8
9
|
export declare function memoize<ResultFn extends (emoji: EmojiDescription, emojiProvider?: EmojiProvider) => TypeAheadItem>(fn: ResultFn): {
|
|
9
10
|
call: ResultFn;
|
|
@@ -12,6 +13,7 @@ export declare function memoize<ResultFn extends (emoji: EmojiDescription, emoji
|
|
|
12
13
|
export declare const defaultListLimit = 50;
|
|
13
14
|
declare const emojiPlugin: NextEditorPlugin<'emoji', {
|
|
14
15
|
pluginConfiguration: EmojiPluginOptions | undefined;
|
|
16
|
+
dependencies: [OptionalPlugin<typeof analyticsPlugin>];
|
|
15
17
|
}>;
|
|
16
18
|
export default emojiPlugin;
|
|
17
19
|
/**
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EmojiProvider, EmojiDescription, EmojiResourceConfig } from '@atlaskit/emoji';
|
|
1
|
+
import type { EmojiProvider, EmojiDescription, EmojiResourceConfig } from '@atlaskit/emoji';
|
|
3
2
|
export interface EmojiPluginOptions {
|
|
4
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
5
3
|
headless?: boolean;
|
|
6
4
|
}
|
|
7
5
|
export type EmojiPluginState = {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import { MentionDescription, MentionProvider } from '@atlaskit/mention';
|
|
2
|
+
import type { MentionDescription, MentionProvider } from '@atlaskit/mention';
|
|
4
3
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
6
5
|
export interface TeamInfoAttrAnalytics {
|
|
7
6
|
teamId: String;
|
|
8
7
|
includesYou: boolean;
|
|
@@ -13,7 +12,6 @@ export interface MentionPluginConfig {
|
|
|
13
12
|
insertDisplayName?: boolean;
|
|
14
13
|
}
|
|
15
14
|
export interface MentionPluginOptions extends MentionPluginConfig {
|
|
16
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
17
15
|
sanitizePrivateContent?: boolean;
|
|
18
16
|
allowZeroWidthSpaceAfter?: boolean;
|
|
19
17
|
}
|
|
@@ -13,5 +13,5 @@ export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProp
|
|
|
13
13
|
* Note: The order that presets are added determines
|
|
14
14
|
* their placement in the editor toolbar
|
|
15
15
|
*/
|
|
16
|
-
export default function createPluginsList(props: EditorProps, prevProps?: EditorProps
|
|
17
|
-
export declare function createPreset(props: EditorProps, prevProps?: EditorProps
|
|
16
|
+
export default function createPluginsList(props: EditorProps, prevProps?: EditorProps): EditorPlugin[];
|
|
17
|
+
export declare function createPreset(props: EditorProps, prevProps?: EditorProps): EditorPresetBuilder<any, any>;
|
|
@@ -18,6 +18,7 @@ export default class EditorNext extends React.Component<EditorNextProps> {
|
|
|
18
18
|
};
|
|
19
19
|
private editorActions;
|
|
20
20
|
private createAnalyticsEvent?;
|
|
21
|
+
private editorSessionId;
|
|
21
22
|
private experienceStore?;
|
|
22
23
|
private startTime?;
|
|
23
24
|
constructor(props: EditorNextProps, context: Context);
|
|
@@ -5,6 +5,5 @@ import { EditorProps } from './types/editor-props';
|
|
|
5
5
|
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp, FeedbackInfo, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PluginsOptions, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
|
|
6
6
|
export default class Editor extends React.Component<EditorProps> {
|
|
7
7
|
static defaultProps: EditorProps;
|
|
8
|
-
private editorSessionId;
|
|
9
8
|
render(): jsx.JSX.Element;
|
|
10
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
1
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { DefaultPresetPluginOptions } from './default';
|
|
4
4
|
import { EditorPresetProps } from './types';
|
|
@@ -18,5 +18,5 @@ type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & Edi
|
|
|
18
18
|
* @param prevAppearance The appearance of the editor in the previous render
|
|
19
19
|
* @returns a full featured preset configured according to the provided props - basis for create-plugins-list
|
|
20
20
|
*/
|
|
21
|
-
export default function createUniversalPreset(appearance: EditorAppearance | undefined, props: UniversalPresetProps, featureFlags: FeatureFlags, prevAppearance?: EditorAppearance,
|
|
21
|
+
export default function createUniversalPreset(appearance: EditorAppearance | undefined, props: UniversalPresetProps, featureFlags: FeatureFlags, prevAppearance?: EditorAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetBuilder<any, any>;
|
|
22
22
|
export {};
|
|
@@ -8,7 +8,8 @@ import type { Command } from '@atlaskit/editor-common/types';
|
|
|
8
8
|
import type { InlineCardAdf } from '@atlaskit/smart-card';
|
|
9
9
|
import { Request } from '../types';
|
|
10
10
|
import type { CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
11
|
-
|
|
11
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
12
|
+
export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf | DatasourceAdf, analyticsAction?: ACTION, editorAnalyticsApi?: EditorAnalyticsAPI, createAnalyticsEvent?: CreateUIAnalyticsEvent) => Command;
|
|
12
13
|
export declare const handleFallbackWithAnalytics: (request: Request, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
13
14
|
export declare const queueCardsFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined) => Transaction;
|
|
14
15
|
export declare const queueCardFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, previousAppearance?: CardAppearance | 'url') => Transaction;
|
|
@@ -3,5 +3,6 @@ import { EditorView } from 'prosemirror-view';
|
|
|
3
3
|
import { Request } from '../../types';
|
|
4
4
|
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
5
5
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
|
|
6
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
7
|
+
export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf | DatasourceAdf>;
|
|
7
8
|
export declare const handleProvider: (_: 'cardProvider', provider: Promise<CardProvider> | undefined, view: EditorView) => void;
|
|
@@ -22,7 +22,6 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
22
22
|
showLinkingToolbar: boolean;
|
|
23
23
|
smartLinkEvents?: import("@atlaskit/smart-card").SmartLinkEvents | undefined;
|
|
24
24
|
smartLinkEventsNext?: import("../../types").SmartLinkEventsNext | undefined;
|
|
25
|
-
createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
|
|
26
25
|
editorAppearance?: import("@atlaskit/editor-common/types").EditorAppearance | undefined;
|
|
27
26
|
showDatasourceModal: boolean;
|
|
28
27
|
datasourceTableRef?: HTMLElement | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { CardProvider, CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
4
|
-
import {
|
|
4
|
+
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import type { CardOptions, CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
6
6
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
7
7
|
import { LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
@@ -99,7 +99,6 @@ export type CardPluginState = {
|
|
|
99
99
|
showLinkingToolbar: boolean;
|
|
100
100
|
smartLinkEvents?: SmartLinkEvents;
|
|
101
101
|
smartLinkEventsNext?: SmartLinkEventsNext;
|
|
102
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
103
102
|
editorAppearance?: EditorAppearance;
|
|
104
103
|
showDatasourceModal: boolean;
|
|
105
104
|
datasourceTableRef?: HTMLElement;
|
|
@@ -109,7 +108,6 @@ export type CardPluginOptions = CardOptions & {
|
|
|
109
108
|
editorAppearance?: EditorAppearance;
|
|
110
109
|
platform: 'mobile' | 'web';
|
|
111
110
|
fullWidthMode?: boolean;
|
|
112
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
113
111
|
linkPicker?: LinkPickerOptions;
|
|
114
112
|
};
|
|
115
113
|
export type SetProvider = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
-
|
|
2
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export declare const addSynchronyErrorAnalytics: (state: EditorState, tr: Transaction, featureFlags: FeatureFlags, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => (error: Error) => Transaction;
|
|
4
5
|
export type EntityEventType = 'error' | 'disconnected';
|
|
5
|
-
export declare const addSynchronyEntityAnalytics: (state: EditorState, tr: Transaction) => (type: EntityEventType) => Transaction;
|
|
6
|
+
export declare const addSynchronyEntityAnalytics: (state: EditorState, tr: Transaction) => (type: EntityEventType, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Transaction;
|
|
@@ -2,7 +2,8 @@ import { EditorView } from 'prosemirror-view';
|
|
|
2
2
|
import type { CollabEventInitData, CollabEventConnectionData, CollabEventPresenceData, CollabTelepointerPayload, CollabEventRemoteData, CollabEventLocalStepData, CollabEditProvider } from '@atlaskit/collab-provider';
|
|
3
3
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import { PrivateCollabEditOptions } from '../types';
|
|
5
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
7
|
export type SynchronyEntity = {
|
|
7
8
|
on: (evt: 'disconnected' | 'error', handler: (...args: any) => void) => void;
|
|
8
9
|
off: (evt: 'disconnected' | 'error', handler: (...args: any) => void) => void;
|
|
@@ -20,4 +21,4 @@ export interface CollabHandlers {
|
|
|
20
21
|
}) => void;
|
|
21
22
|
}
|
|
22
23
|
export type Cleanup = () => void;
|
|
23
|
-
export declare const subscribe: (currentDeps_0: EditorView, currentDeps_1: CollabEditProvider<import("@atlaskit/collab-provider").CollabEvents>, currentDeps_2: PrivateCollabEditOptions, currentDeps_3: FeatureFlags, currentDeps_4?: ProviderFactory | undefined) => Cleanup;
|
|
24
|
+
export declare const subscribe: (currentDeps_0: EditorView, currentDeps_1: CollabEditProvider<import("@atlaskit/collab-provider").CollabEvents>, currentDeps_2: PrivateCollabEditOptions, currentDeps_3: FeatureFlags, currentDeps_4?: ProviderFactory | undefined, currentDeps_5?: EditorAnalyticsAPI | undefined) => Cleanup;
|
|
@@ -3,12 +3,14 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
3
3
|
import type { CollabEditProvider } from '@atlaskit/collab-provider';
|
|
4
4
|
import { PrivateCollabEditOptions } from '../types';
|
|
5
5
|
import { Cleanup } from './handlers';
|
|
6
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
8
|
type Props = {
|
|
8
9
|
view: EditorView;
|
|
9
10
|
options: PrivateCollabEditOptions;
|
|
10
11
|
providerFactory: ProviderFactory;
|
|
11
12
|
featureFlags: FeatureFlags;
|
|
13
|
+
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
12
14
|
};
|
|
13
|
-
export declare const initialize: ({ options, providerFactory, view, featureFlags }: Props) => (provider: CollabEditProvider) => Cleanup;
|
|
15
|
+
export declare const initialize: ({ options, providerFactory, view, featureFlags, editorAnalyticsApi, }: Props) => (provider: CollabEditProvider) => Cleanup;
|
|
14
16
|
export {};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { pluginKey } from './plugin';
|
|
3
3
|
import { CollabEditOptions, PrivateCollabEditOptions } from './types';
|
|
4
4
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
6
|
export { pluginKey };
|
|
6
7
|
export type { CollabEditOptions };
|
|
7
8
|
declare const collabEditPlugin: NextEditorPlugin<'collabEdit', {
|
|
8
9
|
pluginConfiguration: PrivateCollabEditOptions;
|
|
9
10
|
dependencies: [
|
|
10
|
-
typeof featureFlagsPlugin
|
|
11
|
+
typeof featureFlagsPlugin,
|
|
12
|
+
OptionalPlugin<typeof analyticsPlugin>
|
|
11
13
|
];
|
|
12
14
|
}>;
|
|
13
15
|
export default collabEditPlugin;
|
|
@@ -6,5 +6,7 @@ import { PluginState } from './plugin-state';
|
|
|
6
6
|
import { pluginKey } from './plugin-key';
|
|
7
7
|
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
8
|
import type { CollabEditProvider } from '@atlaskit/collab-provider/types';
|
|
9
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type collabEditPlugin from './index';
|
|
9
11
|
export { PluginState, pluginKey };
|
|
10
|
-
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, providerResolver: (value: CollabEditProvider) => void, collabProviderCallback: ProviderCallback, options: PrivateCollabEditOptions, featureFlags: FeatureFlags) => SafePlugin<PluginState>;
|
|
12
|
+
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, providerResolver: (value: CollabEditProvider) => void, collabProviderCallback: ProviderCallback, options: PrivateCollabEditOptions, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<typeof collabEditPlugin> | undefined) => SafePlugin<PluginState>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { CollabEditProvider, SyncUpErrorFunction } from '@atlaskit/collab-provider';
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
5
4
|
export type InviteToEditComponentProps = {
|
|
6
5
|
children: ReactElement<InviteToEditButtonProps>;
|
|
7
6
|
};
|
|
@@ -27,7 +26,6 @@ export type CollabEditOptions = {
|
|
|
27
26
|
} & CollabInviteToEditProps & CollabAnalyticsProps;
|
|
28
27
|
export type PrivateCollabEditOptions = CollabEditOptions & {
|
|
29
28
|
sanitizePrivateContent?: boolean;
|
|
30
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
31
29
|
onSyncUpError?: SyncUpErrorFunction;
|
|
32
30
|
};
|
|
33
31
|
export type ProviderCallback = <ReturnType>(codeToExecute: (provider: CollabEditProvider) => ReturnType | undefined, onError?: (err: Error) => void) => Promise<ReturnType | undefined> | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { EditorState, PluginKey } from 'prosemirror-state';
|
|
3
3
|
import { EmojiDescription, EmojiProvider } from '@atlaskit/emoji';
|
|
4
|
-
import type { Command, NextEditorPlugin, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { Command, NextEditorPlugin, PMPluginFactoryParams, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { TypeAheadItem } from '../type-ahead/types';
|
|
6
6
|
import { EmojiPluginOptions, EmojiPluginState } from './types';
|
|
7
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
8
|
export declare const emojiToTypeaheadItem: (emoji: EmojiDescription, emojiProvider?: EmojiProvider) => TypeAheadItem;
|
|
8
9
|
export declare function memoize<ResultFn extends (emoji: EmojiDescription, emojiProvider?: EmojiProvider) => TypeAheadItem>(fn: ResultFn): {
|
|
9
10
|
call: ResultFn;
|
|
@@ -12,6 +13,9 @@ export declare function memoize<ResultFn extends (emoji: EmojiDescription, emoji
|
|
|
12
13
|
export declare const defaultListLimit = 50;
|
|
13
14
|
declare const emojiPlugin: NextEditorPlugin<'emoji', {
|
|
14
15
|
pluginConfiguration: EmojiPluginOptions | undefined;
|
|
16
|
+
dependencies: [
|
|
17
|
+
OptionalPlugin<typeof analyticsPlugin>
|
|
18
|
+
];
|
|
15
19
|
}>;
|
|
16
20
|
export default emojiPlugin;
|
|
17
21
|
/**
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EmojiProvider, EmojiDescription, EmojiResourceConfig } from '@atlaskit/emoji';
|
|
1
|
+
import type { EmojiProvider, EmojiDescription, EmojiResourceConfig } from '@atlaskit/emoji';
|
|
3
2
|
export interface EmojiPluginOptions {
|
|
4
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
5
3
|
headless?: boolean;
|
|
6
4
|
}
|
|
7
5
|
export type EmojiPluginState = {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import { MentionDescription, MentionProvider } from '@atlaskit/mention';
|
|
2
|
+
import type { MentionDescription, MentionProvider } from '@atlaskit/mention';
|
|
4
3
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
6
5
|
export interface TeamInfoAttrAnalytics {
|
|
7
6
|
teamId: String;
|
|
8
7
|
includesYou: boolean;
|
|
@@ -13,7 +12,6 @@ export interface MentionPluginConfig {
|
|
|
13
12
|
insertDisplayName?: boolean;
|
|
14
13
|
}
|
|
15
14
|
export interface MentionPluginOptions extends MentionPluginConfig {
|
|
16
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
17
15
|
sanitizePrivateContent?: boolean;
|
|
18
16
|
allowZeroWidthSpaceAfter?: boolean;
|
|
19
17
|
}
|