@atlaskit/editor-common 111.8.7 → 111.8.9
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 +17 -0
- package/afm-jira/tsconfig.json +1 -1
- package/dist/cjs/analytics/types/enums.js +12 -0
- package/dist/cjs/experiences/consts.js +9 -2
- package/dist/cjs/experiences/experience-utils.js +16 -1
- package/dist/cjs/experiences/index.js +12 -0
- package/dist/cjs/experiences/types.js +15 -1
- package/dist/cjs/extensibility/Extension/Extension/index.js +3 -2
- package/dist/cjs/link/LinkSearch/index.js +2 -1
- package/dist/cjs/messages/block-menu.js +20 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +12 -0
- package/dist/es2019/experiences/consts.js +8 -1
- package/dist/es2019/experiences/experience-utils.js +13 -0
- package/dist/es2019/experiences/index.js +2 -2
- package/dist/es2019/experiences/types.js +14 -0
- package/dist/es2019/extensibility/Extension/Extension/index.js +3 -2
- package/dist/es2019/link/LinkSearch/index.js +2 -1
- package/dist/es2019/messages/block-menu.js +20 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +12 -0
- package/dist/esm/experiences/consts.js +8 -1
- package/dist/esm/experiences/experience-utils.js +15 -0
- package/dist/esm/experiences/index.js +2 -2
- package/dist/esm/experiences/types.js +14 -0
- package/dist/esm/extensibility/Extension/Extension/index.js +3 -2
- package/dist/esm/link/LinkSearch/index.js +2 -1
- package/dist/esm/messages/block-menu.js +20 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +12 -0
- package/dist/types/analytics/types/sync-block-events.d.ts +14 -2
- package/dist/types/experiences/Experience.d.ts +2 -2
- package/dist/types/experiences/consts.d.ts +7 -0
- package/dist/types/experiences/experience-utils.d.ts +7 -0
- package/dist/types/experiences/index.d.ts +2 -2
- package/dist/types/experiences/types.d.ts +4 -1
- package/dist/types/extensibility/Extension/Extension/index.d.ts +58 -58
- package/dist/types/link/LinkSearch/index.d.ts +43 -41
- package/dist/types/messages/block-menu.d.ts +20 -0
- package/dist/types/utils/browser.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +12 -0
- package/dist/types-ts4.5/analytics/types/sync-block-events.d.ts +14 -2
- package/dist/types-ts4.5/experiences/Experience.d.ts +2 -2
- package/dist/types-ts4.5/experiences/consts.d.ts +7 -0
- package/dist/types-ts4.5/experiences/experience-utils.d.ts +7 -0
- package/dist/types-ts4.5/experiences/index.d.ts +2 -2
- package/dist/types-ts4.5/experiences/types.d.ts +4 -1
- package/dist/types-ts4.5/extensibility/Extension/Extension/index.d.ts +58 -58
- package/dist/types-ts4.5/link/LinkSearch/index.d.ts +43 -41
- package/dist/types-ts4.5/messages/block-menu.d.ts +20 -0
- package/dist/types-ts4.5/utils/browser.d.ts +2 -1
- package/package.json +6 -5
|
@@ -59,6 +59,7 @@ export declare enum ACTION {
|
|
|
59
59
|
EXPERIENCE_MEASURED = "experienceMeasured",
|
|
60
60
|
EXPERIENCE_SAMPLED = "experienceSampled",
|
|
61
61
|
EXPOSED = "exposed",
|
|
62
|
+
FETCHED = "fetched",
|
|
62
63
|
FAILED_TO_UNMOUNT = "failedToUnmount",
|
|
63
64
|
FAILED_TO_INSERT = "failedToInsert",
|
|
64
65
|
FIND_NEXT_PERFORMED = "findNextPerformed",
|
|
@@ -101,6 +102,8 @@ export declare enum ACTION {
|
|
|
101
102
|
PRESSED = "pressed",
|
|
102
103
|
PROSEMIRROR_RENDERED = "proseMirrorRendered",
|
|
103
104
|
REACT_NODEVIEW_RENDERED = "reactNodeViewRendered",
|
|
105
|
+
REFERENCE_SYNCED_BLOCK_DELETE = "referenceSyncedBlockDelete",
|
|
106
|
+
REFERENCE_SYNCED_BLOCK_UPDATE = "referenceSyncedBlockUpdate",
|
|
104
107
|
REPLACED_ALL = "replacedAll",
|
|
105
108
|
REPLACED_ONE = "replacedOne",
|
|
106
109
|
RESOLVED = "resolved",
|
|
@@ -112,6 +115,11 @@ export declare enum ACTION {
|
|
|
112
115
|
STOPPED = "stopped",
|
|
113
116
|
SUBMITTED = "submitted",
|
|
114
117
|
SUBSTITUTED = "autoSubstituted",
|
|
118
|
+
SYNCED_BLOCK_CREATE = "syncedBlockCreate",
|
|
119
|
+
SYNCED_BLOCK_UPDATE = "syncedBlockUpdate",
|
|
120
|
+
SYNCED_BLOCK_FETCH = "syncedBlockFetch",
|
|
121
|
+
SYNCED_BLOCK_DELETE = "syncedBlockDelete",
|
|
122
|
+
SYNCED_BLOCK_GET_SOURCE_INFO = "syncedBlockGetSourceInfo",
|
|
115
123
|
SYNCHRONY_DISCONNECTED = "synchronyDisconnected",
|
|
116
124
|
SYNCHRONY_ENTITY_ERROR = "synchronyEntityError",
|
|
117
125
|
SYNCHRONY_ERROR = "synchronyError",
|
|
@@ -357,6 +365,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
357
365
|
ALT_TEXT = "altText",
|
|
358
366
|
ANNOTATE_BUTTON = "annotateButton",
|
|
359
367
|
AVATAR_GROUP_PLUGIN = "AvatarGroupInPlugin",
|
|
368
|
+
BLOCK_MENU = "blockMenu",
|
|
360
369
|
BLOCK_QUOTE = "blockQuote",
|
|
361
370
|
BORDER = "border",
|
|
362
371
|
BUTTON_CATEGORY = "categoryButton",
|
|
@@ -471,10 +480,12 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
471
480
|
PLACEHOLDER_TEXT = "placeholderText",
|
|
472
481
|
POST_QUERY_SEARCH_RESULTS = "postQuerySearchResults",
|
|
473
482
|
PRE_QUERY_SEARCH_RESULTS = "preQuerySearchResults",
|
|
483
|
+
PRIMARY_TOOLBAR = "primaryToolbar",
|
|
474
484
|
PROACTIVE_SUGGESTION = "proactiveSuggestion",
|
|
475
485
|
PRODUCT_NAME = "productName",
|
|
476
486
|
PUNC = "punctuation",
|
|
477
487
|
QUICK_SEARCH = "quickSearch",
|
|
488
|
+
QUICK_INSERT = "quickInsert",
|
|
478
489
|
RANGE = "range",
|
|
479
490
|
REACT_NODE_VIEW = "reactNodeView",
|
|
480
491
|
RECENT_ACTIVITIES = "recentActivities",
|
|
@@ -514,6 +525,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
514
525
|
EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM = "editorPluginSelectionExtensionItem",
|
|
515
526
|
EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT = "editorPluginSelectionExtensionComponent",
|
|
516
527
|
TRANSFORM = "transform",
|
|
528
|
+
SYNCED_BLOCK_TOOLBAR = "syncedBlockToolbar",
|
|
517
529
|
SYNCED_BLOCK_SOURCE_URL = "syncedBlockSourceUrl",
|
|
518
530
|
SYNCED_BLOCK_UPDATE_CACHE = "syncedBlockUpdateCache",
|
|
519
531
|
SYNCED_BLOCK_UPDATE = "syncedBlockUpdate",
|
|
@@ -3,6 +3,14 @@ import type { ExperienceEventPayload } from './experience-events';
|
|
|
3
3
|
import type { OperationalAEP } from './utils';
|
|
4
4
|
type SyncedBlockErrorAttributes = {
|
|
5
5
|
error: string;
|
|
6
|
+
resourceId?: string;
|
|
7
|
+
};
|
|
8
|
+
type SyncedBlockSuccessAttributes = {
|
|
9
|
+
resourceId: string;
|
|
10
|
+
};
|
|
11
|
+
type FetchSyncedBlockSuccessAttributes = SyncedBlockSuccessAttributes & {
|
|
12
|
+
blockInstanceId?: string;
|
|
13
|
+
sourceProduct?: string;
|
|
6
14
|
};
|
|
7
15
|
export type SyncedBlockSourceURLErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_SOURCE_URL, SyncedBlockErrorAttributes>;
|
|
8
16
|
export type SyncedBlockUpdateCacheErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_UPDATE_CACHE, SyncedBlockErrorAttributes>;
|
|
@@ -13,6 +21,10 @@ export type SyncedBlockDeleteErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJ
|
|
|
13
21
|
export type SyncedBlockGetSourceInfoErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_GET_SOURCE_INFO, SyncedBlockErrorAttributes>;
|
|
14
22
|
export type SyncedBlockFetchErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_FETCH, SyncedBlockErrorAttributes>;
|
|
15
23
|
export type SyncedBlockFetchReferencesErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_FETCH_REFERENCES, SyncedBlockErrorAttributes>;
|
|
16
|
-
export type
|
|
17
|
-
export type
|
|
24
|
+
export type SyncedBlockFetchSuccessAEP = OperationalAEP<ACTION.FETCHED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_FETCH, FetchSyncedBlockSuccessAttributes>;
|
|
25
|
+
export type SyncedBlockCreateSuccessAEP = OperationalAEP<ACTION.INSERTED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_CREATE, SyncedBlockSuccessAttributes>;
|
|
26
|
+
export type SyncedBlockUpdateSuccessAEP = OperationalAEP<ACTION.UPDATED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_UPDATE, SyncedBlockSuccessAttributes>;
|
|
27
|
+
export type SyncedBlockDeleteSuccessAEP = OperationalAEP<ACTION.DELETED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_DELETE, SyncedBlockSuccessAttributes>;
|
|
28
|
+
export type SyncBlockEventPayload = SyncedBlockSourceURLErrorAEP | SyncedBlockUpdateCacheErrorAEP | SyncedBlockUpdateErrorAEP | SyncedBlockUpdateSuccessAEP | SyncedBlockCreateErrorAEP | SyncedBlockCreateSuccessAEP | SyncedBlockDeleteErrorAEP | SyncedBlockDeleteSuccessAEP | SyncedBlockGetSourceInfoErrorAEP | SyncedBlockFetchErrorAEP | SyncedBlockFetchSuccessAEP | ReferenceSyncedBlockUpdateErrorAEP | SyncedBlockFetchReferencesErrorAEP | ExperienceEventPayload;
|
|
29
|
+
export type RendererSyncBlockEventPayload = SyncedBlockGetSourceInfoErrorAEP | SyncedBlockFetchErrorAEP | SyncedBlockFetchSuccessAEP | ReferenceSyncedBlockUpdateErrorAEP | ExperienceEventPayload;
|
|
18
30
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DispatchAnalyticsEvent } from '../analytics';
|
|
2
2
|
import type { ExperienceCheck } from './ExperienceCheck';
|
|
3
|
-
import type { CustomExperienceMetadata } from './types';
|
|
3
|
+
import type { CustomExperienceMetadata, ExperienceId } from './types';
|
|
4
4
|
type ExperienceOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* An optional sub identifier to further classify the specific experience action taken
|
|
@@ -99,7 +99,7 @@ export declare class Experience {
|
|
|
99
99
|
* @param options.action - Optional sub identifier for the specific experience action e.g. 'bold' 'insert-table'
|
|
100
100
|
* @param options.actionSubjectId - Optional sub identifier for the experience action subject e.g. 'selection-toolbar' 'quick-insert'
|
|
101
101
|
*/
|
|
102
|
-
constructor(id:
|
|
102
|
+
constructor(id: ExperienceId, options: ExperienceOptions);
|
|
103
103
|
private startCheck;
|
|
104
104
|
private stopCheck;
|
|
105
105
|
private getEndStateMetadata;
|
|
@@ -41,3 +41,10 @@ export declare const EXPERIENCE_ABORT_REASON: {
|
|
|
41
41
|
* instrumentation, then the sample rate can be tuned up to a safe threshold.
|
|
42
42
|
*/
|
|
43
43
|
export declare const DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
|
|
44
|
+
export declare const EXPERIENCE_ID: {
|
|
45
|
+
readonly ASYNC_OPERATION: "asyncOperation";
|
|
46
|
+
readonly MENU_ACTION: "menuAction";
|
|
47
|
+
readonly MENU_OPEN: "menu-open";
|
|
48
|
+
readonly TOOLBAR_ACTION: "toolbarAction";
|
|
49
|
+
readonly TOOLBAR_OPEN: "toolbar-open";
|
|
50
|
+
};
|
|
@@ -21,3 +21,10 @@ export declare const popupWithNestedElement: (node: Node | null | undefined, nes
|
|
|
21
21
|
* @returns The popup container HTMLElement if found, otherwise undefined.
|
|
22
22
|
*/
|
|
23
23
|
export declare const getPopupContainerFromEditorView: (editorViewEl?: HTMLElement | null) => HTMLElement | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Checks if a node matches or contains the node given by the provided query css selector
|
|
26
|
+
*
|
|
27
|
+
* @param query - CSS selector string
|
|
28
|
+
* @returns true if node matches or contains query or false otherwise
|
|
29
|
+
*/
|
|
30
|
+
export declare const getNodeQuery: (query: string) => (node?: Node | null) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { Experience } from './Experience';
|
|
2
|
-
export { EXPERIENCE_ABORT_REASON, EXPERIENCE_FAILURE_REASON } from './consts';
|
|
2
|
+
export { EXPERIENCE_ABORT_REASON, EXPERIENCE_FAILURE_REASON, EXPERIENCE_ID } from './consts';
|
|
3
3
|
export { ExperienceCheckComposite } from './ExperienceCheckComposite';
|
|
4
4
|
export { ExperienceCheckDomMutation } from './ExperienceCheckDomMutation';
|
|
5
5
|
export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
|
|
6
6
|
export type { ExperienceCheck, ExperienceCheckCallback, ExperienceCheckResult, } from './ExperienceCheck';
|
|
7
7
|
export type { ExperienceCheckDomMutationConfig, ExperienceCheckDomMutationObserveConfig, ExperienceDomMutationCheckOptions, } from './ExperienceCheckDomMutation';
|
|
8
|
-
export { containsPopupWithNestedElement, popupWithNestedElement, getPopupContainerFromEditorView, } from './experience-utils';
|
|
8
|
+
export { containsPopupWithNestedElement, popupWithNestedElement, getPopupContainerFromEditorView, getNodeQuery, } from './experience-utils';
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* Allow any additional custom metadata to be attached to experience events.
|
|
3
3
|
*/
|
|
4
4
|
export type CustomExperienceMetadata = {
|
|
5
|
-
[key: string]: string | number | boolean | CustomExperienceMetadata |
|
|
5
|
+
[key: string]: string | number | boolean | CustomExperienceMetadata | undefined;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Represents the state of an experience throughout its lifecycle.
|
|
9
9
|
*/
|
|
10
10
|
export type ExperienceState = 'pending' | 'started' | 'aborted' | 'failed' | 'succeeded';
|
|
11
|
+
declare const EXPERIENCE_IDS: ("asyncOperation" | "menuAction" | "menu-open" | "toolbarAction" | "toolbar-open")[];
|
|
12
|
+
export type ExperienceId = typeof EXPERIENCE_IDS[number];
|
|
13
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { ExtensionProvider, ReferenceEntity } from '../../../extensions';
|
|
5
5
|
import type { ProsemirrorGetPosHandler } from '../../../react-node-view';
|
|
6
6
|
import type { EditorAppearance } from '../../../types';
|
|
7
|
-
import type { OverflowShadowProps } from '../../../ui';
|
|
7
|
+
import type { OverflowShadowProps, OverflowShadowState, ShadowObserver } from '../../../ui';
|
|
8
8
|
import type { ExtensionsPluginInjectionAPI, MacroInteractionDesignFeatureFlags } from '../../types';
|
|
9
9
|
export interface Props {
|
|
10
10
|
children?: React.ReactNode;
|
|
@@ -28,85 +28,85 @@ export interface Props {
|
|
|
28
28
|
showUpdatedLivePages1PBodiedExtensionUI?: boolean;
|
|
29
29
|
view: EditorView;
|
|
30
30
|
}
|
|
31
|
-
declare const
|
|
31
|
+
declare const _default_1: {
|
|
32
32
|
new (props: Props & OverflowShadowProps): {
|
|
33
|
-
|
|
33
|
+
calcOverflowDiff: () => number;
|
|
34
|
+
calcScrollableWidth: () => number;
|
|
35
|
+
componentDidCatch?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
36
|
+
componentDidMount?: () => void;
|
|
37
|
+
componentDidUpdate: () => void;
|
|
38
|
+
componentWillMount?: () => void;
|
|
39
|
+
componentWillReceiveProps?: (nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any) => void;
|
|
40
|
+
componentWillUnmount: () => void;
|
|
41
|
+
componentWillUpdate?: (nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any) => void;
|
|
34
42
|
container?: HTMLElement;
|
|
35
|
-
|
|
43
|
+
context: unknown;
|
|
44
|
+
diff?: number;
|
|
45
|
+
forceUpdate: (callback?: (() => void) | undefined) => void;
|
|
46
|
+
getSnapshotBeforeUpdate?: (prevProps: Readonly<Props & OverflowShadowProps>, prevState: Readonly<OverflowShadowState>) => any;
|
|
47
|
+
handleContainer: (container: HTMLElement | null) => void;
|
|
48
|
+
handleScroll: (event: Event) => void;
|
|
49
|
+
initShadowObserver: () => void;
|
|
50
|
+
overflowContainer?: HTMLElement | null;
|
|
36
51
|
overflowContainerWidth: number;
|
|
52
|
+
readonly props: Readonly<Props & OverflowShadowProps>;
|
|
53
|
+
refs: {
|
|
54
|
+
[key: string]: React.ReactInstance;
|
|
55
|
+
};
|
|
56
|
+
render: () => React.JSX.Element;
|
|
37
57
|
scrollable?: NodeList;
|
|
38
|
-
|
|
58
|
+
setState: <K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<Props & OverflowShadowProps>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined) => void;
|
|
59
|
+
shadowObserver?: ShadowObserver;
|
|
60
|
+
shouldComponentUpdate?: (nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any) => boolean;
|
|
61
|
+
showLeftShadow: (overflowContainer: HTMLElement | null | undefined) => boolean;
|
|
39
62
|
state: {
|
|
40
63
|
showLeftShadow: boolean;
|
|
41
64
|
showRightShadow: boolean;
|
|
42
65
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
66
|
+
UNSAFE_componentWillMount?: () => void;
|
|
67
|
+
UNSAFE_componentWillReceiveProps?: (nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any) => void;
|
|
68
|
+
UNSAFE_componentWillUpdate?: (nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any) => void;
|
|
46
69
|
updateShadows: () => void;
|
|
47
|
-
|
|
70
|
+
};
|
|
71
|
+
new (props: Props & OverflowShadowProps, context: any): {
|
|
48
72
|
calcOverflowDiff: () => number;
|
|
49
73
|
calcScrollableWidth: () => number;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
74
|
+
componentDidCatch?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
75
|
+
componentDidMount?: () => void;
|
|
76
|
+
componentDidUpdate: () => void;
|
|
77
|
+
componentWillMount?: () => void;
|
|
78
|
+
componentWillReceiveProps?: (nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any) => void;
|
|
79
|
+
componentWillUnmount: () => void;
|
|
80
|
+
componentWillUpdate?: (nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any) => void;
|
|
81
|
+
container?: HTMLElement;
|
|
53
82
|
context: unknown;
|
|
54
|
-
|
|
55
|
-
forceUpdate(callback?: (() => void) | undefined)
|
|
83
|
+
diff?: number;
|
|
84
|
+
forceUpdate: (callback?: (() => void) | undefined) => void;
|
|
85
|
+
getSnapshotBeforeUpdate?: (prevProps: Readonly<Props & OverflowShadowProps>, prevState: Readonly<OverflowShadowState>) => any;
|
|
86
|
+
handleContainer: (container: HTMLElement | null) => void;
|
|
87
|
+
handleScroll: (event: Event) => void;
|
|
88
|
+
initShadowObserver: () => void;
|
|
89
|
+
overflowContainer?: HTMLElement | null;
|
|
90
|
+
overflowContainerWidth: number;
|
|
56
91
|
readonly props: Readonly<Props & OverflowShadowProps>;
|
|
57
92
|
refs: {
|
|
58
93
|
[key: string]: React.ReactInstance;
|
|
59
94
|
};
|
|
60
|
-
|
|
61
|
-
shouldComponentUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
|
|
62
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
63
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props & OverflowShadowProps>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
|
|
64
|
-
componentWillMount?(): void;
|
|
65
|
-
UNSAFE_componentWillMount?(): void;
|
|
66
|
-
componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
|
|
67
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
|
|
68
|
-
componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
|
|
69
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
|
|
70
|
-
};
|
|
71
|
-
new (props: Props & OverflowShadowProps, context: any): {
|
|
72
|
-
overflowContainer?: HTMLElement | null;
|
|
73
|
-
container?: HTMLElement;
|
|
74
|
-
shadowObserver?: import("../../../ui").ShadowObserver;
|
|
75
|
-
overflowContainerWidth: number;
|
|
95
|
+
render: () => React.JSX.Element;
|
|
76
96
|
scrollable?: NodeList;
|
|
77
|
-
|
|
97
|
+
setState: <K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<Props & OverflowShadowProps>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined) => void;
|
|
98
|
+
shadowObserver?: ShadowObserver;
|
|
99
|
+
shouldComponentUpdate?: (nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any) => boolean;
|
|
100
|
+
showLeftShadow: (overflowContainer: HTMLElement | null | undefined) => boolean;
|
|
78
101
|
state: {
|
|
79
102
|
showLeftShadow: boolean;
|
|
80
103
|
showRightShadow: boolean;
|
|
81
104
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
105
|
+
UNSAFE_componentWillMount?: () => void;
|
|
106
|
+
UNSAFE_componentWillReceiveProps?: (nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any) => void;
|
|
107
|
+
UNSAFE_componentWillUpdate?: (nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any) => void;
|
|
85
108
|
updateShadows: () => void;
|
|
86
|
-
showLeftShadow: (overflowContainer: HTMLElement | null | undefined) => boolean;
|
|
87
|
-
calcOverflowDiff: () => number;
|
|
88
|
-
calcScrollableWidth: () => number;
|
|
89
|
-
handleContainer: (container: HTMLElement | null) => void;
|
|
90
|
-
initShadowObserver(): void;
|
|
91
|
-
render(): React.JSX.Element;
|
|
92
|
-
context: unknown;
|
|
93
|
-
setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props & OverflowShadowProps>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
94
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
95
|
-
readonly props: Readonly<Props & OverflowShadowProps>;
|
|
96
|
-
refs: {
|
|
97
|
-
[key: string]: React.ReactInstance;
|
|
98
|
-
};
|
|
99
|
-
componentDidMount?(): void;
|
|
100
|
-
shouldComponentUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
|
|
101
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
102
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props & OverflowShadowProps>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
|
|
103
|
-
componentWillMount?(): void;
|
|
104
|
-
UNSAFE_componentWillMount?(): void;
|
|
105
|
-
componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
|
|
106
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
|
|
107
|
-
componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
|
|
108
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
|
|
109
109
|
};
|
|
110
110
|
contextType?: React.Context<any> | undefined;
|
|
111
111
|
};
|
|
112
|
-
export default
|
|
112
|
+
export default _default_1;
|
|
@@ -1,55 +1,57 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Providers } from '../../provider-factory';
|
|
3
|
+
import type { Diff } from '../../utils';
|
|
2
4
|
import { type RecentSearchProps } from './types';
|
|
3
|
-
import { type WithActivityProviderProps } from './withActivityProvider';
|
|
4
|
-
declare const
|
|
5
|
-
new (props:
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { type ExpandedActivityProviderProps, type WithActivityProviderProps } from './withActivityProvider';
|
|
6
|
+
declare const _default_1: {
|
|
7
|
+
new (props: Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps): {
|
|
8
|
+
componentDidCatch?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
9
|
+
componentDidMount?: () => void;
|
|
10
|
+
componentDidUpdate?: (prevProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, prevState: Readonly<{}>, snapshot?: any) => void;
|
|
11
|
+
componentWillMount?: () => void;
|
|
12
|
+
componentWillReceiveProps?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextContext: any) => void;
|
|
13
|
+
componentWillUnmount?: () => void;
|
|
14
|
+
componentWillUpdate?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any) => void;
|
|
8
15
|
context: unknown;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly props: Readonly<
|
|
12
|
-
state: Readonly<{}>;
|
|
16
|
+
forceUpdate: (callback?: (() => void) | undefined) => void;
|
|
17
|
+
getSnapshotBeforeUpdate?: (prevProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, prevState: Readonly<{}>) => any;
|
|
18
|
+
readonly props: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>;
|
|
13
19
|
refs: {
|
|
14
20
|
[key: string]: React.ReactInstance;
|
|
15
21
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
componentWillReceiveProps?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextContext: any): void;
|
|
25
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextContext: any): void;
|
|
26
|
-
componentWillUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
27
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
22
|
+
render: () => React.JSX.Element;
|
|
23
|
+
renderNode: (providers: Providers) => React.JSX.Element;
|
|
24
|
+
setState: <K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined) => void;
|
|
25
|
+
shouldComponentUpdate?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any) => boolean;
|
|
26
|
+
state: Readonly<{}>;
|
|
27
|
+
UNSAFE_componentWillMount?: () => void;
|
|
28
|
+
UNSAFE_componentWillReceiveProps?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextContext: any) => void;
|
|
29
|
+
UNSAFE_componentWillUpdate?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any) => void;
|
|
28
30
|
};
|
|
29
|
-
new (props:
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
new (props: Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps, context: any): {
|
|
32
|
+
componentDidCatch?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
33
|
+
componentDidMount?: () => void;
|
|
34
|
+
componentDidUpdate?: (prevProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, prevState: Readonly<{}>, snapshot?: any) => void;
|
|
35
|
+
componentWillMount?: () => void;
|
|
36
|
+
componentWillReceiveProps?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextContext: any) => void;
|
|
37
|
+
componentWillUnmount?: () => void;
|
|
38
|
+
componentWillUpdate?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any) => void;
|
|
32
39
|
context: unknown;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
readonly props: Readonly<
|
|
36
|
-
state: Readonly<{}>;
|
|
40
|
+
forceUpdate: (callback?: (() => void) | undefined) => void;
|
|
41
|
+
getSnapshotBeforeUpdate?: (prevProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, prevState: Readonly<{}>) => any;
|
|
42
|
+
readonly props: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>;
|
|
37
43
|
refs: {
|
|
38
44
|
[key: string]: React.ReactInstance;
|
|
39
45
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
componentWillReceiveProps?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextContext: any): void;
|
|
49
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextContext: any): void;
|
|
50
|
-
componentWillUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
51
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
46
|
+
render: () => React.JSX.Element;
|
|
47
|
+
renderNode: (providers: Providers) => React.JSX.Element;
|
|
48
|
+
setState: <K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined) => void;
|
|
49
|
+
shouldComponentUpdate?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any) => boolean;
|
|
50
|
+
state: Readonly<{}>;
|
|
51
|
+
UNSAFE_componentWillMount?: () => void;
|
|
52
|
+
UNSAFE_componentWillReceiveProps?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextContext: any) => void;
|
|
53
|
+
UNSAFE_componentWillUpdate?: (nextProps: Readonly<Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any) => void;
|
|
52
54
|
};
|
|
53
55
|
contextType?: React.Context<any> | undefined;
|
|
54
56
|
};
|
|
55
|
-
export default
|
|
57
|
+
export default _default_1;
|
|
@@ -84,4 +84,24 @@ export declare const messages: {
|
|
|
84
84
|
defaultMessage: string;
|
|
85
85
|
description: string;
|
|
86
86
|
};
|
|
87
|
+
create: {
|
|
88
|
+
id: string;
|
|
89
|
+
defaultMessage: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
headings: {
|
|
93
|
+
id: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
suggested: {
|
|
98
|
+
id: string;
|
|
99
|
+
defaultMessage: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
structure: {
|
|
103
|
+
id: string;
|
|
104
|
+
defaultMessage: string;
|
|
105
|
+
description: string;
|
|
106
|
+
};
|
|
87
107
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type MemoizedFn } from 'memoize-one';
|
|
1
2
|
/**
|
|
2
3
|
* @deprecated
|
|
3
4
|
* This file is deprecated and will be removed in the next major release.
|
|
@@ -8,6 +9,6 @@ declare const result: {
|
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
};
|
|
10
11
|
export { result as browser };
|
|
11
|
-
export declare const getBrowserInfo:
|
|
12
|
+
export declare const getBrowserInfo: MemoizedFn<() => {
|
|
12
13
|
[key: string]: any;
|
|
13
14
|
}>;
|
|
@@ -59,6 +59,7 @@ export declare enum ACTION {
|
|
|
59
59
|
EXPERIENCE_MEASURED = "experienceMeasured",
|
|
60
60
|
EXPERIENCE_SAMPLED = "experienceSampled",
|
|
61
61
|
EXPOSED = "exposed",
|
|
62
|
+
FETCHED = "fetched",
|
|
62
63
|
FAILED_TO_UNMOUNT = "failedToUnmount",
|
|
63
64
|
FAILED_TO_INSERT = "failedToInsert",
|
|
64
65
|
FIND_NEXT_PERFORMED = "findNextPerformed",
|
|
@@ -101,6 +102,8 @@ export declare enum ACTION {
|
|
|
101
102
|
PRESSED = "pressed",
|
|
102
103
|
PROSEMIRROR_RENDERED = "proseMirrorRendered",
|
|
103
104
|
REACT_NODEVIEW_RENDERED = "reactNodeViewRendered",
|
|
105
|
+
REFERENCE_SYNCED_BLOCK_DELETE = "referenceSyncedBlockDelete",
|
|
106
|
+
REFERENCE_SYNCED_BLOCK_UPDATE = "referenceSyncedBlockUpdate",
|
|
104
107
|
REPLACED_ALL = "replacedAll",
|
|
105
108
|
REPLACED_ONE = "replacedOne",
|
|
106
109
|
RESOLVED = "resolved",
|
|
@@ -112,6 +115,11 @@ export declare enum ACTION {
|
|
|
112
115
|
STOPPED = "stopped",
|
|
113
116
|
SUBMITTED = "submitted",
|
|
114
117
|
SUBSTITUTED = "autoSubstituted",
|
|
118
|
+
SYNCED_BLOCK_CREATE = "syncedBlockCreate",
|
|
119
|
+
SYNCED_BLOCK_UPDATE = "syncedBlockUpdate",
|
|
120
|
+
SYNCED_BLOCK_FETCH = "syncedBlockFetch",
|
|
121
|
+
SYNCED_BLOCK_DELETE = "syncedBlockDelete",
|
|
122
|
+
SYNCED_BLOCK_GET_SOURCE_INFO = "syncedBlockGetSourceInfo",
|
|
115
123
|
SYNCHRONY_DISCONNECTED = "synchronyDisconnected",
|
|
116
124
|
SYNCHRONY_ENTITY_ERROR = "synchronyEntityError",
|
|
117
125
|
SYNCHRONY_ERROR = "synchronyError",
|
|
@@ -357,6 +365,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
357
365
|
ALT_TEXT = "altText",
|
|
358
366
|
ANNOTATE_BUTTON = "annotateButton",
|
|
359
367
|
AVATAR_GROUP_PLUGIN = "AvatarGroupInPlugin",
|
|
368
|
+
BLOCK_MENU = "blockMenu",
|
|
360
369
|
BLOCK_QUOTE = "blockQuote",
|
|
361
370
|
BORDER = "border",
|
|
362
371
|
BUTTON_CATEGORY = "categoryButton",
|
|
@@ -471,10 +480,12 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
471
480
|
PLACEHOLDER_TEXT = "placeholderText",
|
|
472
481
|
POST_QUERY_SEARCH_RESULTS = "postQuerySearchResults",
|
|
473
482
|
PRE_QUERY_SEARCH_RESULTS = "preQuerySearchResults",
|
|
483
|
+
PRIMARY_TOOLBAR = "primaryToolbar",
|
|
474
484
|
PROACTIVE_SUGGESTION = "proactiveSuggestion",
|
|
475
485
|
PRODUCT_NAME = "productName",
|
|
476
486
|
PUNC = "punctuation",
|
|
477
487
|
QUICK_SEARCH = "quickSearch",
|
|
488
|
+
QUICK_INSERT = "quickInsert",
|
|
478
489
|
RANGE = "range",
|
|
479
490
|
REACT_NODE_VIEW = "reactNodeView",
|
|
480
491
|
RECENT_ACTIVITIES = "recentActivities",
|
|
@@ -514,6 +525,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
514
525
|
EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM = "editorPluginSelectionExtensionItem",
|
|
515
526
|
EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT = "editorPluginSelectionExtensionComponent",
|
|
516
527
|
TRANSFORM = "transform",
|
|
528
|
+
SYNCED_BLOCK_TOOLBAR = "syncedBlockToolbar",
|
|
517
529
|
SYNCED_BLOCK_SOURCE_URL = "syncedBlockSourceUrl",
|
|
518
530
|
SYNCED_BLOCK_UPDATE_CACHE = "syncedBlockUpdateCache",
|
|
519
531
|
SYNCED_BLOCK_UPDATE = "syncedBlockUpdate",
|
|
@@ -3,6 +3,14 @@ import type { ExperienceEventPayload } from './experience-events';
|
|
|
3
3
|
import type { OperationalAEP } from './utils';
|
|
4
4
|
type SyncedBlockErrorAttributes = {
|
|
5
5
|
error: string;
|
|
6
|
+
resourceId?: string;
|
|
7
|
+
};
|
|
8
|
+
type SyncedBlockSuccessAttributes = {
|
|
9
|
+
resourceId: string;
|
|
10
|
+
};
|
|
11
|
+
type FetchSyncedBlockSuccessAttributes = SyncedBlockSuccessAttributes & {
|
|
12
|
+
blockInstanceId?: string;
|
|
13
|
+
sourceProduct?: string;
|
|
6
14
|
};
|
|
7
15
|
export type SyncedBlockSourceURLErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_SOURCE_URL, SyncedBlockErrorAttributes>;
|
|
8
16
|
export type SyncedBlockUpdateCacheErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_UPDATE_CACHE, SyncedBlockErrorAttributes>;
|
|
@@ -13,6 +21,10 @@ export type SyncedBlockDeleteErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJ
|
|
|
13
21
|
export type SyncedBlockGetSourceInfoErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_GET_SOURCE_INFO, SyncedBlockErrorAttributes>;
|
|
14
22
|
export type SyncedBlockFetchErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_FETCH, SyncedBlockErrorAttributes>;
|
|
15
23
|
export type SyncedBlockFetchReferencesErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_FETCH_REFERENCES, SyncedBlockErrorAttributes>;
|
|
16
|
-
export type
|
|
17
|
-
export type
|
|
24
|
+
export type SyncedBlockFetchSuccessAEP = OperationalAEP<ACTION.FETCHED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_FETCH, FetchSyncedBlockSuccessAttributes>;
|
|
25
|
+
export type SyncedBlockCreateSuccessAEP = OperationalAEP<ACTION.INSERTED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_CREATE, SyncedBlockSuccessAttributes>;
|
|
26
|
+
export type SyncedBlockUpdateSuccessAEP = OperationalAEP<ACTION.UPDATED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_UPDATE, SyncedBlockSuccessAttributes>;
|
|
27
|
+
export type SyncedBlockDeleteSuccessAEP = OperationalAEP<ACTION.DELETED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_DELETE, SyncedBlockSuccessAttributes>;
|
|
28
|
+
export type SyncBlockEventPayload = SyncedBlockSourceURLErrorAEP | SyncedBlockUpdateCacheErrorAEP | SyncedBlockUpdateErrorAEP | SyncedBlockUpdateSuccessAEP | SyncedBlockCreateErrorAEP | SyncedBlockCreateSuccessAEP | SyncedBlockDeleteErrorAEP | SyncedBlockDeleteSuccessAEP | SyncedBlockGetSourceInfoErrorAEP | SyncedBlockFetchErrorAEP | SyncedBlockFetchSuccessAEP | ReferenceSyncedBlockUpdateErrorAEP | SyncedBlockFetchReferencesErrorAEP | ExperienceEventPayload;
|
|
29
|
+
export type RendererSyncBlockEventPayload = SyncedBlockGetSourceInfoErrorAEP | SyncedBlockFetchErrorAEP | SyncedBlockFetchSuccessAEP | ReferenceSyncedBlockUpdateErrorAEP | ExperienceEventPayload;
|
|
18
30
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DispatchAnalyticsEvent } from '../analytics';
|
|
2
2
|
import type { ExperienceCheck } from './ExperienceCheck';
|
|
3
|
-
import type { CustomExperienceMetadata } from './types';
|
|
3
|
+
import type { CustomExperienceMetadata, ExperienceId } from './types';
|
|
4
4
|
type ExperienceOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* An optional sub identifier to further classify the specific experience action taken
|
|
@@ -99,7 +99,7 @@ export declare class Experience {
|
|
|
99
99
|
* @param options.action - Optional sub identifier for the specific experience action e.g. 'bold' 'insert-table'
|
|
100
100
|
* @param options.actionSubjectId - Optional sub identifier for the experience action subject e.g. 'selection-toolbar' 'quick-insert'
|
|
101
101
|
*/
|
|
102
|
-
constructor(id:
|
|
102
|
+
constructor(id: ExperienceId, options: ExperienceOptions);
|
|
103
103
|
private startCheck;
|
|
104
104
|
private stopCheck;
|
|
105
105
|
private getEndStateMetadata;
|
|
@@ -41,3 +41,10 @@ export declare const EXPERIENCE_ABORT_REASON: {
|
|
|
41
41
|
* instrumentation, then the sample rate can be tuned up to a safe threshold.
|
|
42
42
|
*/
|
|
43
43
|
export declare const DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
|
|
44
|
+
export declare const EXPERIENCE_ID: {
|
|
45
|
+
readonly ASYNC_OPERATION: "asyncOperation";
|
|
46
|
+
readonly MENU_ACTION: "menuAction";
|
|
47
|
+
readonly MENU_OPEN: "menu-open";
|
|
48
|
+
readonly TOOLBAR_ACTION: "toolbarAction";
|
|
49
|
+
readonly TOOLBAR_OPEN: "toolbar-open";
|
|
50
|
+
};
|
|
@@ -21,3 +21,10 @@ export declare const popupWithNestedElement: (node: Node | null | undefined, nes
|
|
|
21
21
|
* @returns The popup container HTMLElement if found, otherwise undefined.
|
|
22
22
|
*/
|
|
23
23
|
export declare const getPopupContainerFromEditorView: (editorViewEl?: HTMLElement | null) => HTMLElement | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Checks if a node matches or contains the node given by the provided query css selector
|
|
26
|
+
*
|
|
27
|
+
* @param query - CSS selector string
|
|
28
|
+
* @returns true if node matches or contains query or false otherwise
|
|
29
|
+
*/
|
|
30
|
+
export declare const getNodeQuery: (query: string) => (node?: Node | null) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { Experience } from './Experience';
|
|
2
|
-
export { EXPERIENCE_ABORT_REASON, EXPERIENCE_FAILURE_REASON } from './consts';
|
|
2
|
+
export { EXPERIENCE_ABORT_REASON, EXPERIENCE_FAILURE_REASON, EXPERIENCE_ID } from './consts';
|
|
3
3
|
export { ExperienceCheckComposite } from './ExperienceCheckComposite';
|
|
4
4
|
export { ExperienceCheckDomMutation } from './ExperienceCheckDomMutation';
|
|
5
5
|
export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
|
|
6
6
|
export type { ExperienceCheck, ExperienceCheckCallback, ExperienceCheckResult, } from './ExperienceCheck';
|
|
7
7
|
export type { ExperienceCheckDomMutationConfig, ExperienceCheckDomMutationObserveConfig, ExperienceDomMutationCheckOptions, } from './ExperienceCheckDomMutation';
|
|
8
|
-
export { containsPopupWithNestedElement, popupWithNestedElement, getPopupContainerFromEditorView, } from './experience-utils';
|
|
8
|
+
export { containsPopupWithNestedElement, popupWithNestedElement, getPopupContainerFromEditorView, getNodeQuery, } from './experience-utils';
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* Allow any additional custom metadata to be attached to experience events.
|
|
3
3
|
*/
|
|
4
4
|
export type CustomExperienceMetadata = {
|
|
5
|
-
[key: string]: string | number | boolean | CustomExperienceMetadata |
|
|
5
|
+
[key: string]: string | number | boolean | CustomExperienceMetadata | undefined;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Represents the state of an experience throughout its lifecycle.
|
|
9
9
|
*/
|
|
10
10
|
export type ExperienceState = 'pending' | 'started' | 'aborted' | 'failed' | 'succeeded';
|
|
11
|
+
declare const EXPERIENCE_IDS: ("asyncOperation" | "menuAction" | "menu-open" | "toolbarAction" | "toolbar-open")[];
|
|
12
|
+
export type ExperienceId = typeof EXPERIENCE_IDS[number];
|
|
13
|
+
export {};
|