@atlaskit/editor-core 185.13.1 → 185.14.2
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 +2 -4
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -4
- 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 +2 -4
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -4
- 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 +2 -4
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -4
- 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 +8 -8
- 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
|
@@ -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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "185.
|
|
3
|
+
"version": "185.14.2",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
43
|
-
"@atlaskit/adf-schema": "^26.
|
|
43
|
+
"@atlaskit/adf-schema": "^26.2.0",
|
|
44
44
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
45
45
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
46
46
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
@@ -57,16 +57,16 @@
|
|
|
57
57
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
58
58
|
"@atlaskit/editor-common": "^74.19.0",
|
|
59
59
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
60
|
-
"@atlaskit/editor-markdown-transformer": "^5.2.
|
|
60
|
+
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
61
61
|
"@atlaskit/editor-palette": "1.5.1",
|
|
62
|
-
"@atlaskit/editor-plugin-analytics": "^0.0
|
|
63
|
-
"@atlaskit/editor-plugin-content-insertion": "^0.0.
|
|
62
|
+
"@atlaskit/editor-plugin-analytics": "^0.1.0",
|
|
63
|
+
"@atlaskit/editor-plugin-content-insertion": "^0.0.6",
|
|
64
64
|
"@atlaskit/editor-plugin-context-panel": "^0.1.0",
|
|
65
65
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
66
66
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
67
67
|
"@atlaskit/editor-plugin-floating-toolbar": "^0.2.0",
|
|
68
68
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
69
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
69
|
+
"@atlaskit/editor-plugin-table": "^2.1.0",
|
|
70
70
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
71
71
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
72
72
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
@@ -148,10 +148,10 @@
|
|
|
148
148
|
"@af/editor-libra": "*",
|
|
149
149
|
"@af/integration-testing": "*",
|
|
150
150
|
"@atlaskit/code": "^14.6.0",
|
|
151
|
-
"@atlaskit/collab-provider": "9.
|
|
151
|
+
"@atlaskit/collab-provider": "9.7.0",
|
|
152
152
|
"@atlaskit/dropdown-menu": "^11.10.0",
|
|
153
153
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
154
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
154
|
+
"@atlaskit/editor-plugin-table": "^2.1.0",
|
|
155
155
|
"@atlaskit/editor-test-helpers": "^18.10.0",
|
|
156
156
|
"@atlaskit/flag": "^15.2.0",
|
|
157
157
|
"@atlaskit/link-provider": "^1.6.0",
|
package/report.api.md
CHANGED
|
@@ -105,9 +105,9 @@ import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
|
105
105
|
import { MediaFeatureFlags as MediaFeatureFlags_2 } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
106
106
|
import { MediaFile } from '@atlaskit/media-picker/types';
|
|
107
107
|
import { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
|
|
108
|
-
import { MentionDescription } from '@atlaskit/mention';
|
|
108
|
+
import type { MentionDescription } from '@atlaskit/mention';
|
|
109
109
|
import { MentionProvider } from '@atlaskit/mention/resource';
|
|
110
|
-
import { MentionProvider as MentionProvider_2 } from '@atlaskit/mention';
|
|
110
|
+
import type { MentionProvider as MentionProvider_2 } from '@atlaskit/mention';
|
|
111
111
|
import { MentionResource } from '@atlaskit/mention/resource';
|
|
112
112
|
import { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
113
113
|
import { default as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createStubInternalApis = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
10
|
-
var _api = require("../../../selection-api/api");
|
|
11
|
-
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
12
|
-
/**
|
|
13
|
-
* DO NOT USE THIS FUNCTION
|
|
14
|
-
*
|
|
15
|
-
* IT IS A TEMPORARY PLACEHOLDER UNTIL THOSE TICKETS XX-11111 XX-22222 are done
|
|
16
|
-
**/
|
|
17
|
-
var createStubInternalApis = function createStubInternalApis() {
|
|
18
|
-
var createAnalyticsEventRef = {
|
|
19
|
-
current: null
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
var createAnalyticsEvent = function createAnalyticsEvent(payload) {
|
|
24
|
-
// That means the AnalyticsNext context is being used
|
|
25
|
-
if (createAnalyticsEventRef.current) {
|
|
26
|
-
return createAnalyticsEventRef.current(payload);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// That means, there is no createAnalyticsEvent available at all.
|
|
30
|
-
// This should not happen, but if it does, we will send a mock function to avoid
|
|
31
|
-
// regression on SmartLinks (they are the only one using this function directly)
|
|
32
|
-
if (process.env.NODE_ENV === 'development') {
|
|
33
|
-
// eslint-disable-next-line no-console
|
|
34
|
-
console.error('This should never be called, if it does we have a problem');
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
fire: function fire() {}
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
var editorSelectionAPI = (0, _api.createEditorSelectionAPI)();
|
|
41
|
-
var MountCreateAnalyticsEventRef = function MountCreateAnalyticsEventRef() {
|
|
42
|
-
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
43
|
-
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
44
|
-
_react.default.useLayoutEffect(function () {
|
|
45
|
-
createAnalyticsEventRef.current = createAnalyticsEvent;
|
|
46
|
-
}, [createAnalyticsEvent]);
|
|
47
|
-
return null;
|
|
48
|
-
};
|
|
49
|
-
var stubInternalApisPlugin = function stubInternalApisPlugin() {
|
|
50
|
-
return {
|
|
51
|
-
name: 'stubInternalApisPlugin',
|
|
52
|
-
pmPlugins: function pmPlugins() {
|
|
53
|
-
return [{
|
|
54
|
-
name: 'stubInternalApisPMPlugin',
|
|
55
|
-
plugin: function plugin() {
|
|
56
|
-
return new _safePlugin.SafePlugin({
|
|
57
|
-
view: function view() {
|
|
58
|
-
return {
|
|
59
|
-
destroy: function destroy() {
|
|
60
|
-
createAnalyticsEventRef.current = null;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}];
|
|
67
|
-
},
|
|
68
|
-
contentComponent: function contentComponent() {
|
|
69
|
-
return /*#__PURE__*/_react.default.createElement(MountCreateAnalyticsEventRef);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
return {
|
|
74
|
-
editorSelectionAPI: editorSelectionAPI,
|
|
75
|
-
createAnalyticsEvent: createAnalyticsEvent,
|
|
76
|
-
stubInternalApisPlugin: stubInternalApisPlugin
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
exports.createStubInternalApis = createStubInternalApis;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
-
import { createEditorSelectionAPI } from '../../../selection-api/api';
|
|
4
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* DO NOT USE THIS FUNCTION
|
|
8
|
-
*
|
|
9
|
-
* IT IS A TEMPORARY PLACEHOLDER UNTIL THOSE TICKETS XX-11111 XX-22222 are done
|
|
10
|
-
**/
|
|
11
|
-
export const createStubInternalApis = () => {
|
|
12
|
-
const createAnalyticsEventRef = {
|
|
13
|
-
current: null
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
const createAnalyticsEvent = payload => {
|
|
18
|
-
// That means the AnalyticsNext context is being used
|
|
19
|
-
if (createAnalyticsEventRef.current) {
|
|
20
|
-
return createAnalyticsEventRef.current(payload);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// That means, there is no createAnalyticsEvent available at all.
|
|
24
|
-
// This should not happen, but if it does, we will send a mock function to avoid
|
|
25
|
-
// regression on SmartLinks (they are the only one using this function directly)
|
|
26
|
-
if (process.env.NODE_ENV === 'development') {
|
|
27
|
-
// eslint-disable-next-line no-console
|
|
28
|
-
console.error('This should never be called, if it does we have a problem');
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
fire: () => {}
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
const editorSelectionAPI = createEditorSelectionAPI();
|
|
35
|
-
const MountCreateAnalyticsEventRef = () => {
|
|
36
|
-
const {
|
|
37
|
-
createAnalyticsEvent
|
|
38
|
-
} = useAnalyticsEvents();
|
|
39
|
-
React.useLayoutEffect(() => {
|
|
40
|
-
createAnalyticsEventRef.current = createAnalyticsEvent;
|
|
41
|
-
}, [createAnalyticsEvent]);
|
|
42
|
-
return null;
|
|
43
|
-
};
|
|
44
|
-
const stubInternalApisPlugin = () => ({
|
|
45
|
-
name: 'stubInternalApisPlugin',
|
|
46
|
-
pmPlugins() {
|
|
47
|
-
return [{
|
|
48
|
-
name: 'stubInternalApisPMPlugin',
|
|
49
|
-
plugin: () => new SafePlugin({
|
|
50
|
-
view: () => {
|
|
51
|
-
return {
|
|
52
|
-
destroy() {
|
|
53
|
-
createAnalyticsEventRef.current = null;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
}];
|
|
59
|
-
},
|
|
60
|
-
contentComponent: () => {
|
|
61
|
-
return /*#__PURE__*/React.createElement(MountCreateAnalyticsEventRef);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
return {
|
|
65
|
-
editorSelectionAPI,
|
|
66
|
-
createAnalyticsEvent,
|
|
67
|
-
stubInternalApisPlugin
|
|
68
|
-
};
|
|
69
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
-
import { createEditorSelectionAPI } from '../../../selection-api/api';
|
|
4
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* DO NOT USE THIS FUNCTION
|
|
8
|
-
*
|
|
9
|
-
* IT IS A TEMPORARY PLACEHOLDER UNTIL THOSE TICKETS XX-11111 XX-22222 are done
|
|
10
|
-
**/
|
|
11
|
-
export var createStubInternalApis = function createStubInternalApis() {
|
|
12
|
-
var createAnalyticsEventRef = {
|
|
13
|
-
current: null
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
var createAnalyticsEvent = function createAnalyticsEvent(payload) {
|
|
18
|
-
// That means the AnalyticsNext context is being used
|
|
19
|
-
if (createAnalyticsEventRef.current) {
|
|
20
|
-
return createAnalyticsEventRef.current(payload);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// That means, there is no createAnalyticsEvent available at all.
|
|
24
|
-
// This should not happen, but if it does, we will send a mock function to avoid
|
|
25
|
-
// regression on SmartLinks (they are the only one using this function directly)
|
|
26
|
-
if (process.env.NODE_ENV === 'development') {
|
|
27
|
-
// eslint-disable-next-line no-console
|
|
28
|
-
console.error('This should never be called, if it does we have a problem');
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
fire: function fire() {}
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
var editorSelectionAPI = createEditorSelectionAPI();
|
|
35
|
-
var MountCreateAnalyticsEventRef = function MountCreateAnalyticsEventRef() {
|
|
36
|
-
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
37
|
-
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
38
|
-
React.useLayoutEffect(function () {
|
|
39
|
-
createAnalyticsEventRef.current = createAnalyticsEvent;
|
|
40
|
-
}, [createAnalyticsEvent]);
|
|
41
|
-
return null;
|
|
42
|
-
};
|
|
43
|
-
var stubInternalApisPlugin = function stubInternalApisPlugin() {
|
|
44
|
-
return {
|
|
45
|
-
name: 'stubInternalApisPlugin',
|
|
46
|
-
pmPlugins: function pmPlugins() {
|
|
47
|
-
return [{
|
|
48
|
-
name: 'stubInternalApisPMPlugin',
|
|
49
|
-
plugin: function plugin() {
|
|
50
|
-
return new SafePlugin({
|
|
51
|
-
view: function view() {
|
|
52
|
-
return {
|
|
53
|
-
destroy: function destroy() {
|
|
54
|
-
createAnalyticsEventRef.current = null;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}];
|
|
61
|
-
},
|
|
62
|
-
contentComponent: function contentComponent() {
|
|
63
|
-
return /*#__PURE__*/React.createElement(MountCreateAnalyticsEventRef);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
return {
|
|
68
|
-
editorSelectionAPI: editorSelectionAPI,
|
|
69
|
-
createAnalyticsEvent: createAnalyticsEvent,
|
|
70
|
-
stubInternalApisPlugin: stubInternalApisPlugin
|
|
71
|
-
};
|
|
72
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { EditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
-
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
4
|
-
/**
|
|
5
|
-
* DO NOT USE THIS FUNCTION
|
|
6
|
-
*
|
|
7
|
-
* IT IS A TEMPORARY PLACEHOLDER UNTIL THOSE TICKETS XX-11111 XX-22222 are done
|
|
8
|
-
**/
|
|
9
|
-
export declare const createStubInternalApis: () => {
|
|
10
|
-
editorSelectionAPI: EditorSelectionAPI;
|
|
11
|
-
createAnalyticsEvent: CreateUIAnalyticsEvent;
|
|
12
|
-
stubInternalApisPlugin: () => EditorPlugin;
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { EditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
-
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
4
|
-
/**
|
|
5
|
-
* DO NOT USE THIS FUNCTION
|
|
6
|
-
*
|
|
7
|
-
* IT IS A TEMPORARY PLACEHOLDER UNTIL THOSE TICKETS XX-11111 XX-22222 are done
|
|
8
|
-
**/
|
|
9
|
-
export declare const createStubInternalApis: () => {
|
|
10
|
-
editorSelectionAPI: EditorSelectionAPI;
|
|
11
|
-
createAnalyticsEvent: CreateUIAnalyticsEvent;
|
|
12
|
-
stubInternalApisPlugin: () => EditorPlugin;
|
|
13
|
-
};
|