@contentful/field-editor-rich-text 1.1.0 → 2.0.0-next.10
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/README.md +1 -1
- package/dist/ContentfulEditorProvider.d.ts +8 -0
- package/dist/RichTextEditor.d.ts +18 -60
- package/dist/RichTextEditor.styles.d.ts +7 -0
- package/dist/SdkProvider.d.ts +7 -0
- package/dist/Toolbar/components/EmbedEntityWidget.d.ts +5 -0
- package/dist/Toolbar/components/EmbeddedEntityDropdownButton.d.ts +9 -0
- package/dist/Toolbar/components/StickyToolbarWrapper.d.ts +7 -0
- package/dist/Toolbar/index.d.ts +5 -20
- package/dist/TrackingProvider.d.ts +11 -0
- package/dist/constants/Schema.d.ts +93 -11
- package/dist/dialogs/openRichTextDialog.d.ts +2 -1
- package/dist/dialogs/renderRichTextDialog.d.ts +2 -1
- package/dist/field-editor-rich-text.cjs.development.js +4738 -5118
- 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 +4715 -5095
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/editor.d.ts +43 -0
- package/dist/helpers/environment.d.ts +2 -0
- package/dist/helpers/extractNodes.d.ts +7 -0
- package/dist/helpers/formatDateAndTime.d.ts +15 -0
- package/dist/helpers/getLinkedContentTypeIdsForNodeType.d.ts +26 -2
- package/dist/helpers/newEntitySelectorConfigFromRichTextField.d.ts +5 -1
- package/dist/helpers/sanitizeSlateDoc.d.ts +5 -0
- package/dist/helpers/transformers.d.ts +8 -0
- package/dist/helpers/validations.d.ts +10 -0
- package/dist/plugins/Break/createExitBreakPlugin.d.ts +2 -0
- package/dist/plugins/Break/createSoftBreakPlugin.d.ts +2 -0
- package/dist/plugins/Break/index.d.ts +3 -0
- package/dist/plugins/DragAndDrop/index.d.ts +2 -0
- package/dist/plugins/EmbeddedEntityBlock/LinkedEntityBlock.d.ts +14 -0
- package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +11 -10
- package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -23
- package/dist/plugins/EmbeddedEntityBlock/index.d.ts +6 -26
- package/dist/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.d.ts +13 -0
- package/dist/plugins/EmbeddedEntityInline/Util.d.ts +16 -0
- package/dist/plugins/EmbeddedEntityInline/index.d.ts +11 -0
- package/dist/plugins/Heading/components/Heading.d.ts +11 -0
- package/dist/plugins/Heading/components/ToolbarHeadingButton.d.ts +4 -0
- package/dist/plugins/Heading/createHeadingPlugin.d.ts +2 -0
- package/dist/plugins/Heading/index.d.ts +2 -380
- package/dist/plugins/Hr/index.d.ts +12 -61
- package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +9 -0
- package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +16 -0
- package/dist/plugins/Hyperlink/index.d.ts +9 -9
- package/dist/plugins/Hyperlink/truncate.d.ts +1 -1
- package/dist/plugins/Hyperlink/utils.d.ts +3 -0
- package/dist/plugins/List/components/List.d.ts +3 -0
- package/dist/plugins/List/components/ListItem.d.ts +2 -0
- package/dist/plugins/List/components/ToolbarListButton.d.ts +4 -0
- package/dist/plugins/List/createListPlugin.d.ts +2 -0
- package/dist/plugins/List/index.d.ts +2 -114
- package/dist/plugins/List/insertListBreak.d.ts +2 -0
- package/dist/plugins/List/insertListFragment.d.ts +2 -0
- package/dist/plugins/List/transforms/insertListItem.d.ts +5 -0
- package/dist/plugins/List/utils.d.ts +14 -0
- package/dist/plugins/List/withList.d.ts +3 -0
- package/dist/plugins/Marks/Bold.d.ts +9 -0
- package/dist/plugins/Marks/Code.d.ts +9 -0
- package/dist/plugins/Marks/Italic.d.ts +9 -0
- package/dist/plugins/Marks/Underline.d.ts +9 -0
- package/dist/plugins/Marks/index.d.ts +2 -0
- package/dist/plugins/Normalizer/baseRules.d.ts +2 -0
- package/dist/plugins/Normalizer/createNormalizerPlugin.d.ts +2 -0
- package/dist/plugins/Normalizer/index.d.ts +2 -0
- package/dist/plugins/Normalizer/types.d.ts +39 -0
- package/dist/plugins/Normalizer/utils.d.ts +8 -0
- package/dist/plugins/Normalizer/withNormalizer.d.ts +2 -0
- package/dist/plugins/Paragraph/Paragraph.d.ts +2 -0
- package/dist/plugins/Paragraph/createParagraphPlugin.d.ts +2 -0
- package/dist/plugins/Paragraph/index.d.ts +1 -5
- package/dist/plugins/Paragraph/utils.d.ts +2 -0
- package/dist/plugins/PasteHTML/createPasteHTMLPlugin.d.ts +2 -0
- package/dist/plugins/PasteHTML/index.d.ts +1 -0
- package/dist/plugins/PasteHTML/utils/sanitizeHTML.d.ts +1 -0
- package/dist/plugins/PasteHTML/utils/sanitizeSheets.d.ts +4 -0
- package/dist/plugins/Quote/components/Quote.d.ts +2 -0
- package/dist/plugins/Quote/components/ToolbarQuoteButton.d.ts +4 -0
- package/dist/plugins/Quote/createQuotePlugin.d.ts +2 -0
- package/dist/plugins/Quote/index.d.ts +2 -59
- package/dist/plugins/Quote/toggleQuote.d.ts +3 -0
- package/dist/plugins/SelectOnBackspace/createSelectOnBackspacePlugin.d.ts +2 -0
- package/dist/plugins/SelectOnBackspace/index.d.ts +1 -0
- package/dist/plugins/Table/actions/addColumn.d.ts +4 -0
- package/dist/plugins/Table/actions/addRow.d.ts +3 -0
- package/dist/plugins/Table/actions/index.d.ts +3 -0
- package/dist/plugins/Table/actions/setHeader.d.ts +2 -0
- package/dist/plugins/Table/addTableTrackingEvents.d.ts +3 -0
- package/dist/plugins/Table/components/Cell.d.ts +2 -0
- package/dist/plugins/Table/components/HeaderCell.d.ts +2 -0
- package/dist/plugins/Table/components/Row.d.ts +2 -0
- package/dist/plugins/Table/components/Table.d.ts +2 -0
- package/dist/plugins/Table/components/TableActions.d.ts +4 -0
- package/dist/plugins/Table/components/ToolbarButton.d.ts +4 -0
- package/dist/plugins/Table/createTablePlugin.d.ts +3 -0
- package/dist/plugins/Table/helpers.d.ts +15 -0
- package/dist/plugins/Table/index.d.ts +2 -0
- package/dist/plugins/Text/createTextPlugin.d.ts +2 -0
- package/dist/plugins/Text/index.d.ts +1 -0
- package/dist/plugins/TrailingParagraph/index.d.ts +1 -0
- package/dist/plugins/Voids/createVoidsPlugin.d.ts +2 -0
- package/dist/plugins/Voids/index.d.ts +1 -0
- package/dist/plugins/Voids/transformVoid.d.ts +6 -0
- package/dist/plugins/index.d.ts +6 -1
- package/dist/plugins/links-tracking.d.ts +7 -0
- package/dist/plugins/shared/EntityStatusIcon.d.ts +7 -0
- package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +23 -0
- package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +13 -0
- package/dist/plugins/shared/ToolbarButton.d.ts +11 -0
- package/dist/test-utils/assertOutput.d.ts +8 -0
- package/dist/test-utils/createEditor.d.ts +14 -0
- package/dist/test-utils/index.d.ts +4 -0
- package/dist/test-utils/jsx.d.ts +28 -0
- package/dist/test-utils/mockPlugin.d.ts +2 -0
- package/dist/test-utils/randomId.d.ts +4 -0
- package/dist/test-utils/setEmptyDataAttribute.d.ts +6 -0
- package/dist/test-utils/validation.d.ts +1 -0
- package/dist/types.d.ts +42 -0
- package/package.json +40 -34
- package/CHANGELOG.md +0 -454
- package/LICENSE +0 -21
- package/dist/RichTextEditor.spec.d.ts +0 -1
- package/dist/Toolbar/StickyToolbarWrapper.d.ts +0 -12
- package/dist/Toolbar/Toolbar.spec.d.ts +0 -1
- package/dist/helpers/browserSupport.d.ts +0 -1
- package/dist/plugins/Bold/index.d.ts +0 -64
- package/dist/plugins/Code/index.d.ts +0 -64
- package/dist/plugins/CommandPalette/CommandMark.d.ts +0 -12
- package/dist/plugins/CommandPalette/CommandPalette.d.ts +0 -10
- package/dist/plugins/CommandPalette/CommandPaletteService.d.ts +0 -20
- package/dist/plugins/CommandPalette/CommandPanel/CommandPanelMenu.d.ts +0 -43
- package/dist/plugins/CommandPalette/CommandPanel/InViewport/InViewport.d.ts +0 -37
- package/dist/plugins/CommandPalette/CommandPanel/index.d.ts +0 -37
- package/dist/plugins/CommandPalette/Util.d.ts +0 -5
- package/dist/plugins/CommandPalette/index.d.ts +0 -7
- package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.d.ts +0 -20
- package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.styles.d.ts +0 -3
- package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedAssetCard.d.ts +0 -15
- package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedEntryCard.d.ts +0 -15
- package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.d.ts +0 -21
- package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.styles.d.ts +0 -4
- package/dist/plugins/EmbeddedEntryInline/FetchingWrappedInlineEntryCard.d.ts +0 -14
- package/dist/plugins/EmbeddedEntryInline/ToolbarIcon.d.ts +0 -11
- package/dist/plugins/EmbeddedEntryInline/Utils.d.ts +0 -4
- package/dist/plugins/EmbeddedEntryInline/index.d.ts +0 -12
- package/dist/plugins/EntryEmbedDropdown/index.d.ts +0 -14
- package/dist/plugins/Heading/HeadingDropdown.d.ts +0 -28
- package/dist/plugins/Heading/HeadingDropdownItem.d.ts +0 -57
- package/dist/plugins/Heading/Paragraph.d.ts +0 -58
- package/dist/plugins/Hyperlink/Hyperlink.d.ts +0 -13
- package/dist/plugins/Hyperlink/ToolbarIcon.d.ts +0 -7
- package/dist/plugins/Hyperlink/Util.d.ts +0 -43
- package/dist/plugins/Hyperlink/styles.d.ts +0 -12
- package/dist/plugins/Hyperlink/useRequestStatus.d.ts +0 -6
- package/dist/plugins/InsertBeforeFirstVoidBlock/Util.d.ts +0 -14
- package/dist/plugins/InsertBeforeFirstVoidBlock/index.d.ts +0 -3
- package/dist/plugins/Italic/index.d.ts +0 -64
- package/dist/plugins/List/EditListWrapper.d.ts +0 -2
- package/dist/plugins/List/ToolbarDecorator.d.ts +0 -62
- package/dist/plugins/NewLinePlugin/index.d.ts +0 -3
- package/dist/plugins/Paste/Paste.d.ts +0 -1
- package/dist/plugins/Paste/Paste.spec.d.ts +0 -1
- package/dist/plugins/Paste/index.d.ts +0 -7
- package/dist/plugins/Paste/index.spec.d.ts +0 -1
- package/dist/plugins/PasteHtml/PasteHtml.spec.d.ts +0 -1
- package/dist/plugins/PasteHtml/Serializer.d.ts +0 -1
- package/dist/plugins/PasteHtml/index.d.ts +0 -3
- package/dist/plugins/PasteText/PasteText.spec.d.ts +0 -1
- package/dist/plugins/PasteText/index.d.ts +0 -3
- package/dist/plugins/Quote/QuotePlugin.d.ts +0 -10
- package/dist/plugins/Quote/Util.d.ts +0 -2
- package/dist/plugins/Underlined/index.d.ts +0 -64
- package/dist/plugins/shared/BlockSelectDecorator.d.ts +0 -63
- package/dist/plugins/shared/BlockToggleDecorator.d.ts +0 -65
- package/dist/plugins/shared/MarkDecorator.d.ts +0 -12
- package/dist/plugins/shared/MarkPlugin.d.ts +0 -9
- package/dist/plugins/shared/MarkToggleDecorator.d.ts +0 -62
- package/dist/plugins/shared/NodeDecorator.d.ts +0 -15
- package/dist/plugins/shared/PasteTestHelpers.d.ts +0 -35
- package/dist/plugins/shared/PluginApi.d.ts +0 -31
- package/dist/plugins/shared/PropTypes.d.ts +0 -15
- package/dist/plugins/shared/ToolbarDropdownListItem.d.ts +0 -14
- package/dist/plugins/shared/ToolbarIcon.d.ts +0 -16
- package/dist/plugins/shared/Util.d.ts +0 -1
- package/dist/plugins/shared/UtilHave.d.ts +0 -24
- package/dist/setupTests.d.ts +0 -1
- package/dist/validations/index.d.ts +0 -9
- package/dist/validations/validations.spec.d.ts +0 -1
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export namespace MarkPropTypes {
|
|
2
|
-
export const attributes: PropTypes.Validator<object>;
|
|
3
|
-
export const children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
4
|
-
export const mark: PropTypes.Validator<string>;
|
|
5
|
-
}
|
|
6
|
-
export namespace NodePropTypes {
|
|
7
|
-
const attributes_1: PropTypes.Validator<object>;
|
|
8
|
-
export { attributes_1 as attributes };
|
|
9
|
-
const children_1: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
10
|
-
export { children_1 as children };
|
|
11
|
-
export const node: PropTypes.Validator<PropTypes.InferProps<{
|
|
12
|
-
type: PropTypes.Validator<string>;
|
|
13
|
-
}>>;
|
|
14
|
-
}
|
|
15
|
-
import PropTypes from "prop-types";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default class ToolbarDropdownListItem extends React.Component<any, any, any> {
|
|
2
|
-
static propTypes: {
|
|
3
|
-
isActive: PropTypes.Validator<boolean>;
|
|
4
|
-
onToggle: PropTypes.Validator<(...args: any[]) => any>;
|
|
5
|
-
title: PropTypes.Validator<string>;
|
|
6
|
-
type: PropTypes.Requireable<string>;
|
|
7
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
|
-
};
|
|
9
|
-
constructor(props: any);
|
|
10
|
-
constructor(props: any, context: any);
|
|
11
|
-
handleClick: (event: any) => void;
|
|
12
|
-
}
|
|
13
|
-
import React from "react";
|
|
14
|
-
import PropTypes from "prop-types";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export default class ToolbarIcon extends React.Component<any, any, any> {
|
|
2
|
-
static propTypes: {
|
|
3
|
-
isActive: PropTypes.Validator<boolean>;
|
|
4
|
-
disabled: PropTypes.Validator<boolean>;
|
|
5
|
-
onToggle: PropTypes.Validator<(...args: any[]) => any>;
|
|
6
|
-
children: PropTypes.Validator<any>;
|
|
7
|
-
title: PropTypes.Validator<string>;
|
|
8
|
-
type: PropTypes.Requireable<string>;
|
|
9
|
-
className: PropTypes.Requireable<string>;
|
|
10
|
-
};
|
|
11
|
-
constructor(props: any);
|
|
12
|
-
constructor(props: any, context: any);
|
|
13
|
-
handleClick: (event: any) => void;
|
|
14
|
-
}
|
|
15
|
-
import React from "react";
|
|
16
|
-
import PropTypes from "prop-types";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function toolbarActionHandlerWithSafeAutoFocus(component: any, customHandler: any): (event: any) => any;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export function haveAnyInlines({ value }: {
|
|
2
|
-
value: any;
|
|
3
|
-
}): boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Checks if all inline nodes in the selectin have a certain type.
|
|
6
|
-
* Returns false if there are no inline nodes in the selection.
|
|
7
|
-
*
|
|
8
|
-
* @param {slate.Editor} editor
|
|
9
|
-
* @param {string} type
|
|
10
|
-
* @returns {boolean}
|
|
11
|
-
*/
|
|
12
|
-
export function haveEveryInlineOfType({ value }: any, type: string): boolean;
|
|
13
|
-
export function haveMarks({ value }: {
|
|
14
|
-
value: any;
|
|
15
|
-
}, type: any): any;
|
|
16
|
-
export function haveBlocks({ value }: {
|
|
17
|
-
value: any;
|
|
18
|
-
}, type: any): any;
|
|
19
|
-
export function haveInlines({ value }: {
|
|
20
|
-
value: any;
|
|
21
|
-
}, type: any): any;
|
|
22
|
-
export function haveTextInSomeBlocks({ value }: {
|
|
23
|
-
value: any;
|
|
24
|
-
}): any;
|
package/dist/setupTests.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export namespace VALIDATIONS {
|
|
2
|
-
export const ENABLED_MARKS: string;
|
|
3
|
-
export const ENABLED_NODE_TYPES: string;
|
|
4
|
-
}
|
|
5
|
-
export const VALIDATABLE_NODE_TYPES: (BLOCKS.PARAGRAPH | BLOCKS.HEADING_1 | BLOCKS.HEADING_2 | BLOCKS.HEADING_3 | BLOCKS.HEADING_4 | BLOCKS.HEADING_5 | BLOCKS.HEADING_6 | BLOCKS.OL_LIST | BLOCKS.UL_LIST | BLOCKS.HR | BLOCKS.QUOTE | BLOCKS.EMBEDDED_ENTRY | BLOCKS.EMBEDDED_ASSET | INLINES)[];
|
|
6
|
-
export function isNodeTypeEnabled(field: any, nodeType: string): boolean;
|
|
7
|
-
export function isMarkEnabled(field: any, mark: string): boolean;
|
|
8
|
-
import { BLOCKS } from "@contentful/rich-text-types";
|
|
9
|
-
import { INLINES } from "@contentful/rich-text-types";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|