@contentful/field-editor-rich-text 1.0.4 → 2.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +0 -18
  2. package/README.md +1 -1
  3. package/dist/ContentfulEditorProvider.d.ts +8 -0
  4. package/dist/RichTextEditor.d.ts +19 -60
  5. package/dist/RichTextEditor.styles.d.ts +7 -0
  6. package/dist/SdkProvider.d.ts +7 -0
  7. package/dist/Toolbar/EmbedEntityWidget.d.ts +6 -0
  8. package/dist/Toolbar/StickyToolbarWrapper.d.ts +6 -11
  9. package/dist/Toolbar/index.d.ts +6 -20
  10. package/dist/TrackingProvider.d.ts +11 -0
  11. package/dist/constants/Schema.d.ts +93 -11
  12. package/dist/dialogs/openRichTextDialog.d.ts +2 -1
  13. package/dist/dialogs/renderRichTextDialog.d.ts +3 -1
  14. package/dist/field-editor-rich-text.cjs.development.js +4539 -5309
  15. package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
  16. package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
  17. package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
  18. package/dist/field-editor-rich-text.esm.js +4521 -5291
  19. package/dist/field-editor-rich-text.esm.js.map +1 -1
  20. package/dist/helpers/deserializer.d.ts +3 -0
  21. package/dist/helpers/editor.d.ts +48 -0
  22. package/dist/helpers/environment.d.ts +1 -0
  23. package/dist/helpers/formatDateAndTime.d.ts +15 -0
  24. package/dist/helpers/getLinkedContentTypeIdsForNodeType.d.ts +26 -2
  25. package/dist/helpers/newEntitySelectorConfigFromRichTextField.d.ts +5 -1
  26. package/dist/helpers/normalizers.d.ts +15 -0
  27. package/dist/helpers/sanitizeSlateDoc.d.ts +18 -0
  28. package/dist/helpers/truncate.d.ts +1 -0
  29. package/dist/helpers/validations.d.ts +10 -0
  30. package/dist/plugins/Bold/index.d.ts +12 -64
  31. package/dist/plugins/Code/index.d.ts +12 -64
  32. package/dist/plugins/DragAndDrop/index.d.ts +2 -0
  33. package/dist/plugins/EmbeddedEntity/index.d.ts +10 -0
  34. package/dist/plugins/EmbeddedEntityBlock/LinkedEntityBlock.d.ts +13 -0
  35. package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +12 -10
  36. package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -23
  37. package/dist/plugins/EmbeddedEntityBlock/index.d.ts +11 -26
  38. package/dist/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.d.ts +12 -0
  39. package/dist/plugins/EmbeddedEntityInline/Util.d.ts +16 -0
  40. package/dist/plugins/EmbeddedEntityInline/index.d.ts +12 -0
  41. package/dist/plugins/Heading/index.d.ts +20 -380
  42. package/dist/plugins/Hr/index.d.ts +13 -61
  43. package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +10 -0
  44. package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +17 -0
  45. package/dist/plugins/Hyperlink/index.d.ts +12 -9
  46. package/dist/plugins/InsertBeforeFirstVoidBlock/index.d.ts +2 -3
  47. package/dist/plugins/Italic/index.d.ts +12 -64
  48. package/dist/plugins/List/getListInsertFragment.d.ts +6 -0
  49. package/dist/plugins/List/index.d.ts +15 -114
  50. package/dist/plugins/NewLine/index.d.ts +2 -0
  51. package/dist/plugins/Paragraph/index.d.ts +7 -5
  52. package/dist/plugins/Paste/index.d.ts +2 -7
  53. package/dist/plugins/Paste/sanitizers/helpers.d.ts +7 -0
  54. package/dist/plugins/Paste/sanitizers/index.d.ts +3 -0
  55. package/dist/plugins/Paste/sanitizers/removeComments.d.ts +2 -0
  56. package/dist/plugins/Paste/sanitizers/sanitizeEntityBlocks.d.ts +6 -0
  57. package/dist/plugins/Paste/sanitizers/sanitizeTables.d.ts +2 -0
  58. package/dist/plugins/Quote/index.d.ts +13 -59
  59. package/dist/plugins/Table/TableActions.d.ts +5 -0
  60. package/dist/plugins/Table/actions/addColumn.d.ts +3 -0
  61. package/dist/plugins/Table/actions/addRow.d.ts +3 -0
  62. package/dist/plugins/Table/actions/index.d.ts +3 -0
  63. package/dist/plugins/Table/actions/setHeader.d.ts +2 -0
  64. package/dist/plugins/Table/helpers.d.ts +5 -0
  65. package/dist/plugins/Table/index.d.ts +189 -0
  66. package/dist/plugins/Table/normalizers.d.ts +2 -0
  67. package/dist/plugins/Text/index.d.ts +2 -0
  68. package/dist/plugins/TrailingParagraph/index.d.ts +1 -0
  69. package/dist/plugins/Underline/index.d.ts +12 -0
  70. package/dist/plugins/index.d.ts +180 -1
  71. package/dist/plugins/shared/EntityStatusIcon.d.ts +8 -0
  72. package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +23 -0
  73. package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +13 -0
  74. package/dist/plugins/shared/ToolbarButton.d.ts +12 -0
  75. package/dist/test-utils/createEditor.d.ts +7 -0
  76. package/dist/test-utils/index.d.ts +2 -0
  77. package/dist/test-utils/jsx.d.ts +28 -0
  78. package/dist/types.d.ts +25 -0
  79. package/package.json +30 -34
  80. package/LICENSE +0 -21
  81. package/dist/RichTextEditor.spec.d.ts +0 -1
  82. package/dist/Toolbar/Toolbar.spec.d.ts +0 -1
  83. package/dist/helpers/browserSupport.d.ts +0 -1
  84. package/dist/plugins/CommandPalette/CommandMark.d.ts +0 -12
  85. package/dist/plugins/CommandPalette/CommandPalette.d.ts +0 -10
  86. package/dist/plugins/CommandPalette/CommandPaletteService.d.ts +0 -20
  87. package/dist/plugins/CommandPalette/CommandPanel/CommandPanelMenu.d.ts +0 -43
  88. package/dist/plugins/CommandPalette/CommandPanel/index.d.ts +0 -37
  89. package/dist/plugins/CommandPalette/Util.d.ts +0 -5
  90. package/dist/plugins/CommandPalette/index.d.ts +0 -7
  91. package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.d.ts +0 -20
  92. package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.styles.d.ts +0 -3
  93. package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedAssetCard.d.ts +0 -15
  94. package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedEntryCard.d.ts +0 -15
  95. package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.d.ts +0 -21
  96. package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.styles.d.ts +0 -4
  97. package/dist/plugins/EmbeddedEntryInline/FetchingWrappedInlineEntryCard.d.ts +0 -14
  98. package/dist/plugins/EmbeddedEntryInline/ToolbarIcon.d.ts +0 -11
  99. package/dist/plugins/EmbeddedEntryInline/Utils.d.ts +0 -4
  100. package/dist/plugins/EmbeddedEntryInline/index.d.ts +0 -12
  101. package/dist/plugins/EntryEmbedDropdown/index.d.ts +0 -14
  102. package/dist/plugins/Heading/HeadingDropdown.d.ts +0 -28
  103. package/dist/plugins/Heading/HeadingDropdownItem.d.ts +0 -57
  104. package/dist/plugins/Heading/Paragraph.d.ts +0 -58
  105. package/dist/plugins/Hyperlink/Hyperlink.d.ts +0 -13
  106. package/dist/plugins/Hyperlink/ToolbarIcon.d.ts +0 -7
  107. package/dist/plugins/Hyperlink/Util.d.ts +0 -43
  108. package/dist/plugins/Hyperlink/styles.d.ts +0 -12
  109. package/dist/plugins/Hyperlink/truncate.d.ts +0 -1
  110. package/dist/plugins/Hyperlink/useRequestStatus.d.ts +0 -6
  111. package/dist/plugins/InsertBeforeFirstVoidBlock/Util.d.ts +0 -14
  112. package/dist/plugins/List/EditListWrapper.d.ts +0 -2
  113. package/dist/plugins/List/ToolbarDecorator.d.ts +0 -62
  114. package/dist/plugins/NewLinePlugin/index.d.ts +0 -3
  115. package/dist/plugins/Paste/Paste.d.ts +0 -1
  116. package/dist/plugins/Paste/Paste.spec.d.ts +0 -1
  117. package/dist/plugins/Paste/index.spec.d.ts +0 -1
  118. package/dist/plugins/PasteHtml/PasteHtml.spec.d.ts +0 -1
  119. package/dist/plugins/PasteHtml/Serializer.d.ts +0 -1
  120. package/dist/plugins/PasteHtml/index.d.ts +0 -3
  121. package/dist/plugins/PasteText/PasteText.spec.d.ts +0 -1
  122. package/dist/plugins/PasteText/index.d.ts +0 -3
  123. package/dist/plugins/Quote/QuotePlugin.d.ts +0 -10
  124. package/dist/plugins/Quote/Util.d.ts +0 -2
  125. package/dist/plugins/Underlined/index.d.ts +0 -64
  126. package/dist/plugins/shared/BlockSelectDecorator.d.ts +0 -63
  127. package/dist/plugins/shared/BlockToggleDecorator.d.ts +0 -65
  128. package/dist/plugins/shared/MarkDecorator.d.ts +0 -12
  129. package/dist/plugins/shared/MarkPlugin.d.ts +0 -9
  130. package/dist/plugins/shared/MarkToggleDecorator.d.ts +0 -62
  131. package/dist/plugins/shared/NodeDecorator.d.ts +0 -15
  132. package/dist/plugins/shared/PasteTestHelpers.d.ts +0 -35
  133. package/dist/plugins/shared/PluginApi.d.ts +0 -31
  134. package/dist/plugins/shared/PropTypes.d.ts +0 -15
  135. package/dist/plugins/shared/ToolbarDropdownListItem.d.ts +0 -14
  136. package/dist/plugins/shared/ToolbarIcon.d.ts +0 -16
  137. package/dist/plugins/shared/Util.d.ts +0 -1
  138. package/dist/plugins/shared/UtilHave.d.ts +0 -24
  139. package/dist/setupTests.d.ts +0 -1
  140. package/dist/validations/index.d.ts +0 -9
  141. package/dist/validations/validations.spec.d.ts +0 -1
@@ -1,20 +0,0 @@
1
- export default class LinkedEntityBlock extends React.Component<any, any, any> {
2
- static propTypes: {
3
- sdk: PropTypes.Validator<object>;
4
- isSelected: PropTypes.Validator<boolean>;
5
- attributes: PropTypes.Validator<object>;
6
- editor: PropTypes.Validator<object>;
7
- node: PropTypes.Validator<object>;
8
- onEntityFetchComplete: PropTypes.Validator<(...args: any[]) => any>;
9
- };
10
- constructor(props: any);
11
- constructor(props: any, context: any);
12
- getEntitySys(): {
13
- id: any;
14
- type: any;
15
- };
16
- handleEditClick: () => any;
17
- handleRemoveClick: () => void;
18
- }
19
- import React from "react";
20
- import PropTypes from "prop-types";
@@ -1,3 +0,0 @@
1
- export declare const styles: {
2
- icon: string;
3
- };
@@ -1,15 +0,0 @@
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";
@@ -1,15 +0,0 @@
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";
@@ -1,21 +0,0 @@
1
- export default EmbeddedEntryInline;
2
- declare class EmbeddedEntryInline extends React.Component<any, any, any> {
3
- static propTypes: {
4
- sdk: PropTypes.Validator<object>;
5
- isSelected: PropTypes.Validator<boolean>;
6
- attributes: PropTypes.Validator<object>;
7
- editor: PropTypes.Validator<object>;
8
- node: PropTypes.Validator<object>;
9
- onEntityFetchComplete: PropTypes.Validator<(...args: any[]) => any>;
10
- };
11
- constructor(props: any);
12
- constructor(props: any, context: any);
13
- getEntitySys(): {
14
- id: any;
15
- type: any;
16
- };
17
- handleEditClick: () => any;
18
- handleRemoveClick: () => void;
19
- }
20
- import React from "react";
21
- import PropTypes from "prop-types";
@@ -1,4 +0,0 @@
1
- export declare const styles: {
2
- icon: string;
3
- root: string;
4
- };
@@ -1,14 +0,0 @@
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";
@@ -1,11 +0,0 @@
1
- export default class EntryLinkToolbarIcon extends React.Component<any, any, any> {
2
- static propTypes: any;
3
- static defaultProps: {
4
- isButton: boolean;
5
- };
6
- constructor(props: any);
7
- constructor(props: any, context: any);
8
- handleClick: (e: any) => void;
9
- handleAction: (event: any) => any;
10
- }
11
- import React from "react";
@@ -1,4 +0,0 @@
1
- export function insertInline(editor: any, entryId: any, focusNextLine?: boolean): void;
2
- export function hasOnlyInlineEntryInSelection(editor: any): boolean | undefined;
3
- export function selectEntryAndInsert(sdk: import('@contentful/field-editor-reference/dist/types').FieldExtensionSDK, editor: any, logAction: Function): Promise<void>;
4
- export function canInsertInline(editor: any): boolean;
@@ -1,12 +0,0 @@
1
- export default ToolbarIcon;
2
- export function EmbeddedEntryInlinePlugin({ richTextAPI: { sdk, logShortcutAction, logViewportAction }, }: {
3
- richTextAPI: {
4
- sdk: any;
5
- logShortcutAction: any;
6
- logViewportAction: any;
7
- };
8
- }): {
9
- renderNode: (props: any, _editor: any, next: any) => any;
10
- onKeyDown: (event: any, editor: any, next: any) => any;
11
- };
12
- import ToolbarIcon from "./ToolbarIcon";
@@ -1,14 +0,0 @@
1
- export default EntryEmbedDropdown;
2
- declare class EntryEmbedDropdown extends React.Component<any, any, any> {
3
- static propTypes: {
4
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
5
- isOpen: PropTypes.Requireable<boolean>;
6
- disabled: PropTypes.Requireable<boolean>;
7
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
8
- onOpen: PropTypes.Requireable<(...args: any[]) => any>;
9
- };
10
- constructor(props: any);
11
- constructor(props: any, context: any);
12
- }
13
- import React from "react";
14
- import PropTypes from "prop-types";
@@ -1,28 +0,0 @@
1
- export const blockTitles: {
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
- };
12
- export default HeadingDropdown;
13
- import { BLOCKS } from "@contentful/rich-text-types";
14
- declare class HeadingDropdown extends React.Component<any, any, any> {
15
- static propTypes: {
16
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
17
- isOpen: PropTypes.Requireable<boolean>;
18
- disabled: PropTypes.Requireable<boolean>;
19
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
20
- onOpen: PropTypes.Requireable<(...args: any[]) => any>;
21
- currentBlockType: PropTypes.Requireable<string>;
22
- };
23
- constructor(props: any);
24
- constructor(props: any, context: any);
25
- getStyleNameForChange: () => any;
26
- }
27
- import React from "react";
28
- import PropTypes from "prop-types";
@@ -1,57 +0,0 @@
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,58 +0,0 @@
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
- };
57
- export default _default;
58
- import React from "react";
@@ -1,13 +0,0 @@
1
- declare function Hyperlink(props: any): JSX.Element;
2
- declare namespace Hyperlink {
3
- export namespace propTypes {
4
- export const attributes: PropTypes.Validator<object>;
5
- export const node: PropTypes.Validator<object>;
6
- export const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
7
- export const editor: PropTypes.Requireable<object>;
8
- export const richTextAPI: PropTypes.Validator<object>;
9
- export const onEdit: PropTypes.Requireable<(...args: any[]) => any>;
10
- }
11
- }
12
- export default Hyperlink;
13
- import PropTypes from "prop-types";
@@ -1,7 +0,0 @@
1
- export default class HyperlinkToolbarIcon extends React.Component<any, any, any> {
2
- static propTypes: any;
3
- constructor(props: any);
4
- constructor(props: any, context: any);
5
- handleClick: (event: any) => any;
6
- }
7
- import React from "react";
@@ -1,43 +0,0 @@
1
- /**
2
- * Returns whether or not the current value selection would allow for a user
3
- * edit on a hyperlink.
4
- *
5
- * @param {slate.Value} value
6
- * @returns {boolean}
7
- */
8
- export function mayEditLink(value: any): boolean;
9
- /**
10
- * Returns whether the given value has any hyperlink node.
11
- *
12
- * @param {slate.Value} value
13
- * @returns {boolean}
14
- */
15
- export function hasHyperlink(value: any): boolean;
16
- /**
17
- * Returns whether the given value has any inline node other than hyperlinks.
18
- *
19
- * @param {slate.Value} value
20
- * @returns {boolean}
21
- */
22
- export function hasOnlyHyperlinkInlines(value: any): boolean;
23
- /**
24
- * Allows the user to insert/remove a link depending on whether the current
25
- * selection has a link or not. If there is no link, a dialog is shown for
26
- * the user.
27
- *
28
- * @param {slate.Editor} editor Will be mutated with the required operations.
29
- * @param {Object} sdk
30
- * @param {function} logAction
31
- * @returns {Promise<void>}
32
- */
33
- export function toggleLink(editor: any, sdk: any, logAction: Function): Promise<void>;
34
- /**
35
- * Allows the user to edit the first selected link of a given Change by showing
36
- * a dialog and applying the change.
37
- *
38
- * @param {slate.Editor} change Will be mutated with the required operations.
39
- * @param {Object} sdk
40
- * @param {function} logAction
41
- * @returns {Promise<void>}
42
- */
43
- export function editLink(change: any, sdk: any, logAction: Function): Promise<void>;
@@ -1,12 +0,0 @@
1
- export namespace hyperlinkTooltipStyles {
2
- export const entityContentType: string;
3
- export const entityTitle: string;
4
- export const separator: string;
5
- }
6
- declare namespace _default {
7
- export const hyperlinkWrapper: string;
8
- export const hyperlink: string;
9
- export const hyperlinkIEFallback: string;
10
- export const hyperlinkIcon: string;
11
- }
12
- export default _default;
@@ -1 +0,0 @@
1
- export function truncate(str: any, length: any): any;
@@ -1,6 +0,0 @@
1
- export function useRequestStatus({ richTextAPI, target }: {
2
- richTextAPI: any;
3
- target: any;
4
- }): {
5
- type: string;
6
- };
@@ -1,14 +0,0 @@
1
- /**
2
- * Checks if the first block in the document is void and is focused.
3
- *
4
- * @param {Slate.Editor} editor
5
- * @returns {Boolean}
6
- */
7
- export function isVoidBlockFirstAndFocused(editor: any): boolean;
8
- /**
9
- * Inserts and focuses an empty paragraph as a first child to the document.
10
- *
11
- * @param {Slate.Editor} editor
12
- * @returns {void}
13
- */
14
- export function insertParagraphAndFocusToStartOfDocument(editor: any): void;
@@ -1,2 +0,0 @@
1
- declare function _default(opt: any): any;
2
- export default _default;
@@ -1,62 +0,0 @@
1
- declare function _default({ type, title, children }: {
2
- type: any;
3
- title: any;
4
- children: any;
5
- }): (Block: any) => {
6
- new (props: any): {
7
- handleToggle: (event: any) => any;
8
- render(): JSX.Element;
9
- context: any;
10
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
11
- forceUpdate(callback?: (() => void) | undefined): void;
12
- readonly props: Readonly<any> & Readonly<{
13
- children?: React.ReactNode;
14
- }>;
15
- state: Readonly<any>;
16
- refs: {
17
- [key: string]: React.ReactInstance;
18
- };
19
- componentDidMount?(): void;
20
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
21
- componentWillUnmount?(): void;
22
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
23
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
24
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
25
- componentWillMount?(): void;
26
- UNSAFE_componentWillMount?(): void;
27
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
28
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
29
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
30
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
31
- };
32
- new (props: any, context: any): {
33
- handleToggle: (event: any) => any;
34
- render(): JSX.Element;
35
- context: any;
36
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
37
- forceUpdate(callback?: (() => void) | undefined): void;
38
- readonly props: Readonly<any> & Readonly<{
39
- children?: React.ReactNode;
40
- }>;
41
- state: Readonly<any>;
42
- refs: {
43
- [key: string]: React.ReactInstance;
44
- };
45
- componentDidMount?(): void;
46
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
47
- componentWillUnmount?(): void;
48
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
49
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
50
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
51
- componentWillMount?(): void;
52
- UNSAFE_componentWillMount?(): void;
53
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
54
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
55
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
56
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
57
- };
58
- propTypes: any;
59
- contextType?: React.Context<any> | undefined;
60
- };
61
- export default _default;
62
- import * as React from "react";
@@ -1,3 +0,0 @@
1
- export default function _default(): {
2
- onKeyDown(event: any, editor: any, next: any): any;
3
- };
@@ -1 +0,0 @@
1
- export function getCharacterCount(editor: any): number;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export function create(): any;
@@ -1,3 +0,0 @@
1
- export function PasteHtmlPlugin(): {
2
- onPaste(event: any, editor: any, next: any): void;
3
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export function PasteTextPlugin(): {
2
- onPaste(event: any, editor: any, next: any): void;
3
- };
@@ -1,10 +0,0 @@
1
- export default QuotePlugin;
2
- declare function QuotePlugin({ type, richTextAPI: { logShortcutAction } }: {
3
- type?: any;
4
- richTextAPI: {
5
- logShortcutAction: any;
6
- };
7
- }): {
8
- renderNode: (props: any, _editor: any, next: any) => any;
9
- onKeyDown: (e: any, editor: any, next: any) => any;
10
- };
@@ -1,2 +0,0 @@
1
- export function isSelectionInQuote(editor: any): boolean;
2
- export function applyChange(editor: any): boolean;
@@ -1,64 +0,0 @@
1
- export function UnderlinedPlugin({ richTextAPI }: {
2
- richTextAPI: any;
3
- }): {
4
- renderMark: (props: any, _editor: any, next: any) => any;
5
- onKeyDown(event: any, editor: any, next: any): any;
6
- };
7
- declare var _default: {
8
- new (props: any): {
9
- handleToggle: (event: any) => any;
10
- render(): JSX.Element;
11
- context: any;
12
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
13
- forceUpdate(callback?: (() => void) | undefined): void;
14
- readonly props: Readonly<any> & Readonly<{
15
- children?: React.ReactNode;
16
- }>;
17
- state: Readonly<any>;
18
- refs: {
19
- [key: string]: React.ReactInstance;
20
- };
21
- componentDidMount?(): void;
22
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
23
- componentWillUnmount?(): void;
24
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
25
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
26
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
27
- componentWillMount?(): void;
28
- UNSAFE_componentWillMount?(): void;
29
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
30
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
31
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
32
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
33
- };
34
- new (props: any, context: any): {
35
- handleToggle: (event: any) => any;
36
- render(): JSX.Element;
37
- context: any;
38
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
39
- forceUpdate(callback?: (() => void) | undefined): void;
40
- readonly props: Readonly<any> & Readonly<{
41
- children?: React.ReactNode;
42
- }>;
43
- state: Readonly<any>;
44
- refs: {
45
- [key: string]: React.ReactInstance;
46
- };
47
- componentDidMount?(): void;
48
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
49
- componentWillUnmount?(): void;
50
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
51
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
52
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
53
- componentWillMount?(): void;
54
- UNSAFE_componentWillMount?(): void;
55
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
56
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
57
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
58
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
59
- };
60
- propTypes: any;
61
- contextType?: React.Context<any> | undefined;
62
- };
63
- export default _default;
64
- import React from "react";