@contentful/field-editor-rich-text 1.0.0-alpha.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +410 -0
- package/LICENSE +1 -1
- package/README.md +9 -20
- package/dist/RichTextEditor.d.ts +14 -24
- package/dist/Toolbar/StickyToolbarWrapper.d.ts +4 -4
- package/dist/Toolbar/index.d.ts +6 -14
- package/dist/dialogs/HypelinkDialog/HyperlinkDialog.d.ts +54 -0
- package/dist/dialogs/openRichTextDialog.d.ts +1 -0
- package/dist/dialogs/renderRichTextDialog.d.ts +1 -0
- package/dist/field-editor-rich-text.cjs.development.js +3543 -1877
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +3544 -1879
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/browserSupport.d.ts +0 -1
- package/dist/helpers/getLinkedContentTypeIdsForNodeType.d.ts +1 -1
- package/dist/helpers/newEntitySelectorConfigFromRichTextField.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/plugins/Bold/index.d.ts +4 -4
- package/dist/plugins/Code/index.d.ts +4 -4
- package/dist/plugins/CommandPalette/CommandMark.d.ts +2 -3
- package/dist/plugins/CommandPalette/CommandPalette.d.ts +0 -4
- package/dist/plugins/CommandPalette/CommandPaletteService.d.ts +16 -8
- package/dist/plugins/CommandPalette/CommandPanel/CommandPanelMenu.d.ts +4 -9
- package/dist/plugins/CommandPalette/CommandPanel/InViewport/InViewport.d.ts +37 -0
- package/dist/plugins/CommandPalette/CommandPanel/index.d.ts +5 -19
- package/dist/plugins/CommandPalette/Util.d.ts +1 -1
- package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.d.ts +4 -13
- package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.styles.d.ts +3 -0
- package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedAssetCard.d.ts +15 -0
- package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedEntryCard.d.ts +15 -0
- package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +4 -4
- package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -2
- package/dist/plugins/EmbeddedEntityBlock/index.d.ts +2 -3
- package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.d.ts +5 -13
- package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.styles.d.ts +4 -0
- package/dist/plugins/EmbeddedEntryInline/FetchingWrappedInlineEntryCard.d.ts +14 -0
- package/dist/plugins/EmbeddedEntryInline/ToolbarIcon.d.ts +4 -4
- package/dist/plugins/EmbeddedEntryInline/Utils.d.ts +1 -1
- package/dist/plugins/EmbeddedEntryInline/index.d.ts +2 -3
- package/dist/plugins/EntryEmbedDropdown/index.d.ts +3 -4
- package/dist/plugins/Heading/HeadingDropdown.d.ts +12 -13
- package/dist/plugins/Heading/HeadingDropdownItem.d.ts +57 -0
- package/dist/plugins/Heading/Paragraph.d.ts +57 -1
- package/dist/plugins/Heading/index.d.ts +336 -6
- package/dist/plugins/Hr/index.d.ts +4 -4
- package/dist/plugins/Hyperlink/Hyperlink.d.ts +11 -23
- package/dist/plugins/Hyperlink/ToolbarIcon.d.ts +3 -4
- package/dist/plugins/Hyperlink/Util.d.ts +4 -4
- package/dist/plugins/Hyperlink/styles.d.ts +5 -0
- package/dist/plugins/Hyperlink/truncate.d.ts +1 -0
- package/dist/plugins/Hyperlink/useRequestStatus.d.ts +6 -0
- package/dist/plugins/Italic/index.d.ts +4 -4
- package/dist/plugins/List/ToolbarDecorator.d.ts +6 -6
- package/dist/plugins/List/index.d.ts +8 -8
- package/dist/plugins/Quote/index.d.ts +4 -4
- package/dist/plugins/Underlined/index.d.ts +4 -4
- package/dist/plugins/shared/BlockSelectDecorator.d.ts +6 -6
- package/dist/plugins/shared/BlockToggleDecorator.d.ts +6 -6
- package/dist/plugins/shared/MarkToggleDecorator.d.ts +6 -6
- package/dist/plugins/shared/PluginApi.d.ts +10 -5
- package/dist/plugins/shared/ToolbarDropdownListItem.d.ts +3 -4
- package/dist/plugins/shared/ToolbarIcon.d.ts +5 -5
- package/dist/plugins/shared/Util.d.ts +1 -0
- package/package.json +22 -12
- package/dist/plugins/Heading/Heading1.d.ts +0 -2
- package/dist/plugins/Heading/Heading2.d.ts +0 -2
- package/dist/plugins/Heading/Heading3.d.ts +0 -2
- package/dist/plugins/Heading/Heading4.d.ts +0 -2
- package/dist/plugins/Heading/Heading5.d.ts +0 -2
- package/dist/plugins/Heading/Heading6.d.ts +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _default(field:
|
|
1
|
+
declare function _default(field: object, nodeType: string): string[];
|
|
2
2
|
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as RichTextEditor } from './RichTextEditor';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { ConnectedRichTextEditor } from './RichTextEditor';
|
|
3
|
+
export { openRichTextDialog } from './dialogs/openRichTextDialog';
|
|
4
|
+
export { renderRichTextDialog } from './dialogs/renderRichTextDialog';
|
|
@@ -5,8 +5,8 @@ export function BoldPlugin({ richTextAPI }: {
|
|
|
5
5
|
onKeyDown(event: any, editor: any, next: any): any;
|
|
6
6
|
};
|
|
7
7
|
declare var _default: {
|
|
8
|
-
new (props:
|
|
9
|
-
handleToggle: (
|
|
8
|
+
new (props: any): {
|
|
9
|
+
handleToggle: (event: any) => any;
|
|
10
10
|
render(): JSX.Element;
|
|
11
11
|
context: any;
|
|
12
12
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -31,8 +31,8 @@ declare var _default: {
|
|
|
31
31
|
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
32
32
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
33
33
|
};
|
|
34
|
-
new (props: any, context
|
|
35
|
-
handleToggle: (
|
|
34
|
+
new (props: any, context: any): {
|
|
35
|
+
handleToggle: (event: any) => any;
|
|
36
36
|
render(): JSX.Element;
|
|
37
37
|
context: any;
|
|
38
38
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -5,8 +5,8 @@ export function CodePlugin({ richTextAPI }: {
|
|
|
5
5
|
onKeyDown(event: any, editor: any, next: any): any;
|
|
6
6
|
};
|
|
7
7
|
declare var _default: {
|
|
8
|
-
new (props:
|
|
9
|
-
handleToggle: (
|
|
8
|
+
new (props: any): {
|
|
9
|
+
handleToggle: (event: any) => any;
|
|
10
10
|
render(): JSX.Element;
|
|
11
11
|
context: any;
|
|
12
12
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -31,8 +31,8 @@ declare var _default: {
|
|
|
31
31
|
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
32
32
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
33
33
|
};
|
|
34
|
-
new (props: any, context
|
|
35
|
-
handleToggle: (
|
|
34
|
+
new (props: any, context: any): {
|
|
35
|
+
handleToggle: (event: any) => any;
|
|
36
36
|
render(): JSX.Element;
|
|
37
37
|
context: any;
|
|
38
38
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -5,9 +5,8 @@ declare class CommandMark extends React.PureComponent<any, any, any> {
|
|
|
5
5
|
editor: PropTypes.Requireable<object>;
|
|
6
6
|
attributes: PropTypes.Requireable<object>;
|
|
7
7
|
};
|
|
8
|
-
constructor(props:
|
|
9
|
-
constructor(props: any, context
|
|
10
|
-
render(): JSX.Element;
|
|
8
|
+
constructor(props: any);
|
|
9
|
+
constructor(props: any, context: any);
|
|
11
10
|
}
|
|
12
11
|
import React from "react";
|
|
13
12
|
import PropTypes from "prop-types";
|
|
@@ -5,10 +5,6 @@ declare class CommandPalette extends React.PureComponent<any, any, any> {
|
|
|
5
5
|
richTextAPI: PropTypes.Requireable<object>;
|
|
6
6
|
};
|
|
7
7
|
constructor(props: any);
|
|
8
|
-
state: {
|
|
9
|
-
embedsEnabled: boolean;
|
|
10
|
-
};
|
|
11
|
-
render(): JSX.Element | null;
|
|
12
8
|
}
|
|
13
9
|
import React from "react";
|
|
14
10
|
import PropTypes from "prop-types";
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export function
|
|
3
|
-
export function fetchEntries(widgetAPI: any, contentType: any, query?: string): Promise<[any, any, any, any, any, any, any, any, any, any]>;
|
|
1
|
+
export function fetchAssets(sdk: any, query?: string): Promise<any>;
|
|
2
|
+
export function fetchEntries(sdk: any, contentType: any, query?: string): Promise<[any, any, any, any, any, any, any, any, any, any]>;
|
|
4
3
|
export function isValidLinkedContentType(field: any, contentType: any, embedType: string): boolean;
|
|
5
4
|
export function isEmbeddingEnabled(field: any): boolean;
|
|
6
5
|
export class CommandPaletteActionBuilder {
|
|
7
|
-
constructor(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
constructor(sdk: any);
|
|
7
|
+
sdk: any;
|
|
8
|
+
maybeBuildEmbedAction(embedType: any, contentType: any, callback: any): false | {
|
|
9
|
+
label: string;
|
|
10
|
+
group: any;
|
|
11
|
+
callback: any;
|
|
12
|
+
icon: string;
|
|
13
|
+
};
|
|
14
|
+
maybeBuildCreateAndEmbedAction(embedType: any, contentType: any, callback: any): Promise<false | {
|
|
15
|
+
label: string;
|
|
16
|
+
group: any;
|
|
17
|
+
callback: any;
|
|
18
|
+
icon: string;
|
|
19
|
+
}>;
|
|
12
20
|
}
|
|
@@ -2,6 +2,8 @@ export class CommandPanel extends React.Component<any, any, any> {
|
|
|
2
2
|
static propTypes: {
|
|
3
3
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
4
4
|
label: PropTypes.Requireable<string>;
|
|
5
|
+
icon: PropTypes.Requireable<string>;
|
|
6
|
+
thumbnail: PropTypes.Requireable<string>;
|
|
5
7
|
callback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
8
|
}> | null | undefined)[]>;
|
|
7
9
|
searchString: PropTypes.Requireable<string>;
|
|
@@ -27,21 +29,14 @@ export class CommandPanel extends React.Component<any, any, any> {
|
|
|
27
29
|
items: any;
|
|
28
30
|
selectedKey: any;
|
|
29
31
|
};
|
|
30
|
-
constructor(props:
|
|
31
|
-
constructor(props: any, context
|
|
32
|
-
state: {
|
|
33
|
-
selectedKey: number;
|
|
34
|
-
items: never[];
|
|
35
|
-
};
|
|
36
|
-
componentDidMount(): void;
|
|
37
|
-
componentWillUnmount(): void;
|
|
32
|
+
constructor(props: any);
|
|
33
|
+
constructor(props: any, context: any);
|
|
38
34
|
handleKeyboard: (e: any) => void;
|
|
39
35
|
renderGroups(): JSX.Element | JSX.Element[];
|
|
40
36
|
renderItems(groupName: any): JSX.Element[];
|
|
41
37
|
renderNavigationBar: () => JSX.Element;
|
|
42
38
|
renderStatusBar: () => JSX.Element;
|
|
43
39
|
renderSkeleton: () => JSX.Element;
|
|
44
|
-
render(): JSX.Element;
|
|
45
40
|
}
|
|
46
41
|
export default CommandPanel;
|
|
47
42
|
import React from "react";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export class InViewport extends React.Component<any, any, any> {
|
|
2
|
+
static defaultProps: {
|
|
3
|
+
testId: string;
|
|
4
|
+
offset: number;
|
|
5
|
+
};
|
|
6
|
+
constructor(props: any);
|
|
7
|
+
constructor(props: any, context: any);
|
|
8
|
+
tGetDomPosition: any;
|
|
9
|
+
nodeRef: any;
|
|
10
|
+
lastOverflowAt: any;
|
|
11
|
+
tOnOverflowTop: (...args: any[]) => any;
|
|
12
|
+
tOnOverflowBottom: (...args: any[]) => any;
|
|
13
|
+
tOnOverflowRight: (...args: any[]) => any;
|
|
14
|
+
tOnOverflowLeft: (...args: any[]) => any;
|
|
15
|
+
getDomPosition: () => void;
|
|
16
|
+
bindEventListeners: () => void;
|
|
17
|
+
handleOverflow: ({ top, left, bottom, right }: {
|
|
18
|
+
top: any;
|
|
19
|
+
left: any;
|
|
20
|
+
bottom: any;
|
|
21
|
+
right: any;
|
|
22
|
+
}, windowWidth: any, windowHeight: any) => void;
|
|
23
|
+
}
|
|
24
|
+
export namespace InViewport {
|
|
25
|
+
export namespace propTypes {
|
|
26
|
+
export const offset: PropTypes.Requireable<number>;
|
|
27
|
+
export const onOverflowTop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
+
export const onOverflowRight: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
+
export const onOverflowBottom: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
+
export const onOverflowLeft: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
+
export const className: PropTypes.Requireable<string>;
|
|
32
|
+
export const children: PropTypes.Requireable<any>;
|
|
33
|
+
export const testId: PropTypes.Requireable<string>;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
import React from "react";
|
|
37
|
+
import PropTypes from "prop-types";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
export default CommandPalette;
|
|
3
2
|
declare class CommandPalette extends React.PureComponent<any, any, any> {
|
|
4
3
|
static propTypes: {
|
|
@@ -6,29 +5,17 @@ declare class CommandPalette extends React.PureComponent<any, any, any> {
|
|
|
6
5
|
command: PropTypes.Requireable<string>;
|
|
7
6
|
richTextAPI: PropTypes.Requireable<object>;
|
|
8
7
|
};
|
|
9
|
-
constructor(props:
|
|
10
|
-
constructor(props: any, context
|
|
11
|
-
state: {
|
|
12
|
-
anchorPosition: {
|
|
13
|
-
top: number;
|
|
14
|
-
left: number;
|
|
15
|
-
};
|
|
16
|
-
items: never[];
|
|
17
|
-
isLoading: boolean;
|
|
18
|
-
panelPosition: string;
|
|
19
|
-
};
|
|
8
|
+
constructor(props: any);
|
|
9
|
+
constructor(props: any, context: any);
|
|
20
10
|
paletteDimensions: {
|
|
21
11
|
height: number;
|
|
22
12
|
width: number;
|
|
23
13
|
};
|
|
24
|
-
componentDidMount(): Promise<void>;
|
|
25
14
|
isComponentMounted: boolean | undefined;
|
|
26
|
-
componentWillUnmount(): void;
|
|
27
15
|
bindEventListeners: () => void;
|
|
28
16
|
removeEventListeners: () => void;
|
|
29
17
|
handleOutsideClick: (event: any) => void;
|
|
30
|
-
requestUpdate: (() => void
|
|
31
|
-
componentDidUpdate(): void;
|
|
18
|
+
requestUpdate: import("lodash").DebouncedFunc<() => void>;
|
|
32
19
|
createCommand: (label: any, contentType: any, entry: any, type: any, description: any, thumbnail: any) => {
|
|
33
20
|
label: string;
|
|
34
21
|
thumbnail: any;
|
|
@@ -36,14 +23,13 @@ declare class CommandPalette extends React.PureComponent<any, any, any> {
|
|
|
36
23
|
callback: () => void;
|
|
37
24
|
};
|
|
38
25
|
onCreateAndEmbedEntity: (contentTypeId: any, nodeType: any) => Promise<any>;
|
|
39
|
-
createContentTypeActions: (actionBuilder: any, contentType: any) => any[]
|
|
40
|
-
createAssetActions: (actionBuilder: any) => any[]
|
|
26
|
+
createContentTypeActions: (actionBuilder: any, contentType: any) => Promise<any[]>;
|
|
27
|
+
createAssetActions: (actionBuilder: any) => Promise<any[]>;
|
|
41
28
|
handleScroll: (e: any) => void;
|
|
42
29
|
clearCommand: () => void;
|
|
43
30
|
createCommands: (contentType: any, type: any, command: any) => Promise<void>;
|
|
44
31
|
createInitialCommands: () => Promise<void>;
|
|
45
32
|
handleKeyboard: (e: any) => void;
|
|
46
|
-
render(): React.ReactPortal | null;
|
|
47
33
|
palette: HTMLDivElement | null | undefined;
|
|
48
34
|
updatePanelPosition(): void;
|
|
49
35
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function getCommandText(editor: any): string;
|
|
2
|
-
export function getDecorationOrDefault(editor: any): any;
|
|
2
|
+
export function getDecorationOrDefault(editor: any): any | null;
|
|
3
3
|
export function hasCommandPaletteMarkType(markType: any): boolean;
|
|
4
4
|
export function hasCommandPaletteDecoration(editor: any): boolean;
|
|
5
5
|
export function removeCommand(editor: any, command: any, anchorOffset?: number): void;
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
export default class LinkedEntityBlock extends React.Component<any, any, any> {
|
|
2
2
|
static propTypes: {
|
|
3
|
-
|
|
3
|
+
sdk: PropTypes.Validator<object>;
|
|
4
4
|
isSelected: PropTypes.Validator<boolean>;
|
|
5
5
|
attributes: PropTypes.Validator<object>;
|
|
6
6
|
editor: PropTypes.Validator<object>;
|
|
7
7
|
node: PropTypes.Validator<object>;
|
|
8
|
-
onEntityFetchComplete: PropTypes.
|
|
9
|
-
renderEntity: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
|
+
onEntityFetchComplete: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
entityId: any;
|
|
14
|
-
entityType: any;
|
|
15
|
-
isSelected: any;
|
|
16
|
-
}) => JSX.Element;
|
|
17
|
-
};
|
|
18
|
-
constructor(props: Readonly<any>);
|
|
19
|
-
constructor(props: any, context?: any);
|
|
10
|
+
constructor(props: any);
|
|
11
|
+
constructor(props: any, context: any);
|
|
20
12
|
getEntitySys(): {
|
|
21
13
|
id: any;
|
|
22
14
|
type: any;
|
|
23
15
|
};
|
|
24
16
|
handleEditClick: () => any;
|
|
25
17
|
handleRemoveClick: () => void;
|
|
26
|
-
render(): JSX.Element;
|
|
27
18
|
}
|
|
28
19
|
import React from "react";
|
|
29
20
|
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function FetchingWrappedAssetCard(props: any): JSX.Element;
|
|
2
|
+
export namespace FetchingWrappedAssetCard {
|
|
3
|
+
export namespace propTypes {
|
|
4
|
+
export const sdk: PropTypes.Validator<object>;
|
|
5
|
+
export const locale: PropTypes.Validator<string>;
|
|
6
|
+
export const assetId: PropTypes.Validator<string>;
|
|
7
|
+
export const isDisabled: PropTypes.Validator<boolean>;
|
|
8
|
+
export const isSelected: PropTypes.Validator<boolean>;
|
|
9
|
+
export const onRemove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
+
export const onEdit: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
+
export const getAssetUrl: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
export const onEntityFetchComplete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function FetchingWrappedEntryCard(props: any): JSX.Element;
|
|
2
|
+
export namespace FetchingWrappedEntryCard {
|
|
3
|
+
export namespace propTypes {
|
|
4
|
+
export const sdk: PropTypes.Validator<object>;
|
|
5
|
+
export const entryId: PropTypes.Validator<string>;
|
|
6
|
+
export const locale: PropTypes.Validator<string>;
|
|
7
|
+
export const isDisabled: PropTypes.Validator<boolean>;
|
|
8
|
+
export const isSelected: PropTypes.Validator<boolean>;
|
|
9
|
+
export const onRemove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
+
export const onEdit: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
+
export const getEntryUrl: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
export const onEntityFetchComplete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
import PropTypes from "prop-types";
|
|
@@ -3,9 +3,9 @@ export default class EntityLinkToolbarIcon extends React.Component<any, any, any
|
|
|
3
3
|
static defaultProps: {
|
|
4
4
|
isButton: boolean;
|
|
5
5
|
};
|
|
6
|
-
constructor(props:
|
|
7
|
-
constructor(props: any, context
|
|
8
|
-
handleClick: (
|
|
9
|
-
|
|
6
|
+
constructor(props: any);
|
|
7
|
+
constructor(props: any, context: any);
|
|
8
|
+
handleClick: (e: any) => void;
|
|
9
|
+
handleAction: (event: any) => any;
|
|
10
10
|
}
|
|
11
11
|
import React from "react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Invokes entity selector modal and inserts block embed.
|
|
3
3
|
* @param {string} nodeType
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {import('@contentful/field-editor-reference/dist/types').FieldExtensionSDK} sdk
|
|
5
5
|
* @param {slate.Editor} editor
|
|
6
6
|
* @param {function} logAction
|
|
7
7
|
*/
|
|
8
|
-
export function selectEntityAndInsert(nodeType: string,
|
|
8
|
+
export function selectEntityAndInsert(nodeType: string, sdk: import('@contentful/field-editor-reference/dist/types').FieldExtensionSDK, editor: any, logAction: Function): Promise<void>;
|
|
9
9
|
export function insertBlock(editor: any, nodeType: any, entity: any, focusNextLine?: boolean): void;
|
|
10
10
|
export function hasBlockOfType(editor: any, type: string): boolean;
|
|
11
11
|
export function createNode(nodeType: any, entity: any): {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export default ToolbarIcon;
|
|
2
|
-
export function EmbeddedEntityBlockPlugin({ richTextAPI: {
|
|
2
|
+
export function EmbeddedEntityBlockPlugin({ richTextAPI: { sdk, logShortcutAction, logViewportAction }, nodeType, hotkey, }: {
|
|
3
3
|
richTextAPI: {
|
|
4
|
-
|
|
5
|
-
customRenderers: any;
|
|
4
|
+
sdk: any;
|
|
6
5
|
logShortcutAction: any;
|
|
7
6
|
logViewportAction: any;
|
|
8
7
|
};
|
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
export default EmbeddedEntryInline;
|
|
2
2
|
declare class EmbeddedEntryInline extends React.Component<any, any, any> {
|
|
3
3
|
static propTypes: {
|
|
4
|
-
|
|
4
|
+
sdk: PropTypes.Validator<object>;
|
|
5
5
|
isSelected: PropTypes.Validator<boolean>;
|
|
6
6
|
attributes: PropTypes.Validator<object>;
|
|
7
7
|
editor: PropTypes.Validator<object>;
|
|
8
8
|
node: PropTypes.Validator<object>;
|
|
9
|
-
onEntityFetchComplete: PropTypes.
|
|
10
|
-
renderEntity: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
+
onEntityFetchComplete: PropTypes.Validator<(...args: any[]) => any>;
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
entryId: any;
|
|
15
|
-
isSelected: any;
|
|
16
|
-
}) => JSX.Element;
|
|
17
|
-
};
|
|
18
|
-
constructor(props: Readonly<any>);
|
|
19
|
-
constructor(props: any, context?: any);
|
|
11
|
+
constructor(props: any);
|
|
12
|
+
constructor(props: any, context: any);
|
|
20
13
|
getEntitySys(): {
|
|
21
14
|
id: any;
|
|
22
15
|
type: any;
|
|
23
16
|
};
|
|
24
|
-
handleEditClick: (
|
|
17
|
+
handleEditClick: () => any;
|
|
25
18
|
handleRemoveClick: () => void;
|
|
26
|
-
render(): JSX.Element;
|
|
27
19
|
}
|
|
28
20
|
import React from "react";
|
|
29
21
|
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function FetchingWrappedInlineEntryCard(props: any): JSX.Element;
|
|
2
|
+
export namespace FetchingWrappedInlineEntryCard {
|
|
3
|
+
export namespace propTypes {
|
|
4
|
+
export const sdk: PropTypes.Validator<object>;
|
|
5
|
+
export const entryId: PropTypes.Validator<string>;
|
|
6
|
+
export const isDisabled: PropTypes.Validator<boolean>;
|
|
7
|
+
export const isSelected: PropTypes.Validator<boolean>;
|
|
8
|
+
export const isReadOnly: PropTypes.Validator<boolean>;
|
|
9
|
+
export const onRemove: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
|
+
export const onEdit: PropTypes.Validator<(...args: any[]) => any>;
|
|
11
|
+
export const onEntityFetchComplete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
import PropTypes from "prop-types";
|
|
@@ -3,9 +3,9 @@ export default class EntryLinkToolbarIcon extends React.Component<any, any, any>
|
|
|
3
3
|
static defaultProps: {
|
|
4
4
|
isButton: boolean;
|
|
5
5
|
};
|
|
6
|
-
constructor(props:
|
|
7
|
-
constructor(props: any, context
|
|
8
|
-
handleClick: (
|
|
9
|
-
|
|
6
|
+
constructor(props: any);
|
|
7
|
+
constructor(props: any, context: any);
|
|
8
|
+
handleClick: (e: any) => void;
|
|
9
|
+
handleAction: (event: any) => any;
|
|
10
10
|
}
|
|
11
11
|
import React from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export function insertInline(editor: any, entryId: any, focusNextLine?: boolean): void;
|
|
2
2
|
export function hasOnlyInlineEntryInSelection(editor: any): boolean | undefined;
|
|
3
|
-
export function selectEntryAndInsert(
|
|
3
|
+
export function selectEntryAndInsert(sdk: import('@contentful/field-editor-reference/dist/types').FieldExtensionSDK, editor: any, logAction: Function): Promise<void>;
|
|
4
4
|
export function canInsertInline(editor: any): boolean;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export default ToolbarIcon;
|
|
2
|
-
export function EmbeddedEntryInlinePlugin({ richTextAPI: {
|
|
2
|
+
export function EmbeddedEntryInlinePlugin({ richTextAPI: { sdk, logShortcutAction, logViewportAction }, }: {
|
|
3
3
|
richTextAPI: {
|
|
4
|
-
|
|
5
|
-
customRenderers: any;
|
|
4
|
+
sdk: any;
|
|
6
5
|
logShortcutAction: any;
|
|
7
6
|
logViewportAction: any;
|
|
8
7
|
};
|
|
@@ -5,11 +5,10 @@ declare class EntryEmbedDropdown extends React.Component<any, any, any> {
|
|
|
5
5
|
isOpen: PropTypes.Requireable<boolean>;
|
|
6
6
|
disabled: PropTypes.Requireable<boolean>;
|
|
7
7
|
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
|
-
|
|
8
|
+
onOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
9
|
};
|
|
10
|
-
constructor(props:
|
|
11
|
-
constructor(props: any, context
|
|
12
|
-
render(): JSX.Element;
|
|
10
|
+
constructor(props: any);
|
|
11
|
+
constructor(props: any, context: any);
|
|
13
12
|
}
|
|
14
13
|
import React from "react";
|
|
15
14
|
import PropTypes from "prop-types";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export const blockTitles: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
"heading-1": string;
|
|
3
|
+
"heading-2": string;
|
|
4
|
+
"heading-3": string;
|
|
5
|
+
"heading-4": string;
|
|
6
|
+
"heading-5": string;
|
|
7
|
+
"heading-6": string;
|
|
8
|
+
paragraph: string;
|
|
9
|
+
"embedded-entry-block": string;
|
|
10
|
+
"embedded-asset-block": string;
|
|
11
11
|
};
|
|
12
12
|
export default HeadingDropdown;
|
|
13
13
|
import { BLOCKS } from "@contentful/rich-text-types";
|
|
@@ -17,13 +17,12 @@ declare class HeadingDropdown extends React.Component<any, any, any> {
|
|
|
17
17
|
isOpen: PropTypes.Requireable<boolean>;
|
|
18
18
|
disabled: PropTypes.Requireable<boolean>;
|
|
19
19
|
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
-
|
|
20
|
+
onOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
21
|
currentBlockType: PropTypes.Requireable<string>;
|
|
22
22
|
};
|
|
23
|
-
constructor(props:
|
|
24
|
-
constructor(props: any, context
|
|
23
|
+
constructor(props: any);
|
|
24
|
+
constructor(props: any, context: any);
|
|
25
25
|
getStyleNameForChange: () => any;
|
|
26
|
-
render(): JSX.Element;
|
|
27
26
|
}
|
|
28
27
|
import React from "react";
|
|
29
28
|
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default function newHeadingDropdownItem(nodeType: any): {
|
|
2
|
+
new (props: any): {
|
|
3
|
+
handleSelect: (event: any) => any;
|
|
4
|
+
render(): JSX.Element;
|
|
5
|
+
context: any;
|
|
6
|
+
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
7
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
8
|
+
readonly props: Readonly<any> & Readonly<{
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
state: Readonly<any>;
|
|
12
|
+
refs: {
|
|
13
|
+
[key: string]: React.ReactInstance;
|
|
14
|
+
};
|
|
15
|
+
componentDidMount?(): void;
|
|
16
|
+
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
17
|
+
componentWillUnmount?(): void;
|
|
18
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
19
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
20
|
+
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
21
|
+
componentWillMount?(): void;
|
|
22
|
+
UNSAFE_componentWillMount?(): void;
|
|
23
|
+
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
24
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
25
|
+
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
26
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
27
|
+
};
|
|
28
|
+
new (props: any, context: any): {
|
|
29
|
+
handleSelect: (event: any) => any;
|
|
30
|
+
render(): JSX.Element;
|
|
31
|
+
context: any;
|
|
32
|
+
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
33
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
34
|
+
readonly props: Readonly<any> & Readonly<{
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}>;
|
|
37
|
+
state: Readonly<any>;
|
|
38
|
+
refs: {
|
|
39
|
+
[key: string]: React.ReactInstance;
|
|
40
|
+
};
|
|
41
|
+
componentDidMount?(): void;
|
|
42
|
+
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
43
|
+
componentWillUnmount?(): void;
|
|
44
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
45
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
46
|
+
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
47
|
+
componentWillMount?(): void;
|
|
48
|
+
UNSAFE_componentWillMount?(): void;
|
|
49
|
+
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
50
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
51
|
+
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
52
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
53
|
+
};
|
|
54
|
+
propTypes: any;
|
|
55
|
+
contextType?: React.Context<any> | undefined;
|
|
56
|
+
};
|
|
57
|
+
import React from "react";
|
|
@@ -1,2 +1,58 @@
|
|
|
1
|
-
declare var _default:
|
|
1
|
+
declare var _default: {
|
|
2
|
+
new (props: any): {
|
|
3
|
+
handleSelect: (event: any) => any;
|
|
4
|
+
render(): JSX.Element;
|
|
5
|
+
context: any;
|
|
6
|
+
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
7
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
8
|
+
readonly props: Readonly<any> & Readonly<{
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
state: Readonly<any>;
|
|
12
|
+
refs: {
|
|
13
|
+
[key: string]: React.ReactInstance;
|
|
14
|
+
};
|
|
15
|
+
componentDidMount?(): void;
|
|
16
|
+
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
17
|
+
componentWillUnmount?(): void;
|
|
18
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
19
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
20
|
+
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
21
|
+
componentWillMount?(): void;
|
|
22
|
+
UNSAFE_componentWillMount?(): void;
|
|
23
|
+
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
24
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
25
|
+
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
26
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
27
|
+
};
|
|
28
|
+
new (props: any, context: any): {
|
|
29
|
+
handleSelect: (event: any) => any;
|
|
30
|
+
render(): JSX.Element;
|
|
31
|
+
context: any;
|
|
32
|
+
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
33
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
34
|
+
readonly props: Readonly<any> & Readonly<{
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}>;
|
|
37
|
+
state: Readonly<any>;
|
|
38
|
+
refs: {
|
|
39
|
+
[key: string]: React.ReactInstance;
|
|
40
|
+
};
|
|
41
|
+
componentDidMount?(): void;
|
|
42
|
+
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
43
|
+
componentWillUnmount?(): void;
|
|
44
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
45
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
46
|
+
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
47
|
+
componentWillMount?(): void;
|
|
48
|
+
UNSAFE_componentWillMount?(): void;
|
|
49
|
+
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
50
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
51
|
+
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
52
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
53
|
+
};
|
|
54
|
+
propTypes: any;
|
|
55
|
+
contextType?: React.Context<any> | undefined;
|
|
56
|
+
};
|
|
2
57
|
export default _default;
|
|
58
|
+
import React from "react";
|