@contentful/field-editor-rich-text 1.1.3 → 2.0.0-next.11
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 +0 -60
- 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 +4749 -5125
- 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 +4729 -5105
- 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/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
package/CHANGELOG.md
CHANGED
|
@@ -3,66 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [1.1.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.1.2...@contentful/field-editor-rich-text@1.1.3) (2022-02-15)
|
|
7
|
-
|
|
8
|
-
### Bug Fixes
|
|
9
|
-
|
|
10
|
-
- bump f36 packages ([#1025](https://github.com/contentful/field-editors/issues/1025)) ([ec37a40](https://github.com/contentful/field-editors/commit/ec37a4000db7cd75c66dd9621136b2272c9feeea))
|
|
11
|
-
|
|
12
|
-
## [1.1.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.1.1...@contentful/field-editor-rich-text@1.1.2) (2022-02-14)
|
|
13
|
-
|
|
14
|
-
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
15
|
-
|
|
16
|
-
## [1.1.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.1.0...@contentful/field-editor-rich-text@1.1.1) (2022-01-20)
|
|
17
|
-
|
|
18
|
-
### Bug Fixes
|
|
19
|
-
|
|
20
|
-
- remove empty text hyperlinks ([#997](https://github.com/contentful/field-editors/issues/997)) ([d998132](https://github.com/contentful/field-editors/commit/d998132fbe948a98f6e800211a794bdd1e292233))
|
|
21
|
-
|
|
22
|
-
# [1.1.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.8...@contentful/field-editor-rich-text@1.1.0) (2022-01-11)
|
|
23
|
-
|
|
24
|
-
### Features
|
|
25
|
-
|
|
26
|
-
- bump f36 packages to stable v4 [BAU-521] ([#988](https://github.com/contentful/field-editors/issues/988)) ([419cf56](https://github.com/contentful/field-editors/commit/419cf56692179b074fcfa2743469d5265ed98429))
|
|
27
|
-
|
|
28
|
-
## [1.0.8](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.7...@contentful/field-editor-rich-text@1.0.8) (2021-12-23)
|
|
29
|
-
|
|
30
|
-
### Bug Fixes
|
|
31
|
-
|
|
32
|
-
- markdown buttons ([#968](https://github.com/contentful/field-editors/issues/968)) ([9803b98](https://github.com/contentful/field-editors/commit/9803b98c25d92df6148686ffe2749a77f7efdbb9))
|
|
33
|
-
|
|
34
|
-
## [1.0.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.6...@contentful/field-editor-rich-text@1.0.7) (2021-12-22)
|
|
35
|
-
|
|
36
|
-
### Bug Fixes
|
|
37
|
-
|
|
38
|
-
- cache content types for Hyperlink ([#967](https://github.com/contentful/field-editors/issues/967)) ([07e376d](https://github.com/contentful/field-editors/commit/07e376de5157fa6477f060550aacf96af3ab5e85))
|
|
39
|
-
|
|
40
|
-
## [1.0.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.5...@contentful/field-editor-rich-text@1.0.6) (2021-12-20)
|
|
41
|
-
|
|
42
|
-
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
43
|
-
|
|
44
|
-
## [1.0.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.4...@contentful/field-editor-rich-text@1.0.5) (2021-11-27)
|
|
45
|
-
|
|
46
|
-
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
47
|
-
|
|
48
|
-
## [1.0.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.3...@contentful/field-editor-rich-text@1.0.4) (2021-11-26)
|
|
49
|
-
|
|
50
|
-
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
51
|
-
|
|
52
|
-
## [1.0.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.2...@contentful/field-editor-rich-text@1.0.3) (2021-11-17)
|
|
53
|
-
|
|
54
|
-
### Bug Fixes
|
|
55
|
-
|
|
56
|
-
- **card-actions:** update forma 36 to fix card actions click issue ([#927](https://github.com/contentful/field-editors/issues/927)) ([3dfdef2](https://github.com/contentful/field-editors/commit/3dfdef2c2b0045f12ea94ddafca89a8e9f25e7d0))
|
|
57
|
-
|
|
58
|
-
## [1.0.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.1...@contentful/field-editor-rich-text@1.0.2) (2021-11-08)
|
|
59
|
-
|
|
60
|
-
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
61
|
-
|
|
62
|
-
## [1.0.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.0...@contentful/field-editor-rich-text@1.0.1) (2021-11-08)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
65
|
-
|
|
66
6
|
# [1.0.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.20.0...@contentful/field-editor-rich-text@1.0.0) (2021-11-04)
|
|
67
7
|
|
|
68
8
|
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
npm install @contentful/field-editor-rich-text
|
|
5
5
|
```
|
|
6
6
|
|
|
7
|
-
This package contains
|
|
7
|
+
This package contains the updated rich text editor, currently in an **ALPHA** state (i.e., not suitable for production use and subject to breaking changes).
|
|
8
8
|
|
|
9
9
|
This editor app is built on top of [Slate](https://github.com/ianstormtaylor/slate), a third party framework for building highly customizable rich text editing solutions.
|
|
10
10
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
3
|
+
export declare function getContentfulEditorId(sdk: FieldExtensionSDK): string;
|
|
4
|
+
interface useContentfulEditorHookProps {
|
|
5
|
+
sdk: FieldExtensionSDK;
|
|
6
|
+
}
|
|
7
|
+
export declare const ContentfulEditorProvider: import("react").FC<useContentfulEditorHookProps>, useContentfulEditor: any;
|
|
8
|
+
export {};
|
package/dist/RichTextEditor.d.ts
CHANGED
|
@@ -1,61 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
2
|
+
import * as Contentful from '@contentful/rich-text-types';
|
|
3
|
+
import { RichTextTrackingActionHandler } from './TrackingProvider';
|
|
4
|
+
declare type ConnectedProps = {
|
|
5
|
+
sdk: FieldExtensionSDK;
|
|
6
|
+
onAction?: RichTextTrackingActionHandler;
|
|
7
|
+
minHeight?: string | number;
|
|
8
|
+
value?: object;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
onChange?: (doc: Contentful.Document) => unknown;
|
|
11
|
+
isToolbarHidden?: boolean;
|
|
12
|
+
actionsDisabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const ConnectedRichTextEditor: (props: ConnectedProps) => JSX.Element;
|
|
15
|
+
declare type Props = ConnectedProps & {
|
|
16
|
+
isInitiallyDisabled: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const RichTextEditor: (props: Props) => JSX.Element;
|
|
7
19
|
export default RichTextEditor;
|
|
8
|
-
export class ConnectedRichTextEditor extends React.Component<any, any, any> {
|
|
9
|
-
static propTypes: {
|
|
10
|
-
minHeight: PropTypes.Requireable<string | number>;
|
|
11
|
-
sdk: PropTypes.Validator<PropTypes.InferProps<{
|
|
12
|
-
field: PropTypes.Validator<PropTypes.InferProps<{
|
|
13
|
-
id: PropTypes.Validator<string>;
|
|
14
|
-
locale: PropTypes.Validator<string>;
|
|
15
|
-
}>>;
|
|
16
|
-
access: PropTypes.Validator<PropTypes.InferProps<{
|
|
17
|
-
can: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
}>>;
|
|
19
|
-
parameters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
-
instance: PropTypes.Validator<PropTypes.InferProps<{
|
|
21
|
-
getEntryUrl: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
-
getAssetUrl: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
-
}>>;
|
|
24
|
-
}>>;
|
|
25
|
-
}>>;
|
|
26
|
-
value: PropTypes.Requireable<object>;
|
|
27
|
-
isDisabled: PropTypes.Requireable<boolean>;
|
|
28
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
-
onAction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
-
isToolbarHidden: PropTypes.Requireable<boolean>;
|
|
31
|
-
actionsDisabled: PropTypes.Requireable<boolean>;
|
|
32
|
-
};
|
|
33
|
-
static defaultProps: {
|
|
34
|
-
value: import("@contentful/rich-text-types").Document;
|
|
35
|
-
onChange: (...args: any[]) => void;
|
|
36
|
-
onAction: (...args: any[]) => void;
|
|
37
|
-
isDisabled: boolean;
|
|
38
|
-
isToolbarHidden: boolean;
|
|
39
|
-
actionsDisabled: boolean;
|
|
40
|
-
};
|
|
41
|
-
constructor(props: any);
|
|
42
|
-
constructor(props: any, context: any);
|
|
43
|
-
editor: React.RefObject<any>;
|
|
44
|
-
richTextAPI: {
|
|
45
|
-
sdk: {
|
|
46
|
-
object: any;
|
|
47
|
-
};
|
|
48
|
-
logViewportAction: {
|
|
49
|
-
function: any;
|
|
50
|
-
};
|
|
51
|
-
createActionLogger: {
|
|
52
|
-
function: any;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
slatePlugins: any[];
|
|
56
|
-
onChange: (editor: any) => void;
|
|
57
|
-
callOnChange: import("lodash").DebouncedFunc<() => void>;
|
|
58
|
-
handleKeyDown: (event: any, editor: any, next: any) => any;
|
|
59
|
-
}
|
|
60
|
-
import React from "react";
|
|
61
|
-
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface EmbeddedEntityDropdownButtonProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
isDisabled: boolean | undefined;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onToggle: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function EmbeddedEntityDropdownButton({ children, isDisabled, isOpen, onClose, onToggle, }: EmbeddedEntityDropdownButtonProps): JSX.Element;
|
package/dist/Toolbar/index.d.ts
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
-
};
|
|
8
|
-
constructor(props: any);
|
|
9
|
-
constructor(props: any, context: any);
|
|
10
|
-
hasMounted: boolean;
|
|
11
|
-
isReadyToSetFocusProgrammatically: boolean;
|
|
12
|
-
onChange: (...args: any[]) => void;
|
|
13
|
-
handleEmbedDropdownOpen: () => void;
|
|
14
|
-
handleEmbedDropdownClose: () => void;
|
|
15
|
-
renderEmbeds: (props: any) => JSX.Element;
|
|
16
|
-
openHeadingMenu: () => void;
|
|
17
|
-
closeHeadingMenu: () => void;
|
|
18
|
-
}
|
|
19
|
-
import React from "react";
|
|
20
|
-
import PropTypes from "prop-types";
|
|
1
|
+
declare type ToolbarProps = {
|
|
2
|
+
isDisabled?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const Toolbar: ({ isDisabled }: ToolbarProps) => JSX.Element;
|
|
5
|
+
export default Toolbar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare type RichTextTrackingActionName = 'insertTable' | 'insertTableRow' | 'insertTableColumn' | 'removeTable' | 'removeTableRow' | 'removeTableColumn' | 'paste' | 'linkRendered';
|
|
3
|
+
export declare type RichTextTrackingActionHandler = (name: RichTextTrackingActionName, data: Record<string, unknown>) => unknown;
|
|
4
|
+
interface TrackingProviderProps {
|
|
5
|
+
onAction: RichTextTrackingActionHandler;
|
|
6
|
+
}
|
|
7
|
+
export interface TrackingProvider {
|
|
8
|
+
onViewportAction: (actionName: RichTextTrackingActionName, data?: Record<string, unknown>) => ReturnType<TrackingProviderProps['onAction']>;
|
|
9
|
+
}
|
|
10
|
+
export declare const TrackingProvider: React.FC<TrackingProviderProps>, useTrackingContext: any;
|
|
11
|
+
export {};
|
|
@@ -1,29 +1,111 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { BLOCKS, INLINES } from '@contentful/rich-text-types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
document: {
|
|
4
|
+
nodes: {
|
|
5
|
+
types: {
|
|
6
|
+
type: import("@contentful/rich-text-types").TopLevelBlockEnum;
|
|
7
|
+
}[];
|
|
5
8
|
}[];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
};
|
|
10
|
+
blocks: {
|
|
11
|
+
blockquote: {
|
|
12
|
+
nodes: {
|
|
13
|
+
match: {
|
|
14
|
+
type: BLOCKS;
|
|
15
|
+
}[][];
|
|
16
|
+
min: number;
|
|
17
|
+
}[];
|
|
18
|
+
normalize: (editor: any, error: any) => any;
|
|
19
|
+
};
|
|
20
|
+
paragraph: {
|
|
21
|
+
nodes: {
|
|
22
|
+
match: ({
|
|
23
|
+
type: INLINES;
|
|
24
|
+
} | {
|
|
25
|
+
object: string;
|
|
26
|
+
})[];
|
|
27
|
+
}[];
|
|
28
|
+
};
|
|
29
|
+
"heading-1": {
|
|
30
|
+
nodes: {
|
|
31
|
+
match: ({
|
|
32
|
+
type: INLINES;
|
|
33
|
+
} | {
|
|
34
|
+
object: string;
|
|
35
|
+
})[];
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
"heading-2": {
|
|
39
|
+
nodes: {
|
|
40
|
+
match: ({
|
|
41
|
+
type: INLINES;
|
|
42
|
+
} | {
|
|
43
|
+
object: string;
|
|
44
|
+
})[];
|
|
45
|
+
}[];
|
|
46
|
+
};
|
|
47
|
+
"heading-3": {
|
|
48
|
+
nodes: {
|
|
49
|
+
match: ({
|
|
50
|
+
type: INLINES;
|
|
51
|
+
} | {
|
|
52
|
+
object: string;
|
|
53
|
+
})[];
|
|
54
|
+
}[];
|
|
55
|
+
};
|
|
56
|
+
"heading-4": {
|
|
57
|
+
nodes: {
|
|
58
|
+
match: ({
|
|
59
|
+
type: INLINES;
|
|
60
|
+
} | {
|
|
61
|
+
object: string;
|
|
62
|
+
})[];
|
|
63
|
+
}[];
|
|
64
|
+
};
|
|
65
|
+
"heading-5": {
|
|
66
|
+
nodes: {
|
|
67
|
+
match: ({
|
|
68
|
+
type: INLINES;
|
|
69
|
+
} | {
|
|
70
|
+
object: string;
|
|
71
|
+
})[];
|
|
72
|
+
}[];
|
|
73
|
+
};
|
|
74
|
+
"heading-6": {
|
|
75
|
+
nodes: {
|
|
76
|
+
match: ({
|
|
77
|
+
type: INLINES;
|
|
78
|
+
} | {
|
|
79
|
+
object: string;
|
|
80
|
+
})[];
|
|
81
|
+
}[];
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
inlines: {
|
|
9
85
|
hyperlink: {
|
|
10
86
|
nodes: {
|
|
11
|
-
|
|
87
|
+
match: {
|
|
88
|
+
object: string;
|
|
89
|
+
}[];
|
|
12
90
|
}[];
|
|
13
91
|
};
|
|
14
92
|
"entry-hyperlink": {
|
|
15
93
|
nodes: {
|
|
16
|
-
|
|
94
|
+
match: {
|
|
95
|
+
object: string;
|
|
96
|
+
}[];
|
|
17
97
|
}[];
|
|
18
98
|
};
|
|
19
99
|
"asset-hyperlink": {
|
|
20
100
|
nodes: {
|
|
21
|
-
|
|
101
|
+
match: {
|
|
102
|
+
object: string;
|
|
103
|
+
}[];
|
|
22
104
|
}[];
|
|
23
105
|
};
|
|
24
106
|
"embedded-entry-inline": {
|
|
25
107
|
isVoid: boolean;
|
|
26
108
|
};
|
|
27
109
|
};
|
|
28
|
-
}
|
|
110
|
+
};
|
|
29
111
|
export default _default;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { DialogExtensionSDK } from '@contentful/app-sdk';
|
|
2
|
+
export declare const openRichTextDialog: (sdk: DialogExtensionSDK) => (options: any) => Promise<unknown>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { DialogExtensionSDK } from '@contentful/app-sdk';
|
|
2
|
+
export declare const renderRichTextDialog: (sdk: DialogExtensionSDK) => JSX.Element;
|