@contentful/field-editor-rich-text 1.0.0-alpha.3 → 1.0.3
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 +424 -0
- package/LICENSE +1 -1
- package/README.md +9 -20
- package/dist/RichTextEditor.d.ts +14 -24
- 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 +3513 -1840
- 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 +3515 -1842
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/getLinkedContentTypeIdsForNodeType.d.ts +1 -1
- package/dist/helpers/newEntitySelectorConfigFromRichTextField.d.ts +1 -1
- package/dist/index.d.ts +2 -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 -11
- 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,13 +1,13 @@
|
|
|
1
1
|
export function toggleChange(editor: any, type: any): boolean;
|
|
2
|
-
declare function _default({ type, title,
|
|
2
|
+
declare function _default({ type, title, children, applyChange, isActive }: {
|
|
3
3
|
type: any;
|
|
4
4
|
title: any;
|
|
5
|
-
|
|
5
|
+
children: any;
|
|
6
6
|
applyChange?: ((editor: any, type: any) => boolean) | undefined;
|
|
7
7
|
isActive?: ((editor: any, type: any) => any) | undefined;
|
|
8
8
|
}): (Block: any) => {
|
|
9
|
-
new (props:
|
|
10
|
-
handleToggle: (
|
|
9
|
+
new (props: any): {
|
|
10
|
+
handleToggle: (event: any) => any;
|
|
11
11
|
render(): JSX.Element;
|
|
12
12
|
context: any;
|
|
13
13
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -32,8 +32,8 @@ declare function _default({ type, title, icon, applyChange, isActive }: {
|
|
|
32
32
|
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
33
33
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
34
34
|
};
|
|
35
|
-
new (props: any, context
|
|
36
|
-
handleToggle: (
|
|
35
|
+
new (props: any, context: any): {
|
|
36
|
+
handleToggle: (event: any) => any;
|
|
37
37
|
render(): JSX.Element;
|
|
38
38
|
context: any;
|
|
39
39
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare function _default({ type, title,
|
|
1
|
+
declare function _default({ type, title, children }: {
|
|
2
2
|
type: any;
|
|
3
3
|
title: any;
|
|
4
|
-
|
|
4
|
+
children: any;
|
|
5
5
|
}): (Mark: any) => {
|
|
6
|
-
new (props:
|
|
7
|
-
handleToggle: (
|
|
6
|
+
new (props: any): {
|
|
7
|
+
handleToggle: (event: any) => any;
|
|
8
8
|
render(): JSX.Element;
|
|
9
9
|
context: any;
|
|
10
10
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -29,8 +29,8 @@ declare function _default({ type, title, icon }: {
|
|
|
29
29
|
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
30
30
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
31
31
|
};
|
|
32
|
-
new (props: any, context
|
|
33
|
-
handleToggle: (
|
|
32
|
+
new (props: any, context: any): {
|
|
33
|
+
handleToggle: (event: any) => any;
|
|
34
34
|
render(): JSX.Element;
|
|
35
35
|
context: any;
|
|
36
36
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -3,15 +3,18 @@
|
|
|
3
3
|
* @type {object}
|
|
4
4
|
*/
|
|
5
5
|
export const actionOrigin: object;
|
|
6
|
-
export function createRichTextAPI({
|
|
7
|
-
|
|
8
|
-
object
|
|
6
|
+
export function createRichTextAPI({ sdk, onAction }: object): {
|
|
7
|
+
sdk: {
|
|
8
|
+
object;
|
|
9
9
|
};
|
|
10
10
|
logViewportAction: {
|
|
11
|
-
function
|
|
11
|
+
function;
|
|
12
12
|
};
|
|
13
13
|
createActionLogger: {
|
|
14
|
-
function
|
|
14
|
+
function;
|
|
15
|
+
};
|
|
16
|
+
createActionLogger: {
|
|
17
|
+
function;
|
|
15
18
|
};
|
|
16
19
|
};
|
|
17
20
|
/**
|
|
@@ -24,3 +27,5 @@ export const EDITOR_PLUGIN_PROP_TYPES: object;
|
|
|
24
27
|
* @type {object}
|
|
25
28
|
*/
|
|
26
29
|
export const TOOLBAR_PLUGIN_PROP_TYPES: object;
|
|
30
|
+
declare function createActionLogger(onAction: any, origin: any): (name: any, data: any) => void;
|
|
31
|
+
export {};
|
|
@@ -6,10 +6,9 @@ export default class ToolbarDropdownListItem extends React.Component<any, any, a
|
|
|
6
6
|
type: PropTypes.Requireable<string>;
|
|
7
7
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
8
|
};
|
|
9
|
-
constructor(props:
|
|
10
|
-
constructor(props: any, context
|
|
11
|
-
|
|
12
|
-
render(): JSX.Element;
|
|
9
|
+
constructor(props: any);
|
|
10
|
+
constructor(props: any, context: any);
|
|
11
|
+
handleClick: (event: any) => void;
|
|
13
12
|
}
|
|
14
13
|
import React from "react";
|
|
15
14
|
import PropTypes from "prop-types";
|
|
@@ -3,14 +3,14 @@ export default class ToolbarIcon extends React.Component<any, any, any> {
|
|
|
3
3
|
isActive: PropTypes.Validator<boolean>;
|
|
4
4
|
disabled: PropTypes.Validator<boolean>;
|
|
5
5
|
onToggle: PropTypes.Validator<(...args: any[]) => any>;
|
|
6
|
-
|
|
6
|
+
children: PropTypes.Validator<any>;
|
|
7
7
|
title: PropTypes.Validator<string>;
|
|
8
8
|
type: PropTypes.Requireable<string>;
|
|
9
|
+
className: PropTypes.Requireable<string>;
|
|
9
10
|
};
|
|
10
|
-
constructor(props:
|
|
11
|
-
constructor(props: any, context
|
|
12
|
-
|
|
13
|
-
render(): JSX.Element;
|
|
11
|
+
constructor(props: any);
|
|
12
|
+
constructor(props: any, context: any);
|
|
13
|
+
handleClick: (event: any) => void;
|
|
14
14
|
}
|
|
15
15
|
import React from "react";
|
|
16
16
|
import PropTypes from "prop-types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function toolbarActionHandlerWithSafeAutoFocus(component: any, customHandler: any): (event: any) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "dist/field-editor-rich-text.esm.js",
|
|
@@ -23,19 +23,20 @@
|
|
|
23
23
|
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@contentful/contentful-slatejs-adapter": "
|
|
27
|
-
"@contentful/
|
|
28
|
-
"@contentful/
|
|
29
|
-
"@contentful/
|
|
30
|
-
"@contentful/
|
|
26
|
+
"@contentful/contentful-slatejs-adapter": "14.1.2",
|
|
27
|
+
"@contentful/f36-components": "^4.0.1-beta.2527",
|
|
28
|
+
"@contentful/f36-icons": "^4.0.1-beta.2527",
|
|
29
|
+
"@contentful/f36-tokens": "^4.0.1-beta.2527",
|
|
30
|
+
"@contentful/field-editor-reference": "^4.0.3",
|
|
31
|
+
"@contentful/field-editor-shared": "^1.0.1",
|
|
31
32
|
"@contentful/rich-text-plain-text-renderer": "^14.0.0",
|
|
32
33
|
"@contentful/rich-text-types": "^14.0.1",
|
|
33
34
|
"@productboard/slate-edit-list": "^0.19.1",
|
|
34
35
|
"@wikifactory/slate-trailing-block": "^0.6.0",
|
|
35
36
|
"classnames": "^2.2.6",
|
|
36
37
|
"detect-browser": "^3.0.1",
|
|
37
|
-
"emotion": "10.0.17",
|
|
38
|
-
"fast-deep-equal": "^
|
|
38
|
+
"emotion": "^10.0.17",
|
|
39
|
+
"fast-deep-equal": "^3.1.1",
|
|
39
40
|
"immutable": "^3.8.2",
|
|
40
41
|
"lodash": "^4.17.15",
|
|
41
42
|
"lodash-es": "^4.17.15",
|
|
@@ -49,9 +50,19 @@
|
|
|
49
50
|
"react": ">=16.8.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
+
"@babel/core": "^7.9.6",
|
|
54
|
+
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
|
55
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
|
|
56
|
+
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
|
|
57
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
58
|
+
"@babel/plugin-transform-runtime": "^7.9.6",
|
|
59
|
+
"@babel/preset-env": "7.12.11",
|
|
60
|
+
"@babel/preset-react": "7.13.13",
|
|
61
|
+
"@contentful/field-editor-test-utils": "^1.0.1",
|
|
62
|
+
"@contentful/rich-text-react-renderer": "^14.1.1",
|
|
53
63
|
"enzyme": "^3.11.0",
|
|
54
|
-
"enzyme-adapter-react-16": "^1.15.2"
|
|
64
|
+
"enzyme-adapter-react-16": "^1.15.2",
|
|
65
|
+
"jest": "26.6.3"
|
|
55
66
|
},
|
|
56
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "3dc7130a751de690903c572edfcdfdf3587b57bf"
|
|
57
68
|
}
|