@contentful/field-editor-rich-text 1.0.2 → 2.0.0-next.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 (132) hide show
  1. package/CHANGELOG.md +0 -8
  2. package/README.md +1 -1
  3. package/dist/ContentfulEditorProvider.d.ts +8 -0
  4. package/dist/RichTextEditor.d.ts +19 -60
  5. package/dist/RichTextEditor.styles.d.ts +7 -0
  6. package/dist/SdkProvider.d.ts +7 -0
  7. package/dist/Toolbar/EmbedEntityWidget.d.ts +6 -0
  8. package/dist/Toolbar/StickyToolbarWrapper.d.ts +6 -11
  9. package/dist/Toolbar/index.d.ts +6 -20
  10. package/dist/TrackingProvider.d.ts +11 -0
  11. package/dist/constants/Schema.d.ts +93 -11
  12. package/dist/dialogs/openRichTextDialog.d.ts +2 -1
  13. package/dist/dialogs/renderRichTextDialog.d.ts +3 -1
  14. package/dist/field-editor-rich-text.cjs.development.js +3967 -5304
  15. package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
  16. package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
  17. package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
  18. package/dist/field-editor-rich-text.esm.js +3937 -5274
  19. package/dist/field-editor-rich-text.esm.js.map +1 -1
  20. package/dist/helpers/deserializer.d.ts +3 -0
  21. package/dist/helpers/editor.d.ts +35 -0
  22. package/dist/helpers/formatDateAndTime.d.ts +15 -0
  23. package/dist/helpers/getLinkedContentTypeIdsForNodeType.d.ts +26 -2
  24. package/dist/helpers/newEntitySelectorConfigFromRichTextField.d.ts +5 -1
  25. package/dist/helpers/sanitizeSlateDoc.d.ts +18 -0
  26. package/dist/helpers/truncate.d.ts +1 -0
  27. package/dist/helpers/validations.d.ts +10 -0
  28. package/dist/plugins/Bold/index.d.ts +12 -64
  29. package/dist/plugins/Code/index.d.ts +12 -64
  30. package/dist/plugins/EmbeddedEntity/index.d.ts +10 -0
  31. package/dist/plugins/EmbeddedEntityBlock/LinkedEntityBlock.d.ts +13 -0
  32. package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +12 -10
  33. package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -23
  34. package/dist/plugins/EmbeddedEntityBlock/index.d.ts +11 -26
  35. package/dist/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.d.ts +12 -0
  36. package/dist/plugins/EmbeddedEntityInline/Util.d.ts +16 -0
  37. package/dist/plugins/EmbeddedEntityInline/index.d.ts +12 -0
  38. package/dist/plugins/Heading/index.d.ts +20 -380
  39. package/dist/plugins/Hr/index.d.ts +13 -61
  40. package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +10 -0
  41. package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +17 -0
  42. package/dist/plugins/Hyperlink/index.d.ts +12 -9
  43. package/dist/plugins/InsertBeforeFirstVoidBlock/index.d.ts +2 -3
  44. package/dist/plugins/Italic/index.d.ts +12 -64
  45. package/dist/plugins/List/index.d.ts +15 -114
  46. package/dist/plugins/NewLine/index.d.ts +2 -0
  47. package/dist/plugins/Paragraph/index.d.ts +7 -5
  48. package/dist/plugins/Paste/index.d.ts +2 -7
  49. package/dist/plugins/Paste/sanitizers/helpers.d.ts +7 -0
  50. package/dist/plugins/Paste/sanitizers/index.d.ts +3 -0
  51. package/dist/plugins/Paste/sanitizers/removeComments.d.ts +2 -0
  52. package/dist/plugins/Paste/sanitizers/sanitizeEntityBlocks.d.ts +6 -0
  53. package/dist/plugins/Paste/sanitizers/sanitizeTables.d.ts +2 -0
  54. package/dist/plugins/Quote/index.d.ts +13 -59
  55. package/dist/plugins/Table/TableActions.d.ts +5 -0
  56. package/dist/plugins/Table/actions/addColumn.d.ts +4 -0
  57. package/dist/plugins/Table/actions/addRow.d.ts +3 -0
  58. package/dist/plugins/Table/actions/index.d.ts +3 -0
  59. package/dist/plugins/Table/actions/setHeader.d.ts +2 -0
  60. package/dist/plugins/Table/helpers.d.ts +4 -0
  61. package/dist/plugins/Table/index.d.ts +186 -0
  62. package/dist/plugins/TrailingParagraph/index.d.ts +1 -0
  63. package/dist/plugins/Underline/index.d.ts +12 -0
  64. package/dist/plugins/shared/EntityStatusIcon.d.ts +8 -0
  65. package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +23 -0
  66. package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +13 -0
  67. package/dist/plugins/shared/ToolbarButton.d.ts +15 -0
  68. package/dist/types.d.ts +25 -0
  69. package/package.json +31 -29
  70. package/LICENSE +0 -21
  71. package/dist/RichTextEditor.spec.d.ts +0 -1
  72. package/dist/Toolbar/Toolbar.spec.d.ts +0 -1
  73. package/dist/helpers/browserSupport.d.ts +0 -1
  74. package/dist/plugins/CommandPalette/CommandMark.d.ts +0 -12
  75. package/dist/plugins/CommandPalette/CommandPalette.d.ts +0 -10
  76. package/dist/plugins/CommandPalette/CommandPaletteService.d.ts +0 -20
  77. package/dist/plugins/CommandPalette/CommandPanel/CommandPanelMenu.d.ts +0 -43
  78. package/dist/plugins/CommandPalette/CommandPanel/index.d.ts +0 -37
  79. package/dist/plugins/CommandPalette/Util.d.ts +0 -5
  80. package/dist/plugins/CommandPalette/index.d.ts +0 -7
  81. package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.d.ts +0 -20
  82. package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.styles.d.ts +0 -3
  83. package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedAssetCard.d.ts +0 -15
  84. package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedEntryCard.d.ts +0 -15
  85. package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.d.ts +0 -21
  86. package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.styles.d.ts +0 -4
  87. package/dist/plugins/EmbeddedEntryInline/FetchingWrappedInlineEntryCard.d.ts +0 -14
  88. package/dist/plugins/EmbeddedEntryInline/ToolbarIcon.d.ts +0 -11
  89. package/dist/plugins/EmbeddedEntryInline/Utils.d.ts +0 -4
  90. package/dist/plugins/EmbeddedEntryInline/index.d.ts +0 -12
  91. package/dist/plugins/EntryEmbedDropdown/index.d.ts +0 -14
  92. package/dist/plugins/Heading/HeadingDropdown.d.ts +0 -28
  93. package/dist/plugins/Heading/HeadingDropdownItem.d.ts +0 -57
  94. package/dist/plugins/Heading/Paragraph.d.ts +0 -58
  95. package/dist/plugins/Hyperlink/Hyperlink.d.ts +0 -13
  96. package/dist/plugins/Hyperlink/ToolbarIcon.d.ts +0 -7
  97. package/dist/plugins/Hyperlink/Util.d.ts +0 -43
  98. package/dist/plugins/Hyperlink/styles.d.ts +0 -12
  99. package/dist/plugins/Hyperlink/truncate.d.ts +0 -1
  100. package/dist/plugins/Hyperlink/useRequestStatus.d.ts +0 -6
  101. package/dist/plugins/InsertBeforeFirstVoidBlock/Util.d.ts +0 -14
  102. package/dist/plugins/List/EditListWrapper.d.ts +0 -2
  103. package/dist/plugins/List/ToolbarDecorator.d.ts +0 -62
  104. package/dist/plugins/NewLinePlugin/index.d.ts +0 -3
  105. package/dist/plugins/Paste/Paste.d.ts +0 -1
  106. package/dist/plugins/Paste/Paste.spec.d.ts +0 -1
  107. package/dist/plugins/Paste/index.spec.d.ts +0 -1
  108. package/dist/plugins/PasteHtml/PasteHtml.spec.d.ts +0 -1
  109. package/dist/plugins/PasteHtml/Serializer.d.ts +0 -1
  110. package/dist/plugins/PasteHtml/index.d.ts +0 -3
  111. package/dist/plugins/PasteText/PasteText.spec.d.ts +0 -1
  112. package/dist/plugins/PasteText/index.d.ts +0 -3
  113. package/dist/plugins/Quote/QuotePlugin.d.ts +0 -10
  114. package/dist/plugins/Quote/Util.d.ts +0 -2
  115. package/dist/plugins/Underlined/index.d.ts +0 -64
  116. package/dist/plugins/index.d.ts +0 -1
  117. package/dist/plugins/shared/BlockSelectDecorator.d.ts +0 -63
  118. package/dist/plugins/shared/BlockToggleDecorator.d.ts +0 -65
  119. package/dist/plugins/shared/MarkDecorator.d.ts +0 -12
  120. package/dist/plugins/shared/MarkPlugin.d.ts +0 -9
  121. package/dist/plugins/shared/MarkToggleDecorator.d.ts +0 -62
  122. package/dist/plugins/shared/NodeDecorator.d.ts +0 -15
  123. package/dist/plugins/shared/PasteTestHelpers.d.ts +0 -35
  124. package/dist/plugins/shared/PluginApi.d.ts +0 -31
  125. package/dist/plugins/shared/PropTypes.d.ts +0 -15
  126. package/dist/plugins/shared/ToolbarDropdownListItem.d.ts +0 -14
  127. package/dist/plugins/shared/ToolbarIcon.d.ts +0 -16
  128. package/dist/plugins/shared/Util.d.ts +0 -1
  129. package/dist/plugins/shared/UtilHave.d.ts +0 -24
  130. package/dist/setupTests.d.ts +0 -1
  131. package/dist/validations/index.d.ts +0 -9
  132. 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.0.2",
3
+ "version": "2.0.0-next.0",
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,40 @@
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",
30
+ "@contentful/contentful-slatejs-adapter": "^15.3.5",
27
31
  "@contentful/f36-components": "beta",
28
32
  "@contentful/f36-icons": "beta",
29
33
  "@contentful/f36-tokens": "beta",
30
- "@contentful/field-editor-reference": "^4.0.2",
34
+ "@contentful/field-editor-reference": "^4.0.0",
31
35
  "@contentful/field-editor-shared": "^1.0.0",
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"
36
+ "@contentful/rich-text-plain-text-renderer": "^15.0.0",
37
+ "@contentful/rich-text-types": "^15.6.2",
38
+ "@udecode/plate-break": "^4.4.0",
39
+ "@udecode/plate-common": "^4.4.0",
40
+ "@udecode/plate-core": "^4.3.7",
41
+ "@udecode/plate-html-serializer": "^4.4.0",
42
+ "@udecode/plate-list": "^4.4.0",
43
+ "@udecode/plate-paragraph": "^4.4.0",
44
+ "@udecode/plate-table": "^4.4.0",
45
+ "@udecode/plate-trailing-block": "^4.4.0",
46
+ "fast-deep-equal": "^3.1.3",
47
+ "react": ">=16.14.0",
48
+ "slate": "^0.66.5",
49
+ "slate-history": "^0.66.0",
50
+ "slate-hyperscript": "^0.67.0",
51
+ "slate-react": "^0.69.0"
48
52
  },
49
53
  "peerDependencies": {
50
- "react": ">=16.8.0"
54
+ "react": ">=16.14.0",
55
+ "react-dom": ">=16.14.0",
56
+ "slate": "^0.66.1"
51
57
  },
52
58
  "devDependencies": {
53
59
  "@babel/core": "^7.9.6",
@@ -59,10 +65,6 @@
59
65
  "@babel/preset-env": "7.12.11",
60
66
  "@babel/preset-react": "7.13.13",
61
67
  "@contentful/field-editor-test-utils": "^1.0.0",
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": "488f2c7475b1d89770db6666709b5b66c592c1b5"
68
+ "@contentful/rich-text-react-renderer": "^14.1.3"
69
+ }
68
70
  }
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 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export const SUPPORTS_NATIVE_SLATE_HYPERLINKS: boolean;
@@ -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 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";
@@ -1,57 +0,0 @@
1
- export default function newHeadingDropdownItem(nodeType: any): {
2
- new (props: any): {
3
- handleSelect: (event: any) => any;
4
- render(): JSX.Element;
5
- context: any;
6
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
7
- forceUpdate(callback?: (() => void) | undefined): void;
8
- readonly props: Readonly<any> & Readonly<{
9
- children?: React.ReactNode;
10
- }>;
11
- state: Readonly<any>;
12
- refs: {
13
- [key: string]: React.ReactInstance;
14
- };
15
- componentDidMount?(): void;
16
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
17
- componentWillUnmount?(): void;
18
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
19
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
20
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
21
- componentWillMount?(): void;
22
- UNSAFE_componentWillMount?(): void;
23
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
24
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
25
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
26
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
27
- };
28
- new (props: any, context: any): {
29
- handleSelect: (event: any) => any;
30
- render(): JSX.Element;
31
- context: any;
32
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
33
- forceUpdate(callback?: (() => void) | undefined): void;
34
- readonly props: Readonly<any> & Readonly<{
35
- children?: React.ReactNode;
36
- }>;
37
- state: Readonly<any>;
38
- refs: {
39
- [key: string]: React.ReactInstance;
40
- };
41
- componentDidMount?(): void;
42
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
43
- componentWillUnmount?(): void;
44
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
45
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
46
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
47
- componentWillMount?(): void;
48
- UNSAFE_componentWillMount?(): void;
49
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
50
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
51
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
52
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
53
- };
54
- propTypes: any;
55
- contextType?: React.Context<any> | undefined;
56
- };
57
- import React from "react";
@@ -1,58 +0,0 @@
1
- declare var _default: {
2
- new (props: any): {
3
- handleSelect: (event: any) => any;
4
- render(): JSX.Element;
5
- context: any;
6
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
7
- forceUpdate(callback?: (() => void) | undefined): void;
8
- readonly props: Readonly<any> & Readonly<{
9
- children?: React.ReactNode;
10
- }>;
11
- state: Readonly<any>;
12
- refs: {
13
- [key: string]: React.ReactInstance;
14
- };
15
- componentDidMount?(): void;
16
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
17
- componentWillUnmount?(): void;
18
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
19
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
20
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
21
- componentWillMount?(): void;
22
- UNSAFE_componentWillMount?(): void;
23
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
24
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
25
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
26
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
27
- };
28
- new (props: any, context: any): {
29
- handleSelect: (event: any) => any;
30
- render(): JSX.Element;
31
- context: any;
32
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
33
- forceUpdate(callback?: (() => void) | undefined): void;
34
- readonly props: Readonly<any> & Readonly<{
35
- children?: React.ReactNode;
36
- }>;
37
- state: Readonly<any>;
38
- refs: {
39
- [key: string]: React.ReactInstance;
40
- };
41
- componentDidMount?(): void;
42
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
43
- componentWillUnmount?(): void;
44
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
45
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
46
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
47
- componentWillMount?(): void;
48
- UNSAFE_componentWillMount?(): void;
49
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
50
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
51
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
52
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
53
- };
54
- propTypes: any;
55
- contextType?: React.Context<any> | undefined;
56
- };
57
- export default _default;
58
- import React from "react";
@@ -1,13 +0,0 @@
1
- declare function Hyperlink(props: any): JSX.Element;
2
- declare namespace Hyperlink {
3
- export namespace propTypes {
4
- export const attributes: PropTypes.Validator<object>;
5
- export const node: PropTypes.Validator<object>;
6
- export const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
7
- export const editor: PropTypes.Requireable<object>;
8
- export const richTextAPI: PropTypes.Validator<object>;
9
- export const onEdit: PropTypes.Requireable<(...args: any[]) => any>;
10
- }
11
- }
12
- export default Hyperlink;
13
- import PropTypes from "prop-types";
@@ -1,7 +0,0 @@
1
- export default class HyperlinkToolbarIcon extends React.Component<any, any, any> {
2
- static propTypes: any;
3
- constructor(props: any);
4
- constructor(props: any, context: any);
5
- handleClick: (event: any) => any;
6
- }
7
- import React from "react";
@@ -1,43 +0,0 @@
1
- /**
2
- * Returns whether or not the current value selection would allow for a user
3
- * edit on a hyperlink.
4
- *
5
- * @param {slate.Value} value
6
- * @returns {boolean}
7
- */
8
- export function mayEditLink(value: any): boolean;
9
- /**
10
- * Returns whether the given value has any hyperlink node.
11
- *
12
- * @param {slate.Value} value
13
- * @returns {boolean}
14
- */
15
- export function hasHyperlink(value: any): boolean;
16
- /**
17
- * Returns whether the given value has any inline node other than hyperlinks.
18
- *
19
- * @param {slate.Value} value
20
- * @returns {boolean}
21
- */
22
- export function hasOnlyHyperlinkInlines(value: any): boolean;
23
- /**
24
- * Allows the user to insert/remove a link depending on whether the current
25
- * selection has a link or not. If there is no link, a dialog is shown for
26
- * the user.
27
- *
28
- * @param {slate.Editor} editor Will be mutated with the required operations.
29
- * @param {Object} sdk
30
- * @param {function} logAction
31
- * @returns {Promise<void>}
32
- */
33
- export function toggleLink(editor: any, sdk: any, logAction: Function): Promise<void>;
34
- /**
35
- * Allows the user to edit the first selected link of a given Change by showing
36
- * a dialog and applying the change.
37
- *
38
- * @param {slate.Editor} change Will be mutated with the required operations.
39
- * @param {Object} sdk
40
- * @param {function} logAction
41
- * @returns {Promise<void>}
42
- */
43
- export function editLink(change: any, sdk: any, logAction: Function): Promise<void>;
@@ -1,12 +0,0 @@
1
- export namespace hyperlinkTooltipStyles {
2
- export const entityContentType: string;
3
- export const entityTitle: string;
4
- export const separator: string;
5
- }
6
- declare namespace _default {
7
- export const hyperlinkWrapper: string;
8
- export const hyperlink: string;
9
- export const hyperlinkIEFallback: string;
10
- export const hyperlinkIcon: string;
11
- }
12
- export default _default;
@@ -1 +0,0 @@
1
- export function truncate(str: any, length: any): any;