@contentful/field-editor-rich-text 4.11.2 → 4.12.0

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 (52) hide show
  1. package/dist/cjs/Toolbar/components/ButtonRedo.js +2 -1
  2. package/dist/cjs/Toolbar/components/ButtonUndo.js +2 -1
  3. package/dist/cjs/Toolbar/components/EmbeddedEntityDropdownButton.js +1 -1
  4. package/dist/cjs/Toolbar/index.js +1 -1
  5. package/dist/cjs/dialogs/HypelinkDialog/HyperlinkDialog.js +10 -11
  6. package/dist/cjs/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +7 -3
  7. package/dist/cjs/plugins/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +3 -1
  8. package/dist/cjs/plugins/Heading/components/ToolbarHeadingButton.js +1 -1
  9. package/dist/cjs/plugins/Hr/index.js +1 -1
  10. package/dist/cjs/plugins/Hyperlink/components/LinkPopover.js +2 -2
  11. package/dist/cjs/plugins/Hyperlink/components/ToolbarHyperlinkButton.js +1 -1
  12. package/dist/cjs/plugins/List/components/ToolbarListButton.js +2 -2
  13. package/dist/cjs/plugins/Marks/Bold.js +1 -1
  14. package/dist/cjs/plugins/Marks/Code.js +1 -1
  15. package/dist/cjs/plugins/Marks/Italic.js +1 -1
  16. package/dist/cjs/plugins/Marks/Subscript.js +1 -1
  17. package/dist/cjs/plugins/Marks/Superscript.js +1 -1
  18. package/dist/cjs/plugins/Marks/Underline.js +1 -1
  19. package/dist/cjs/plugins/Marks/components/MarkToolbarButton.js +2 -2
  20. package/dist/cjs/plugins/Quote/components/ToolbarQuoteButton.js +1 -1
  21. package/dist/cjs/plugins/Table/components/TableActions.js +1 -1
  22. package/dist/cjs/plugins/shared/EmbeddedBlockToolbarIcon.js +10 -4
  23. package/dist/cjs/plugins/shared/EmbeddedInlineToolbarIcon.js +4 -4
  24. package/dist/cjs/plugins/shared/FetchingWrappedAssetCard.js +22 -2
  25. package/dist/cjs/plugins/shared/FetchingWrappedEntryCard.js +4 -3
  26. package/dist/esm/Toolbar/components/ButtonRedo.js +2 -1
  27. package/dist/esm/Toolbar/components/ButtonUndo.js +2 -1
  28. package/dist/esm/Toolbar/components/EmbeddedEntityDropdownButton.js +2 -2
  29. package/dist/esm/Toolbar/index.js +2 -2
  30. package/dist/esm/dialogs/HypelinkDialog/HyperlinkDialog.js +10 -11
  31. package/dist/esm/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +8 -4
  32. package/dist/esm/plugins/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +4 -2
  33. package/dist/esm/plugins/Heading/components/ToolbarHeadingButton.js +2 -2
  34. package/dist/esm/plugins/Hr/index.js +2 -2
  35. package/dist/esm/plugins/Hyperlink/components/LinkPopover.js +3 -3
  36. package/dist/esm/plugins/Hyperlink/components/ToolbarHyperlinkButton.js +2 -2
  37. package/dist/esm/plugins/List/components/ToolbarListButton.js +3 -3
  38. package/dist/esm/plugins/Marks/Bold.js +2 -2
  39. package/dist/esm/plugins/Marks/Code.js +2 -2
  40. package/dist/esm/plugins/Marks/Italic.js +2 -2
  41. package/dist/esm/plugins/Marks/Subscript.js +2 -2
  42. package/dist/esm/plugins/Marks/Superscript.js +2 -2
  43. package/dist/esm/plugins/Marks/Underline.js +2 -2
  44. package/dist/esm/plugins/Marks/components/MarkToolbarButton.js +2 -2
  45. package/dist/esm/plugins/Quote/components/ToolbarQuoteButton.js +2 -2
  46. package/dist/esm/plugins/Table/components/TableActions.js +2 -2
  47. package/dist/esm/plugins/shared/EmbeddedBlockToolbarIcon.js +8 -6
  48. package/dist/esm/plugins/shared/EmbeddedInlineToolbarIcon.js +5 -5
  49. package/dist/esm/plugins/shared/FetchingWrappedAssetCard.js +23 -3
  50. package/dist/esm/plugins/shared/FetchingWrappedEntryCard.js +5 -4
  51. package/dist/types/dialogs/HypelinkDialog/HyperlinkDialog.d.ts +0 -4
  52. package/package.json +8 -8
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "ButtonRedo", {
10
10
  });
11
11
  const _react = /*#__PURE__*/ _interop_require_default(require("react"));
12
12
  const _f36components = require("@contentful/f36-components");
13
+ const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
13
14
  const _ContentfulEditorProvider = require("../../ContentfulEditorProvider");
14
15
  const _ToolbarButton = require("../../plugins/shared/ToolbarButton");
15
16
  function _interop_require_default(obj) {
@@ -29,7 +30,7 @@ const ButtonRedo = ()=>{
29
30
  isActive: false,
30
31
  isDisabled: editor.history.redos.length === 0
31
32
  }, /*#__PURE__*/ _react.default.createElement(_f36components.Icon, {
32
- variant: "secondary"
33
+ color: _f36tokens.default.gray900
33
34
  }, /*#__PURE__*/ _react.default.createElement("path", {
34
35
  d: "M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z"
35
36
  })));
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "ButtonUndo", {
10
10
  });
11
11
  const _react = /*#__PURE__*/ _interop_require_default(require("react"));
12
12
  const _f36components = require("@contentful/f36-components");
13
+ const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
13
14
  const _ContentfulEditorProvider = require("../../ContentfulEditorProvider");
14
15
  const _ToolbarButton = require("../../plugins/shared/ToolbarButton");
15
16
  function _interop_require_default(obj) {
@@ -29,7 +30,7 @@ const ButtonUndo = ()=>{
29
30
  isActive: false,
30
31
  isDisabled: editor.history.undos.length === 0
31
32
  }, /*#__PURE__*/ _react.default.createElement(_f36components.Icon, {
32
- variant: "secondary"
33
+ color: _f36tokens.default.gray900
33
34
  }, /*#__PURE__*/ _react.default.createElement("path", {
34
35
  d: "M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z"
35
36
  })));
@@ -59,7 +59,7 @@ function EmbeddedEntityDropdownButton({ children, isDisabled, isOpen, onClose, o
59
59
  onClose: onClose,
60
60
  onOpen: onToggle
61
61
  }, /*#__PURE__*/ _react.createElement(_f36components.Menu.Trigger, null, /*#__PURE__*/ _react.createElement(_f36components.Button, {
62
- endIcon: /*#__PURE__*/ _react.createElement(_f36icons.ChevronDownIcon, null),
62
+ endIcon: /*#__PURE__*/ _react.createElement(_f36icons.CaretDownIcon, null),
63
63
  testId: "toolbar-entity-dropdown-toggle",
64
64
  variant: "secondary",
65
65
  size: "small",
@@ -138,7 +138,7 @@ const Dropdown = ({ sdk, isDisabled })=>{
138
138
  size: "small",
139
139
  className: styles.toolbarBtn,
140
140
  variant: isActive ? 'secondary' : 'transparent',
141
- icon: /*#__PURE__*/ _react.createElement(_f36icons.MoreHorizontalIcon, null),
141
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.DotsThreeIcon, null),
142
142
  "aria-label": "toggle menu",
143
143
  isDisabled: isDisabled,
144
144
  testId: "dropdown-toolbar-button"
@@ -139,7 +139,16 @@ class HyperlinkDialog extends (_React_Component = _react.Component) {
139
139
  return type === LINK_TYPES.URI && uri || target;
140
140
  }
141
141
  render() {
142
- const { labels } = this.props;
142
+ const labels = this.props.labels || {
143
+ title: _core.i18n._({
144
+ id: "FieldEditors.RichText.HyperlinkDialog.DefaultTitle",
145
+ message: "Insert link"
146
+ }),
147
+ confirm: _core.i18n._({
148
+ id: "FieldEditors.RichText.HyperlinkDialog.DefaultConfirm",
149
+ message: "Insert link"
150
+ })
151
+ };
143
152
  return /*#__PURE__*/ _react.createElement(_fieldeditorreference.EntityProvider, {
144
153
  sdk: this.props.sdk
145
154
  }, /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(_f36components.ModalContent, null, this.renderFields()), /*#__PURE__*/ _react.createElement(_f36components.ModalControls, null, /*#__PURE__*/ _react.createElement(_f36components.Button, {
@@ -345,16 +354,6 @@ _define_property(HyperlinkDialog, "propTypes", {
345
354
  onClose: _proptypes.default.func.isRequired
346
355
  });
347
356
  _define_property(HyperlinkDialog, "defaultProps", {
348
- labels: {
349
- title: _core.i18n._({
350
- id: "FieldEditors.RichText.HyperlinkDialog.DefaultTitle",
351
- message: "Insert link"
352
- }),
353
- confirm: _core.i18n._({
354
- id: "FieldEditors.RichText.HyperlinkDialog.DefaultConfirm",
355
- message: "Insert link"
356
- })
357
- },
358
357
  value: {},
359
358
  hideText: false,
360
359
  entitySelectorConfigs: {},
@@ -107,14 +107,16 @@ function InternalFetchingWrappedInlineEntryCard({ entry, allContentTypes, locale
107
107
  disabled: isDisabled,
108
108
  testId: "delete"
109
109
  }, "Remove")
110
- ]
110
+ ].map((item, i)=>/*#__PURE__*/ _react.createElement(_f36components.Menu, {
111
+ key: i
112
+ }, item))
111
113
  }, /*#__PURE__*/ _react.createElement(_fieldeditorreference.ScheduledIconWithTooltip, {
112
114
  getEntityScheduledActions: getEntityScheduledActions,
113
115
  entityType: "Entry",
114
116
  entityId: entry.sys.id
115
117
  }, /*#__PURE__*/ _react.createElement(_f36icons.ClockIcon, {
116
118
  className: styles.scheduledIcon,
117
- variant: "muted",
119
+ color: _f36tokens.default.gray600,
118
120
  testId: "scheduled-icon"
119
121
  })), /*#__PURE__*/ _react.createElement(_f36components.Text, null, title));
120
122
  }
@@ -155,7 +157,9 @@ function FetchingWrappedInlineEntryCard(props) {
155
157
  onClick: props.onRemove,
156
158
  testId: "delete"
157
159
  }, "Remove")
158
- ]
160
+ ].map((item, i)=>/*#__PURE__*/ _react.createElement(_f36components.Menu, {
161
+ key: i
162
+ }, item))
159
163
  });
160
164
  }
161
165
  return /*#__PURE__*/ _react.createElement(InternalFetchingWrappedInlineEntryCard, {
@@ -103,6 +103,8 @@ function FetchingWrappedResourceInlineCard(props) {
103
103
  disabled: props.isDisabled,
104
104
  testId: "delete"
105
105
  }, "Remove")
106
- ]
106
+ ].map((item, i)=>/*#__PURE__*/ _react.createElement(_f36components.Menu, {
107
+ key: i
108
+ }, item))
107
109
  }, /*#__PURE__*/ _react.createElement(_f36components.Text, null, title));
108
110
  }
@@ -173,7 +173,7 @@ function ToolbarHeadingButton(props) {
173
173
  size: "small",
174
174
  testId: "toolbar-heading-toggle",
175
175
  variant: "transparent",
176
- endIcon: /*#__PURE__*/ _react.createElement(_f36icons.ChevronDownIcon, null),
176
+ endIcon: /*#__PURE__*/ _react.createElement(_f36icons.CaretDownIcon, null),
177
177
  isDisabled: props.isDisabled,
178
178
  onClick: ()=>someHeadingsEnabled && setOpen(!isOpen),
179
179
  className: styles.button
@@ -152,7 +152,7 @@ function ToolbarHrButton(props) {
152
152
  onClick: handleOnClick,
153
153
  testId: "hr-toolbar-button",
154
154
  isActive: (0, _editor.isBlockSelected)(editor, _richtexttypes.BLOCKS.HR)
155
- }, /*#__PURE__*/ _react.createElement(_f36icons.HorizontalRuleIcon, null));
155
+ }, /*#__PURE__*/ _react.createElement(_f36icons.MinusIcon, null));
156
156
  }
157
157
  function Hr(props) {
158
158
  const isSelected = _slatereact.useSelected();
@@ -94,7 +94,7 @@ const LinkPopover = ({ isLinkFocused, popoverText, handleEditLink, handleRemoveL
94
94
  size: "small",
95
95
  variant: "transparent",
96
96
  "aria-label": "Copy link",
97
- icon: /*#__PURE__*/ _react.createElement(_f36icons.CopyIcon, {
97
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.CopySimpleIcon, {
98
98
  size: "tiny"
99
99
  })
100
100
  })), /*#__PURE__*/ _react.createElement(_f36components.Tooltip, {
@@ -107,7 +107,7 @@ const LinkPopover = ({ isLinkFocused, popoverText, handleEditLink, handleRemoveL
107
107
  size: "small",
108
108
  variant: "transparent",
109
109
  "aria-label": "Edit link",
110
- icon: /*#__PURE__*/ _react.createElement(_f36icons.EditIcon, {
110
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.PencilSimpleIcon, {
111
111
  size: "tiny"
112
112
  })
113
113
  })), /*#__PURE__*/ _react.createElement(_f36components.Tooltip, {
@@ -76,5 +76,5 @@ function ToolbarHyperlinkButton(props) {
76
76
  onClick: handleClick,
77
77
  isActive: isActive,
78
78
  isDisabled: props.isDisabled
79
- }, /*#__PURE__*/ _react.createElement(_f36icons.LinkIcon, null));
79
+ }, /*#__PURE__*/ _react.createElement(_f36icons.LinkSimpleIcon, null));
80
80
  }
@@ -78,11 +78,11 @@ function ToolbarListButton(props) {
78
78
  onClick: handleClick(_richtexttypes.BLOCKS.UL_LIST),
79
79
  isActive: (0, _utils.isListTypeActive)(editor, _richtexttypes.BLOCKS.UL_LIST),
80
80
  isDisabled: props.isDisabled
81
- }, /*#__PURE__*/ _react.createElement(_f36icons.ListBulletedIcon, null)), (0, _validations.isNodeTypeEnabled)(sdk.field, _richtexttypes.BLOCKS.OL_LIST) && /*#__PURE__*/ _react.createElement(_ToolbarButton.ToolbarButton, {
81
+ }, /*#__PURE__*/ _react.createElement(_f36icons.ListBulletsIcon, null)), (0, _validations.isNodeTypeEnabled)(sdk.field, _richtexttypes.BLOCKS.OL_LIST) && /*#__PURE__*/ _react.createElement(_ToolbarButton.ToolbarButton, {
82
82
  title: "OL",
83
83
  testId: "ol-toolbar-button",
84
84
  onClick: handleClick(_richtexttypes.BLOCKS.OL_LIST),
85
85
  isActive: (0, _utils.isListTypeActive)(editor, _richtexttypes.BLOCKS.OL_LIST),
86
86
  isDisabled: props.isDisabled
87
- }, /*#__PURE__*/ _react.createElement(_f36icons.ListNumberedIcon, null)));
87
+ }, /*#__PURE__*/ _react.createElement(_f36icons.ListNumbersIcon, null)));
88
88
  }
@@ -71,7 +71,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
71
71
  const ToolbarBoldButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
72
72
  title: 'Bold',
73
73
  mark: _richtexttypes.MARKS.BOLD,
74
- icon: /*#__PURE__*/ _react.createElement(_f36icons.FormatBoldIcon, null)
74
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.TextBIcon, null)
75
75
  });
76
76
  const styles = {
77
77
  bold: (0, _emotion.css)({
@@ -73,7 +73,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
73
73
  const ToolbarCodeButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
74
74
  title: 'Code',
75
75
  mark: _richtexttypes.MARKS.CODE,
76
- icon: /*#__PURE__*/ _react.createElement(_f36icons.CodeIcon, null)
76
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.CodeSimpleIcon, null)
77
77
  });
78
78
  const ToolbarDropdownCodeButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
79
79
  title: 'Code',
@@ -71,7 +71,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
71
71
  const ToolbarItalicButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
72
72
  title: 'Italic',
73
73
  mark: _richtexttypes.MARKS.ITALIC,
74
- icon: /*#__PURE__*/ _react.createElement(_f36icons.FormatItalicIcon, null)
74
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.TextItalicIcon, null)
75
75
  });
76
76
  const styles = {
77
77
  italic: (0, _emotion.css)({
@@ -79,7 +79,7 @@ const styles = {
79
79
  const ToolbarSubscriptButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
80
80
  title: 'Subscript',
81
81
  mark: _richtexttypes.MARKS.SUBSCRIPT,
82
- icon: /*#__PURE__*/ _react.createElement(_f36icons.SubscriptIcon, {
82
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.TextSubscriptIcon, {
83
83
  viewBox: "0 0 23 18"
84
84
  })
85
85
  });
@@ -79,7 +79,7 @@ const styles = {
79
79
  const ToolbarSuperscriptButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
80
80
  title: 'Superscript',
81
81
  mark: _richtexttypes.MARKS.SUPERSCRIPT,
82
- icon: /*#__PURE__*/ _react.createElement(_f36icons.SuperscriptIcon, null)
82
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.TextSuperscriptIcon, null)
83
83
  });
84
84
  const ToolbarDropdownSuperscriptButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
85
85
  title: 'Superscript',
@@ -70,7 +70,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
70
70
  const ToolbarUnderlineButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
71
71
  title: 'Underline',
72
72
  mark: _richtexttypes.MARKS.UNDERLINE,
73
- icon: /*#__PURE__*/ _react.createElement(_f36icons.FormatUnderlinedIcon, null)
73
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.TextUnderlineIcon, null)
74
74
  });
75
75
  function Underline(props) {
76
76
  return /*#__PURE__*/ _react.createElement("u", props.attributes, props.children);
@@ -85,14 +85,14 @@ const createMarkToolbarButton = ({ mark, title, icon })=>{
85
85
  ]);
86
86
  if (!editor) return null;
87
87
  if (!icon) {
88
- return /*#__PURE__*/ _react.createElement(_f36components.Menu.Item, {
88
+ return /*#__PURE__*/ _react.createElement(_f36components.Menu, null, /*#__PURE__*/ _react.createElement(_f36components.Menu.Item, {
89
89
  onClick: handleClick,
90
90
  disabled: isDisabled,
91
91
  className: (0, _emotion.cx)({
92
92
  [styles.isActive]: (0, _queries.isMarkActive)(editor, mark)
93
93
  }),
94
94
  testId: `${mark}-toolbar-button`
95
- }, title);
95
+ }, title));
96
96
  }
97
97
  return /*#__PURE__*/ _react.createElement(_ToolbarButton.ToolbarButton, {
98
98
  title: title,
@@ -70,5 +70,5 @@ function ToolbarQuoteButton(props) {
70
70
  testId: "quote-toolbar-button",
71
71
  isDisabled: props.isDisabled,
72
72
  isActive: (0, _editor.isBlockSelected)(editor, _richtexttypes.BLOCKS.QUOTE)
73
- }, /*#__PURE__*/ _react.createElement(_f36icons.QuoteIcon, null));
73
+ }, /*#__PURE__*/ _react.createElement(_f36icons.QuotesIcon, null));
74
74
  }
@@ -153,7 +153,7 @@ const TableActions = ()=>{
153
153
  variant: "transparent",
154
154
  tabIndex: -1,
155
155
  className: styles.topRight,
156
- icon: /*#__PURE__*/ _react.createElement(_f36icons.ChevronDownIcon, null),
156
+ icon: /*#__PURE__*/ _react.createElement(_f36icons.CaretDownIcon, null),
157
157
  "aria-label": "Open table menu",
158
158
  testId: "cf-table-actions-button"
159
159
  })), /*#__PURE__*/ _react.createElement(_f36components.Menu.List, null, /*#__PURE__*/ _react.createElement(_f36components.Menu.Item, {
@@ -19,12 +19,18 @@ _export(exports, {
19
19
  const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
20
20
  const _f36components = require("@contentful/f36-components");
21
21
  const _f36icons = require("@contentful/f36-icons");
22
+ const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
22
23
  const _richtexttypes = require("@contentful/rich-text-types");
23
24
  const _emotion = require("emotion");
24
25
  const _ContentfulEditorProvider = require("../../ContentfulEditorProvider");
25
26
  const _SdkProvider = require("../../SdkProvider");
26
27
  const _EmbeddedBlockUtil = require("../shared/EmbeddedBlockUtil");
27
28
  const _ResourceNewBadge = require("./ResourceNewBadge");
29
+ function _interop_require_default(obj) {
30
+ return obj && obj.__esModule ? obj : {
31
+ default: obj
32
+ };
33
+ }
28
34
  function _getRequireWildcardCache(nodeInterop) {
29
35
  if (typeof WeakMap !== "function") return null;
30
36
  var cacheBabelInterop = new WeakMap();
@@ -88,7 +94,7 @@ function EmbeddedBlockToolbarIcon({ isDisabled, nodeType, onClose }) {
88
94
  };
89
95
  const type = getEntityTypeFromNodeType(nodeType);
90
96
  const baseClass = `rich-text__${nodeType}`;
91
- return /*#__PURE__*/ _react.createElement(_f36components.Menu.Item, {
97
+ return /*#__PURE__*/ _react.createElement(_f36components.Menu, null, /*#__PURE__*/ _react.createElement(_f36components.Menu.Item, {
92
98
  disabled: isDisabled,
93
99
  className: `${baseClass}-list-item`,
94
100
  onClick: handleClick,
@@ -97,10 +103,10 @@ function EmbeddedBlockToolbarIcon({ isDisabled, nodeType, onClose }) {
97
103
  alignItems: "center",
98
104
  flexDirection: "row"
99
105
  }, /*#__PURE__*/ _react.createElement(_f36components.Icon, {
100
- as: type === 'Asset' ? _f36icons.AssetIcon : _f36icons.EmbeddedEntryBlockIcon,
106
+ as: type === 'Asset' ? _f36icons.ImageSquareIcon : _f36icons.EmbeddedBlockIcon,
101
107
  className: `rich-text__embedded-entry-list-icon ${styles.icon}`,
102
- variant: "secondary"
103
- }), /*#__PURE__*/ _react.createElement("span", null, type, nodeType == _richtexttypes.BLOCKS.EMBEDDED_RESOURCE && /*#__PURE__*/ _react.createElement(_ResourceNewBadge.ResourceNewBadge, null))));
108
+ color: _f36tokens.default.gray900
109
+ }), /*#__PURE__*/ _react.createElement("span", null, type, nodeType == _richtexttypes.BLOCKS.EMBEDDED_RESOURCE && /*#__PURE__*/ _react.createElement(_ResourceNewBadge.ResourceNewBadge, null)))));
104
110
  }
105
111
  function getEntityTypeFromNodeType(nodeType) {
106
112
  const words = nodeType.toLowerCase().split('-');
@@ -92,7 +92,7 @@ function EmbeddedInlineToolbarIcon({ onClose, nodeType, isDisabled }) {
92
92
  }
93
93
  (0, _editor.moveToTheNextChar)(editor);
94
94
  }
95
- return /*#__PURE__*/ _react.createElement(_f36components.Menu.Item, {
95
+ return /*#__PURE__*/ _react.createElement(_f36components.Menu, null, /*#__PURE__*/ _react.createElement(_f36components.Menu.Item, {
96
96
  disabled: isDisabled,
97
97
  className: "rich-text__entry-link-block-button",
98
98
  testId: `toolbar-toggle-${nodeType}`,
@@ -100,8 +100,8 @@ function EmbeddedInlineToolbarIcon({ onClose, nodeType, isDisabled }) {
100
100
  }, /*#__PURE__*/ _react.createElement(_f36components.Flex, {
101
101
  alignItems: "center",
102
102
  flexDirection: "row"
103
- }, /*#__PURE__*/ _react.createElement(_f36icons.EmbeddedEntryInlineIcon, {
104
- variant: "secondary",
103
+ }, /*#__PURE__*/ _react.createElement(_f36icons.EmbeddedLineIcon, {
104
+ color: _f36tokens.default.gray900,
105
105
  className: `rich-text__embedded-entry-list-icon ${styles.icon}`
106
- }), /*#__PURE__*/ _react.createElement("span", null, "Inline entry", nodeType == _richtexttypes.INLINES.EMBEDDED_RESOURCE && /*#__PURE__*/ _react.createElement(_ResourceNewBadge.ResourceNewBadge, null))));
106
+ }), /*#__PURE__*/ _react.createElement("span", null, "Inline entry", nodeType == _richtexttypes.INLINES.EMBEDDED_RESOURCE && /*#__PURE__*/ _react.createElement(_ResourceNewBadge.ResourceNewBadge, null)))));
107
107
  }
@@ -60,6 +60,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
60
60
  return newObj;
61
61
  }
62
62
  const InternalAssetCard = /*#__PURE__*/ _react.memo((props)=>{
63
+ const { releaseLocalesStatusMap, isActiveReleaseLoading, activeRelease, releaseAction } = props;
63
64
  const activeLocales = (0, _fieldeditorshared.useActiveLocales)(props.sdk);
64
65
  return /*#__PURE__*/ _react.createElement(_fieldeditorreference.WrappedAssetCard, {
65
66
  getEntityScheduledActions: props.loadEntityScheduledActions,
@@ -78,7 +79,11 @@ const InternalAssetCard = /*#__PURE__*/ _react.memo((props)=>{
78
79
  renderDragHandle: !props.isDisabled ? (dragHandleProps)=>/*#__PURE__*/ _react.createElement(_f36components.DragHandle, {
79
80
  label: "drag embedded asset",
80
81
  ...dragHandleProps
81
- }) : undefined
82
+ }) : undefined,
83
+ releaseLocalesStatusMap: releaseLocalesStatusMap,
84
+ isReleasesLoading: isActiveReleaseLoading,
85
+ activeRelease: activeRelease,
86
+ releaseAction: releaseAction
82
87
  });
83
88
  }, _fastdeepequal.default);
84
89
  InternalAssetCard.displayName = 'InternalAssetCard';
@@ -91,6 +96,17 @@ function FetchingWrappedAssetCard(props) {
91
96
  props.assetId
92
97
  ]);
93
98
  const localesStatusMap = (0, _fieldeditorshared.useLocalePublishStatus)(asset, props.sdk.locales);
99
+ const { releaseVersionMap, locales, activeRelease, releases, isActiveReleaseLoading } = (0, _fieldeditorshared.parseReleaseParams)(props.sdk.parameters.instance.release);
100
+ const { releaseLocalesStatusMap } = (0, _fieldeditorshared.useActiveReleaseLocalesStatuses)({
101
+ currentEntityDraft: asset,
102
+ entityId: props.assetId,
103
+ entityType: 'Asset',
104
+ releaseVersionMap,
105
+ locales,
106
+ activeRelease,
107
+ releases
108
+ });
109
+ const { releaseAction } = (0, _fieldeditorshared.getEntityReleaseStatus)(props.assetId, locales, activeRelease);
94
110
  _react.useEffect(()=>{
95
111
  if (status === 'success') {
96
112
  onEntityFetchComplete?.();
@@ -121,6 +137,10 @@ function FetchingWrappedAssetCard(props) {
121
137
  locale: props.locale,
122
138
  onEdit: props.onEdit,
123
139
  onRemove: props.onRemove,
124
- localesStatusMap: localesStatusMap
140
+ localesStatusMap: localesStatusMap,
141
+ releaseLocalesStatusMap: releaseLocalesStatusMap,
142
+ isActiveReleaseLoading: isActiveReleaseLoading,
143
+ activeRelease: activeRelease,
144
+ releaseAction: releaseAction
125
145
  });
126
146
  }
@@ -101,14 +101,15 @@ const FetchingWrappedEntryCard = (props)=>{
101
101
  const localesStatusMap = (0, _fieldeditorshared.useLocalePublishStatus)(entry, props.sdk.locales);
102
102
  const { releaseVersionMap, locales, activeRelease, releases, isActiveReleaseLoading } = (0, _fieldeditorshared.parseReleaseParams)(props.sdk.parameters.instance.release);
103
103
  const { releaseLocalesStatusMap } = (0, _fieldeditorshared.useActiveReleaseLocalesStatuses)({
104
- currentEntryDraft: entry,
105
- entryId: props.entryId,
104
+ currentEntityDraft: entry,
105
+ entityId: props.entryId,
106
+ entityType: 'Entry',
106
107
  releaseVersionMap,
107
108
  locales,
108
109
  activeRelease,
109
110
  releases
110
111
  });
111
- const { releaseAction } = (0, _fieldeditorshared.getEntryReleaseStatus)(props.entryId, locales, activeRelease);
112
+ const { releaseAction } = (0, _fieldeditorshared.getEntityReleaseStatus)(props.entryId, locales, activeRelease);
112
113
  _react.useEffect(()=>{
113
114
  if (status === 'success') {
114
115
  onEntityFetchComplete?.();
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Icon } from '@contentful/f36-components';
3
+ import tokens from '@contentful/f36-tokens';
3
4
  import { useContentfulEditor } from '../../ContentfulEditorProvider';
4
5
  import { ToolbarButton } from '../../plugins/shared/ToolbarButton';
5
6
  export const ButtonRedo = ()=>{
@@ -14,7 +15,7 @@ export const ButtonRedo = ()=>{
14
15
  isActive: false,
15
16
  isDisabled: editor.history.redos.length === 0
16
17
  }, /*#__PURE__*/ React.createElement(Icon, {
17
- variant: "secondary"
18
+ color: tokens.gray900
18
19
  }, /*#__PURE__*/ React.createElement("path", {
19
20
  d: "M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z"
20
21
  })));
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Icon } from '@contentful/f36-components';
3
+ import tokens from '@contentful/f36-tokens';
3
4
  import { useContentfulEditor } from '../../ContentfulEditorProvider';
4
5
  import { ToolbarButton } from '../../plugins/shared/ToolbarButton';
5
6
  export const ButtonUndo = ()=>{
@@ -14,7 +15,7 @@ export const ButtonUndo = ()=>{
14
15
  isActive: false,
15
16
  isDisabled: editor.history.undos.length === 0
16
17
  }, /*#__PURE__*/ React.createElement(Icon, {
17
- variant: "secondary"
18
+ color: tokens.gray900
18
19
  }, /*#__PURE__*/ React.createElement("path", {
19
20
  d: "M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z"
20
21
  })));
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Button, Menu } from '@contentful/f36-components';
3
- import { PlusIcon, ChevronDownIcon } from '@contentful/f36-icons';
3
+ import { CaretDownIcon, PlusIcon } from '@contentful/f36-icons';
4
4
  export function EmbeddedEntityDropdownButton({ children, isDisabled, isOpen, onClose, onToggle }) {
5
5
  return /*#__PURE__*/ React.createElement(Menu, {
6
6
  placement: "bottom-end",
@@ -8,7 +8,7 @@ export function EmbeddedEntityDropdownButton({ children, isDisabled, isOpen, onC
8
8
  onClose: onClose,
9
9
  onOpen: onToggle
10
10
  }, /*#__PURE__*/ React.createElement(Menu.Trigger, null, /*#__PURE__*/ React.createElement(Button, {
11
- endIcon: /*#__PURE__*/ React.createElement(ChevronDownIcon, null),
11
+ endIcon: /*#__PURE__*/ React.createElement(CaretDownIcon, null),
12
12
  testId: "toolbar-entity-dropdown-toggle",
13
13
  variant: "secondary",
14
14
  size: "small",
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Flex, IconButton, Menu } from '@contentful/f36-components';
3
- import { MoreHorizontalIcon } from '@contentful/f36-icons';
3
+ import { DotsThreeIcon } from '@contentful/f36-icons';
4
4
  import tokens from '@contentful/f36-tokens';
5
5
  import { BLOCKS, INLINES, MARKS } from '@contentful/rich-text-types';
6
6
  import { css } from 'emotion';
@@ -82,7 +82,7 @@ const Dropdown = ({ sdk, isDisabled })=>{
82
82
  size: "small",
83
83
  className: styles.toolbarBtn,
84
84
  variant: isActive ? 'secondary' : 'transparent',
85
- icon: /*#__PURE__*/ React.createElement(MoreHorizontalIcon, null),
85
+ icon: /*#__PURE__*/ React.createElement(DotsThreeIcon, null),
86
86
  "aria-label": "toggle menu",
87
87
  isDisabled: isDisabled,
88
88
  testId: "dropdown-toolbar-button"
@@ -72,7 +72,16 @@ export class HyperlinkDialog extends (_React_Component = React.Component) {
72
72
  return type === LINK_TYPES.URI && uri || target;
73
73
  }
74
74
  render() {
75
- const { labels } = this.props;
75
+ const labels = this.props.labels || {
76
+ title: $_i18n._({
77
+ id: "FieldEditors.RichText.HyperlinkDialog.DefaultTitle",
78
+ message: "Insert link"
79
+ }),
80
+ confirm: $_i18n._({
81
+ id: "FieldEditors.RichText.HyperlinkDialog.DefaultConfirm",
82
+ message: "Insert link"
83
+ })
84
+ };
76
85
  return /*#__PURE__*/ React.createElement(EntityProvider, {
77
86
  sdk: this.props.sdk
78
87
  }, /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(ModalContent, null, this.renderFields()), /*#__PURE__*/ React.createElement(ModalControls, null, /*#__PURE__*/ React.createElement(Button, {
@@ -278,16 +287,6 @@ _define_property(HyperlinkDialog, "propTypes", {
278
287
  onClose: PropTypes.func.isRequired
279
288
  });
280
289
  _define_property(HyperlinkDialog, "defaultProps", {
281
- labels: {
282
- title: $_i18n._({
283
- id: "FieldEditors.RichText.HyperlinkDialog.DefaultTitle",
284
- message: "Insert link"
285
- }),
286
- confirm: $_i18n._({
287
- id: "FieldEditors.RichText.HyperlinkDialog.DefaultConfirm",
288
- message: "Insert link"
289
- })
290
- },
291
290
  value: {},
292
291
  hideText: false,
293
292
  entitySelectorConfigs: {},
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { InlineEntryCard, MenuItem, Text } from '@contentful/f36-components';
2
+ import { InlineEntryCard, Menu, MenuItem, Text } from '@contentful/f36-components';
3
3
  import { ClockIcon } from '@contentful/f36-icons';
4
4
  import tokens from '@contentful/f36-tokens';
5
5
  import { ScheduledIconWithTooltip, useEntity, useEntityLoader } from '@contentful/field-editor-reference';
@@ -51,14 +51,16 @@ function InternalFetchingWrappedInlineEntryCard({ entry, allContentTypes, locale
51
51
  disabled: isDisabled,
52
52
  testId: "delete"
53
53
  }, "Remove")
54
- ]
54
+ ].map((item, i)=>/*#__PURE__*/ React.createElement(Menu, {
55
+ key: i
56
+ }, item))
55
57
  }, /*#__PURE__*/ React.createElement(ScheduledIconWithTooltip, {
56
58
  getEntityScheduledActions: getEntityScheduledActions,
57
59
  entityType: "Entry",
58
60
  entityId: entry.sys.id
59
61
  }, /*#__PURE__*/ React.createElement(ClockIcon, {
60
62
  className: styles.scheduledIcon,
61
- variant: "muted",
63
+ color: tokens.gray600,
62
64
  testId: "scheduled-icon"
63
65
  })), /*#__PURE__*/ React.createElement(Text, null, title));
64
66
  }
@@ -99,7 +101,9 @@ export function FetchingWrappedInlineEntryCard(props) {
99
101
  onClick: props.onRemove,
100
102
  testId: "delete"
101
103
  }, "Remove")
102
- ]
104
+ ].map((item, i)=>/*#__PURE__*/ React.createElement(Menu, {
105
+ key: i
106
+ }, item))
103
107
  });
104
108
  }
105
109
  return /*#__PURE__*/ React.createElement(InternalFetchingWrappedInlineEntryCard, {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { InlineEntryCard, MenuItem, Text } from '@contentful/f36-components';
2
+ import { InlineEntryCard, Menu, MenuItem, Text } from '@contentful/f36-components';
3
3
  import { useResource } from '@contentful/field-editor-reference';
4
4
  import { entityHelpers } from '@contentful/field-editor-shared';
5
5
  import { INLINES } from '@contentful/rich-text-types';
@@ -52,6 +52,8 @@ export function FetchingWrappedResourceInlineCard(props) {
52
52
  disabled: props.isDisabled,
53
53
  testId: "delete"
54
54
  }, "Remove")
55
- ]
55
+ ].map((item, i)=>/*#__PURE__*/ React.createElement(Menu, {
56
+ key: i
57
+ }, item))
56
58
  }, /*#__PURE__*/ React.createElement(Text, null, title));
57
59
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Menu, Button } from '@contentful/f36-components';
3
- import { ChevronDownIcon } from '@contentful/f36-icons';
3
+ import { CaretDownIcon } from '@contentful/f36-icons';
4
4
  import tokens from '@contentful/f36-tokens';
5
5
  import { BLOCKS } from '@contentful/rich-text-types';
6
6
  import { css, cx } from 'emotion';
@@ -117,7 +117,7 @@ export function ToolbarHeadingButton(props) {
117
117
  size: "small",
118
118
  testId: "toolbar-heading-toggle",
119
119
  variant: "transparent",
120
- endIcon: /*#__PURE__*/ React.createElement(ChevronDownIcon, null),
120
+ endIcon: /*#__PURE__*/ React.createElement(CaretDownIcon, null),
121
121
  isDisabled: props.isDisabled,
122
122
  onClick: ()=>someHeadingsEnabled && setOpen(!isOpen),
123
123
  className: styles.button
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { HorizontalRuleIcon } from '@contentful/f36-icons';
2
+ import { MinusIcon } from '@contentful/f36-icons';
3
3
  import tokens from '@contentful/f36-tokens';
4
4
  import { BLOCKS } from '@contentful/rich-text-types';
5
5
  import { css, cx } from 'emotion';
@@ -82,7 +82,7 @@ export function ToolbarHrButton(props) {
82
82
  onClick: handleOnClick,
83
83
  testId: "hr-toolbar-button",
84
84
  isActive: isBlockSelected(editor, BLOCKS.HR)
85
- }, /*#__PURE__*/ React.createElement(HorizontalRuleIcon, null));
85
+ }, /*#__PURE__*/ React.createElement(MinusIcon, null));
86
86
  }
87
87
  export function Hr(props) {
88
88
  const isSelected = Slate.useSelected();
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Popover, IconButton, Tooltip, Flex } from '@contentful/f36-components';
3
- import { EditIcon, CopyIcon } from '@contentful/f36-icons';
3
+ import { CopySimpleIcon, PencilSimpleIcon } from '@contentful/f36-icons';
4
4
  import { styles } from './styles';
5
5
  export const LinkPopover = ({ isLinkFocused, popoverText, handleEditLink, handleRemoveLink, children, handleCopyLink, isEditorFocused })=>{
6
6
  const popoverContent = React.useRef(null);
@@ -43,7 +43,7 @@ export const LinkPopover = ({ isLinkFocused, popoverText, handleEditLink, handle
43
43
  size: "small",
44
44
  variant: "transparent",
45
45
  "aria-label": "Copy link",
46
- icon: /*#__PURE__*/ React.createElement(CopyIcon, {
46
+ icon: /*#__PURE__*/ React.createElement(CopySimpleIcon, {
47
47
  size: "tiny"
48
48
  })
49
49
  })), /*#__PURE__*/ React.createElement(Tooltip, {
@@ -56,7 +56,7 @@ export const LinkPopover = ({ isLinkFocused, popoverText, handleEditLink, handle
56
56
  size: "small",
57
57
  variant: "transparent",
58
58
  "aria-label": "Edit link",
59
- icon: /*#__PURE__*/ React.createElement(EditIcon, {
59
+ icon: /*#__PURE__*/ React.createElement(PencilSimpleIcon, {
60
60
  size: "tiny"
61
61
  })
62
62
  })), /*#__PURE__*/ React.createElement(Tooltip, {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { LinkIcon } from '@contentful/f36-icons';
2
+ import { LinkSimpleIcon } from '@contentful/f36-icons';
3
3
  import { useContentfulEditor } from '../../../ContentfulEditorProvider';
4
4
  import { isLinkActive, unwrapLink } from '../../../helpers/editor';
5
5
  import { useSdkContext } from '../../../SdkProvider';
@@ -25,5 +25,5 @@ export function ToolbarHyperlinkButton(props) {
25
25
  onClick: handleClick,
26
26
  isActive: isActive,
27
27
  isDisabled: props.isDisabled
28
- }, /*#__PURE__*/ React.createElement(LinkIcon, null));
28
+ }, /*#__PURE__*/ React.createElement(LinkSimpleIcon, null));
29
29
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ListBulletedIcon, ListNumberedIcon } from '@contentful/f36-icons';
2
+ import { ListBulletsIcon, ListNumbersIcon } from '@contentful/f36-icons';
3
3
  import { BLOCKS } from '@contentful/rich-text-types';
4
4
  import { useContentfulEditor } from '../../../ContentfulEditorProvider';
5
5
  import { focus } from '../../../helpers/editor';
@@ -27,11 +27,11 @@ export function ToolbarListButton(props) {
27
27
  onClick: handleClick(BLOCKS.UL_LIST),
28
28
  isActive: isListTypeActive(editor, BLOCKS.UL_LIST),
29
29
  isDisabled: props.isDisabled
30
- }, /*#__PURE__*/ React.createElement(ListBulletedIcon, null)), isNodeTypeEnabled(sdk.field, BLOCKS.OL_LIST) && /*#__PURE__*/ React.createElement(ToolbarButton, {
30
+ }, /*#__PURE__*/ React.createElement(ListBulletsIcon, null)), isNodeTypeEnabled(sdk.field, BLOCKS.OL_LIST) && /*#__PURE__*/ React.createElement(ToolbarButton, {
31
31
  title: "OL",
32
32
  testId: "ol-toolbar-button",
33
33
  onClick: handleClick(BLOCKS.OL_LIST),
34
34
  isActive: isListTypeActive(editor, BLOCKS.OL_LIST),
35
35
  isDisabled: props.isDisabled
36
- }, /*#__PURE__*/ React.createElement(ListNumberedIcon, null)));
36
+ }, /*#__PURE__*/ React.createElement(ListNumbersIcon, null)));
37
37
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FormatBoldIcon } from '@contentful/f36-icons';
2
+ import { TextBIcon } from '@contentful/f36-icons';
3
3
  import { MARKS } from '@contentful/rich-text-types';
4
4
  import { createBoldPlugin as createDefaultBoldPlugin } from '@udecode/plate-basic-marks';
5
5
  import { css } from 'emotion';
@@ -9,7 +9,7 @@ import { buildMarkEventHandler } from './helpers';
9
9
  export const ToolbarBoldButton = createMarkToolbarButton({
10
10
  title: 'Bold',
11
11
  mark: MARKS.BOLD,
12
- icon: /*#__PURE__*/ React.createElement(FormatBoldIcon, null)
12
+ icon: /*#__PURE__*/ React.createElement(TextBIcon, null)
13
13
  });
14
14
  const styles = {
15
15
  bold: css({
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { CodeIcon } from '@contentful/f36-icons';
2
+ import { CodeSimpleIcon } from '@contentful/f36-icons';
3
3
  import { MARKS } from '@contentful/rich-text-types';
4
4
  import { createCodePlugin as createDefaultCodePlugin } from '@udecode/plate-basic-marks';
5
5
  import { css } from 'emotion';
@@ -8,7 +8,7 @@ import { buildMarkEventHandler } from './helpers';
8
8
  export const ToolbarCodeButton = createMarkToolbarButton({
9
9
  title: 'Code',
10
10
  mark: MARKS.CODE,
11
- icon: /*#__PURE__*/ React.createElement(CodeIcon, null)
11
+ icon: /*#__PURE__*/ React.createElement(CodeSimpleIcon, null)
12
12
  });
13
13
  export const ToolbarDropdownCodeButton = createMarkToolbarButton({
14
14
  title: 'Code',
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FormatItalicIcon } from '@contentful/f36-icons';
2
+ import { TextItalicIcon } from '@contentful/f36-icons';
3
3
  import { MARKS } from '@contentful/rich-text-types';
4
4
  import { createItalicPlugin as createDefaultItalicPlugin } from '@udecode/plate-basic-marks';
5
5
  import { css } from 'emotion';
@@ -9,7 +9,7 @@ import { buildMarkEventHandler } from './helpers';
9
9
  export const ToolbarItalicButton = createMarkToolbarButton({
10
10
  title: 'Italic',
11
11
  mark: MARKS.ITALIC,
12
- icon: /*#__PURE__*/ React.createElement(FormatItalicIcon, null)
12
+ icon: /*#__PURE__*/ React.createElement(TextItalicIcon, null)
13
13
  });
14
14
  const styles = {
15
15
  italic: css({
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SubscriptIcon } from '@contentful/f36-icons';
2
+ import { TextSubscriptIcon } from '@contentful/f36-icons';
3
3
  import { MARKS } from '@contentful/rich-text-types';
4
4
  import { createSubscriptPlugin as createDefaultSubscriptPlugin } from '@udecode/plate-basic-marks';
5
5
  import { css } from 'emotion';
@@ -14,7 +14,7 @@ const styles = {
14
14
  export const ToolbarSubscriptButton = createMarkToolbarButton({
15
15
  title: 'Subscript',
16
16
  mark: MARKS.SUBSCRIPT,
17
- icon: /*#__PURE__*/ React.createElement(SubscriptIcon, {
17
+ icon: /*#__PURE__*/ React.createElement(TextSubscriptIcon, {
18
18
  viewBox: "0 0 23 18"
19
19
  })
20
20
  });
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SuperscriptIcon } from '@contentful/f36-icons';
2
+ import { TextSuperscriptIcon } from '@contentful/f36-icons';
3
3
  import { MARKS } from '@contentful/rich-text-types';
4
4
  import { createSuperscriptPlugin as createDefaultSuperscriptPlugin } from '@udecode/plate-basic-marks';
5
5
  import { css } from 'emotion';
@@ -14,7 +14,7 @@ const styles = {
14
14
  export const ToolbarSuperscriptButton = createMarkToolbarButton({
15
15
  title: 'Superscript',
16
16
  mark: MARKS.SUPERSCRIPT,
17
- icon: /*#__PURE__*/ React.createElement(SuperscriptIcon, null)
17
+ icon: /*#__PURE__*/ React.createElement(TextSuperscriptIcon, null)
18
18
  });
19
19
  export const ToolbarDropdownSuperscriptButton = createMarkToolbarButton({
20
20
  title: 'Superscript',
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FormatUnderlinedIcon } from '@contentful/f36-icons';
2
+ import { TextUnderlineIcon } from '@contentful/f36-icons';
3
3
  import { MARKS } from '@contentful/rich-text-types';
4
4
  import { createUnderlinePlugin as createDefaultUnderlinePlugin } from '@udecode/plate-basic-marks';
5
5
  import { someHtmlElement } from '../../internal/queries';
@@ -8,7 +8,7 @@ import { buildMarkEventHandler } from './helpers';
8
8
  export const ToolbarUnderlineButton = createMarkToolbarButton({
9
9
  title: 'Underline',
10
10
  mark: MARKS.UNDERLINE,
11
- icon: /*#__PURE__*/ React.createElement(FormatUnderlinedIcon, null)
11
+ icon: /*#__PURE__*/ React.createElement(TextUnderlineIcon, null)
12
12
  });
13
13
  export function Underline(props) {
14
14
  return /*#__PURE__*/ React.createElement("u", props.attributes, props.children);
@@ -29,14 +29,14 @@ export const createMarkToolbarButton = ({ mark, title, icon })=>{
29
29
  ]);
30
30
  if (!editor) return null;
31
31
  if (!icon) {
32
- return /*#__PURE__*/ React.createElement(Menu.Item, {
32
+ return /*#__PURE__*/ React.createElement(Menu, null, /*#__PURE__*/ React.createElement(Menu.Item, {
33
33
  onClick: handleClick,
34
34
  disabled: isDisabled,
35
35
  className: cx({
36
36
  [styles.isActive]: isMarkActive(editor, mark)
37
37
  }),
38
38
  testId: `${mark}-toolbar-button`
39
- }, title);
39
+ }, title));
40
40
  }
41
41
  return /*#__PURE__*/ React.createElement(ToolbarButton, {
42
42
  title: title,
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { QuoteIcon } from '@contentful/f36-icons';
2
+ import { QuotesIcon } from '@contentful/f36-icons';
3
3
  import { BLOCKS } from '@contentful/rich-text-types';
4
4
  import { useContentfulEditor } from '../../../ContentfulEditorProvider';
5
5
  import { isBlockSelected, focus } from '../../../helpers/editor';
@@ -19,5 +19,5 @@ export function ToolbarQuoteButton(props) {
19
19
  testId: "quote-toolbar-button",
20
20
  isDisabled: props.isDisabled,
21
21
  isActive: isBlockSelected(editor, BLOCKS.QUOTE)
22
- }, /*#__PURE__*/ React.createElement(QuoteIcon, null));
22
+ }, /*#__PURE__*/ React.createElement(QuotesIcon, null));
23
23
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IconButton, Menu } from '@contentful/f36-components';
3
- import { ChevronDownIcon } from '@contentful/f36-icons';
3
+ import { CaretDownIcon } from '@contentful/f36-icons';
4
4
  import { BLOCKS } from '@contentful/rich-text-types';
5
5
  import { deleteColumn, deleteRow, deleteTable } from '@udecode/plate-table';
6
6
  import { css } from 'emotion';
@@ -94,7 +94,7 @@ export const TableActions = ()=>{
94
94
  variant: "transparent",
95
95
  tabIndex: -1,
96
96
  className: styles.topRight,
97
- icon: /*#__PURE__*/ React.createElement(ChevronDownIcon, null),
97
+ icon: /*#__PURE__*/ React.createElement(CaretDownIcon, null),
98
98
  "aria-label": "Open table menu",
99
99
  testId: "cf-table-actions-button"
100
100
  })), /*#__PURE__*/ React.createElement(Menu.List, null, /*#__PURE__*/ React.createElement(Menu.Item, {
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
- import { Flex, Icon, Menu } from '@contentful/f36-components';
3
- import { AssetIcon, EmbeddedEntryBlockIcon } from '@contentful/f36-icons';
2
+ import { Flex, Menu } from '@contentful/f36-components';
3
+ import { Icon } from '@contentful/f36-components';
4
+ import { ImageSquareIcon, EmbeddedBlockIcon } from '@contentful/f36-icons';
5
+ import tokens from '@contentful/f36-tokens';
4
6
  import { BLOCKS } from '@contentful/rich-text-types';
5
7
  import { css } from 'emotion';
6
8
  import { useContentfulEditor } from '../../ContentfulEditorProvider';
@@ -29,7 +31,7 @@ export function EmbeddedBlockToolbarIcon({ isDisabled, nodeType, onClose }) {
29
31
  };
30
32
  const type = getEntityTypeFromNodeType(nodeType);
31
33
  const baseClass = `rich-text__${nodeType}`;
32
- return /*#__PURE__*/ React.createElement(Menu.Item, {
34
+ return /*#__PURE__*/ React.createElement(Menu, null, /*#__PURE__*/ React.createElement(Menu.Item, {
33
35
  disabled: isDisabled,
34
36
  className: `${baseClass}-list-item`,
35
37
  onClick: handleClick,
@@ -38,10 +40,10 @@ export function EmbeddedBlockToolbarIcon({ isDisabled, nodeType, onClose }) {
38
40
  alignItems: "center",
39
41
  flexDirection: "row"
40
42
  }, /*#__PURE__*/ React.createElement(Icon, {
41
- as: type === 'Asset' ? AssetIcon : EmbeddedEntryBlockIcon,
43
+ as: type === 'Asset' ? ImageSquareIcon : EmbeddedBlockIcon,
42
44
  className: `rich-text__embedded-entry-list-icon ${styles.icon}`,
43
- variant: "secondary"
44
- }), /*#__PURE__*/ React.createElement("span", null, type, nodeType == BLOCKS.EMBEDDED_RESOURCE && /*#__PURE__*/ React.createElement(ResourceNewBadge, null))));
45
+ color: tokens.gray900
46
+ }), /*#__PURE__*/ React.createElement("span", null, type, nodeType == BLOCKS.EMBEDDED_RESOURCE && /*#__PURE__*/ React.createElement(ResourceNewBadge, null)))));
45
47
  }
46
48
  function getEntityTypeFromNodeType(nodeType) {
47
49
  const words = nodeType.toLowerCase().split('-');
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Menu, Flex } from '@contentful/f36-components';
3
- import { EmbeddedEntryInlineIcon } from '@contentful/f36-icons';
3
+ import { EmbeddedLineIcon } from '@contentful/f36-icons';
4
4
  import tokens from '@contentful/f36-tokens';
5
5
  import { INLINES } from '@contentful/rich-text-types';
6
6
  import { css } from 'emotion';
@@ -36,7 +36,7 @@ export function EmbeddedInlineToolbarIcon({ onClose, nodeType, isDisabled }) {
36
36
  }
37
37
  moveToTheNextChar(editor);
38
38
  }
39
- return /*#__PURE__*/ React.createElement(Menu.Item, {
39
+ return /*#__PURE__*/ React.createElement(Menu, null, /*#__PURE__*/ React.createElement(Menu.Item, {
40
40
  disabled: isDisabled,
41
41
  className: "rich-text__entry-link-block-button",
42
42
  testId: `toolbar-toggle-${nodeType}`,
@@ -44,8 +44,8 @@ export function EmbeddedInlineToolbarIcon({ onClose, nodeType, isDisabled }) {
44
44
  }, /*#__PURE__*/ React.createElement(Flex, {
45
45
  alignItems: "center",
46
46
  flexDirection: "row"
47
- }, /*#__PURE__*/ React.createElement(EmbeddedEntryInlineIcon, {
48
- variant: "secondary",
47
+ }, /*#__PURE__*/ React.createElement(EmbeddedLineIcon, {
48
+ color: tokens.gray900,
49
49
  className: `rich-text__embedded-entry-list-icon ${styles.icon}`
50
- }), /*#__PURE__*/ React.createElement("span", null, "Inline entry", nodeType == INLINES.EMBEDDED_RESOURCE && /*#__PURE__*/ React.createElement(ResourceNewBadge, null))));
50
+ }), /*#__PURE__*/ React.createElement("span", null, "Inline entry", nodeType == INLINES.EMBEDDED_RESOURCE && /*#__PURE__*/ React.createElement(ResourceNewBadge, null)))));
51
51
  }
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { AssetCard, DragHandle } from '@contentful/f36-components';
3
3
  import { useEntity, useEntityLoader, MissingEntityCard, WrappedAssetCard } from '@contentful/field-editor-reference';
4
- import { useLocalePublishStatus, useActiveLocales } from '@contentful/field-editor-shared';
4
+ import { useLocalePublishStatus, useActiveLocales, parseReleaseParams, useActiveReleaseLocalesStatuses, getEntityReleaseStatus } from '@contentful/field-editor-shared';
5
5
  import areEqual from 'fast-deep-equal';
6
6
  const InternalAssetCard = /*#__PURE__*/ React.memo((props)=>{
7
+ const { releaseLocalesStatusMap, isActiveReleaseLoading, activeRelease, releaseAction } = props;
7
8
  const activeLocales = useActiveLocales(props.sdk);
8
9
  return /*#__PURE__*/ React.createElement(WrappedAssetCard, {
9
10
  getEntityScheduledActions: props.loadEntityScheduledActions,
@@ -22,7 +23,11 @@ const InternalAssetCard = /*#__PURE__*/ React.memo((props)=>{
22
23
  renderDragHandle: !props.isDisabled ? (dragHandleProps)=>/*#__PURE__*/ React.createElement(DragHandle, {
23
24
  label: "drag embedded asset",
24
25
  ...dragHandleProps
25
- }) : undefined
26
+ }) : undefined,
27
+ releaseLocalesStatusMap: releaseLocalesStatusMap,
28
+ isReleasesLoading: isActiveReleaseLoading,
29
+ activeRelease: activeRelease,
30
+ releaseAction: releaseAction
26
31
  });
27
32
  }, areEqual);
28
33
  InternalAssetCard.displayName = 'InternalAssetCard';
@@ -35,6 +40,17 @@ export function FetchingWrappedAssetCard(props) {
35
40
  props.assetId
36
41
  ]);
37
42
  const localesStatusMap = useLocalePublishStatus(asset, props.sdk.locales);
43
+ const { releaseVersionMap, locales, activeRelease, releases, isActiveReleaseLoading } = parseReleaseParams(props.sdk.parameters.instance.release);
44
+ const { releaseLocalesStatusMap } = useActiveReleaseLocalesStatuses({
45
+ currentEntityDraft: asset,
46
+ entityId: props.assetId,
47
+ entityType: 'Asset',
48
+ releaseVersionMap,
49
+ locales,
50
+ activeRelease,
51
+ releases
52
+ });
53
+ const { releaseAction } = getEntityReleaseStatus(props.assetId, locales, activeRelease);
38
54
  React.useEffect(()=>{
39
55
  if (status === 'success') {
40
56
  onEntityFetchComplete?.();
@@ -65,6 +81,10 @@ export function FetchingWrappedAssetCard(props) {
65
81
  locale: props.locale,
66
82
  onEdit: props.onEdit,
67
83
  onRemove: props.onRemove,
68
- localesStatusMap: localesStatusMap
84
+ localesStatusMap: localesStatusMap,
85
+ releaseLocalesStatusMap: releaseLocalesStatusMap,
86
+ isActiveReleaseLoading: isActiveReleaseLoading,
87
+ activeRelease: activeRelease,
88
+ releaseAction: releaseAction
69
89
  });
70
90
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { DragHandle, EntryCard } from '@contentful/f36-components';
3
3
  import { useEntity, MissingEntityCard, WrappedEntryCard, useEntityLoader } from '@contentful/field-editor-reference';
4
- import { useLocalePublishStatus, useActiveLocales, parseReleaseParams, useActiveReleaseLocalesStatuses, getEntryReleaseStatus } from '@contentful/field-editor-shared';
4
+ import { useLocalePublishStatus, useActiveLocales, parseReleaseParams, useActiveReleaseLocalesStatuses, getEntityReleaseStatus } from '@contentful/field-editor-shared';
5
5
  import areEqual from 'fast-deep-equal';
6
6
  const InternalEntryCard = /*#__PURE__*/ React.memo((props)=>{
7
7
  const { entry, sdk, loadEntityScheduledActions, releaseLocalesStatusMap, isActiveReleaseLoading, activeRelease, releaseAction } = props;
@@ -45,14 +45,15 @@ export const FetchingWrappedEntryCard = (props)=>{
45
45
  const localesStatusMap = useLocalePublishStatus(entry, props.sdk.locales);
46
46
  const { releaseVersionMap, locales, activeRelease, releases, isActiveReleaseLoading } = parseReleaseParams(props.sdk.parameters.instance.release);
47
47
  const { releaseLocalesStatusMap } = useActiveReleaseLocalesStatuses({
48
- currentEntryDraft: entry,
49
- entryId: props.entryId,
48
+ currentEntityDraft: entry,
49
+ entityId: props.entryId,
50
+ entityType: 'Entry',
50
51
  releaseVersionMap,
51
52
  locales,
52
53
  activeRelease,
53
54
  releases
54
55
  });
55
- const { releaseAction } = getEntryReleaseStatus(props.entryId, locales, activeRelease);
56
+ const { releaseAction } = getEntityReleaseStatus(props.entryId, locales, activeRelease);
56
57
  React.useEffect(()=>{
57
58
  if (status === 'success') {
58
59
  onEntityFetchComplete?.();
@@ -22,10 +22,6 @@ export class HyperlinkDialog extends React.Component<any, any, any> {
22
22
  onClose: PropTypes.Validator<(...args: any[]) => any>;
23
23
  };
24
24
  static defaultProps: {
25
- labels: {
26
- title: string;
27
- confirm: string;
28
- };
29
25
  value: {};
30
26
  hideText: boolean;
31
27
  entitySelectorConfigs: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "4.11.2",
3
+ "version": "4.12.0",
4
4
  "source": "./src/index.tsx",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -41,12 +41,12 @@
41
41
  "dependencies": {
42
42
  "@contentful/app-sdk": "^4.29.0",
43
43
  "@contentful/contentful-slatejs-adapter": "^15.16.5",
44
- "@contentful/f36-components": "^4.70.0",
45
- "@contentful/f36-icons": "^4.29.0",
46
- "@contentful/f36-tokens": "^4.0.5",
44
+ "@contentful/f36-components": "5.1.1",
45
+ "@contentful/f36-icons": "5.1.1",
46
+ "@contentful/f36-tokens": "5.1.0",
47
47
  "@contentful/f36-utils": "^4.24.3",
48
- "@contentful/field-editor-reference": "^6.10.7",
49
- "@contentful/field-editor-shared": "^2.11.1",
48
+ "@contentful/field-editor-reference": "^6.11.0",
49
+ "@contentful/field-editor-shared": "^2.12.0",
50
50
  "@contentful/rich-text-plain-text-renderer": "^17.0.0",
51
51
  "@contentful/rich-text-types": "^17.0.0",
52
52
  "@popperjs/core": "^2.11.5",
@@ -78,7 +78,7 @@
78
78
  "react-dom": ">=16.14.0"
79
79
  },
80
80
  "devDependencies": {
81
- "@contentful/field-editor-test-utils": "^1.6.0",
81
+ "@contentful/field-editor-test-utils": "^1.6.1",
82
82
  "@contentful/rich-text-react-renderer": "^16.0.0",
83
83
  "@lingui/core": "5.3.0",
84
84
  "@types/is-hotkey": "^0.1.6",
@@ -89,5 +89,5 @@
89
89
  "publishConfig": {
90
90
  "registry": "https://npm.pkg.github.com/"
91
91
  },
92
- "gitHead": "f1cb85110b2358bffa0aba4596a6d5c637e8a04e"
92
+ "gitHead": "8b1ac3ac7ae3fe40fde1ec1ea5066dc817743d26"
93
93
  }