@contentful/field-editor-rich-text 1.1.3 → 2.0.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/CHANGELOG.md +0 -60
  2. package/README.md +1 -1
  3. package/dist/ContentfulEditorProvider.d.ts +8 -0
  4. package/dist/RichTextEditor.d.ts +18 -60
  5. package/dist/RichTextEditor.styles.d.ts +7 -0
  6. package/dist/SdkProvider.d.ts +7 -0
  7. package/dist/Toolbar/components/EmbedEntityWidget.d.ts +5 -0
  8. package/dist/Toolbar/components/EmbeddedEntityDropdownButton.d.ts +9 -0
  9. package/dist/Toolbar/components/StickyToolbarWrapper.d.ts +7 -0
  10. package/dist/Toolbar/index.d.ts +5 -20
  11. package/dist/TrackingProvider.d.ts +11 -0
  12. package/dist/constants/Schema.d.ts +93 -11
  13. package/dist/dialogs/openRichTextDialog.d.ts +2 -1
  14. package/dist/dialogs/renderRichTextDialog.d.ts +2 -1
  15. package/dist/field-editor-rich-text.cjs.development.js +4749 -5125
  16. package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
  17. package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
  18. package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
  19. package/dist/field-editor-rich-text.esm.js +4729 -5105
  20. package/dist/field-editor-rich-text.esm.js.map +1 -1
  21. package/dist/helpers/editor.d.ts +43 -0
  22. package/dist/helpers/environment.d.ts +2 -0
  23. package/dist/helpers/extractNodes.d.ts +7 -0
  24. package/dist/helpers/formatDateAndTime.d.ts +15 -0
  25. package/dist/helpers/getLinkedContentTypeIdsForNodeType.d.ts +26 -2
  26. package/dist/helpers/newEntitySelectorConfigFromRichTextField.d.ts +5 -1
  27. package/dist/helpers/sanitizeSlateDoc.d.ts +5 -0
  28. package/dist/helpers/transformers.d.ts +8 -0
  29. package/dist/helpers/validations.d.ts +10 -0
  30. package/dist/plugins/Break/createExitBreakPlugin.d.ts +2 -0
  31. package/dist/plugins/Break/createSoftBreakPlugin.d.ts +2 -0
  32. package/dist/plugins/Break/index.d.ts +3 -0
  33. package/dist/plugins/DragAndDrop/index.d.ts +2 -0
  34. package/dist/plugins/EmbeddedEntityBlock/LinkedEntityBlock.d.ts +14 -0
  35. package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +11 -10
  36. package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -23
  37. package/dist/plugins/EmbeddedEntityBlock/index.d.ts +6 -26
  38. package/dist/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.d.ts +13 -0
  39. package/dist/plugins/EmbeddedEntityInline/Util.d.ts +16 -0
  40. package/dist/plugins/EmbeddedEntityInline/index.d.ts +11 -0
  41. package/dist/plugins/Heading/components/Heading.d.ts +11 -0
  42. package/dist/plugins/Heading/components/ToolbarHeadingButton.d.ts +4 -0
  43. package/dist/plugins/Heading/createHeadingPlugin.d.ts +2 -0
  44. package/dist/plugins/Heading/index.d.ts +2 -380
  45. package/dist/plugins/Hr/index.d.ts +12 -61
  46. package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +9 -0
  47. package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +16 -0
  48. package/dist/plugins/Hyperlink/index.d.ts +9 -9
  49. package/dist/plugins/Hyperlink/truncate.d.ts +1 -1
  50. package/dist/plugins/Hyperlink/utils.d.ts +3 -0
  51. package/dist/plugins/List/components/List.d.ts +3 -0
  52. package/dist/plugins/List/components/ListItem.d.ts +2 -0
  53. package/dist/plugins/List/components/ToolbarListButton.d.ts +4 -0
  54. package/dist/plugins/List/createListPlugin.d.ts +2 -0
  55. package/dist/plugins/List/index.d.ts +2 -114
  56. package/dist/plugins/List/insertListBreak.d.ts +2 -0
  57. package/dist/plugins/List/insertListFragment.d.ts +2 -0
  58. package/dist/plugins/List/transforms/insertListItem.d.ts +5 -0
  59. package/dist/plugins/List/utils.d.ts +14 -0
  60. package/dist/plugins/List/withList.d.ts +3 -0
  61. package/dist/plugins/Marks/Bold.d.ts +9 -0
  62. package/dist/plugins/Marks/Code.d.ts +9 -0
  63. package/dist/plugins/Marks/Italic.d.ts +9 -0
  64. package/dist/plugins/Marks/Underline.d.ts +9 -0
  65. package/dist/plugins/Marks/index.d.ts +2 -0
  66. package/dist/plugins/Normalizer/baseRules.d.ts +2 -0
  67. package/dist/plugins/Normalizer/createNormalizerPlugin.d.ts +2 -0
  68. package/dist/plugins/Normalizer/index.d.ts +2 -0
  69. package/dist/plugins/Normalizer/types.d.ts +39 -0
  70. package/dist/plugins/Normalizer/utils.d.ts +8 -0
  71. package/dist/plugins/Normalizer/withNormalizer.d.ts +2 -0
  72. package/dist/plugins/Paragraph/Paragraph.d.ts +2 -0
  73. package/dist/plugins/Paragraph/createParagraphPlugin.d.ts +2 -0
  74. package/dist/plugins/Paragraph/index.d.ts +1 -5
  75. package/dist/plugins/Paragraph/utils.d.ts +2 -0
  76. package/dist/plugins/PasteHTML/createPasteHTMLPlugin.d.ts +2 -0
  77. package/dist/plugins/PasteHTML/index.d.ts +1 -0
  78. package/dist/plugins/PasteHTML/utils/sanitizeHTML.d.ts +1 -0
  79. package/dist/plugins/PasteHTML/utils/sanitizeSheets.d.ts +4 -0
  80. package/dist/plugins/Quote/components/Quote.d.ts +2 -0
  81. package/dist/plugins/Quote/components/ToolbarQuoteButton.d.ts +4 -0
  82. package/dist/plugins/Quote/createQuotePlugin.d.ts +2 -0
  83. package/dist/plugins/Quote/index.d.ts +2 -59
  84. package/dist/plugins/Quote/toggleQuote.d.ts +3 -0
  85. package/dist/plugins/SelectOnBackspace/createSelectOnBackspacePlugin.d.ts +2 -0
  86. package/dist/plugins/SelectOnBackspace/index.d.ts +1 -0
  87. package/dist/plugins/Table/actions/addColumn.d.ts +4 -0
  88. package/dist/plugins/Table/actions/addRow.d.ts +3 -0
  89. package/dist/plugins/Table/actions/index.d.ts +3 -0
  90. package/dist/plugins/Table/actions/setHeader.d.ts +2 -0
  91. package/dist/plugins/Table/addTableTrackingEvents.d.ts +3 -0
  92. package/dist/plugins/Table/components/Cell.d.ts +2 -0
  93. package/dist/plugins/Table/components/HeaderCell.d.ts +2 -0
  94. package/dist/plugins/Table/components/Row.d.ts +2 -0
  95. package/dist/plugins/Table/components/Table.d.ts +2 -0
  96. package/dist/plugins/Table/components/TableActions.d.ts +4 -0
  97. package/dist/plugins/Table/components/ToolbarButton.d.ts +4 -0
  98. package/dist/plugins/Table/createTablePlugin.d.ts +3 -0
  99. package/dist/plugins/Table/helpers.d.ts +15 -0
  100. package/dist/plugins/Table/index.d.ts +2 -0
  101. package/dist/plugins/Text/createTextPlugin.d.ts +2 -0
  102. package/dist/plugins/Text/index.d.ts +1 -0
  103. package/dist/plugins/TrailingParagraph/index.d.ts +1 -0
  104. package/dist/plugins/Voids/createVoidsPlugin.d.ts +2 -0
  105. package/dist/plugins/Voids/index.d.ts +1 -0
  106. package/dist/plugins/Voids/transformVoid.d.ts +6 -0
  107. package/dist/plugins/index.d.ts +6 -1
  108. package/dist/plugins/links-tracking.d.ts +7 -0
  109. package/dist/plugins/shared/EntityStatusIcon.d.ts +7 -0
  110. package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +23 -0
  111. package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +13 -0
  112. package/dist/plugins/shared/ToolbarButton.d.ts +11 -0
  113. package/dist/test-utils/assertOutput.d.ts +8 -0
  114. package/dist/test-utils/createEditor.d.ts +14 -0
  115. package/dist/test-utils/index.d.ts +4 -0
  116. package/dist/test-utils/jsx.d.ts +28 -0
  117. package/dist/test-utils/mockPlugin.d.ts +2 -0
  118. package/dist/test-utils/randomId.d.ts +4 -0
  119. package/dist/test-utils/setEmptyDataAttribute.d.ts +6 -0
  120. package/dist/test-utils/validation.d.ts +1 -0
  121. package/dist/types.d.ts +42 -0
  122. package/package.json +40 -34
  123. package/LICENSE +0 -21
  124. package/dist/RichTextEditor.spec.d.ts +0 -1
  125. package/dist/Toolbar/StickyToolbarWrapper.d.ts +0 -12
  126. package/dist/Toolbar/Toolbar.spec.d.ts +0 -1
  127. package/dist/helpers/browserSupport.d.ts +0 -1
  128. package/dist/plugins/Bold/index.d.ts +0 -64
  129. package/dist/plugins/Code/index.d.ts +0 -64
  130. package/dist/plugins/CommandPalette/CommandMark.d.ts +0 -12
  131. package/dist/plugins/CommandPalette/CommandPalette.d.ts +0 -10
  132. package/dist/plugins/CommandPalette/CommandPaletteService.d.ts +0 -20
  133. package/dist/plugins/CommandPalette/CommandPanel/CommandPanelMenu.d.ts +0 -43
  134. package/dist/plugins/CommandPalette/CommandPanel/InViewport/InViewport.d.ts +0 -37
  135. package/dist/plugins/CommandPalette/CommandPanel/index.d.ts +0 -37
  136. package/dist/plugins/CommandPalette/Util.d.ts +0 -5
  137. package/dist/plugins/CommandPalette/index.d.ts +0 -7
  138. package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.d.ts +0 -20
  139. package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.styles.d.ts +0 -3
  140. package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedAssetCard.d.ts +0 -15
  141. package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedEntryCard.d.ts +0 -15
  142. package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.d.ts +0 -21
  143. package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.styles.d.ts +0 -4
  144. package/dist/plugins/EmbeddedEntryInline/FetchingWrappedInlineEntryCard.d.ts +0 -14
  145. package/dist/plugins/EmbeddedEntryInline/ToolbarIcon.d.ts +0 -11
  146. package/dist/plugins/EmbeddedEntryInline/Utils.d.ts +0 -4
  147. package/dist/plugins/EmbeddedEntryInline/index.d.ts +0 -12
  148. package/dist/plugins/EntryEmbedDropdown/index.d.ts +0 -14
  149. package/dist/plugins/Heading/HeadingDropdown.d.ts +0 -28
  150. package/dist/plugins/Heading/HeadingDropdownItem.d.ts +0 -57
  151. package/dist/plugins/Heading/Paragraph.d.ts +0 -58
  152. package/dist/plugins/Hyperlink/Hyperlink.d.ts +0 -13
  153. package/dist/plugins/Hyperlink/ToolbarIcon.d.ts +0 -7
  154. package/dist/plugins/Hyperlink/Util.d.ts +0 -43
  155. package/dist/plugins/Hyperlink/styles.d.ts +0 -12
  156. package/dist/plugins/Hyperlink/useRequestStatus.d.ts +0 -6
  157. package/dist/plugins/InsertBeforeFirstVoidBlock/Util.d.ts +0 -14
  158. package/dist/plugins/InsertBeforeFirstVoidBlock/index.d.ts +0 -3
  159. package/dist/plugins/Italic/index.d.ts +0 -64
  160. package/dist/plugins/List/EditListWrapper.d.ts +0 -2
  161. package/dist/plugins/List/ToolbarDecorator.d.ts +0 -62
  162. package/dist/plugins/NewLinePlugin/index.d.ts +0 -3
  163. package/dist/plugins/Paste/Paste.d.ts +0 -1
  164. package/dist/plugins/Paste/Paste.spec.d.ts +0 -1
  165. package/dist/plugins/Paste/index.d.ts +0 -7
  166. package/dist/plugins/Paste/index.spec.d.ts +0 -1
  167. package/dist/plugins/PasteHtml/PasteHtml.spec.d.ts +0 -1
  168. package/dist/plugins/PasteHtml/Serializer.d.ts +0 -1
  169. package/dist/plugins/PasteHtml/index.d.ts +0 -3
  170. package/dist/plugins/PasteText/PasteText.spec.d.ts +0 -1
  171. package/dist/plugins/PasteText/index.d.ts +0 -3
  172. package/dist/plugins/Quote/QuotePlugin.d.ts +0 -10
  173. package/dist/plugins/Quote/Util.d.ts +0 -2
  174. package/dist/plugins/Underlined/index.d.ts +0 -64
  175. package/dist/plugins/shared/BlockSelectDecorator.d.ts +0 -63
  176. package/dist/plugins/shared/BlockToggleDecorator.d.ts +0 -65
  177. package/dist/plugins/shared/MarkDecorator.d.ts +0 -12
  178. package/dist/plugins/shared/MarkPlugin.d.ts +0 -9
  179. package/dist/plugins/shared/MarkToggleDecorator.d.ts +0 -62
  180. package/dist/plugins/shared/NodeDecorator.d.ts +0 -15
  181. package/dist/plugins/shared/PasteTestHelpers.d.ts +0 -35
  182. package/dist/plugins/shared/PluginApi.d.ts +0 -31
  183. package/dist/plugins/shared/PropTypes.d.ts +0 -15
  184. package/dist/plugins/shared/ToolbarDropdownListItem.d.ts +0 -14
  185. package/dist/plugins/shared/ToolbarIcon.d.ts +0 -16
  186. package/dist/plugins/shared/Util.d.ts +0 -1
  187. package/dist/plugins/shared/UtilHave.d.ts +0 -24
  188. package/dist/setupTests.d.ts +0 -1
  189. package/dist/validations/index.d.ts +0 -9
  190. package/dist/validations/validations.spec.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "1.1.3",
3
+ "version": "2.0.0-next.11",
4
+ "publishConfig": {
5
+ "tag": "next"
6
+ },
4
7
  "source": "./src/index.tsx",
5
8
  "main": "./dist/index.js",
6
9
  "module": "dist/field-editor-rich-text.esm.js",
@@ -17,37 +20,41 @@
17
20
  "scripts": {
18
21
  "watch": "tsdx watch",
19
22
  "build": "tsdx build",
20
- "test": "jest --env=jsdom --watch --config jest.config.js",
21
- "test:ci": "jest --env=jsdom --ci",
23
+ "test": "tsdx test --env=jsdom --watch",
24
+ "test:ci": "tsdx test --env=jsdom --ci --passWithNoTests",
22
25
  "tsc": "tsc -p ./ --noEmit",
23
- "lint": "eslint ./src --ext .js,.jsx,.ts,.tsx"
26
+ "lint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
27
+ "prepublishOnly": "yarn build"
24
28
  },
25
29
  "dependencies": {
26
- "@contentful/contentful-slatejs-adapter": "14.1.2",
27
- "@contentful/f36-components": "^4.0.27",
28
- "@contentful/f36-icons": "^4.1.0",
29
- "@contentful/f36-tokens": "^4.0.0",
30
- "@contentful/field-editor-reference": "^4.1.2",
31
- "@contentful/field-editor-shared": "^1.1.2",
32
- "@contentful/rich-text-plain-text-renderer": "^14.0.0",
33
- "@contentful/rich-text-types": "^14.0.1",
34
- "@productboard/slate-edit-list": "^0.19.1",
35
- "@wikifactory/slate-trailing-block": "^0.6.0",
36
- "classnames": "^2.2.6",
37
- "detect-browser": "^3.0.1",
38
- "emotion": "^10.0.17",
39
- "fast-deep-equal": "^3.1.1",
40
- "immutable": "^3.8.2",
41
- "lodash": "^4.17.15",
42
- "lodash-es": "^4.17.15",
43
- "prop-types": "^15.7.2",
44
- "slate": "0.44.10",
45
- "slate-html-serializer": "0.7.34",
46
- "slate-plain-serializer": "0.6.34",
47
- "slate-react": "0.21.16"
30
+ "@contentful/contentful-slatejs-adapter": "^15.11.0",
31
+ "@contentful/f36-components": "^4.0.1-beta.2705",
32
+ "@contentful/f36-icons": "^4.0.1-beta.2705",
33
+ "@contentful/f36-tokens": "^4.0.1-beta.2705",
34
+ "@contentful/field-editor-reference": "^4.0.7",
35
+ "@contentful/field-editor-shared": "^1.0.3",
36
+ "@contentful/rich-text-plain-text-renderer": "^15.11.1",
37
+ "@contentful/rich-text-types": "^15.11.1",
38
+ "@udecode/plate-basic-marks": "^9.2.1",
39
+ "@udecode/plate-break": "^9.2.1",
40
+ "@udecode/plate-core": "^9.2.1",
41
+ "@udecode/plate-list": "^9.2.1",
42
+ "@udecode/plate-paragraph": "^9.2.1",
43
+ "@udecode/plate-select": "^9.2.1",
44
+ "@udecode/plate-serializer-docx": "^9.2.1",
45
+ "@udecode/plate-table": "^9.2.1",
46
+ "@udecode/plate-trailing-block": "^9.2.1",
47
+ "fast-deep-equal": "^3.1.3",
48
+ "is-hotkey": "^0.2.0",
49
+ "is-plain-obj": "^3.0.0",
50
+ "slate": "^0.72.3",
51
+ "slate-history": "^0.66.0",
52
+ "slate-hyperscript": "^0.67.0",
53
+ "slate-react": "^0.72.6"
48
54
  },
49
55
  "peerDependencies": {
50
- "react": ">=16.8.0"
56
+ "react": ">=16.14.0",
57
+ "react-dom": ">=16.14.0"
51
58
  },
52
59
  "devDependencies": {
53
60
  "@babel/core": "^7.9.6",
@@ -58,11 +65,10 @@
58
65
  "@babel/plugin-transform-runtime": "^7.9.6",
59
66
  "@babel/preset-env": "7.12.11",
60
67
  "@babel/preset-react": "7.13.13",
61
- "@contentful/field-editor-test-utils": "^1.1.2",
62
- "@contentful/rich-text-react-renderer": "^14.1.1",
63
- "enzyme": "^3.11.0",
64
- "enzyme-adapter-react-16": "^1.15.2",
65
- "jest": "26.6.3"
66
- },
67
- "gitHead": "de8be92c698f4fd7348e79325f39ea1525439b1e"
68
+ "@contentful/field-editor-test-utils": "^1.0.0",
69
+ "@contentful/rich-text-react-renderer": "^15.11.0",
70
+ "@types/is-hotkey": "^0.1.6",
71
+ "@udecode/plate-test-utils": "^3.2.0",
72
+ "react": ">=16.14.0"
73
+ }
68
74
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020 Contentful
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- export default StickyToolbarWrapper;
2
- declare function StickyToolbarWrapper({ isDisabled, children }: {
3
- isDisabled: any;
4
- children: any;
5
- }): JSX.Element;
6
- declare namespace StickyToolbarWrapper {
7
- export namespace propTypes {
8
- export const isDisabled: PropTypes.Requireable<boolean>;
9
- export const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
- }
11
- }
12
- import PropTypes from "prop-types";
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export const SUPPORTS_NATIVE_SLATE_HYPERLINKS: boolean;
@@ -1,64 +0,0 @@
1
- export function BoldPlugin({ richTextAPI }: {
2
- richTextAPI: any;
3
- }): {
4
- renderMark: (props: any, _editor: any, next: any) => any;
5
- onKeyDown(event: any, editor: any, next: any): any;
6
- };
7
- declare var _default: {
8
- new (props: any): {
9
- handleToggle: (event: any) => any;
10
- render(): JSX.Element;
11
- context: any;
12
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
13
- forceUpdate(callback?: (() => void) | undefined): void;
14
- readonly props: Readonly<any> & Readonly<{
15
- children?: React.ReactNode;
16
- }>;
17
- state: Readonly<any>;
18
- refs: {
19
- [key: string]: React.ReactInstance;
20
- };
21
- componentDidMount?(): void;
22
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
23
- componentWillUnmount?(): void;
24
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
25
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
26
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
27
- componentWillMount?(): void;
28
- UNSAFE_componentWillMount?(): void;
29
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
30
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
31
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
32
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
33
- };
34
- new (props: any, context: any): {
35
- handleToggle: (event: any) => any;
36
- render(): JSX.Element;
37
- context: any;
38
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
39
- forceUpdate(callback?: (() => void) | undefined): void;
40
- readonly props: Readonly<any> & Readonly<{
41
- children?: React.ReactNode;
42
- }>;
43
- state: Readonly<any>;
44
- refs: {
45
- [key: string]: React.ReactInstance;
46
- };
47
- componentDidMount?(): void;
48
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
49
- componentWillUnmount?(): void;
50
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
51
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
52
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
53
- componentWillMount?(): void;
54
- UNSAFE_componentWillMount?(): void;
55
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
56
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
57
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
58
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
59
- };
60
- propTypes: any;
61
- contextType?: React.Context<any> | undefined;
62
- };
63
- export default _default;
64
- import React from "react";
@@ -1,64 +0,0 @@
1
- export function CodePlugin({ richTextAPI }: {
2
- richTextAPI: any;
3
- }): {
4
- renderMark: (props: any, _editor: any, next: any) => any;
5
- onKeyDown(event: any, editor: any, next: any): any;
6
- };
7
- declare var _default: {
8
- new (props: any): {
9
- handleToggle: (event: any) => any;
10
- render(): JSX.Element;
11
- context: any;
12
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
13
- forceUpdate(callback?: (() => void) | undefined): void;
14
- readonly props: Readonly<any> & Readonly<{
15
- children?: React.ReactNode;
16
- }>;
17
- state: Readonly<any>;
18
- refs: {
19
- [key: string]: React.ReactInstance;
20
- };
21
- componentDidMount?(): void;
22
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
23
- componentWillUnmount?(): void;
24
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
25
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
26
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
27
- componentWillMount?(): void;
28
- UNSAFE_componentWillMount?(): void;
29
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
30
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
31
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
32
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
33
- };
34
- new (props: any, context: any): {
35
- handleToggle: (event: any) => any;
36
- render(): JSX.Element;
37
- context: any;
38
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
39
- forceUpdate(callback?: (() => void) | undefined): void;
40
- readonly props: Readonly<any> & Readonly<{
41
- children?: React.ReactNode;
42
- }>;
43
- state: Readonly<any>;
44
- refs: {
45
- [key: string]: React.ReactInstance;
46
- };
47
- componentDidMount?(): void;
48
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
49
- componentWillUnmount?(): void;
50
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
51
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
52
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
53
- componentWillMount?(): void;
54
- UNSAFE_componentWillMount?(): void;
55
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
56
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
57
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
58
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
59
- };
60
- propTypes: any;
61
- contextType?: React.Context<any> | undefined;
62
- };
63
- export default _default;
64
- import React from "react";
@@ -1,12 +0,0 @@
1
- export default CommandMark;
2
- declare class CommandMark extends React.PureComponent<any, any, any> {
3
- static propTypes: {
4
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
5
- editor: PropTypes.Requireable<object>;
6
- attributes: PropTypes.Requireable<object>;
7
- };
8
- constructor(props: any);
9
- constructor(props: any, context: any);
10
- }
11
- import React from "react";
12
- import PropTypes from "prop-types";
@@ -1,10 +0,0 @@
1
- export default CommandPalette;
2
- declare class CommandPalette extends React.PureComponent<any, any, any> {
3
- static propTypes: {
4
- editor: PropTypes.Requireable<object>;
5
- richTextAPI: PropTypes.Requireable<object>;
6
- };
7
- constructor(props: any);
8
- }
9
- import React from "react";
10
- import PropTypes from "prop-types";
@@ -1,20 +0,0 @@
1
- export function fetchAssets(sdk: any, query?: string): Promise<any>;
2
- export function fetchEntries(sdk: any, contentType: any, query?: string): Promise<[any, any, any, any, any, any, any, any, any, any]>;
3
- export function isValidLinkedContentType(field: any, contentType: any, embedType: string): boolean;
4
- export function isEmbeddingEnabled(field: any): boolean;
5
- export class CommandPaletteActionBuilder {
6
- constructor(sdk: any);
7
- sdk: any;
8
- maybeBuildEmbedAction(embedType: any, contentType: any, callback: any): false | {
9
- label: string;
10
- group: any;
11
- callback: any;
12
- icon: string;
13
- };
14
- maybeBuildCreateAndEmbedAction(embedType: any, contentType: any, callback: any): Promise<false | {
15
- label: string;
16
- group: any;
17
- callback: any;
18
- icon: string;
19
- }>;
20
- }
@@ -1,43 +0,0 @@
1
- export class CommandPanel extends React.Component<any, any, any> {
2
- static propTypes: {
3
- items: PropTypes.Requireable<(PropTypes.InferProps<{
4
- label: PropTypes.Requireable<string>;
5
- icon: PropTypes.Requireable<string>;
6
- thumbnail: PropTypes.Requireable<string>;
7
- callback: PropTypes.Requireable<(...args: any[]) => any>;
8
- }> | null | undefined)[]>;
9
- searchString: PropTypes.Requireable<string>;
10
- className: PropTypes.Requireable<string>;
11
- testId: PropTypes.Requireable<string>;
12
- isLoading: PropTypes.Requireable<boolean>;
13
- isUpdating: PropTypes.Requireable<boolean>;
14
- breadcrumb: PropTypes.Requireable<string>;
15
- richTextAPI: PropTypes.Requireable<object>;
16
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
17
- };
18
- static defaultProps: {
19
- className: undefined;
20
- searchString: string;
21
- items: never[];
22
- testId: string;
23
- isLoading: boolean;
24
- isUpdating: boolean;
25
- };
26
- static getDerivedStateFromProps(props: any, state: any): {
27
- originalItems: any;
28
- originalSearchString: any;
29
- items: any;
30
- selectedKey: any;
31
- };
32
- constructor(props: any);
33
- constructor(props: any, context: any);
34
- handleKeyboard: (e: any) => void;
35
- renderGroups(): JSX.Element | JSX.Element[];
36
- renderItems(groupName: any): JSX.Element[];
37
- renderNavigationBar: () => JSX.Element;
38
- renderStatusBar: () => JSX.Element;
39
- renderSkeleton: () => JSX.Element;
40
- }
41
- export default CommandPanel;
42
- import React from "react";
43
- import PropTypes from "prop-types";
@@ -1,37 +0,0 @@
1
- export class InViewport extends React.Component<any, any, any> {
2
- static defaultProps: {
3
- testId: string;
4
- offset: number;
5
- };
6
- constructor(props: any);
7
- constructor(props: any, context: any);
8
- tGetDomPosition: any;
9
- nodeRef: any;
10
- lastOverflowAt: any;
11
- tOnOverflowTop: (...args: any[]) => any;
12
- tOnOverflowBottom: (...args: any[]) => any;
13
- tOnOverflowRight: (...args: any[]) => any;
14
- tOnOverflowLeft: (...args: any[]) => any;
15
- getDomPosition: () => void;
16
- bindEventListeners: () => void;
17
- handleOverflow: ({ top, left, bottom, right }: {
18
- top: any;
19
- left: any;
20
- bottom: any;
21
- right: any;
22
- }, windowWidth: any, windowHeight: any) => void;
23
- }
24
- export namespace InViewport {
25
- export namespace propTypes {
26
- export const offset: PropTypes.Requireable<number>;
27
- export const onOverflowTop: PropTypes.Requireable<(...args: any[]) => any>;
28
- export const onOverflowRight: PropTypes.Requireable<(...args: any[]) => any>;
29
- export const onOverflowBottom: PropTypes.Requireable<(...args: any[]) => any>;
30
- export const onOverflowLeft: PropTypes.Requireable<(...args: any[]) => any>;
31
- export const className: PropTypes.Requireable<string>;
32
- export const children: PropTypes.Requireable<any>;
33
- export const testId: PropTypes.Requireable<string>;
34
- }
35
- }
36
- import React from "react";
37
- import PropTypes from "prop-types";
@@ -1,37 +0,0 @@
1
- export default CommandPalette;
2
- declare class CommandPalette extends React.PureComponent<any, any, any> {
3
- static propTypes: {
4
- editor: PropTypes.Requireable<object>;
5
- command: PropTypes.Requireable<string>;
6
- richTextAPI: PropTypes.Requireable<object>;
7
- };
8
- constructor(props: any);
9
- constructor(props: any, context: any);
10
- paletteDimensions: {
11
- height: number;
12
- width: number;
13
- };
14
- isComponentMounted: boolean | undefined;
15
- bindEventListeners: () => void;
16
- removeEventListeners: () => void;
17
- handleOutsideClick: (event: any) => void;
18
- requestUpdate: import("lodash").DebouncedFunc<() => void>;
19
- createCommand: (label: any, contentType: any, entry: any, type: any, description: any, thumbnail: any) => {
20
- label: string;
21
- thumbnail: any;
22
- contentType: any;
23
- callback: () => void;
24
- };
25
- onCreateAndEmbedEntity: (contentTypeId: any, nodeType: any) => Promise<any>;
26
- createContentTypeActions: (actionBuilder: any, contentType: any) => Promise<any[]>;
27
- createAssetActions: (actionBuilder: any) => Promise<any[]>;
28
- handleScroll: (e: any) => void;
29
- clearCommand: () => void;
30
- createCommands: (contentType: any, type: any, command: any) => Promise<void>;
31
- createInitialCommands: () => Promise<void>;
32
- handleKeyboard: (e: any) => void;
33
- palette: HTMLDivElement | null | undefined;
34
- updatePanelPosition(): void;
35
- }
36
- import React from "react";
37
- import PropTypes from "prop-types";
@@ -1,5 +0,0 @@
1
- export function getCommandText(editor: any): string;
2
- export function getDecorationOrDefault(editor: any): any | null;
3
- export function hasCommandPaletteMarkType(markType: any): boolean;
4
- export function hasCommandPaletteDecoration(editor: any): boolean;
5
- export function removeCommand(editor: any, command: any, anchorOffset?: number): void;
@@ -1,7 +0,0 @@
1
- export function CommandPalettePlugin({ richTextAPI }: {
2
- richTextAPI: any;
3
- }): {
4
- decorateNode: (_node: any, editor: any, next: any) => any[];
5
- renderMark: (props: any, editor: any, next: any) => any;
6
- renderEditor: (_props: any, editor: any, next: any) => JSX.Element;
7
- };
@@ -1,20 +0,0 @@
1
- export default class LinkedEntityBlock extends React.Component<any, any, any> {
2
- static propTypes: {
3
- sdk: PropTypes.Validator<object>;
4
- isSelected: PropTypes.Validator<boolean>;
5
- attributes: PropTypes.Validator<object>;
6
- editor: PropTypes.Validator<object>;
7
- node: PropTypes.Validator<object>;
8
- onEntityFetchComplete: PropTypes.Validator<(...args: any[]) => any>;
9
- };
10
- constructor(props: any);
11
- constructor(props: any, context: any);
12
- getEntitySys(): {
13
- id: any;
14
- type: any;
15
- };
16
- handleEditClick: () => any;
17
- handleRemoveClick: () => void;
18
- }
19
- import React from "react";
20
- import PropTypes from "prop-types";
@@ -1,3 +0,0 @@
1
- export declare const styles: {
2
- icon: string;
3
- };
@@ -1,15 +0,0 @@
1
- export function FetchingWrappedAssetCard(props: any): JSX.Element;
2
- export namespace FetchingWrappedAssetCard {
3
- export namespace propTypes {
4
- export const sdk: PropTypes.Validator<object>;
5
- export const locale: PropTypes.Validator<string>;
6
- export const assetId: PropTypes.Validator<string>;
7
- export const isDisabled: PropTypes.Validator<boolean>;
8
- export const isSelected: PropTypes.Validator<boolean>;
9
- export const onRemove: PropTypes.Requireable<(...args: any[]) => any>;
10
- export const onEdit: PropTypes.Requireable<(...args: any[]) => any>;
11
- export const getAssetUrl: PropTypes.Requireable<(...args: any[]) => any>;
12
- export const onEntityFetchComplete: PropTypes.Requireable<(...args: any[]) => any>;
13
- }
14
- }
15
- import PropTypes from "prop-types";
@@ -1,15 +0,0 @@
1
- export function FetchingWrappedEntryCard(props: any): JSX.Element;
2
- export namespace FetchingWrappedEntryCard {
3
- export namespace propTypes {
4
- export const sdk: PropTypes.Validator<object>;
5
- export const entryId: PropTypes.Validator<string>;
6
- export const locale: PropTypes.Validator<string>;
7
- export const isDisabled: PropTypes.Validator<boolean>;
8
- export const isSelected: PropTypes.Validator<boolean>;
9
- export const onRemove: PropTypes.Requireable<(...args: any[]) => any>;
10
- export const onEdit: PropTypes.Requireable<(...args: any[]) => any>;
11
- export const getEntryUrl: PropTypes.Requireable<(...args: any[]) => any>;
12
- export const onEntityFetchComplete: PropTypes.Requireable<(...args: any[]) => any>;
13
- }
14
- }
15
- import PropTypes from "prop-types";
@@ -1,21 +0,0 @@
1
- export default EmbeddedEntryInline;
2
- declare class EmbeddedEntryInline extends React.Component<any, any, any> {
3
- static propTypes: {
4
- sdk: PropTypes.Validator<object>;
5
- isSelected: PropTypes.Validator<boolean>;
6
- attributes: PropTypes.Validator<object>;
7
- editor: PropTypes.Validator<object>;
8
- node: PropTypes.Validator<object>;
9
- onEntityFetchComplete: PropTypes.Validator<(...args: any[]) => any>;
10
- };
11
- constructor(props: any);
12
- constructor(props: any, context: any);
13
- getEntitySys(): {
14
- id: any;
15
- type: any;
16
- };
17
- handleEditClick: () => any;
18
- handleRemoveClick: () => void;
19
- }
20
- import React from "react";
21
- import PropTypes from "prop-types";
@@ -1,4 +0,0 @@
1
- export declare const styles: {
2
- icon: string;
3
- root: string;
4
- };
@@ -1,14 +0,0 @@
1
- export function FetchingWrappedInlineEntryCard(props: any): JSX.Element;
2
- export namespace FetchingWrappedInlineEntryCard {
3
- export namespace propTypes {
4
- export const sdk: PropTypes.Validator<object>;
5
- export const entryId: PropTypes.Validator<string>;
6
- export const isDisabled: PropTypes.Validator<boolean>;
7
- export const isSelected: PropTypes.Validator<boolean>;
8
- export const isReadOnly: PropTypes.Validator<boolean>;
9
- export const onRemove: PropTypes.Validator<(...args: any[]) => any>;
10
- export const onEdit: PropTypes.Validator<(...args: any[]) => any>;
11
- export const onEntityFetchComplete: PropTypes.Requireable<(...args: any[]) => any>;
12
- }
13
- }
14
- import PropTypes from "prop-types";
@@ -1,11 +0,0 @@
1
- export default class EntryLinkToolbarIcon extends React.Component<any, any, any> {
2
- static propTypes: any;
3
- static defaultProps: {
4
- isButton: boolean;
5
- };
6
- constructor(props: any);
7
- constructor(props: any, context: any);
8
- handleClick: (e: any) => void;
9
- handleAction: (event: any) => any;
10
- }
11
- import React from "react";
@@ -1,4 +0,0 @@
1
- export function insertInline(editor: any, entryId: any, focusNextLine?: boolean): void;
2
- export function hasOnlyInlineEntryInSelection(editor: any): boolean | undefined;
3
- export function selectEntryAndInsert(sdk: import('@contentful/field-editor-reference/dist/types').FieldExtensionSDK, editor: any, logAction: Function): Promise<void>;
4
- export function canInsertInline(editor: any): boolean;
@@ -1,12 +0,0 @@
1
- export default ToolbarIcon;
2
- export function EmbeddedEntryInlinePlugin({ richTextAPI: { sdk, logShortcutAction, logViewportAction }, }: {
3
- richTextAPI: {
4
- sdk: any;
5
- logShortcutAction: any;
6
- logViewportAction: any;
7
- };
8
- }): {
9
- renderNode: (props: any, _editor: any, next: any) => any;
10
- onKeyDown: (event: any, editor: any, next: any) => any;
11
- };
12
- import ToolbarIcon from "./ToolbarIcon";
@@ -1,14 +0,0 @@
1
- export default EntryEmbedDropdown;
2
- declare class EntryEmbedDropdown extends React.Component<any, any, any> {
3
- static propTypes: {
4
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
5
- isOpen: PropTypes.Requireable<boolean>;
6
- disabled: PropTypes.Requireable<boolean>;
7
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
8
- onOpen: PropTypes.Requireable<(...args: any[]) => any>;
9
- };
10
- constructor(props: any);
11
- constructor(props: any, context: any);
12
- }
13
- import React from "react";
14
- import PropTypes from "prop-types";
@@ -1,28 +0,0 @@
1
- export const blockTitles: {
2
- "heading-1": string;
3
- "heading-2": string;
4
- "heading-3": string;
5
- "heading-4": string;
6
- "heading-5": string;
7
- "heading-6": string;
8
- paragraph: string;
9
- "embedded-entry-block": string;
10
- "embedded-asset-block": string;
11
- };
12
- export default HeadingDropdown;
13
- import { BLOCKS } from "@contentful/rich-text-types";
14
- declare class HeadingDropdown extends React.Component<any, any, any> {
15
- static propTypes: {
16
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
17
- isOpen: PropTypes.Requireable<boolean>;
18
- disabled: PropTypes.Requireable<boolean>;
19
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
20
- onOpen: PropTypes.Requireable<(...args: any[]) => any>;
21
- currentBlockType: PropTypes.Requireable<string>;
22
- };
23
- constructor(props: any);
24
- constructor(props: any, context: any);
25
- getStyleNameForChange: () => any;
26
- }
27
- import React from "react";
28
- import PropTypes from "prop-types";