@contentful/field-editor-rich-text 4.4.1 → 4.4.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/dist/cjs/RichTextEditor.js +6 -6
- package/dist/cjs/RichTextEditor.styles.js +1 -1
- package/dist/cjs/SdkProvider.js +2 -2
- package/dist/cjs/SyncEditorChanges.js +2 -2
- package/dist/cjs/Toolbar/_tests_/toolbar.test.js +2 -2
- package/dist/cjs/Toolbar/components/ButtonRedo.js +1 -1
- package/dist/cjs/Toolbar/components/ButtonUndo.js +1 -1
- package/dist/cjs/Toolbar/components/EmbedEntityWidget.js +1 -1
- package/dist/cjs/Toolbar/components/EmbeddedEntityDropdownButton.js +1 -1
- package/dist/cjs/Toolbar/components/StickyToolbarWrapper.js +1 -1
- package/dist/cjs/Toolbar/index.js +2 -2
- package/dist/cjs/__fixtures__/asset/index.js +5 -5
- package/dist/cjs/__fixtures__/content-type/index.js +1 -1
- package/dist/cjs/__fixtures__/entry/index.js +4 -4
- package/dist/cjs/__fixtures__/fixtures.js +6 -6
- package/dist/cjs/__fixtures__/locale/index.js +2 -2
- package/dist/cjs/__fixtures__/space/index.js +1 -1
- package/dist/cjs/dialogs/HypelinkDialog/HyperlinkDialog.js +6 -9
- package/dist/cjs/dialogs/openRichTextDialog.js +1 -1
- package/dist/cjs/dialogs/renderRichTextDialog.js +1 -1
- package/dist/cjs/helpers/callbacks.js +2 -2
- package/dist/cjs/helpers/config.js +2 -2
- package/dist/cjs/helpers/formatDateAndTime.js +1 -1
- package/dist/cjs/helpers/getAllowedResourcesForNodeType.js +3 -3
- package/dist/cjs/helpers/getLinkedContentTypeIdsForNodeType.js +3 -3
- package/dist/cjs/helpers/sdkNavigatorSlideIn.js +1 -1
- package/dist/cjs/helpers/sdkNavigatorSlideIn.spec.js +1 -1
- package/dist/cjs/helpers/toSlateValue.js +1 -1
- package/dist/cjs/helpers/validations.js +3 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal/constants.js +1 -1
- package/dist/cjs/internal/hooks.js +2 -2
- package/dist/cjs/internal/misc.js +1 -1
- package/dist/cjs/internal/queries.js +2 -2
- package/dist/cjs/internal/transforms.js +1 -1
- package/dist/cjs/plugins/CommandPalette/components/CommandList.js +2 -2
- package/dist/cjs/plugins/CommandPalette/components/CommandList.styles.js +1 -1
- package/dist/cjs/plugins/CommandPalette/components/CommandPrompt.js +2 -2
- package/dist/cjs/plugins/CommandPalette/hooks/useCommandList.js +2 -2
- package/dist/cjs/plugins/CommandPalette/onKeyDown.js +1 -1
- package/dist/cjs/plugins/CommandPalette/onKeyDown.spec.js +1 -1
- package/dist/cjs/plugins/EmbeddedEntityBlock/LinkedEntityBlock.js +1 -1
- package/dist/cjs/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +2 -2
- package/dist/cjs/plugins/EmbeddedEntityInline/LinkedEntityInline.js +1 -1
- package/dist/cjs/plugins/EmbeddedResourceBlock/LinkedResourceBlock.js +1 -1
- package/dist/cjs/plugins/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +1 -1
- package/dist/cjs/plugins/EmbeddedResourceInline/LinkedResourceInline.js +1 -1
- package/dist/cjs/plugins/Heading/components/Heading.js +2 -2
- package/dist/cjs/plugins/Heading/components/ToolbarHeadingButton.js +2 -2
- package/dist/cjs/plugins/Heading/createHeadingPlugin.js +1 -1
- package/dist/cjs/plugins/Hr/index.js +3 -3
- package/dist/cjs/plugins/Hyperlink/HyperlinkModal.js +4 -4
- package/dist/cjs/plugins/Hyperlink/components/EntityHyperlink.js +1 -1
- package/dist/cjs/plugins/Hyperlink/components/LinkPopover.js +1 -1
- package/dist/cjs/plugins/Hyperlink/components/ResourceHyperlink.js +1 -1
- package/dist/cjs/plugins/Hyperlink/components/ToolbarHyperlinkButton.js +1 -1
- package/dist/cjs/plugins/Hyperlink/components/UrlHyperlink.js +1 -1
- package/dist/cjs/plugins/Hyperlink/components/styles.js +1 -1
- package/dist/cjs/plugins/Hyperlink/createHyperlinkPlugin.js +2 -2
- package/dist/cjs/plugins/Hyperlink/useResourceEntityInfo.js +1 -1
- package/dist/cjs/plugins/List/components/List.js +2 -2
- package/dist/cjs/plugins/List/components/ListItem.js +2 -2
- package/dist/cjs/plugins/List/components/ToolbarListButton.js +1 -1
- package/dist/cjs/plugins/List/onKeyDownList.js +1 -1
- package/dist/cjs/plugins/Marks/Bold.js +1 -1
- package/dist/cjs/plugins/Marks/Code.js +1 -1
- package/dist/cjs/plugins/Marks/Italic.js +1 -1
- package/dist/cjs/plugins/Marks/Strikethrough.js +1 -1
- package/dist/cjs/plugins/Marks/Subscript.js +3 -3
- package/dist/cjs/plugins/Marks/Superscript.js +3 -3
- package/dist/cjs/plugins/Marks/Underline.js +1 -1
- package/dist/cjs/plugins/Marks/components/MarkToolbarButton.js +2 -2
- package/dist/cjs/plugins/Marks/helpers.js +1 -1
- package/dist/cjs/plugins/Normalizer/withNormalizer.js +1 -1
- package/dist/cjs/plugins/Paragraph/Paragraph.js +2 -2
- package/dist/cjs/plugins/Paragraph/createParagraphPlugin.js +1 -1
- package/dist/cjs/plugins/Quote/components/Quote.js +2 -2
- package/dist/cjs/plugins/Quote/components/ToolbarQuoteButton.js +1 -1
- package/dist/cjs/plugins/Quote/toggleQuote.js +1 -1
- package/dist/cjs/plugins/Table/components/Cell.js +2 -2
- package/dist/cjs/plugins/Table/components/HeaderCell.js +2 -2
- package/dist/cjs/plugins/Table/components/Row.js +2 -2
- package/dist/cjs/plugins/Table/components/Table.js +2 -2
- package/dist/cjs/plugins/Table/components/TableActions.js +1 -1
- package/dist/cjs/plugins/Table/components/ToolbarButton.js +1 -1
- package/dist/cjs/plugins/Tracking/utils.js +2 -2
- package/dist/cjs/plugins/shared/EmbeddedBlockToolbarIcon.js +1 -1
- package/dist/cjs/plugins/shared/EmbeddedBlockUtil.js +1 -1
- package/dist/cjs/plugins/shared/EmbeddedInlineToolbarIcon.js +2 -2
- package/dist/cjs/plugins/shared/EmbeddedInlineUtil.js +1 -1
- package/dist/cjs/plugins/shared/FetchingWrappedAssetCard.js +2 -2
- package/dist/cjs/plugins/shared/FetchingWrappedEntryCard.js +2 -2
- package/dist/cjs/plugins/shared/FetchingWrappedResourceCard.js +2 -2
- package/dist/cjs/plugins/shared/LinkedBlockWrapper.js +1 -1
- package/dist/cjs/plugins/shared/LinkedInlineWrapper.js +2 -2
- package/dist/cjs/plugins/shared/ResourceNewBadge.js +1 -1
- package/dist/cjs/plugins/shared/ToolbarButton.js +2 -2
- package/dist/cjs/plugins/shared/__tests__/FetchingWrappedAssetCard.test.js +2 -2
- package/dist/cjs/plugins/shared/__tests__/FetchingWrappedEntryCard.test.js +3 -3
- package/dist/cjs/plugins/shared/__tests__/FetchingWrappedResourceCard.test.js +4 -4
- package/dist/esm/Toolbar/index.js +2 -2
- package/dist/esm/dialogs/HypelinkDialog/HyperlinkDialog.js +3 -6
- package/dist/esm/plugins/Marks/Subscript.js +2 -2
- package/dist/esm/plugins/Marks/Superscript.js +2 -2
- package/dist/esm/plugins/Marks/index.js +2 -2
- package/dist/esm/test-utils/jsx.js +1 -1
- package/package.json +4 -4
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "ToolbarButton", {
|
|
|
8
8
|
return ToolbarButton;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _react = _interop_require_wildcard(require("react"));
|
|
11
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
|
-
const _f36tokens = _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
|
+
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
14
14
|
const _emotion = require("emotion");
|
|
15
15
|
function _interop_require_default(obj) {
|
|
16
16
|
return obj && obj.__esModule ? obj : {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const _react = _interop_require_wildcard(require("react"));
|
|
5
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
6
6
|
const _fieldeditorreference = require("@contentful/field-editor-reference");
|
|
7
7
|
const _fieldeditortestutils = require("@contentful/field-editor-test-utils");
|
|
8
8
|
require("@testing-library/jest-dom/extend-expect");
|
|
9
9
|
const _react1 = require("@testing-library/react");
|
|
10
|
-
const _published_assetjson = _interop_require_default(require("../__fixtures__/published_asset.json"));
|
|
10
|
+
const _published_assetjson = /*#__PURE__*/ _interop_require_default(require("../__fixtures__/published_asset.json"));
|
|
11
11
|
const _FetchingWrappedAssetCard = require("../FetchingWrappedAssetCard");
|
|
12
12
|
function _interop_require_default(obj) {
|
|
13
13
|
return obj && obj.__esModule ? obj : {
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const _react = _interop_require_wildcard(require("react"));
|
|
5
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
6
6
|
const _fieldeditorreference = require("@contentful/field-editor-reference");
|
|
7
7
|
const _fieldeditortestutils = require("@contentful/field-editor-test-utils");
|
|
8
8
|
require("@testing-library/jest-dom/extend-expect");
|
|
9
9
|
const _react1 = require("@testing-library/react");
|
|
10
|
-
const _published_content_typejson = _interop_require_default(require("../__fixtures__/published_content_type.json"));
|
|
11
|
-
const _published_entryjson = _interop_require_default(require("../__fixtures__/published_entry.json"));
|
|
10
|
+
const _published_content_typejson = /*#__PURE__*/ _interop_require_default(require("../__fixtures__/published_content_type.json"));
|
|
11
|
+
const _published_entryjson = /*#__PURE__*/ _interop_require_default(require("../__fixtures__/published_entry.json"));
|
|
12
12
|
const _FetchingWrappedEntryCard = require("../FetchingWrappedEntryCard");
|
|
13
13
|
function _interop_require_default(obj) {
|
|
14
14
|
return obj && obj.__esModule ? obj : {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const _react = _interop_require_wildcard(require("react"));
|
|
5
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
6
6
|
require("@testing-library/jest-dom/extend-expect");
|
|
7
7
|
const _fieldeditorreference = require("@contentful/field-editor-reference");
|
|
8
8
|
const _fieldeditortestutils = require("@contentful/field-editor-test-utils");
|
|
9
9
|
const _react1 = require("@testing-library/react");
|
|
10
|
-
const _published_content_typejson = _interop_require_default(require("../__fixtures__/published_content_type.json"));
|
|
11
|
-
const _published_entryjson = _interop_require_default(require("../__fixtures__/published_entry.json"));
|
|
12
|
-
const _spacejson = _interop_require_default(require("../__fixtures__/space.json"));
|
|
10
|
+
const _published_content_typejson = /*#__PURE__*/ _interop_require_default(require("../__fixtures__/published_content_type.json"));
|
|
11
|
+
const _published_entryjson = /*#__PURE__*/ _interop_require_default(require("../__fixtures__/published_entry.json"));
|
|
12
|
+
const _spacejson = /*#__PURE__*/ _interop_require_default(require("../__fixtures__/space.json"));
|
|
13
13
|
const _FetchingWrappedResourceCard = require("../FetchingWrappedResourceCard");
|
|
14
14
|
function _interop_require_default(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : {
|
|
@@ -16,8 +16,8 @@ import { ToolbarBoldButton } from '../plugins/Marks/Bold';
|
|
|
16
16
|
import { ToolbarCodeButton, ToolbarDropdownCodeButton } from '../plugins/Marks/Code';
|
|
17
17
|
import { ToolbarItalicButton } from '../plugins/Marks/Italic';
|
|
18
18
|
import { ToolbarDropdownStrikethroughButton, ToolbarStrikethroughButton } from '../plugins/Marks/Strikethrough';
|
|
19
|
-
import { ToolbarDropdownSubscriptButton, ToolbarSubscriptButton } from
|
|
20
|
-
import { ToolbarDropdownSuperscriptButton, ToolbarSuperscriptButton } from
|
|
19
|
+
import { ToolbarDropdownSubscriptButton, ToolbarSubscriptButton } from "../plugins/Marks/Subscript";
|
|
20
|
+
import { ToolbarDropdownSuperscriptButton, ToolbarSuperscriptButton } from "../plugins/Marks/Superscript";
|
|
21
21
|
import { ToolbarUnderlineButton } from '../plugins/Marks/Underline';
|
|
22
22
|
import { ToolbarQuoteButton } from '../plugins/Quote';
|
|
23
23
|
import { ToolbarTableButton } from '../plugins/Table';
|
|
@@ -175,20 +175,17 @@ export class HyperlinkDialog extends (_React_Component = React.Component) {
|
|
|
175
175
|
}, "Select asset"));
|
|
176
176
|
}
|
|
177
177
|
constructor(props){
|
|
178
|
-
super(props)
|
|
179
|
-
_define_property(this, "handleSubmit", (event)=>{
|
|
178
|
+
super(props), _define_property(this, "handleSubmit", (event)=>{
|
|
180
179
|
event.preventDefault();
|
|
181
180
|
this.props.onClose(this.getValue());
|
|
182
|
-
})
|
|
183
|
-
_define_property(this, "selectEntry", async ()=>{
|
|
181
|
+
}), _define_property(this, "selectEntry", async ()=>{
|
|
184
182
|
const { locale, contentTypes } = this.props.entitySelectorConfigs.Entry;
|
|
185
183
|
const entry = await this.props.sdk.dialogs.selectSingleEntry({
|
|
186
184
|
locale,
|
|
187
185
|
contentTypes
|
|
188
186
|
});
|
|
189
187
|
this.setTargetEntity(LINK_TYPES.ENTRY, entry);
|
|
190
|
-
})
|
|
191
|
-
_define_property(this, "selectAsset", async ()=>{
|
|
188
|
+
}), _define_property(this, "selectAsset", async ()=>{
|
|
192
189
|
const { locale } = this.props.entitySelectorConfigs.Asset;
|
|
193
190
|
const asset = await this.props.sdk.dialogs.selectSingleAsset({
|
|
194
191
|
locale
|
|
@@ -12,14 +12,14 @@ const styles = {
|
|
|
12
12
|
})
|
|
13
13
|
};
|
|
14
14
|
export const ToolbarSubscriptButton = createMarkToolbarButton({
|
|
15
|
-
title:
|
|
15
|
+
title: "Subscript",
|
|
16
16
|
mark: MARKS.SUBSCRIPT,
|
|
17
17
|
icon: React.createElement(SubscriptIcon, {
|
|
18
18
|
viewBox: "0 0 23 18"
|
|
19
19
|
})
|
|
20
20
|
});
|
|
21
21
|
export const ToolbarDropdownSubscriptButton = createMarkToolbarButton({
|
|
22
|
-
title:
|
|
22
|
+
title: "Subscript",
|
|
23
23
|
mark: MARKS.SUBSCRIPT
|
|
24
24
|
});
|
|
25
25
|
export function Subscript(props) {
|
|
@@ -12,12 +12,12 @@ const styles = {
|
|
|
12
12
|
})
|
|
13
13
|
};
|
|
14
14
|
export const ToolbarSuperscriptButton = createMarkToolbarButton({
|
|
15
|
-
title:
|
|
15
|
+
title: "Superscript",
|
|
16
16
|
mark: MARKS.SUPERSCRIPT,
|
|
17
17
|
icon: React.createElement(SuperscriptIcon, null)
|
|
18
18
|
});
|
|
19
19
|
export const ToolbarDropdownSuperscriptButton = createMarkToolbarButton({
|
|
20
|
-
title:
|
|
20
|
+
title: "Superscript",
|
|
21
21
|
mark: MARKS.SUPERSCRIPT
|
|
22
22
|
});
|
|
23
23
|
export function Superscript(props) {
|
|
@@ -2,8 +2,8 @@ import { createBoldPlugin } from './Bold';
|
|
|
2
2
|
import { createCodePlugin } from './Code';
|
|
3
3
|
import { createItalicPlugin } from './Italic';
|
|
4
4
|
import { createStrikethroughPlugin } from './Strikethrough';
|
|
5
|
-
import { createSubscriptPlugin } from
|
|
6
|
-
import { createSuperscriptPlugin } from
|
|
5
|
+
import { createSubscriptPlugin } from "./Subscript";
|
|
6
|
+
import { createSuperscriptPlugin } from "./Superscript";
|
|
7
7
|
import { createUnderlinePlugin } from './Underline';
|
|
8
8
|
export const createMarksPlugin = ()=>({
|
|
9
9
|
key: 'Marks',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BLOCKS, INLINES } from '@contentful/rich-text-types';
|
|
2
2
|
import { createText } from '@udecode/plate-test-utils';
|
|
3
|
-
import { createHyperscript } from
|
|
3
|
+
import { createHyperscript } from "slate-hyperscript";
|
|
4
4
|
const voidChildren = [
|
|
5
5
|
{
|
|
6
6
|
text: ''
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.3",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@contentful/f36-icons": "^4.29.0",
|
|
45
45
|
"@contentful/f36-tokens": "^4.0.5",
|
|
46
46
|
"@contentful/f36-utils": "^4.24.3",
|
|
47
|
-
"@contentful/field-editor-reference": "^6.6.
|
|
48
|
-
"@contentful/field-editor-shared": "^2.4.
|
|
47
|
+
"@contentful/field-editor-reference": "^6.6.3",
|
|
48
|
+
"@contentful/field-editor-shared": "^2.4.1",
|
|
49
49
|
"@contentful/rich-text-plain-text-renderer": "^17.0.0",
|
|
50
50
|
"@contentful/rich-text-types": "^17.0.0",
|
|
51
51
|
"@popperjs/core": "^2.11.5",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"registry": "https://npm.pkg.github.com/"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "74c01134b9af5b36ed64b464712eab83d37639c9"
|
|
90
90
|
}
|