@contentful/field-editor-rich-text 3.16.11 → 3.16.13

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 (210) hide show
  1. package/dist/cjs/ContentfulEditorProvider.js +8 -8
  2. package/dist/cjs/RichTextEditor.js +6 -4
  3. package/dist/cjs/SdkProvider.js +4 -2
  4. package/dist/cjs/SyncEditorChanges.js +4 -2
  5. package/dist/cjs/Toolbar/_tests_/toolbar.test.js +6 -4
  6. package/dist/cjs/Toolbar/components/EmbedEntityWidget.js +4 -2
  7. package/dist/cjs/Toolbar/components/EmbeddedEntityDropdownButton.js +4 -2
  8. package/dist/cjs/Toolbar/components/StickyToolbarWrapper.js +1 -1
  9. package/dist/cjs/Toolbar/index.js +5 -3
  10. package/dist/cjs/__fixtures__/FakeSdk.js +3 -3
  11. package/dist/cjs/__fixtures__/asset/index.js +5 -5
  12. package/dist/cjs/__fixtures__/entry/index.js +3 -3
  13. package/dist/cjs/__fixtures__/fixtures.js +3 -1
  14. package/dist/cjs/dialogs/HypelinkDialog/HyperlinkDialog.js +17 -15
  15. package/dist/cjs/dialogs/openRichTextDialog.js +4 -2
  16. package/dist/cjs/dialogs/renderRichTextDialog.js +3 -1
  17. package/dist/cjs/helpers/__tests__/removeInternalMarks.test.js +1 -1
  18. package/dist/cjs/helpers/editor.js +42 -42
  19. package/dist/cjs/helpers/environment.js +3 -3
  20. package/dist/cjs/helpers/formatDateAndTime.js +3 -3
  21. package/dist/cjs/helpers/nodeFactory.js +6 -6
  22. package/dist/cjs/helpers/sdkNavigatorSlideIn.js +1 -1
  23. package/dist/cjs/helpers/transformers.js +5 -5
  24. package/dist/cjs/helpers/validations.js +5 -5
  25. package/dist/cjs/index.js +6 -4
  26. package/dist/cjs/internal/constants.js +3 -1
  27. package/dist/cjs/internal/hooks.js +7 -5
  28. package/dist/cjs/internal/misc.js +12 -10
  29. package/dist/cjs/internal/queries.js +107 -105
  30. package/dist/cjs/internal/transforms.js +49 -47
  31. package/dist/cjs/plugins/Break/createExitBreakPlugin.test.js +1 -1
  32. package/dist/cjs/plugins/Break/createSoftBreakPlugin.test.js +1 -1
  33. package/dist/cjs/plugins/CommandPalette/components/CommandList.js +9 -7
  34. package/dist/cjs/plugins/CommandPalette/components/CommandPrompt.js +3 -1
  35. package/dist/cjs/plugins/CommandPalette/hooks/useCommandList.js +3 -1
  36. package/dist/cjs/plugins/CommandPalette/onKeyDown.spec.js +5 -3
  37. package/dist/cjs/plugins/CommandPalette/useCommands.js +2 -2
  38. package/dist/cjs/plugins/DragAndDrop/index.js +4 -1
  39. package/dist/cjs/plugins/EmbeddedEntityBlock/LinkedEntityBlock.js +6 -4
  40. package/dist/cjs/plugins/EmbeddedEntityBlock/index.js +3 -3
  41. package/dist/cjs/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +7 -5
  42. package/dist/cjs/plugins/EmbeddedEntityInline/LinkedEntityInline.js +6 -4
  43. package/dist/cjs/plugins/EmbeddedResourceBlock/LinkedResourceBlock.js +2 -2
  44. package/dist/cjs/plugins/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +7 -5
  45. package/dist/cjs/plugins/EmbeddedResourceInline/LinkedResourceInline.js +2 -2
  46. package/dist/cjs/plugins/Heading/components/Heading.js +3 -1
  47. package/dist/cjs/plugins/Heading/components/ToolbarHeadingButton.js +3 -1
  48. package/dist/cjs/plugins/Heading/createHeadingPlugin.js +1 -1
  49. package/dist/cjs/plugins/Hr/index.js +8 -6
  50. package/dist/cjs/plugins/Hyperlink/HyperlinkModal.js +7 -5
  51. package/dist/cjs/plugins/Hyperlink/components/EntityHyperlink.js +6 -4
  52. package/dist/cjs/plugins/Hyperlink/components/LinkPopover.js +4 -2
  53. package/dist/cjs/plugins/Hyperlink/components/ResourceHyperlink.js +6 -4
  54. package/dist/cjs/plugins/Hyperlink/components/ToolbarHyperlinkButton.js +3 -1
  55. package/dist/cjs/plugins/Hyperlink/components/UrlHyperlink.js +4 -2
  56. package/dist/cjs/plugins/Hyperlink/components/linkHandlers.js +3 -3
  57. package/dist/cjs/plugins/Hyperlink/createHyperlinkPlugin.js +4 -2
  58. package/dist/cjs/plugins/Hyperlink/useEntityInfo.js +3 -3
  59. package/dist/cjs/plugins/Hyperlink/useResourceEntityInfo.js +5 -3
  60. package/dist/cjs/plugins/Hyperlink/utils.js +4 -4
  61. package/dist/cjs/plugins/List/__tests__/insertListBreak.test.js +1 -1
  62. package/dist/cjs/plugins/List/__tests__/insertListFragment.test.js +1 -1
  63. package/dist/cjs/plugins/List/components/List.js +6 -4
  64. package/dist/cjs/plugins/List/components/ListItem.js +3 -1
  65. package/dist/cjs/plugins/List/components/ToolbarListButton.js +3 -1
  66. package/dist/cjs/plugins/List/insertListBreak.js +2 -2
  67. package/dist/cjs/plugins/List/insertListFragment.js +1 -1
  68. package/dist/cjs/plugins/List/onKeyDownList.js +1 -1
  69. package/dist/cjs/plugins/List/transforms/moveListItemDown.js +1 -1
  70. package/dist/cjs/plugins/List/transforms/moveListItems.js +1 -1
  71. package/dist/cjs/plugins/List/transforms/moveListItems.test.js +1 -1
  72. package/dist/cjs/plugins/List/transforms/toggleList.js +3 -3
  73. package/dist/cjs/plugins/List/transforms/toggleList.spec.js +9 -9
  74. package/dist/cjs/plugins/List/transforms/unwrapList.js +1 -1
  75. package/dist/cjs/plugins/List/utils.js +11 -11
  76. package/dist/cjs/plugins/List/withList.js +1 -1
  77. package/dist/cjs/plugins/Marks/Bold.js +6 -4
  78. package/dist/cjs/plugins/Marks/Code.js +6 -4
  79. package/dist/cjs/plugins/Marks/Italic.js +6 -4
  80. package/dist/cjs/plugins/Marks/Subscript.js +7 -5
  81. package/dist/cjs/plugins/Marks/Superscript.js +7 -5
  82. package/dist/cjs/plugins/Marks/Underline.js +3 -1
  83. package/dist/cjs/plugins/Marks/components/MarkToolbarButton.js +5 -3
  84. package/dist/cjs/plugins/Marks/helpers.js +4 -4
  85. package/dist/cjs/plugins/Normalizer/createNormalizerPlugin.test.js +3 -3
  86. package/dist/cjs/plugins/Normalizer/utils.js +3 -3
  87. package/dist/cjs/plugins/Normalizer/withNormalizer.js +2 -2
  88. package/dist/cjs/plugins/Paragraph/Paragraph.js +3 -1
  89. package/dist/cjs/plugins/Paragraph/createParagraphPlugin.js +1 -1
  90. package/dist/cjs/plugins/PasteHTML/createPasteHTMLPlugin.js +5 -5
  91. package/dist/cjs/plugins/Quote/components/Quote.js +3 -1
  92. package/dist/cjs/plugins/Quote/components/ToolbarQuoteButton.js +3 -1
  93. package/dist/cjs/plugins/Quote/toggleQuote.js +4 -4
  94. package/dist/cjs/plugins/Quote/withQuote.js +2 -2
  95. package/dist/cjs/plugins/Table/__tests__/helpers.test.js +1 -1
  96. package/dist/cjs/plugins/Table/actions/addColumn.js +4 -4
  97. package/dist/cjs/plugins/Table/actions/addRow.js +3 -3
  98. package/dist/cjs/plugins/Table/components/Cell.js +3 -1
  99. package/dist/cjs/plugins/Table/components/HeaderCell.js +3 -1
  100. package/dist/cjs/plugins/Table/components/Row.js +3 -1
  101. package/dist/cjs/plugins/Table/components/Table.js +3 -1
  102. package/dist/cjs/plugins/Table/components/TableActions.js +6 -4
  103. package/dist/cjs/plugins/Table/components/ToolbarButton.js +3 -1
  104. package/dist/cjs/plugins/Table/createTablePlugin.js +1 -1
  105. package/dist/cjs/plugins/Table/helpers.js +12 -12
  106. package/dist/cjs/plugins/Table/insertTableFragment.js +1 -1
  107. package/dist/cjs/plugins/Table/onKeyDownTable.js +2 -2
  108. package/dist/cjs/plugins/Table/tableTracking.js +6 -6
  109. package/dist/cjs/plugins/Text/__tests__/createTextPlugin.test.js +2 -2
  110. package/dist/cjs/plugins/Text/createTextPlugin.js +3 -3
  111. package/dist/cjs/plugins/Tracking/createTrackingPlugin.js +4 -4
  112. package/dist/cjs/plugins/Tracking/utils.js +3 -1
  113. package/dist/cjs/plugins/index.js +3 -3
  114. package/dist/cjs/plugins/shared/EmbeddedBlockToolbarIcon.js +7 -5
  115. package/dist/cjs/plugins/shared/EmbeddedBlockUtil.js +5 -5
  116. package/dist/cjs/plugins/shared/EmbeddedInlineToolbarIcon.js +4 -2
  117. package/dist/cjs/plugins/shared/EmbeddedInlineUtil.js +4 -4
  118. package/dist/cjs/plugins/shared/FetchingWrappedAssetCard.js +6 -4
  119. package/dist/cjs/plugins/shared/FetchingWrappedEntryCard.js +7 -5
  120. package/dist/cjs/plugins/shared/FetchingWrappedResourceCard.js +6 -4
  121. package/dist/cjs/plugins/shared/LinkedBlockWrapper.js +1 -1
  122. package/dist/cjs/plugins/shared/LinkedInlineWrapper.js +4 -2
  123. package/dist/cjs/plugins/shared/ResourceNewBadge.js +3 -1
  124. package/dist/cjs/plugins/shared/ToolbarButton.js +4 -2
  125. package/dist/cjs/plugins/shared/__tests__/FetchingWrappedAssetCard.test.js +4 -2
  126. package/dist/cjs/plugins/shared/__tests__/FetchingWrappedEntryCard.test.js +4 -2
  127. package/dist/cjs/plugins/shared/__tests__/FetchingWrappedResourceCard.test.js +9 -7
  128. package/dist/cjs/test-utils/validation.js +3 -3
  129. package/dist/esm/ContentfulEditorProvider.js +1 -1
  130. package/dist/esm/RichTextEditor.js +3 -3
  131. package/dist/esm/SdkProvider.js +1 -1
  132. package/dist/esm/SyncEditorChanges.js +1 -1
  133. package/dist/esm/Toolbar/_tests_/toolbar.test.js +3 -3
  134. package/dist/esm/Toolbar/components/EmbedEntityWidget.js +1 -1
  135. package/dist/esm/Toolbar/components/EmbeddedEntityDropdownButton.js +1 -1
  136. package/dist/esm/Toolbar/components/StickyToolbarWrapper.js +1 -1
  137. package/dist/esm/Toolbar/index.js +2 -2
  138. package/dist/esm/__fixtures__/FakeSdk.js +3 -3
  139. package/dist/esm/dialogs/HypelinkDialog/HyperlinkDialog.js +11 -11
  140. package/dist/esm/dialogs/openRichTextDialog.js +1 -1
  141. package/dist/esm/helpers/__tests__/removeInternalMarks.test.js +1 -1
  142. package/dist/esm/helpers/editor.js +3 -3
  143. package/dist/esm/helpers/sdkNavigatorSlideIn.js +1 -1
  144. package/dist/esm/plugins/Break/createExitBreakPlugin.test.js +1 -1
  145. package/dist/esm/plugins/Break/createSoftBreakPlugin.test.js +1 -1
  146. package/dist/esm/plugins/CommandPalette/components/CommandList.js +6 -6
  147. package/dist/esm/plugins/CommandPalette/onKeyDown.spec.js +2 -2
  148. package/dist/esm/plugins/CommandPalette/useCommands.js +2 -2
  149. package/dist/esm/plugins/DragAndDrop/index.js +4 -1
  150. package/dist/esm/plugins/EmbeddedEntityBlock/LinkedEntityBlock.js +3 -3
  151. package/dist/esm/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +4 -4
  152. package/dist/esm/plugins/EmbeddedEntityInline/LinkedEntityInline.js +3 -3
  153. package/dist/esm/plugins/EmbeddedResourceBlock/LinkedResourceBlock.js +2 -2
  154. package/dist/esm/plugins/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +4 -4
  155. package/dist/esm/plugins/EmbeddedResourceInline/LinkedResourceInline.js +2 -2
  156. package/dist/esm/plugins/Heading/createHeadingPlugin.js +1 -1
  157. package/dist/esm/plugins/Hyperlink/HyperlinkModal.js +4 -4
  158. package/dist/esm/plugins/Hyperlink/components/EntityHyperlink.js +3 -3
  159. package/dist/esm/plugins/Hyperlink/components/LinkPopover.js +1 -1
  160. package/dist/esm/plugins/Hyperlink/components/ResourceHyperlink.js +3 -3
  161. package/dist/esm/plugins/Hyperlink/components/UrlHyperlink.js +1 -1
  162. package/dist/esm/plugins/Hyperlink/createHyperlinkPlugin.js +1 -1
  163. package/dist/esm/plugins/Hyperlink/useEntityInfo.js +3 -3
  164. package/dist/esm/plugins/Hyperlink/useResourceEntityInfo.js +2 -2
  165. package/dist/esm/plugins/Hyperlink/utils.js +1 -1
  166. package/dist/esm/plugins/List/__tests__/insertListBreak.test.js +1 -1
  167. package/dist/esm/plugins/List/__tests__/insertListFragment.test.js +1 -1
  168. package/dist/esm/plugins/List/insertListBreak.js +2 -2
  169. package/dist/esm/plugins/List/insertListFragment.js +1 -1
  170. package/dist/esm/plugins/List/onKeyDownList.js +1 -1
  171. package/dist/esm/plugins/List/transforms/moveListItemDown.js +1 -1
  172. package/dist/esm/plugins/List/transforms/moveListItems.js +1 -1
  173. package/dist/esm/plugins/List/transforms/moveListItems.test.js +1 -1
  174. package/dist/esm/plugins/List/transforms/toggleList.js +3 -3
  175. package/dist/esm/plugins/List/transforms/toggleList.spec.js +9 -9
  176. package/dist/esm/plugins/List/transforms/unwrapList.js +1 -1
  177. package/dist/esm/plugins/List/utils.js +1 -1
  178. package/dist/esm/plugins/List/withList.js +1 -1
  179. package/dist/esm/plugins/Marks/components/MarkToolbarButton.js +2 -2
  180. package/dist/esm/plugins/Marks/helpers.js +1 -1
  181. package/dist/esm/plugins/Normalizer/createNormalizerPlugin.test.js +3 -3
  182. package/dist/esm/plugins/Normalizer/withNormalizer.js +2 -2
  183. package/dist/esm/plugins/Paragraph/createParagraphPlugin.js +1 -1
  184. package/dist/esm/plugins/PasteHTML/createPasteHTMLPlugin.js +1 -1
  185. package/dist/esm/plugins/Quote/toggleQuote.js +1 -1
  186. package/dist/esm/plugins/Quote/withQuote.js +2 -2
  187. package/dist/esm/plugins/Table/__tests__/helpers.test.js +1 -1
  188. package/dist/esm/plugins/Table/actions/addColumn.js +1 -1
  189. package/dist/esm/plugins/Table/createTablePlugin.js +1 -1
  190. package/dist/esm/plugins/Table/insertTableFragment.js +1 -1
  191. package/dist/esm/plugins/Table/onKeyDownTable.js +2 -2
  192. package/dist/esm/plugins/Table/tableTracking.js +6 -6
  193. package/dist/esm/plugins/Text/__tests__/createTextPlugin.test.js +2 -2
  194. package/dist/esm/plugins/Text/createTextPlugin.js +3 -3
  195. package/dist/esm/plugins/Tracking/createTrackingPlugin.js +1 -1
  196. package/dist/esm/plugins/shared/EmbeddedBlockToolbarIcon.js +1 -1
  197. package/dist/esm/plugins/shared/EmbeddedBlockUtil.js +5 -5
  198. package/dist/esm/plugins/shared/EmbeddedInlineToolbarIcon.js +1 -1
  199. package/dist/esm/plugins/shared/EmbeddedInlineUtil.js +4 -4
  200. package/dist/esm/plugins/shared/FetchingWrappedAssetCard.js +3 -3
  201. package/dist/esm/plugins/shared/FetchingWrappedEntryCard.js +4 -4
  202. package/dist/esm/plugins/shared/FetchingWrappedResourceCard.js +3 -3
  203. package/dist/esm/plugins/shared/LinkedBlockWrapper.js +1 -1
  204. package/dist/esm/plugins/shared/LinkedInlineWrapper.js +1 -1
  205. package/dist/esm/plugins/shared/ToolbarButton.js +1 -1
  206. package/dist/esm/plugins/shared/__tests__/FetchingWrappedAssetCard.test.js +1 -1
  207. package/dist/esm/plugins/shared/__tests__/FetchingWrappedEntryCard.test.js +1 -1
  208. package/dist/esm/plugins/shared/__tests__/FetchingWrappedResourceCard.test.js +6 -6
  209. package/dist/esm/test-utils/validation.js +3 -3
  210. package/package.json +4 -4
@@ -43,7 +43,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
43
43
  if (cache && cache.has(obj)) {
44
44
  return cache.get(obj);
45
45
  }
46
- var newObj = {};
46
+ var newObj = {
47
+ __proto__: null
48
+ };
47
49
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
48
50
  for(var key in obj){
49
51
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -61,7 +63,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
61
63
  }
62
64
  return newObj;
63
65
  }
64
- const Group = ({ commandGroup , selectedItem })=>_react.createElement("section", {
66
+ const Group = ({ commandGroup, selectedItem })=>_react.createElement("section", {
65
67
  key: commandGroup.group
66
68
  }, _react.createElement(_f36components.SectionHeading, {
67
69
  as: "h3",
@@ -80,7 +82,7 @@ const Group = ({ commandGroup , selectedItem })=>_react.createElement("section"
80
82
  className: _CommandListstyles.default.menuDivider,
81
83
  "aria-orientation": "horizontal"
82
84
  }));
83
- const Asset = ({ command , selectedItem })=>_react.createElement("button", {
85
+ const Asset = ({ command, selectedItem })=>_react.createElement("button", {
84
86
  key: command.id,
85
87
  id: command.id,
86
88
  className: (0, _emotion.cx)(_CommandListstyles.default.menuItem, {
@@ -101,7 +103,7 @@ const Asset = ({ command , selectedItem })=>_react.createElement("button", {
101
103
  height: "30",
102
104
  className: _CommandListstyles.default.thumbnail
103
105
  }), _react.createElement("span", null, command.label)));
104
- const Item = ({ command , selectedItem })=>_react.createElement("button", {
106
+ const Item = ({ command, selectedItem })=>_react.createElement("button", {
105
107
  key: command.id,
106
108
  id: command.id,
107
109
  className: (0, _emotion.cx)(_CommandListstyles.default.menuItem, {
@@ -109,7 +111,7 @@ const Item = ({ command , selectedItem })=>_react.createElement("button", {
109
111
  }),
110
112
  onClick: command.callback
111
113
  }, command.label);
112
- const CommandListItems = ({ commandItems , selectedItem })=>{
114
+ const CommandListItems = ({ commandItems, selectedItem })=>{
113
115
  return _react.createElement(_react.Fragment, null, commandItems.map((command)=>{
114
116
  return 'group' in command ? _react.createElement(Group, {
115
117
  key: command.group,
@@ -126,14 +128,14 @@ const CommandListItems = ({ commandItems , selectedItem })=>{
126
128
  });
127
129
  }));
128
130
  };
129
- const CommandList = ({ query , editor , textContainer })=>{
131
+ const CommandList = ({ query, editor, textContainer })=>{
130
132
  const sdk = (0, _SdkProvider.useSdkContext)();
131
133
  const popoverContainer = _react.useRef(null);
132
134
  const popper = (0, _reactpopper.usePopper)(textContainer, popoverContainer?.current, {
133
135
  placement: 'bottom-start'
134
136
  });
135
137
  const commandItems = (0, _useCommands.useCommands)(sdk, query, editor);
136
- const { selectedItem , isOpen } = (0, _useCommandList.useCommandList)(commandItems, popoverContainer);
138
+ const { selectedItem, isOpen } = (0, _useCommandList.useCommandList)(commandItems, popoverContainer);
137
139
  if (!commandItems.length) {
138
140
  return null;
139
141
  }
@@ -39,7 +39,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
39
39
  if (cache && cache.has(obj)) {
40
40
  return cache.get(obj);
41
41
  }
42
- var newObj = {};
42
+ var newObj = {
43
+ __proto__: null
44
+ };
43
45
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
44
46
  for(var key in obj){
45
47
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -36,7 +36,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
36
36
  if (cache && cache.has(obj)) {
37
37
  return cache.get(obj);
38
38
  }
39
- var newObj = {};
39
+ var newObj = {
40
+ __proto__: null
41
+ };
40
42
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
41
43
  for(var key in obj){
42
44
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -27,7 +27,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
27
27
  if (cache && cache.has(obj)) {
28
28
  return cache.get(obj);
29
29
  }
30
- var newObj = {};
30
+ var newObj = {
31
+ __proto__: null
32
+ };
31
33
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
32
34
  for(var key in obj){
33
35
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -52,7 +54,7 @@ jest.mock('../../internal/transforms', ()=>{
52
54
  };
53
55
  });
54
56
  describe('onKeyDown', ()=>{
55
- const { editor } = (0, _testutils.createTestEditor)({});
57
+ const { editor } = (0, _testutils.createTestEditor)({});
56
58
  const addMark = jest.spyOn(_transforms, 'addMark');
57
59
  const onCommandPaletteAction = jest.spyOn(editor.tracking, 'onCommandPaletteAction');
58
60
  afterEach(()=>{
@@ -70,7 +72,7 @@ describe('onKeyDown', ()=>{
70
72
  which: 55,
71
73
  shiftKey: true
72
74
  }}
73
- `('supports hotKeys for every keyboard layout #{layout}', ({ key })=>{
75
+ `('supports hotKeys for every keyboard layout #{layout}', ({ key })=>{
74
76
  (0, _onKeyDown.createOnKeyDown)()(editor, {})({
75
77
  type: 'keydown',
76
78
  ...key
@@ -57,7 +57,7 @@ function isCommandPromptPluginEnabled(sdk) {
57
57
  }
58
58
  function getCommandPermissions(sdk, editor) {
59
59
  const canInsertBlocks = !(0, _editor.isNodeTypeSelected)(editor, _richtexttypes.BLOCKS.TABLE);
60
- const { inlineAllowed , entriesAllowed , assetsAllowed } = isCommandPromptPluginEnabled(sdk);
60
+ const { inlineAllowed, entriesAllowed, assetsAllowed } = isCommandPromptPluginEnabled(sdk);
61
61
  return {
62
62
  inlineAllowed,
63
63
  entriesAllowed: entriesAllowed && canInsertBlocks,
@@ -86,7 +86,7 @@ const getAllowedContentTypesFromValidation = (validations)=>{
86
86
  };
87
87
  const useCommands = (sdk, query, editor)=>{
88
88
  const contentTypes = sdk.space.getCachedContentTypes();
89
- const { inlineAllowed , entriesAllowed , assetsAllowed } = getCommandPermissions(sdk, editor);
89
+ const { inlineAllowed, entriesAllowed, assetsAllowed } = getCommandPermissions(sdk, editor);
90
90
  const allowedContentTypesFromValidation = getAllowedContentTypesFromValidation(sdk.field.validations);
91
91
  const filterContentTypesByValidation = (type)=>contentTypes.filter((contentType)=>allowedContentTypesFromValidation[type]?.[contentType.sys.id]);
92
92
  const filteredBlockContentTypes = filterContentTypesByValidation(_richtexttypes.BLOCKS.EMBEDDED_ENTRY);
@@ -39,7 +39,10 @@ function createDragAndDropPlugin() {
39
39
  return ON_DROP_ALLOWED_TYPES[node.nodeName] ? !ON_DROP_ALLOWED_TYPES[node.nodeName]?.includes(draggingNode.type) : false;
40
40
  });
41
41
  if (!dropDisallowed) {
42
- editor.history.undos.push([]);
42
+ editor.history.undos.push({
43
+ operations: [],
44
+ selectionBefore: null
45
+ });
43
46
  }
44
47
  return dropDisallowed;
45
48
  }
@@ -39,7 +39,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
39
39
  if (cache && cache.has(obj)) {
40
40
  return cache.get(obj);
41
41
  }
42
- var newObj = {};
42
+ var newObj = {
43
+ __proto__: null
44
+ };
43
45
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
44
46
  for(var key in obj){
45
47
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -58,13 +60,13 @@ function _interop_require_wildcard(obj, nodeInterop) {
58
60
  return newObj;
59
61
  }
60
62
  function LinkedEntityBlock(props) {
61
- const { attributes , children , element } = props;
62
- const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
63
+ const { attributes, children, element } = props;
64
+ const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
63
65
  const isSelected = (0, _slatereact.useSelected)();
64
66
  const editor = (0, _ContentfulEditorProvider.useContentfulEditor)();
65
67
  const sdk = (0, _SdkProvider.useSdkContext)();
66
68
  const isDisabled = (0, _slatereact.useReadOnly)();
67
- const { id: entityId , linkType: entityType } = element.data.target.sys;
69
+ const { id: entityId, linkType: entityType } = element.data.target.sys;
68
70
  const handleEditClick = _react.useCallback(()=>{
69
71
  const openEntity = entityType === 'Asset' ? sdk.navigator.openAsset : sdk.navigator.openEntry;
70
72
  return openEntity(entityId, {
@@ -9,11 +9,11 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- createEmbeddedEntryBlockPlugin: function() {
13
- return createEmbeddedEntryBlockPlugin;
14
- },
15
12
  createEmbeddedAssetBlockPlugin: function() {
16
13
  return createEmbeddedAssetBlockPlugin;
14
+ },
15
+ createEmbeddedEntryBlockPlugin: function() {
16
+ return createEmbeddedEntryBlockPlugin;
17
17
  }
18
18
  });
19
19
  const _richtexttypes = require("@contentful/rich-text-types");
@@ -42,7 +42,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
42
42
  if (cache && cache.has(obj)) {
43
43
  return cache.get(obj);
44
44
  }
45
- var newObj = {};
45
+ var newObj = {
46
+ __proto__: null
47
+ };
46
48
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
47
49
  for(var key in obj){
48
50
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -60,7 +62,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
60
62
  }
61
63
  return newObj;
62
64
  }
63
- const { getEntryTitle , getEntryStatus } = _fieldeditorshared.entityHelpers;
65
+ const { getEntryTitle, getEntryStatus } = _fieldeditorshared.entityHelpers;
64
66
  const styles = {
65
67
  scheduledIcon: (0, _emotion.css)({
66
68
  verticalAlign: 'text-bottom',
@@ -68,11 +70,11 @@ const styles = {
68
70
  })
69
71
  };
70
72
  function FetchingWrappedInlineEntryCard(props) {
71
- const { data: entry , status: requestStatus } = (0, _fieldeditorreference.useEntity)('Entry', props.entryId);
72
- const { getEntityScheduledActions } = (0, _fieldeditorreference.useEntityLoader)();
73
+ const { data: entry, status: requestStatus } = (0, _fieldeditorreference.useEntity)('Entry', props.entryId);
74
+ const { getEntityScheduledActions } = (0, _fieldeditorreference.useEntityLoader)();
73
75
  const loadEntityScheduledActions = ()=>getEntityScheduledActions('Entry', props.entryId);
74
76
  const allContentTypes = props.sdk.space.getCachedContentTypes();
75
- const { onEntityFetchComplete } = props;
77
+ const { onEntityFetchComplete } = props;
76
78
  const contentType = _react.useMemo(()=>{
77
79
  if (!entry || !allContentTypes) return undefined;
78
80
  return allContentTypes.find((contentType)=>contentType.sys.id === entry.sys.contentType.sys.id);
@@ -39,7 +39,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
39
39
  if (cache && cache.has(obj)) {
40
40
  return cache.get(obj);
41
41
  }
42
- var newObj = {};
42
+ var newObj = {
43
+ __proto__: null
44
+ };
43
45
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
44
46
  for(var key in obj){
45
47
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -58,13 +60,13 @@ function _interop_require_wildcard(obj, nodeInterop) {
58
60
  return newObj;
59
61
  }
60
62
  function LinkedEntityInline(props) {
61
- const { attributes , children , element } = props;
62
- const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
63
+ const { attributes, children, element } = props;
64
+ const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
63
65
  const isSelected = (0, _slatereact.useSelected)();
64
66
  const editor = (0, _ContentfulEditorProvider.useContentfulEditor)();
65
67
  const sdk = (0, _SdkProvider.useSdkContext)();
66
68
  const isDisabled = (0, _slatereact.useReadOnly)();
67
- const { id: entryId } = element.data.target.sys;
69
+ const { id: entryId } = element.data.target.sys;
68
70
  function handleEditClick() {
69
71
  return sdk.navigator.openEntry(entryId, {
70
72
  slideIn: {
@@ -22,8 +22,8 @@ function _interop_require_default(obj) {
22
22
  };
23
23
  }
24
24
  function LinkedResourceBlock(props) {
25
- const { attributes , children , element } = props;
26
- const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
25
+ const { attributes, children, element } = props;
26
+ const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
27
27
  const isSelected = (0, _slatereact.useSelected)();
28
28
  const editor = (0, _ContentfulEditorProvider.useContentfulEditor)();
29
29
  const sdk = (0, _SdkProvider.useSdkContext)();
@@ -35,7 +35,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
35
35
  if (cache && cache.has(obj)) {
36
36
  return cache.get(obj);
37
37
  }
38
- var newObj = {};
38
+ var newObj = {
39
+ __proto__: null
40
+ };
39
41
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
40
42
  for(var key in obj){
41
43
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -53,10 +55,10 @@ function _interop_require_wildcard(obj, nodeInterop) {
53
55
  }
54
56
  return newObj;
55
57
  }
56
- const { getEntryTitle , getEntryStatus } = _fieldeditorshared.entityHelpers;
58
+ const { getEntryTitle, getEntryStatus } = _fieldeditorshared.entityHelpers;
57
59
  function FetchingWrappedResourceInlineCard(props) {
58
- const { link , onEntityFetchComplete } = props;
59
- const { data , status: requestStatus } = (0, _fieldeditorreference.useResource)(link.linkType, link.urn);
60
+ const { link, onEntityFetchComplete } = props;
61
+ const { data, status: requestStatus } = (0, _fieldeditorreference.useResource)(link.linkType, link.urn);
60
62
  _react.useEffect(()=>{
61
63
  if (requestStatus === 'success') {
62
64
  onEntityFetchComplete?.();
@@ -77,7 +79,7 @@ function FetchingWrappedResourceInlineCard(props) {
77
79
  isLoading: true
78
80
  });
79
81
  }
80
- const { resource: entry , contentType , defaultLocaleCode , space } = data;
82
+ const { resource: entry, contentType, defaultLocaleCode, space } = data;
81
83
  const title = getEntryTitle({
82
84
  entry,
83
85
  contentType,
@@ -22,8 +22,8 @@ function _interop_require_default(obj) {
22
22
  };
23
23
  }
24
24
  function LinkedResourceInline(props) {
25
- const { attributes , children , element } = props;
26
- const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
25
+ const { attributes, children, element } = props;
26
+ const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
27
27
  const isSelected = (0, _slatereact.useSelected)();
28
28
  const editor = (0, _ContentfulEditorProvider.useContentfulEditor)();
29
29
  const sdk = (0, _SdkProvider.useSdkContext)();
@@ -38,7 +38,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
38
38
  if (cache && cache.has(obj)) {
39
39
  return cache.get(obj);
40
40
  }
41
- var newObj = {};
41
+ var newObj = {
42
+ __proto__: null
43
+ };
42
44
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
43
45
  for(var key in obj){
44
46
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -44,7 +44,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
44
44
  if (cache && cache.has(obj)) {
45
45
  return cache.get(obj);
46
46
  }
47
- var newObj = {};
47
+ var newObj = {
48
+ __proto__: null
49
+ };
48
50
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
49
51
  for(var key in obj){
50
52
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -20,7 +20,7 @@ function _interop_require_default(obj) {
20
20
  default: obj
21
21
  };
22
22
  }
23
- const buildHeadingEventHandler = (type)=>(editor, { options: { hotkey } })=>(event)=>{
23
+ const buildHeadingEventHandler = (type)=>(editor, { options: { hotkey } })=>(event)=>{
24
24
  if (editor.selection && hotkey && (0, _ishotkey.default)(hotkey, event)) {
25
25
  const isActive = (0, _editor.isBlockSelected)(editor, type);
26
26
  editor.tracking.onShortcutAction(isActive ? 'remove' : 'insert', {
@@ -9,17 +9,17 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- withHrEvents: function() {
13
- return withHrEvents;
12
+ Hr: function() {
13
+ return Hr;
14
14
  },
15
15
  ToolbarHrButton: function() {
16
16
  return ToolbarHrButton;
17
17
  },
18
- Hr: function() {
19
- return Hr;
20
- },
21
18
  createHrPlugin: function() {
22
19
  return createHrPlugin;
20
+ },
21
+ withHrEvents: function() {
22
+ return withHrEvents;
23
23
  }
24
24
  });
25
25
  const _react = _interop_require_wildcard(require("react"));
@@ -59,7 +59,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
59
59
  if (cache && cache.has(obj)) {
60
60
  return cache.get(obj);
61
61
  }
62
- var newObj = {};
62
+ var newObj = {
63
+ __proto__: null
64
+ };
63
65
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
64
66
  for(var key in obj){
65
67
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -59,7 +59,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
59
59
  if (cache && cache.has(obj)) {
60
60
  return cache.get(obj);
61
61
  }
62
- var newObj = {};
62
+ var newObj = {
63
+ __proto__: null
64
+ };
63
65
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
64
66
  for(var key in obj){
65
67
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -140,7 +142,7 @@ function HyperlinkModal(props) {
140
142
  });
141
143
  }
142
144
  function entityToLink(entity) {
143
- const { id , type } = entity.sys;
145
+ const { id, type } = entity.sys;
144
146
  return {
145
147
  sys: {
146
148
  id,
@@ -150,7 +152,7 @@ function HyperlinkModal(props) {
150
152
  };
151
153
  }
152
154
  function entityToResourceLink(entity) {
153
- const { urn } = entity.sys;
155
+ const { urn } = entity.sys;
154
156
  return {
155
157
  sys: {
156
158
  urn,
@@ -311,7 +313,7 @@ async function addOrEditLink(editor, sdk, logAction, targetPath) {
311
313
  shouldCloseOnEscapePress: true,
312
314
  shouldCloseOnOverlayClick: true,
313
315
  allowHeightOverflow: true
314
- }, ({ onClose })=>{
316
+ }, ({ onClose })=>{
315
317
  return _react.createElement(HyperlinkModal, {
316
318
  linkTarget: linkTarget,
317
319
  linkText: currentLinkText,
@@ -328,7 +330,7 @@ async function addOrEditLink(editor, sdk, logAction, targetPath) {
328
330
  logAction(isEditing ? 'cancelEditHyperlinkDialog' : 'cancelCreateHyperlinkDialog');
329
331
  return;
330
332
  }
331
- const { linkText: text , linkTarget: url , linkType: type , linkEntity: target } = data;
333
+ const { linkText: text, linkTarget: url, linkType: type, linkEntity: target } = data;
332
334
  (0, _internal.withoutNormalizing)(editor, ()=>{
333
335
  (0, _editor.insertLink)(editor, {
334
336
  text,
@@ -37,7 +37,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
37
37
  if (cache && cache.has(obj)) {
38
38
  return cache.get(obj);
39
39
  }
40
- var newObj = {};
40
+ var newObj = {
41
+ __proto__: null
42
+ };
41
43
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
42
44
  for(var key in obj){
43
45
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -56,9 +58,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
56
58
  return newObj;
57
59
  }
58
60
  function EntityHyperlink(props) {
59
- const { editor , sdk , isLinkFocused , pathToElement } = (0, _useHyperlinkCommon.useHyperlinkCommon)(props.element);
60
- const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
61
- const { target } = props.element.data;
61
+ const { editor, sdk, isLinkFocused, pathToElement } = (0, _useHyperlinkCommon.useHyperlinkCommon)(props.element);
62
+ const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
63
+ const { target } = props.element.data;
62
64
  const tooltipContent = (0, _useEntityInfo.useEntityInfo)({
63
65
  target,
64
66
  sdk,
@@ -34,7 +34,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
34
34
  if (cache && cache.has(obj)) {
35
35
  return cache.get(obj);
36
36
  }
37
- var newObj = {};
37
+ var newObj = {
38
+ __proto__: null
39
+ };
38
40
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
39
41
  for(var key in obj){
40
42
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -52,7 +54,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
52
54
  }
53
55
  return newObj;
54
56
  }
55
- const LinkPopover = ({ isLinkFocused , popoverText , handleEditLink , handleRemoveLink , children , handleCopyLink })=>{
57
+ const LinkPopover = ({ isLinkFocused, popoverText, handleEditLink, handleRemoveLink, children, handleCopyLink })=>{
56
58
  const isEditorFocused = (0, _hooks.useFocused)();
57
59
  const popoverContent = _react.useRef(null);
58
60
  const [isPopoverContentClicked, setIsPopoverContentClicked] = _react.useState(false);
@@ -37,7 +37,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
37
37
  if (cache && cache.has(obj)) {
38
38
  return cache.get(obj);
39
39
  }
40
- var newObj = {};
40
+ var newObj = {
41
+ __proto__: null
42
+ };
41
43
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
42
44
  for(var key in obj){
43
45
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -56,9 +58,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
56
58
  return newObj;
57
59
  }
58
60
  function ResourceHyperlink(props) {
59
- const { editor , sdk , isLinkFocused , pathToElement } = (0, _useHyperlinkCommon.useHyperlinkCommon)(props.element);
60
- const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
61
- const { target } = props.element.data;
61
+ const { editor, sdk, isLinkFocused, pathToElement } = (0, _useHyperlinkCommon.useHyperlinkCommon)(props.element);
62
+ const { onEntityFetchComplete } = (0, _linkstracking.useLinkTracking)();
63
+ const { target } = props.element.data;
62
64
  const tooltipContent = (0, _useResourceEntityInfo.useResourceEntityInfo)({
63
65
  target,
64
66
  onEntityFetchComplete
@@ -36,7 +36,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
36
36
  if (cache && cache.has(obj)) {
37
37
  return cache.get(obj);
38
38
  }
39
- var newObj = {};
39
+ var newObj = {
40
+ __proto__: null
41
+ };
40
42
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
41
43
  for(var key in obj){
42
44
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -35,7 +35,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
35
35
  if (cache && cache.has(obj)) {
36
36
  return cache.get(obj);
37
37
  }
38
- var newObj = {};
38
+ var newObj = {
39
+ __proto__: null
40
+ };
39
41
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
40
42
  for(var key in obj){
41
43
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -54,7 +56,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
54
56
  return newObj;
55
57
  }
56
58
  function UrlHyperlink(props) {
57
- const { editor , sdk , isLinkFocused , pathToElement } = (0, _useHyperlinkCommon.useHyperlinkCommon)(props.element);
59
+ const { editor, sdk, isLinkFocused, pathToElement } = (0, _useHyperlinkCommon.useHyperlinkCommon)(props.element);
58
60
  const uri = props.element.data?.uri;
59
61
  const popoverText = _react.createElement(_f36components.TextLink, {
60
62
  className: _styles.styles.openLink,
@@ -9,14 +9,14 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ handleCopyLink: function() {
13
+ return handleCopyLink;
14
+ },
12
15
  handleEditLink: function() {
13
16
  return handleEditLink;
14
17
  },
15
18
  handleRemoveLink: function() {
16
19
  return handleRemoveLink;
17
- },
18
- handleCopyLink: function() {
19
- return handleCopyLink;
20
20
  }
21
21
  });
22
22
  const _f36components = require("@contentful/f36-components");
@@ -44,7 +44,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
44
44
  if (cache && cache.has(obj)) {
45
45
  return cache.get(obj);
46
46
  }
47
- var newObj = {};
47
+ var newObj = {
48
+ __proto__: null
49
+ };
48
50
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
49
51
  for(var key in obj){
50
52
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -66,7 +68,7 @@ const isAnchor = (element)=>element.nodeName === 'A' && !!element.getAttribute('
66
68
  const isEntryAnchor = (element)=>element.nodeName === 'A' && element.getAttribute('data-link-type') === 'Entry';
67
69
  const isAssetAnchor = (element)=>element.nodeName === 'A' && element.getAttribute('data-link-type') === 'Asset';
68
70
  const isResourceAnchor = (element)=>element.nodeName === 'A' && element.getAttribute('data-resource-link-type') === 'Contentful:Entry';
69
- const buildHyperlinkEventHandler = (sdk)=>(editor, { options: { hotkey } })=>{
71
+ const buildHyperlinkEventHandler = (sdk)=>(editor, { options: { hotkey } })=>{
70
72
  return (event)=>{
71
73
  if (!editor.selection) {
72
74
  return;
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useEntityInfo", {
11
11
  const _react = require("react");
12
12
  const _fieldeditorshared = require("@contentful/field-editor-shared");
13
13
  const _utils = require("./utils");
14
- async function fetchAllData({ sdk , entityId , entityType , localeCode , defaultLocaleCode }) {
14
+ async function fetchAllData({ sdk, entityId, entityType, localeCode, defaultLocaleCode }) {
15
15
  let contentType;
16
16
  const getEntity = entityType === 'Entry' ? sdk.space.getEntry : sdk.space.getAsset;
17
17
  const entity = await getEntity(entityId);
@@ -48,7 +48,7 @@ async function fetchAllData({ sdk , entityId , entityType , localeCode , default
48
48
  contentTypeName: contentType ? contentType.name : ''
49
49
  };
50
50
  }
51
- function useRequestStatus({ sdk , target , onEntityFetchComplete }) {
51
+ function useRequestStatus({ sdk, target, onEntityFetchComplete }) {
52
52
  const [requestStatus, setRequestStatus] = (0, _react.useState)({
53
53
  type: 'loading'
54
54
  });
@@ -84,7 +84,7 @@ function useRequestStatus({ sdk , target , onEntityFetchComplete }) {
84
84
  }
85
85
  function useEntityInfo(props) {
86
86
  const status = useRequestStatus(props);
87
- const { linkType } = props.target.sys;
87
+ const { linkType } = props.target.sys;
88
88
  if (status.type === 'loading') {
89
89
  return `Loading ${linkType.toLowerCase()}...`;
90
90
  }
@@ -32,7 +32,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
32
32
  if (cache && cache.has(obj)) {
33
33
  return cache.get(obj);
34
34
  }
35
- var newObj = {};
35
+ var newObj = {
36
+ __proto__: null
37
+ };
36
38
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
37
39
  for(var key in obj){
38
40
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -50,8 +52,8 @@ function _interop_require_wildcard(obj, nodeInterop) {
50
52
  }
51
53
  return newObj;
52
54
  }
53
- function useResourceEntityInfo({ onEntityFetchComplete , target }) {
54
- const { data , error , status } = (0, _fieldeditorreference.useResource)(target.sys.linkType, target.sys.urn);
55
+ function useResourceEntityInfo({ onEntityFetchComplete, target }) {
56
+ const { data, error, status } = (0, _fieldeditorreference.useResource)(target.sys.linkType, target.sys.urn);
55
57
  _react.useEffect(()=>{
56
58
  if (status === 'success') {
57
59
  onEntityFetchComplete?.();
@@ -9,11 +9,11 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- hasText: function() {
13
- return hasText;
14
- },
15
12
  getEntityInfo: function() {
16
13
  return getEntityInfo;
14
+ },
15
+ hasText: function() {
16
+ return hasText;
17
17
  }
18
18
  });
19
19
  const _fieldeditorreference = require("@contentful/field-editor-reference");
@@ -28,7 +28,7 @@ function getEntityInfo(data) {
28
28
  if (!data) {
29
29
  return '';
30
30
  }
31
- const { entityTitle , contentTypeName , entityStatus , jobs } = data;
31
+ const { entityTitle, contentTypeName, entityStatus, jobs } = data;
32
32
  const title = (0, _utils.truncateTitle)(entityTitle, 60) || 'Untitled';
33
33
  const scheduledActions = jobs.length > 0 ? (0, _fieldeditorreference.getScheduleTooltipContent)({
34
34
  job: jobs[0],