@atlaskit/editor-common 93.4.2 → 93.4.4
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 +23 -0
- package/UNSAFE_do_not_use_editor_context/package.json +15 -0
- package/dist/cjs/analytics/types/enums.js +4 -0
- package/dist/cjs/analytics/types/mention-events.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/EditorContext/index.js +9 -0
- package/dist/cjs/with-plugin-state/index.js +273 -18
- package/dist/es2019/analytics/types/enums.js +4 -0
- package/dist/es2019/analytics/types/mention-events.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/EditorContext/index.js +2 -0
- package/dist/es2019/with-plugin-state/index.js +217 -5
- package/dist/esm/analytics/types/enums.js +4 -0
- package/dist/esm/analytics/types/mention-events.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/EditorContext/index.js +2 -0
- package/dist/esm/with-plugin-state/index.js +272 -17
- package/dist/types/analytics/types/enums.d.ts +4 -0
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/analytics/types/mention-events.d.ts +80 -0
- package/dist/types/ui/EditorContext/index.d.ts +2 -0
- package/dist/types/with-plugin-state/index.d.ts +35 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +4 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/mention-events.d.ts +80 -0
- package/dist/types-ts4.5/ui/EditorContext/index.d.ts +2 -0
- package/dist/types-ts4.5/with-plugin-state/index.d.ts +35 -1
- package/package.json +3 -2
|
@@ -81,6 +81,7 @@ export declare enum ACTION {
|
|
|
81
81
|
PASTED = "pasted",
|
|
82
82
|
PASTED_AS_PLAIN = "pastedAsPlain",
|
|
83
83
|
PASTED_TIMED = "pastedTimed",
|
|
84
|
+
PRESSED = "pressed",
|
|
84
85
|
PROSEMIRROR_RENDERED = "proseMirrorRendered",
|
|
85
86
|
REACT_NODEVIEW_RENDERED = "reactNodeViewRendered",
|
|
86
87
|
REPLACED_ALL = "replacedAll",
|
|
@@ -218,11 +219,13 @@ export declare enum ACTION_SUBJECT {
|
|
|
218
219
|
FLOATING_CONTEXTUAL_BUTTON = "floatingContextualButton",
|
|
219
220
|
FLOATING_TOOLBAR_PLUGIN = "floatingToolbarPlugin",
|
|
220
221
|
HELP = "help",
|
|
222
|
+
INVITE_ITEM = "inviteItem",
|
|
221
223
|
LAYOUT = "layout",
|
|
222
224
|
LIST = "list",
|
|
223
225
|
MEDIA = "media",
|
|
224
226
|
MEDIA_SINGLE = "mediaSingle",
|
|
225
227
|
MENTION = "mention",
|
|
228
|
+
MENTION_TYPEAHEAD = "mentionTypeahead",
|
|
226
229
|
NESTED_EXPAND = "nestedExpand",
|
|
227
230
|
PANEL = "panel",
|
|
228
231
|
PICKER = "picker",
|
|
@@ -235,6 +238,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
235
238
|
HYPERLINK = "hyperlink",
|
|
236
239
|
TABLE = "table",
|
|
237
240
|
TABLES_PLUGIN = "tablesPlugin",
|
|
241
|
+
TEAM_MENTION_TYPEAHEAD = "teamMentionTypeahead",
|
|
238
242
|
TEXT = "text",
|
|
239
243
|
TOOLBAR = "toolbar",
|
|
240
244
|
TYPEAHEAD = "typeAhead",
|
|
@@ -26,6 +26,7 @@ import type { CreateLinkInlineDialogEventPayload, EditLinkToolbarAEP, OpenSettin
|
|
|
26
26
|
import type { ListEventPayload } from './list-events';
|
|
27
27
|
import type { LoomEventPayload } from './loom-events';
|
|
28
28
|
import type { MediaEventPayload } from './media-events';
|
|
29
|
+
import { type MentionEventPayload } from './mention-events';
|
|
29
30
|
import type { MoveContentEventPayload } from './move-content-events';
|
|
30
31
|
import type { NodeEventPayload } from './node-events';
|
|
31
32
|
import type { PasteEventPayload } from './paste-events';
|
|
@@ -45,7 +46,7 @@ export type SimplifiedNode = {
|
|
|
45
46
|
marks?: string[];
|
|
46
47
|
content?: SimplifiedNode[];
|
|
47
48
|
};
|
|
48
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | EngagementPlatformEventPayload;
|
|
49
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload;
|
|
49
50
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
50
51
|
previousColor: string;
|
|
51
52
|
newColor: string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type ComponentNames, type Actions as MentionActions, type SliNames } from '@atlaskit/mention/types';
|
|
2
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
3
|
+
import { type OperationalAEP, type UIAEP } from './utils';
|
|
4
|
+
type MentionTypeaheadCancelledEventPayload = UIAEP<ACTION.CANCELLED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
|
|
5
|
+
componentName: string;
|
|
6
|
+
duration: number;
|
|
7
|
+
queryLength?: number;
|
|
8
|
+
spaceInQuery?: boolean;
|
|
9
|
+
upKeyCount: number;
|
|
10
|
+
downKeyCount: number;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
}, undefined>;
|
|
13
|
+
type MentionTypeaheadInviteItemViewedPayload = UIAEP<ACTION.RENDERED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
|
|
14
|
+
componentName: string;
|
|
15
|
+
containerId: string;
|
|
16
|
+
objectId: string;
|
|
17
|
+
childObjectId?: string;
|
|
18
|
+
userRole?: string;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
type MentionTypeaheadInviteItemClickedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
|
|
22
|
+
componentName: string;
|
|
23
|
+
duration: number;
|
|
24
|
+
queryLength?: number;
|
|
25
|
+
spaceInQuery?: boolean;
|
|
26
|
+
upKeyCount: number;
|
|
27
|
+
downKeyCount: number;
|
|
28
|
+
containerId: string;
|
|
29
|
+
objectId: string;
|
|
30
|
+
childObjectId?: string;
|
|
31
|
+
userRole?: string;
|
|
32
|
+
sessionId: string;
|
|
33
|
+
keyboardKey?: string;
|
|
34
|
+
}, undefined>;
|
|
35
|
+
type MentionTypeaheadInsertedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
|
|
36
|
+
sessionId: string;
|
|
37
|
+
duration: number;
|
|
38
|
+
position?: number;
|
|
39
|
+
keyboardKey?: string;
|
|
40
|
+
source?: string;
|
|
41
|
+
queryLength?: number;
|
|
42
|
+
spaceInQuery?: boolean;
|
|
43
|
+
isSpecial: boolean;
|
|
44
|
+
accessLevel: string;
|
|
45
|
+
userType?: string;
|
|
46
|
+
userId: string;
|
|
47
|
+
upKeyCount: number;
|
|
48
|
+
downKeyCount: number;
|
|
49
|
+
memberCount?: number | null;
|
|
50
|
+
includesYou?: boolean | null;
|
|
51
|
+
taskListId?: string;
|
|
52
|
+
taskItemId?: string;
|
|
53
|
+
localId?: string;
|
|
54
|
+
containerId?: string;
|
|
55
|
+
objectId?: string;
|
|
56
|
+
childObjectId?: string;
|
|
57
|
+
}, undefined>;
|
|
58
|
+
type MentionTypeaheadRenderedPayload = OperationalAEP<ACTION.RENDERED, ACTION_SUBJECT.MENTION_TYPEAHEAD | ACTION_SUBJECT.TEAM_MENTION_TYPEAHEAD, undefined, {
|
|
59
|
+
componentName: string;
|
|
60
|
+
duration: number;
|
|
61
|
+
userIds: Array<string> | null;
|
|
62
|
+
teams: Array<{
|
|
63
|
+
teamId: string;
|
|
64
|
+
includesYou: boolean;
|
|
65
|
+
memberCount: number;
|
|
66
|
+
}> | null;
|
|
67
|
+
queryLength?: number;
|
|
68
|
+
spaceInQuery?: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
type MentionProviderErroredPayload = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.MENTION, ACTION_SUBJECT_ID.MENTION_PROVIDER, {
|
|
71
|
+
reason: string;
|
|
72
|
+
}>;
|
|
73
|
+
export type MentionAttributes = {
|
|
74
|
+
[key: string]: string;
|
|
75
|
+
};
|
|
76
|
+
type MentionSliEventPayload = OperationalAEP<MentionActions, ComponentNames | SliNames, undefined, {
|
|
77
|
+
componentName: string;
|
|
78
|
+
} & MentionAttributes>;
|
|
79
|
+
export type MentionEventPayload = MentionTypeaheadCancelledEventPayload | MentionTypeaheadInviteItemViewedPayload | MentionTypeaheadInviteItemClickedPayload | MentionTypeaheadInsertedPayload | MentionTypeaheadRenderedPayload | MentionProviderErroredPayload | MentionSliEventPayload;
|
|
80
|
+
export {};
|
|
@@ -73,7 +73,41 @@ export interface Props<P extends NamedPluginKeys> {
|
|
|
73
73
|
* ```
|
|
74
74
|
*
|
|
75
75
|
*/
|
|
76
|
-
declare class WithPluginState<P extends NamedPluginKeys> extends React.Component<
|
|
76
|
+
declare class WithPluginState<P extends NamedPluginKeys> extends React.Component<WithPluginStateInnerProps<P>, State> {
|
|
77
|
+
constructor(props: WithPluginStateInnerProps<P>);
|
|
78
|
+
render(): JSX.Element;
|
|
79
|
+
}
|
|
80
|
+
type WithPluginStateInnerProps<P extends NamedPluginKeys> = Props<P> & {
|
|
81
|
+
editorActions?: EditorActionsPrivateAccess;
|
|
82
|
+
};
|
|
83
|
+
export declare class WithPluginStateInner<P extends NamedPluginKeys> extends React.Component<WithPluginStateInnerProps<P>, State> {
|
|
84
|
+
static displayName: string;
|
|
85
|
+
private listeners;
|
|
86
|
+
private debounce;
|
|
87
|
+
private notAppliedState;
|
|
88
|
+
private isSubscribed;
|
|
89
|
+
private callsCount;
|
|
90
|
+
state: NamedPluginStates<P>;
|
|
91
|
+
constructor(props: Props<P>);
|
|
92
|
+
private getEditorView;
|
|
93
|
+
private getEventDispatcher;
|
|
94
|
+
private handlePluginStateChange;
|
|
95
|
+
/**
|
|
96
|
+
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
97
|
+
*/
|
|
98
|
+
private updateState;
|
|
99
|
+
private dispatchAnalyticsEvent;
|
|
100
|
+
private getPluginsStates;
|
|
101
|
+
private subscribe;
|
|
102
|
+
private unsubscribe;
|
|
103
|
+
private subscribeToContextUpdates;
|
|
104
|
+
private unsubscribeFromContextUpdates;
|
|
105
|
+
componentDidMount(): void;
|
|
106
|
+
UNSAFE_componentWillReceiveProps(nextProps: Props<P>): void;
|
|
107
|
+
componentWillUnmount(): void;
|
|
108
|
+
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
109
|
+
}
|
|
110
|
+
export declare class WithPluginStateOld<P extends NamedPluginKeys> extends React.Component<Props<P>, State> {
|
|
77
111
|
static displayName: string;
|
|
78
112
|
private listeners;
|
|
79
113
|
private debounce;
|
|
@@ -81,6 +81,7 @@ export declare enum ACTION {
|
|
|
81
81
|
PASTED = "pasted",
|
|
82
82
|
PASTED_AS_PLAIN = "pastedAsPlain",
|
|
83
83
|
PASTED_TIMED = "pastedTimed",
|
|
84
|
+
PRESSED = "pressed",
|
|
84
85
|
PROSEMIRROR_RENDERED = "proseMirrorRendered",
|
|
85
86
|
REACT_NODEVIEW_RENDERED = "reactNodeViewRendered",
|
|
86
87
|
REPLACED_ALL = "replacedAll",
|
|
@@ -218,11 +219,13 @@ export declare enum ACTION_SUBJECT {
|
|
|
218
219
|
FLOATING_CONTEXTUAL_BUTTON = "floatingContextualButton",
|
|
219
220
|
FLOATING_TOOLBAR_PLUGIN = "floatingToolbarPlugin",
|
|
220
221
|
HELP = "help",
|
|
222
|
+
INVITE_ITEM = "inviteItem",
|
|
221
223
|
LAYOUT = "layout",
|
|
222
224
|
LIST = "list",
|
|
223
225
|
MEDIA = "media",
|
|
224
226
|
MEDIA_SINGLE = "mediaSingle",
|
|
225
227
|
MENTION = "mention",
|
|
228
|
+
MENTION_TYPEAHEAD = "mentionTypeahead",
|
|
226
229
|
NESTED_EXPAND = "nestedExpand",
|
|
227
230
|
PANEL = "panel",
|
|
228
231
|
PICKER = "picker",
|
|
@@ -235,6 +238,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
235
238
|
HYPERLINK = "hyperlink",
|
|
236
239
|
TABLE = "table",
|
|
237
240
|
TABLES_PLUGIN = "tablesPlugin",
|
|
241
|
+
TEAM_MENTION_TYPEAHEAD = "teamMentionTypeahead",
|
|
238
242
|
TEXT = "text",
|
|
239
243
|
TOOLBAR = "toolbar",
|
|
240
244
|
TYPEAHEAD = "typeAhead",
|
|
@@ -26,6 +26,7 @@ import type { CreateLinkInlineDialogEventPayload, EditLinkToolbarAEP, OpenSettin
|
|
|
26
26
|
import type { ListEventPayload } from './list-events';
|
|
27
27
|
import type { LoomEventPayload } from './loom-events';
|
|
28
28
|
import type { MediaEventPayload } from './media-events';
|
|
29
|
+
import { type MentionEventPayload } from './mention-events';
|
|
29
30
|
import type { MoveContentEventPayload } from './move-content-events';
|
|
30
31
|
import type { NodeEventPayload } from './node-events';
|
|
31
32
|
import type { PasteEventPayload } from './paste-events';
|
|
@@ -45,7 +46,7 @@ export type SimplifiedNode = {
|
|
|
45
46
|
marks?: string[];
|
|
46
47
|
content?: SimplifiedNode[];
|
|
47
48
|
};
|
|
48
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | EngagementPlatformEventPayload;
|
|
49
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload;
|
|
49
50
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
50
51
|
previousColor: string;
|
|
51
52
|
newColor: string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type ComponentNames, type Actions as MentionActions, type SliNames } from '@atlaskit/mention/types';
|
|
2
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
3
|
+
import { type OperationalAEP, type UIAEP } from './utils';
|
|
4
|
+
type MentionTypeaheadCancelledEventPayload = UIAEP<ACTION.CANCELLED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
|
|
5
|
+
componentName: string;
|
|
6
|
+
duration: number;
|
|
7
|
+
queryLength?: number;
|
|
8
|
+
spaceInQuery?: boolean;
|
|
9
|
+
upKeyCount: number;
|
|
10
|
+
downKeyCount: number;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
}, undefined>;
|
|
13
|
+
type MentionTypeaheadInviteItemViewedPayload = UIAEP<ACTION.RENDERED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
|
|
14
|
+
componentName: string;
|
|
15
|
+
containerId: string;
|
|
16
|
+
objectId: string;
|
|
17
|
+
childObjectId?: string;
|
|
18
|
+
userRole?: string;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
type MentionTypeaheadInviteItemClickedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
|
|
22
|
+
componentName: string;
|
|
23
|
+
duration: number;
|
|
24
|
+
queryLength?: number;
|
|
25
|
+
spaceInQuery?: boolean;
|
|
26
|
+
upKeyCount: number;
|
|
27
|
+
downKeyCount: number;
|
|
28
|
+
containerId: string;
|
|
29
|
+
objectId: string;
|
|
30
|
+
childObjectId?: string;
|
|
31
|
+
userRole?: string;
|
|
32
|
+
sessionId: string;
|
|
33
|
+
keyboardKey?: string;
|
|
34
|
+
}, undefined>;
|
|
35
|
+
type MentionTypeaheadInsertedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
|
|
36
|
+
sessionId: string;
|
|
37
|
+
duration: number;
|
|
38
|
+
position?: number;
|
|
39
|
+
keyboardKey?: string;
|
|
40
|
+
source?: string;
|
|
41
|
+
queryLength?: number;
|
|
42
|
+
spaceInQuery?: boolean;
|
|
43
|
+
isSpecial: boolean;
|
|
44
|
+
accessLevel: string;
|
|
45
|
+
userType?: string;
|
|
46
|
+
userId: string;
|
|
47
|
+
upKeyCount: number;
|
|
48
|
+
downKeyCount: number;
|
|
49
|
+
memberCount?: number | null;
|
|
50
|
+
includesYou?: boolean | null;
|
|
51
|
+
taskListId?: string;
|
|
52
|
+
taskItemId?: string;
|
|
53
|
+
localId?: string;
|
|
54
|
+
containerId?: string;
|
|
55
|
+
objectId?: string;
|
|
56
|
+
childObjectId?: string;
|
|
57
|
+
}, undefined>;
|
|
58
|
+
type MentionTypeaheadRenderedPayload = OperationalAEP<ACTION.RENDERED, ACTION_SUBJECT.MENTION_TYPEAHEAD | ACTION_SUBJECT.TEAM_MENTION_TYPEAHEAD, undefined, {
|
|
59
|
+
componentName: string;
|
|
60
|
+
duration: number;
|
|
61
|
+
userIds: Array<string> | null;
|
|
62
|
+
teams: Array<{
|
|
63
|
+
teamId: string;
|
|
64
|
+
includesYou: boolean;
|
|
65
|
+
memberCount: number;
|
|
66
|
+
}> | null;
|
|
67
|
+
queryLength?: number;
|
|
68
|
+
spaceInQuery?: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
type MentionProviderErroredPayload = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.MENTION, ACTION_SUBJECT_ID.MENTION_PROVIDER, {
|
|
71
|
+
reason: string;
|
|
72
|
+
}>;
|
|
73
|
+
export type MentionAttributes = {
|
|
74
|
+
[key: string]: string;
|
|
75
|
+
};
|
|
76
|
+
type MentionSliEventPayload = OperationalAEP<MentionActions, ComponentNames | SliNames, undefined, {
|
|
77
|
+
componentName: string;
|
|
78
|
+
} & MentionAttributes>;
|
|
79
|
+
export type MentionEventPayload = MentionTypeaheadCancelledEventPayload | MentionTypeaheadInviteItemViewedPayload | MentionTypeaheadInviteItemClickedPayload | MentionTypeaheadInsertedPayload | MentionTypeaheadRenderedPayload | MentionProviderErroredPayload | MentionSliEventPayload;
|
|
80
|
+
export {};
|
|
@@ -73,7 +73,41 @@ export interface Props<P extends NamedPluginKeys> {
|
|
|
73
73
|
* ```
|
|
74
74
|
*
|
|
75
75
|
*/
|
|
76
|
-
declare class WithPluginState<P extends NamedPluginKeys> extends React.Component<
|
|
76
|
+
declare class WithPluginState<P extends NamedPluginKeys> extends React.Component<WithPluginStateInnerProps<P>, State> {
|
|
77
|
+
constructor(props: WithPluginStateInnerProps<P>);
|
|
78
|
+
render(): JSX.Element;
|
|
79
|
+
}
|
|
80
|
+
type WithPluginStateInnerProps<P extends NamedPluginKeys> = Props<P> & {
|
|
81
|
+
editorActions?: EditorActionsPrivateAccess;
|
|
82
|
+
};
|
|
83
|
+
export declare class WithPluginStateInner<P extends NamedPluginKeys> extends React.Component<WithPluginStateInnerProps<P>, State> {
|
|
84
|
+
static displayName: string;
|
|
85
|
+
private listeners;
|
|
86
|
+
private debounce;
|
|
87
|
+
private notAppliedState;
|
|
88
|
+
private isSubscribed;
|
|
89
|
+
private callsCount;
|
|
90
|
+
state: NamedPluginStates<P>;
|
|
91
|
+
constructor(props: Props<P>);
|
|
92
|
+
private getEditorView;
|
|
93
|
+
private getEventDispatcher;
|
|
94
|
+
private handlePluginStateChange;
|
|
95
|
+
/**
|
|
96
|
+
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
97
|
+
*/
|
|
98
|
+
private updateState;
|
|
99
|
+
private dispatchAnalyticsEvent;
|
|
100
|
+
private getPluginsStates;
|
|
101
|
+
private subscribe;
|
|
102
|
+
private unsubscribe;
|
|
103
|
+
private subscribeToContextUpdates;
|
|
104
|
+
private unsubscribeFromContextUpdates;
|
|
105
|
+
componentDidMount(): void;
|
|
106
|
+
UNSAFE_componentWillReceiveProps(nextProps: Props<P>): void;
|
|
107
|
+
componentWillUnmount(): void;
|
|
108
|
+
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
109
|
+
}
|
|
110
|
+
export declare class WithPluginStateOld<P extends NamedPluginKeys> extends React.Component<Props<P>, State> {
|
|
77
111
|
static displayName: string;
|
|
78
112
|
private listeners;
|
|
79
113
|
private debounce;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "93.4.
|
|
3
|
+
"version": "93.4.4",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -105,7 +105,8 @@
|
|
|
105
105
|
"./intl-error-boundary": "./src/ui/IntlErrorBoundary/index.tsx",
|
|
106
106
|
"./code-block": "./src/code-block/index.ts",
|
|
107
107
|
"./table": "./src/table/index.ts",
|
|
108
|
-
"./lazy-node-view": "./src/lazy-node-view/index.ts"
|
|
108
|
+
"./lazy-node-view": "./src/lazy-node-view/index.ts",
|
|
109
|
+
"./UNSAFE_do_not_use_editor_context": "./src/ui/EditorContext/index.ts"
|
|
109
110
|
},
|
|
110
111
|
"dependencies": {
|
|
111
112
|
"@atlaskit/activity-provider": "^2.4.0",
|