@atlaskit/editor-core 151.3.0 → 151.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/create-editor/ReactEditorView.js +22 -8
- package/dist/cjs/create-editor/create-plugins-list.js +25 -9
- package/dist/cjs/labs/next/presets/cxhtml.js +1 -2
- package/dist/cjs/nodeviews/ReactNodeView.js +2 -2
- package/dist/cjs/nodeviews/SelectionBasedNodeView.js +6 -0
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/annotation/utils.js +19 -8
- package/dist/cjs/plugins/avatar-group/index.js +2 -1
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +5 -2
- package/dist/cjs/plugins/before-primaryToolbar/index.js +26 -0
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +28 -0
- package/dist/cjs/plugins/extension/extension-api.js +10 -2
- package/dist/cjs/plugins/extension/ui/styles.js +1 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +172 -0
- package/dist/cjs/plugins/find-replace/index.js +14 -137
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +10 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/cjs/plugins/fragment/index.js +34 -0
- package/dist/cjs/plugins/fragment/plugin-key.js +11 -0
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/cjs/plugins/index.js +16 -0
- package/dist/cjs/plugins/list/actions/conversions.js +39 -71
- package/dist/cjs/plugins/list/transforms.js +7 -1
- package/dist/cjs/plugins/media/index.js +2 -3
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +3 -1
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +12 -5
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +6 -4
- package/dist/cjs/plugins/media/nodeviews/styles.js +6 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +49 -15
- package/dist/cjs/plugins/media/toolbar/commands.js +59 -0
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +7 -2
- package/dist/cjs/plugins/media/toolbar/index.js +90 -3
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +9 -1
- package/dist/cjs/plugins/media/utils/media-common.js +1 -1
- package/dist/cjs/plugins/media/utils/media-files.js +5 -1
- package/dist/cjs/plugins/panel/actions.js +2 -2
- package/dist/cjs/plugins/panel/index.js +3 -3
- package/dist/cjs/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/cjs/plugins/panel/toolbar.js +10 -5
- package/dist/cjs/plugins/panel/utils.js +15 -0
- package/dist/cjs/plugins/rank.js +3 -2
- package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +49 -1
- package/dist/cjs/plugins/status/ui/statusPicker.js +4 -2
- package/dist/cjs/plugins/table/commands/insert.js +1 -0
- package/dist/cjs/plugins/table/index.js +3 -2
- package/dist/cjs/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -3
- package/dist/cjs/plugins/table/pm-plugins/main.js +26 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/cjs/plugins/table/transforms/column-width.js +14 -5
- package/dist/cjs/plugins/table/transforms/fix-tables.js +43 -6
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/cjs/plugins/table/ui/common-styles.css.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +1 -1
- package/dist/cjs/plugins/table/ui/messages.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/cjs/plugins/text-formatting/index.js +2 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +1 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +77 -26
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +32 -9
- package/dist/cjs/ui/ColorPalette/Color/index.js +8 -18
- package/dist/cjs/ui/ColorPalette/index.js +7 -4
- package/dist/cjs/ui/ColorPickerButton/index.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +114 -61
- package/dist/cjs/ui/ConfigPanel/FormContent.js +39 -26
- package/dist/cjs/ui/ConfigPanel/transformers.js +490 -248
- package/dist/cjs/ui/ConfigPanel/utils.js +2 -10
- package/dist/cjs/ui/DropdownMenu/index.js +3 -1
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/cjs/ui/Resizer/index.js +9 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +19 -8
- package/dist/es2019/create-editor/create-plugins-list.js +26 -10
- package/dist/es2019/labs/next/presets/cxhtml.js +1 -2
- package/dist/es2019/nodeviews/ReactNodeView.js +1 -1
- package/dist/es2019/nodeviews/SelectionBasedNodeView.js +11 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/annotation/utils.js +18 -7
- package/dist/es2019/plugins/avatar-group/index.js +2 -1
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -2
- package/dist/es2019/plugins/before-primaryToolbar/index.js +15 -0
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +12 -0
- package/dist/es2019/plugins/extension/extension-api.js +9 -2
- package/dist/es2019/plugins/extension/ui/styles.js +6 -0
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +152 -0
- package/dist/es2019/plugins/find-replace/index.js +15 -128
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +10 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/es2019/plugins/fragment/index.js +22 -0
- package/dist/es2019/plugins/fragment/plugin-key.js +2 -0
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/es2019/plugins/index.js +2 -0
- package/dist/es2019/plugins/list/actions/conversions.js +38 -69
- package/dist/es2019/plugins/list/transforms.js +5 -1
- package/dist/es2019/plugins/media/index.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +2 -1
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +8 -4
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +7 -5
- package/dist/es2019/plugins/media/nodeviews/styles.js +2 -0
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +32 -17
- package/dist/es2019/plugins/media/toolbar/commands.js +47 -0
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +6 -2
- package/dist/es2019/plugins/media/toolbar/index.js +90 -3
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +7 -1
- package/dist/es2019/plugins/media/utils/media-common.js +1 -1
- package/dist/es2019/plugins/media/utils/media-files.js +6 -1
- package/dist/es2019/plugins/panel/actions.js +2 -2
- package/dist/es2019/plugins/panel/index.js +5 -5
- package/dist/es2019/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/es2019/plugins/panel/toolbar.js +10 -5
- package/dist/es2019/plugins/panel/utils.js +8 -1
- package/dist/es2019/plugins/rank.js +3 -2
- package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +48 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +4 -2
- package/dist/es2019/plugins/table/commands/insert.js +1 -2
- package/dist/es2019/plugins/table/index.js +2 -1
- package/dist/es2019/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +25 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/es2019/plugins/table/transforms/column-width.js +13 -3
- package/dist/es2019/plugins/table/transforms/fix-tables.js +43 -5
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/es2019/plugins/table/ui/common-styles.css.js +5 -1
- package/dist/es2019/plugins/table/ui/consts.js +2 -2
- package/dist/es2019/plugins/table/ui/messages.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/es2019/plugins/text-formatting/index.js +3 -2
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +60 -27
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +51 -7
- package/dist/es2019/ui/ColorPalette/Color/index.js +9 -18
- package/dist/es2019/ui/ColorPalette/index.js +7 -4
- package/dist/es2019/ui/ColorPickerButton/index.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +101 -49
- package/dist/es2019/ui/ConfigPanel/FormContent.js +35 -26
- package/dist/es2019/ui/ConfigPanel/transformers.js +243 -72
- package/dist/es2019/ui/ConfigPanel/utils.js +1 -2
- package/dist/es2019/ui/Dropdown/index.js +2 -1
- package/dist/es2019/ui/DropdownMenu/index.js +7 -3
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/es2019/ui/Resizer/index.js +9 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +22 -8
- package/dist/esm/create-editor/create-plugins-list.js +26 -10
- package/dist/esm/labs/next/presets/cxhtml.js +1 -2
- package/dist/esm/nodeviews/ReactNodeView.js +2 -2
- package/dist/esm/nodeviews/SelectionBasedNodeView.js +7 -0
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/annotation/utils.js +18 -7
- package/dist/esm/plugins/avatar-group/index.js +2 -1
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +5 -2
- package/dist/esm/plugins/before-primaryToolbar/index.js +15 -0
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +12 -0
- package/dist/esm/plugins/extension/extension-api.js +9 -2
- package/dist/esm/plugins/extension/ui/styles.js +1 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +155 -0
- package/dist/esm/plugins/find-replace/index.js +14 -131
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +9 -4
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/esm/plugins/fragment/index.js +22 -0
- package/dist/esm/plugins/fragment/plugin-key.js +2 -0
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/esm/plugins/index.js +2 -0
- package/dist/esm/plugins/list/actions/conversions.js +38 -71
- package/dist/esm/plugins/list/transforms.js +7 -1
- package/dist/esm/plugins/media/index.js +2 -3
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +11 -6
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +7 -5
- package/dist/esm/plugins/media/nodeviews/styles.js +2 -0
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +47 -16
- package/dist/esm/plugins/media/toolbar/commands.js +45 -0
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +6 -2
- package/dist/esm/plugins/media/toolbar/index.js +88 -3
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +9 -1
- package/dist/esm/plugins/media/utils/media-common.js +1 -1
- package/dist/esm/plugins/media/utils/media-files.js +6 -1
- package/dist/esm/plugins/panel/actions.js +2 -2
- package/dist/esm/plugins/panel/index.js +5 -5
- package/dist/esm/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/esm/plugins/panel/toolbar.js +9 -4
- package/dist/esm/plugins/panel/utils.js +13 -0
- package/dist/esm/plugins/rank.js +3 -2
- package/dist/esm/plugins/selection/pm-plugins/selection-main.js +50 -1
- package/dist/esm/plugins/status/ui/statusPicker.js +4 -2
- package/dist/esm/plugins/table/commands/insert.js +1 -2
- package/dist/esm/plugins/table/index.js +3 -2
- package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +27 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/esm/plugins/table/transforms/column-width.js +13 -3
- package/dist/esm/plugins/table/transforms/fix-tables.js +42 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/esm/plugins/table/ui/common-styles.css.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +2 -2
- package/dist/esm/plugins/table/ui/messages.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/esm/plugins/text-formatting/index.js +3 -2
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +67 -27
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +20 -7
- package/dist/esm/ui/ColorPalette/Color/index.js +9 -16
- package/dist/esm/ui/ColorPalette/index.js +7 -4
- package/dist/esm/ui/ColorPickerButton/index.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +113 -62
- package/dist/esm/ui/ConfigPanel/FormContent.js +39 -26
- package/dist/esm/ui/ConfigPanel/transformers.js +488 -248
- package/dist/esm/ui/ConfigPanel/utils.js +1 -6
- package/dist/esm/ui/Dropdown/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +7 -3
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/esm/ui/Resizer/index.js +9 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/nodeviews/ReactNodeView.d.ts +1 -1
- package/dist/types/nodeviews/SelectionBasedNodeView.d.ts +1 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +7 -1
- package/dist/types/plugins/annotation/utils.d.ts +1 -1
- package/dist/types/plugins/avatar-group/index.d.ts +1 -0
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +1 -0
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +5 -0
- package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +5 -0
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +15 -0
- package/dist/types/plugins/find-replace/index.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/ui/EmojiPickerButton.d.ts +1 -1
- package/dist/types/plugins/fragment/index.d.ts +5 -0
- package/dist/types/plugins/fragment/plugin-key.d.ts +2 -0
- package/dist/types/plugins/index.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +3 -2
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -2
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/styles.d.ts +2 -0
- package/dist/types/plugins/media/toolbar/commands.d.ts +3 -0
- package/dist/types/plugins/media/toolbar/filePreviewItem.d.ts +2 -0
- package/dist/types/plugins/media/types.d.ts +0 -1
- package/dist/types/plugins/panel/actions.d.ts +1 -1
- package/dist/types/plugins/panel/types.d.ts +8 -2
- package/dist/types/plugins/quick-insert/index.d.ts +2 -1
- package/dist/types/plugins/table/commands/insert.d.ts +3 -0
- package/dist/types/plugins/table/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -0
- package/dist/types/plugins/table/transforms/column-width.d.ts +4 -1
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +3 -2
- package/dist/types/plugins/table/types.d.ts +8 -0
- package/dist/types/plugins/table/ui/consts.d.ts +1 -1
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +11 -1
- package/dist/types/types/feature-flags.d.ts +13 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +10 -1
- package/dist/types/ui/ColorPalette/Color/index.d.ts +8 -5
- package/dist/types/ui/ColorPalette/index.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/transformers.d.ts +7 -1
- package/dist/types/ui/ConfigPanel/utils.d.ts +0 -1
- package/dist/types/ui/Resizer/index.d.ts +1 -0
- package/package.json +10 -7
- package/dist/cjs/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -38
- package/dist/es2019/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -28
- package/dist/esm/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -28
- package/dist/types/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.d.ts +0 -1
|
@@ -14,11 +14,6 @@ export var fromEntries = function fromEntries(iterable) {
|
|
|
14
14
|
return obj;
|
|
15
15
|
}, {});
|
|
16
16
|
};
|
|
17
|
-
export var toEntries = function toEntries(parameters) {
|
|
18
|
-
return Array.isArray(parameters) ? parameters.reduce(function (prev, curr) {
|
|
19
|
-
return [].concat(_toConsumableArray(prev), _toConsumableArray(Object.entries(curr)));
|
|
20
|
-
}, []) : Object.entries(parameters);
|
|
21
|
-
};
|
|
22
17
|
|
|
23
18
|
var isEmptyString = function isEmptyString(value) {
|
|
24
19
|
return typeof value === 'string' && value === '';
|
|
@@ -72,7 +67,7 @@ export var isDuplicateField = function isDuplicateField(key) {
|
|
|
72
67
|
export var getNameFromDuplicateField = function getNameFromDuplicateField(key) {
|
|
73
68
|
return key.replace(duplicateFieldRegex, '');
|
|
74
69
|
};
|
|
75
|
-
/*
|
|
70
|
+
/*
|
|
76
71
|
ColorPickerButton only accepts 8 digit hex alpha values, for example:
|
|
77
72
|
#123fffaa (8 digits, hex alpha)
|
|
78
73
|
*/
|
|
@@ -11,7 +11,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
|
-
import { PureComponent } from 'react';
|
|
14
|
+
import { PureComponent } from 'react'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
|
+
|
|
15
16
|
import DropdownList from '@atlaskit/droplist';
|
|
16
17
|
import { Popup } from '@atlaskit/editor-common';
|
|
17
18
|
import withOuterListeners from '../with-outer-listeners';
|
|
@@ -14,8 +14,10 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
14
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
15
|
|
|
16
16
|
import React, { PureComponent } from 'react';
|
|
17
|
-
import styled from 'styled-components';
|
|
18
|
-
|
|
17
|
+
import styled from 'styled-components'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
18
|
+
|
|
19
|
+
import DropList from '@atlaskit/droplist'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
20
|
+
|
|
19
21
|
import Item, { ItemGroup } from '@atlaskit/item';
|
|
20
22
|
import Tooltip from '@atlaskit/tooltip';
|
|
21
23
|
import { Popup } from '@atlaskit/editor-common';
|
|
@@ -106,6 +108,7 @@ var DropdownMenuWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
106
108
|
key: item.key || item.content,
|
|
107
109
|
isSelected: item.isActive
|
|
108
110
|
}, /*#__PURE__*/React.createElement(Item, {
|
|
111
|
+
role: "menuitem",
|
|
109
112
|
elemBefore: item.elemBefore,
|
|
110
113
|
elemAfter: item.elemAfter,
|
|
111
114
|
isDisabled: item.isDisabled,
|
|
@@ -184,7 +187,8 @@ var DropdownMenuWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
184
187
|
}
|
|
185
188
|
}), items.map(function (group, index) {
|
|
186
189
|
return /*#__PURE__*/React.createElement(ItemGroup, {
|
|
187
|
-
key: index
|
|
190
|
+
key: index,
|
|
191
|
+
role: "menu"
|
|
188
192
|
}, group.items.map(function (item) {
|
|
189
193
|
return _this2.renderItem(item);
|
|
190
194
|
}));
|
|
@@ -6,6 +6,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
6
6
|
|
|
7
7
|
import React, { useState, useCallback } from 'react';
|
|
8
8
|
import styled, { ThemeProvider } from 'styled-components';
|
|
9
|
+
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
9
10
|
import Item, { itemThemeNamespace } from '@atlaskit/item'; // AFP-2532 TODO: Fix automatic suppressions below
|
|
10
11
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
11
12
|
|
|
@@ -14,6 +14,7 @@ import memoizeOne from 'memoize-one';
|
|
|
14
14
|
import styled, { ThemeProvider, css } from 'styled-components';
|
|
15
15
|
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
|
|
16
16
|
import { Collection } from 'react-virtualized/dist/commonjs/Collection';
|
|
17
|
+
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
17
18
|
import Item from '@atlaskit/item';
|
|
18
19
|
import { B100, N20, N200 } from '@atlaskit/theme/colors';
|
|
19
20
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -18,7 +18,7 @@ import styled from 'styled-components'; // AFP-2532 TODO: Fix automatic suppress
|
|
|
18
18
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
19
19
|
|
|
20
20
|
import { fontSizeSmall } from '@atlaskit/theme';
|
|
21
|
-
import { N20,
|
|
21
|
+
import { N20, N300, N800 } from '@atlaskit/theme/colors';
|
|
22
22
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
23
23
|
import formatDistance from 'date-fns/formatDistance';
|
|
24
24
|
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
|
@@ -31,7 +31,7 @@ export var Container = styled.li(_templateObject || (_templateObject = _taggedTe
|
|
|
31
31
|
});
|
|
32
32
|
var NameWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: hidden;\n"])));
|
|
33
33
|
export var Name = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 20px;\n"])), N800);
|
|
34
|
-
export var ContainerName = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n line-height: 14px;\n font-size: ", ";\n"])),
|
|
34
|
+
export var ContainerName = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n line-height: 14px;\n font-size: ", ";\n"])), N300, relativeFontSizeToBase16(fontSizeSmall()));
|
|
35
35
|
var Icon = styled.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n min-width: 16px;\n margin-top: 3px;\n margin-right: 12px;\n\n img {\n max-width: 16px;\n }\n"])));
|
|
36
36
|
|
|
37
37
|
var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -169,6 +169,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
169
169
|
value: function render() {
|
|
170
170
|
var handleStyles = {};
|
|
171
171
|
var handles = {};
|
|
172
|
+
var handleComponent = {};
|
|
172
173
|
var _this$props4 = this.props,
|
|
173
174
|
_this$props4$innerPad = _this$props4.innerPadding,
|
|
174
175
|
innerPadding = _this$props4$innerPad === void 0 ? 0 : _this$props4$innerPad,
|
|
@@ -178,7 +179,8 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
178
179
|
layout = _this$props4.layout,
|
|
179
180
|
enable = _this$props4.enable,
|
|
180
181
|
children = _this$props4.children,
|
|
181
|
-
ratio = _this$props4.ratio
|
|
182
|
+
ratio = _this$props4.ratio,
|
|
183
|
+
handleComponentFunc = _this$props4.handleComponentFunc;
|
|
182
184
|
var isResizing = this.state.isResizing;
|
|
183
185
|
handleSides.forEach(function (side) {
|
|
184
186
|
var _handleStyles$side;
|
|
@@ -187,6 +189,11 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
187
189
|
handleStyles[side] = (_handleStyles$side = {
|
|
188
190
|
width: '24px'
|
|
189
191
|
}, _defineProperty(_handleStyles$side, side, "".concat(-13 - innerPadding, "px")), _defineProperty(_handleStyles$side, "zIndex", akRichMediaResizeZIndex), _defineProperty(_handleStyles$side, "pointerEvents", 'auto'), _handleStyles$side);
|
|
192
|
+
var sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
|
|
193
|
+
|
|
194
|
+
if (sideHandleComponent) {
|
|
195
|
+
handleComponent[side] = sideHandleComponent;
|
|
196
|
+
}
|
|
190
197
|
});
|
|
191
198
|
var className = classnames(richMediaClassName, "image-".concat(layout), this.props.className, {
|
|
192
199
|
'is-resizing': isResizing,
|
|
@@ -219,6 +226,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
219
226
|
handleClasses: handles,
|
|
220
227
|
handleStyles: handleStyles,
|
|
221
228
|
handleWrapperStyle: handleWrapperStyle,
|
|
229
|
+
handleComponent: handleComponent,
|
|
222
230
|
enable: enable,
|
|
223
231
|
onResize: this.handleResize,
|
|
224
232
|
onResizeStop: this.handleResizeStop,
|
package/dist/esm/version.json
CHANGED
|
@@ -5,5 +5,5 @@ import EditorActions from '../../actions';
|
|
|
5
5
|
export declare type FullPageProps = EditorProps & {
|
|
6
6
|
onMount?: (actions: EditorActions) => void;
|
|
7
7
|
} & WithAnalyticsEventsProps;
|
|
8
|
-
declare const FullPageWithAnalytics: React.ForwardRefExoticComponent<Pick<FullPageProps, "mentionProvider" | "emojiProvider" | "autoformattingProvider" | "taskDecisionProvider" | "contextIdentifierProvider" | "collabEditProvider" | "macroProvider" | "searchProvider" | "activityProvider" | "presenceProvider" | "placeholderBracketHint" | "placeholderHints" | "codeBlock" | "media" | "allowBlockType" | "defaultValue" | "placeholder" | "onChange" | "contextPanel" | "appearance" | "quickInsert" | "disabled" | "waitForMediaUpload" | "maxHeight" | "popupsMountPoint" | "popupsBoundariesElement" | "popupsScrollableElement" | "editorActions" | "mention" | "insertMenuItems" | "primaryToolbarComponents" | "contentComponents" | "onDestroy" | "onMount" | "saveOnEnter" | "textFormatting" | "maxContentSize" | "performanceTracking" | "featureFlags" | "onSave" | "onCancel" | "extensionHandlers" | "collabEdit" | "allowBreakout" | "uploadErrorHandler" | "sanitizePrivateContent" | "mentionInsertDisplayName" | "allowNestedTasks" | "allowExpand" | "shouldFocus" | "persistScrollGutter" | "primaryToolbarIconBefore" | "secondaryToolbarComponents" | "allowAnalyticsGASV3" | "allowTasksAndDecisions" | "allowRule" | "allowTextColor" | "allowTables" | "allowHelpDialog" | "feedbackInfo" | "allowJiraIssue" | "allowPanel" | "allowExtension" | "allowConfluenceInlineComment" | "allowTemplatePlaceholders" | "allowDate" | "allowLayouts" | "allowStatus" | "allowDynamicTextSizing" | "allowTextAlignment" | "allowIndentation" | "allowNewInsertionBehaviour" | "autoScrollIntoView" | "allowFindReplace" | "UNSAFE_cards" | "smartLinks" | "errorReporterHandler" | "annotationProviders" | "legacyImageUploadProvider" | "contentTransformerProvider" | "allowKeyboardAccessibleDatepicker" | "onEditorReady" | "inputSamplingLimit" | "extensionProviders" | "UNSAFE_useAnalyticsContext" | "elementBrowser" | "UNSAFE_allowUndoRedoButtons" | "trackValidTransactions" | "useStickyToolbar" | "dangerouslyAppendPlugins"> & React.RefAttributes<any>>;
|
|
8
|
+
declare const FullPageWithAnalytics: React.ForwardRefExoticComponent<Pick<FullPageProps, "mentionProvider" | "emojiProvider" | "autoformattingProvider" | "taskDecisionProvider" | "contextIdentifierProvider" | "collabEditProvider" | "macroProvider" | "searchProvider" | "activityProvider" | "presenceProvider" | "placeholderBracketHint" | "placeholderHints" | "codeBlock" | "media" | "allowBlockType" | "defaultValue" | "placeholder" | "onChange" | "contextPanel" | "appearance" | "quickInsert" | "disabled" | "waitForMediaUpload" | "maxHeight" | "popupsMountPoint" | "popupsBoundariesElement" | "popupsScrollableElement" | "editorActions" | "mention" | "insertMenuItems" | "primaryToolbarComponents" | "contentComponents" | "onDestroy" | "onMount" | "saveOnEnter" | "textFormatting" | "maxContentSize" | "performanceTracking" | "featureFlags" | "onSave" | "onCancel" | "extensionHandlers" | "collabEdit" | "allowBreakout" | "uploadErrorHandler" | "sanitizePrivateContent" | "mentionInsertDisplayName" | "allowNestedTasks" | "allowExpand" | "shouldFocus" | "persistScrollGutter" | "primaryToolbarIconBefore" | "secondaryToolbarComponents" | "allowAnalyticsGASV3" | "allowTasksAndDecisions" | "allowRule" | "allowTextColor" | "allowTables" | "allowHelpDialog" | "feedbackInfo" | "allowJiraIssue" | "allowPanel" | "allowExtension" | "allowConfluenceInlineComment" | "allowTemplatePlaceholders" | "allowDate" | "allowLayouts" | "allowStatus" | "allowDynamicTextSizing" | "allowTextAlignment" | "allowIndentation" | "allowNewInsertionBehaviour" | "autoScrollIntoView" | "allowFindReplace" | "UNSAFE_cards" | "smartLinks" | "errorReporterHandler" | "annotationProviders" | "legacyImageUploadProvider" | "contentTransformerProvider" | "allowKeyboardAccessibleDatepicker" | "onEditorReady" | "inputSamplingLimit" | "extensionProviders" | "UNSAFE_useAnalyticsContext" | "elementBrowser" | "UNSAFE_allowUndoRedoButtons" | "trackValidTransactions" | "useStickyToolbar" | "UNSAFE_allowFragmentMark" | "dangerouslyAppendPlugins"> & React.RefAttributes<any>>;
|
|
9
9
|
export { FullPageWithAnalytics as FullPage };
|
|
@@ -40,7 +40,7 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
|
|
|
40
40
|
handleRef: (node: HTMLElement | null) => void;
|
|
41
41
|
private _handleRef;
|
|
42
42
|
render(props: P, forwardRef?: ForwardRef): React.ReactElement<any> | null;
|
|
43
|
-
update(node: PMNode, _decorations: Array<Decoration>, validUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
|
|
43
|
+
update(node: PMNode, _decorations: Array<Decoration>, _innerDecorations?: Array<Decoration>, validUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
|
|
44
44
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
45
45
|
/**
|
|
46
46
|
* Copies the attributes from a ProseMirror Node to a DOM node.
|
|
@@ -46,6 +46,7 @@ export declare class SelectionBasedNodeView<P = ReactComponentProps> extends Rea
|
|
|
46
46
|
isSelectionInsideNode: (from: number, to: number, pos?: number | undefined, posEnd?: number | undefined) => boolean;
|
|
47
47
|
private isSelectedNode;
|
|
48
48
|
insideSelection: () => boolean;
|
|
49
|
+
nodeInsideSelection: () => boolean;
|
|
49
50
|
viewShouldUpdate(_nextNode: PMNode): boolean;
|
|
50
51
|
destroy(): void;
|
|
51
52
|
private onSelectionChange;
|
|
@@ -50,6 +50,7 @@ export declare enum ACTION {
|
|
|
50
50
|
INITIALISED = "initialised",
|
|
51
51
|
INPUT_PERF_SAMPLING = "inputPerfSampling",
|
|
52
52
|
INSERTED = "inserted",
|
|
53
|
+
INVALID_DOCUMENT_ENCOUNTERED = "invalidDocumentEncountered",
|
|
53
54
|
INVOKED = "invoked",
|
|
54
55
|
LANGUAGE_SELECTED = "languageSelected",
|
|
55
56
|
LIST_ITEM_JOINED = "listItemJoined",
|
|
@@ -63,6 +63,12 @@ declare type SynchronyErrorAEP = OperationalAEP<ACTION.SYNCHRONY_ERROR, ACTION_S
|
|
|
63
63
|
docStructure?: string | SimplifiedNode;
|
|
64
64
|
browserExtensions?: UserBrowserExtensionResults;
|
|
65
65
|
}, undefined>;
|
|
66
|
+
declare type InvalidDocumentEncounteredAEP = OperationalAEP<ACTION.INVALID_DOCUMENT_ENCOUNTERED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
67
|
+
nodeType: string;
|
|
68
|
+
reason: string;
|
|
69
|
+
tableLocalId: string;
|
|
70
|
+
spanValue: number;
|
|
71
|
+
}, undefined>;
|
|
66
72
|
declare type SynchronyEntityErrorAEP = OperationalAEP<ACTION.SYNCHRONY_ENTITY_ERROR | ACTION.SYNCHRONY_DISCONNECTED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
67
73
|
onLine: boolean;
|
|
68
74
|
visibilityState: string;
|
|
@@ -91,5 +97,5 @@ declare type ComponentCrashAdditionalInfoErrorAEP = OperationalAEP<ACTION.EDITOR
|
|
|
91
97
|
errorStack: string;
|
|
92
98
|
errorId: string;
|
|
93
99
|
}, undefined>;
|
|
94
|
-
export declare type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP;
|
|
100
|
+
export declare type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP;
|
|
95
101
|
export {};
|
|
@@ -50,7 +50,7 @@ export declare const hasInvalidNodes: (state: EditorState) => boolean;
|
|
|
50
50
|
* Checks if any of the nodes in a given selection are completely whitespace
|
|
51
51
|
* This is to conform to Confluence annotation specifications
|
|
52
52
|
*/
|
|
53
|
-
export declare function
|
|
53
|
+
export declare function hasInvalidWhitespaceNode(selection: TextSelection | AllSelection): boolean;
|
|
54
54
|
export declare function hasAnnotationMark(node: Node, state: EditorState): boolean;
|
|
55
55
|
export declare function annotationExists(annotationId: string, state: EditorState): boolean;
|
|
56
56
|
export declare function containsAnyAnnotations(slice: Slice, state: EditorState): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const BeforePrimaryToolbarPluginWrapper: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
3
|
+
export declare const BeforePrimaryToolbarWrapper: (props: {
|
|
4
|
+
beforePrimaryToolbarComponents: any;
|
|
5
|
+
}) => JSX.Element;
|
|
@@ -4,4 +4,4 @@ import type { FeatureFlags } from '../../types/feature-flags';
|
|
|
4
4
|
*
|
|
5
5
|
* Useful for analytics and analysis purposes.
|
|
6
6
|
*/
|
|
7
|
-
export declare function getEnabledFeatureFlagKeys(featureFlags: FeatureFlags): ("newInsertionBehaviour" | "interactiveExpand" | "placeholderBracketHint" | "placeholderHints" | "moreTextColors" | "findReplace" | "findReplaceMatchCase" | "extensionLocalIdGeneration" | "keyboardAccessibleDatepicker" | "addColumnWithCustomStep" | "undoRedoButtons" | "catchAllTracking" | "nextEmojiNodeView" | "stickyHeadersOptimization" | "initialRenderOptimization" | "mouseMoveOptimization" | "tableRenderOptimization" | "tableOverflowShadowsOptimization" | "codeBlockSyntaxHighlighting" | "codeBidiWarnings" | "queueAnalytics" | "extendFloatingToolbar" | "displayInlineBlockForInlineNodes" | "useUnpredictableInputRule" | "showAvatarGroupAsPlugin" | "errorBoundaryDocStructure" | "synchronyErrorDocStructure" | "enableViewUpdateSubscription" | "collabAvatarScroll" | "ufo")[];
|
|
7
|
+
export declare function getEnabledFeatureFlagKeys(featureFlags: FeatureFlags): ("singleLayout" | "newInsertionBehaviour" | "interactiveExpand" | "placeholderBracketHint" | "placeholderHints" | "moreTextColors" | "findReplace" | "findReplaceMatchCase" | "extensionLocalIdGeneration" | "keyboardAccessibleDatepicker" | "addColumnWithCustomStep" | "undoRedoButtons" | "catchAllTracking" | "nextEmojiNodeView" | "stickyHeadersOptimization" | "initialRenderOptimization" | "mouseMoveOptimization" | "tableRenderOptimization" | "tableOverflowShadowsOptimization" | "codeBlockSyntaxHighlighting" | "codeBidiWarnings" | "queueAnalytics" | "extendFloatingToolbar" | "displayInlineBlockForInlineNodes" | "useUnpredictableInputRule" | "showAvatarGroupAsPlugin" | "errorBoundaryDocStructure" | "synchronyErrorDocStructure" | "enableViewUpdateSubscription" | "collabAvatarScroll" | "ufo" | "twoLineEditorToolbar")[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EditorView } from 'prosemirror-view';
|
|
3
|
+
import { DispatchAnalyticsEvent } from '../analytics';
|
|
4
|
+
export declare type FindReplaceToolbarButtonWithStateProps = {
|
|
5
|
+
popupsBoundariesElement?: HTMLElement;
|
|
6
|
+
popupsMountPoint?: HTMLElement;
|
|
7
|
+
popupsScrollableElement?: HTMLElement;
|
|
8
|
+
isToolbarReducedSpacing?: boolean;
|
|
9
|
+
editorView: EditorView;
|
|
10
|
+
containerElement: HTMLElement | null;
|
|
11
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
12
|
+
takeFullWidth?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const FindReplaceToolbarButtonWithState: React.FunctionComponent<FindReplaceToolbarButtonWithStateProps>;
|
|
15
|
+
export default FindReplaceToolbarButtonWithState;
|
|
@@ -4,7 +4,7 @@ import { ProviderFactory } from '@atlaskit/editor-common';
|
|
|
4
4
|
import { EmojiId } from '@atlaskit/emoji';
|
|
5
5
|
export declare const EmojiPickerButton: React.FunctionComponent<{
|
|
6
6
|
className?: string;
|
|
7
|
-
|
|
7
|
+
editorView?: EditorView;
|
|
8
8
|
idx?: number;
|
|
9
9
|
providerFactory?: ProviderFactory;
|
|
10
10
|
title?: string;
|
|
@@ -44,6 +44,7 @@ export { default as breakoutPlugin } from './breakout';
|
|
|
44
44
|
export { default as alignmentPlugin } from './alignment';
|
|
45
45
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
46
46
|
export { default as editorDisabledPlugin } from './editor-disabled';
|
|
47
|
+
export { default as fragmentMarkPlugin } from './fragment';
|
|
47
48
|
export { default as indentationPlugin } from './indentation';
|
|
48
49
|
export { default as annotationPlugin } from './annotation';
|
|
49
50
|
export { default as analyticsPlugin } from './analytics';
|
|
@@ -63,4 +64,5 @@ export { default as clipboardPlugin } from './clipboard';
|
|
|
63
64
|
export { default as undoRedoPlugin } from './undo-redo';
|
|
64
65
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
65
66
|
export { default as viewUpdateSubscriptionPlugin } from './view-update-subscription';
|
|
67
|
+
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
66
68
|
export { default as codeBidiWarningPlugin } from './code-bidi-warning';
|
|
@@ -2,7 +2,7 @@ import { Node as PMNode } from 'prosemirror-model';
|
|
|
2
2
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
5
|
-
import { getPosHandler,
|
|
5
|
+
import { getPosHandler, SelectionBasedNodeView } from '../../../nodeviews/';
|
|
6
6
|
import { FileIdentifier } from '@atlaskit/media-client';
|
|
7
7
|
import { MediaProvider, ProviderFactory } from '@atlaskit/editor-common';
|
|
8
8
|
import { PortalProviderAPI } from '../../../../src/ui/PortalProvider';
|
|
@@ -10,12 +10,13 @@ export interface MediaInlineProps {
|
|
|
10
10
|
mediaProvider: Promise<MediaProvider>;
|
|
11
11
|
identifier: FileIdentifier;
|
|
12
12
|
node: PMNode;
|
|
13
|
+
isSelected: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare const MediaInline: React.FC<MediaInlineProps>;
|
|
15
16
|
export interface MediaInlineNodeViewProps {
|
|
16
17
|
providerFactory: ProviderFactory;
|
|
17
18
|
}
|
|
18
|
-
export declare class MediaInlineNodeView extends
|
|
19
|
+
export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInlineNodeViewProps> {
|
|
19
20
|
createDomRef(): HTMLSpanElement;
|
|
20
21
|
getContentDOM(): {
|
|
21
22
|
dom: HTMLSpanElement;
|
|
@@ -28,9 +28,9 @@ export declare class MediaNodeUpdater {
|
|
|
28
28
|
hasFileAttributesDefined: () => string | false | 0 | null | undefined;
|
|
29
29
|
updateFileAttrs: (isMediaSingle?: boolean) => Promise<void>;
|
|
30
30
|
getAttrs: () => MediaADFAttrs | undefined;
|
|
31
|
-
getObjectId: () => Promise<string |
|
|
31
|
+
getObjectId: () => Promise<string | null>;
|
|
32
32
|
uploadExternalMedia: (getPos: ProsemirrorGetPosHandler) => Promise<void>;
|
|
33
|
-
getNodeContextId: () => string |
|
|
33
|
+
getNodeContextId: () => string | null;
|
|
34
34
|
updateDimensions: (dimensions: RemoteDimensions) => void;
|
|
35
35
|
getRemoteDimensions(): Promise<false | RemoteDimensions>;
|
|
36
36
|
hasDifferentContextId: () => Promise<boolean>;
|
|
@@ -47,7 +47,7 @@ declare class MediaSingleNodeView extends ReactNodeView<MediaSingleNodeViewProps
|
|
|
47
47
|
checkAndUpdateSelectionType: () => import("../../../utils/nodes").SelectedState | null;
|
|
48
48
|
isNodeSelected: () => boolean;
|
|
49
49
|
getNodeMediaId(node: PMNode): string | undefined;
|
|
50
|
-
update(node: PMNode, decorations: Decoration[], isValidUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
|
|
50
|
+
update(node: PMNode, decorations: Decoration[], _innerDecorations?: Decoration[], isValidUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
|
|
51
51
|
render(props: MediaSingleNodeViewProps, forwardRef?: ForwardRef): JSX.Element;
|
|
52
52
|
ignoreMutation(): boolean;
|
|
53
53
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
3
|
+
export declare const MediaInlineNodeSelector = "media-inline-node";
|
|
4
|
+
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
3
5
|
export declare const FigureWrapper: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>>;
|
|
4
6
|
declare type MediaCardWrapperProps = {
|
|
5
7
|
dimensions: NumericalCardDimensions;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { MediaPluginState } from '../pm-plugins/types';
|
|
3
|
+
import { InjectedIntl } from 'react-intl';
|
|
3
4
|
interface FilePreviewProps {
|
|
4
5
|
mediaPluginState: MediaPluginState;
|
|
6
|
+
intl: InjectedIntl;
|
|
5
7
|
}
|
|
6
8
|
export declare const FilePreviewItem: FC<FilePreviewProps>;
|
|
7
9
|
export {};
|
|
@@ -10,7 +10,6 @@ import { PlaceholderTextOptions } from '../../plugins/placeholder-text/types';
|
|
|
10
10
|
export declare type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
|
|
11
11
|
export interface MediaOptions {
|
|
12
12
|
provider?: Providers['mediaProvider'];
|
|
13
|
-
allowMediaInline?: boolean;
|
|
14
13
|
allowMediaSingle?: boolean | MediaSingleOptions;
|
|
15
14
|
allowMediaGroup?: boolean;
|
|
16
15
|
customDropzoneContainer?: HTMLElement;
|
|
@@ -6,4 +6,4 @@ export declare type DomAtPos = (pos: number) => {
|
|
|
6
6
|
offset: number;
|
|
7
7
|
};
|
|
8
8
|
export declare const removePanel: () => Command;
|
|
9
|
-
export declare const changePanelType: (panelType: PanelType, panelOptions?: PanelOptions,
|
|
9
|
+
export declare const changePanelType: (panelType: PanelType, panelOptions?: PanelOptions, allowCustomPanel?: boolean) => Command;
|
|
@@ -4,6 +4,12 @@ export declare const pluginKey: PluginKey<any, any>;
|
|
|
4
4
|
export interface PanelPluginOptions extends LongPressSelectionPluginOptions, PanelPluginConfig {
|
|
5
5
|
}
|
|
6
6
|
export interface PanelPluginConfig {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
allowCustomPanel?: boolean;
|
|
8
|
+
allowCustomPanelEdit?: boolean;
|
|
9
9
|
}
|
|
10
|
+
export declare type DomPanelAtrrs = {
|
|
11
|
+
class: string;
|
|
12
|
+
'data-panel-type': string;
|
|
13
|
+
'data-panel-color'?: string;
|
|
14
|
+
style: string;
|
|
15
|
+
};
|
|
@@ -7,4 +7,5 @@ export type { QuickInsertHandler, QuickInsertPluginState, QuickInsertPluginOptio
|
|
|
7
7
|
export { pluginKey };
|
|
8
8
|
declare const quickInsertPlugin: (options?: QuickInsertPluginOptions | undefined) => EditorPlugin;
|
|
9
9
|
export default quickInsertPlugin;
|
|
10
|
-
|
|
10
|
+
declare const processItems: (items: Array<QuickInsertHandler>, intl: InjectedIntl, extendedActions?: Record<string, Function> | undefined) => QuickInsertItem[];
|
|
11
|
+
export declare const memoProcessItems: typeof processItems;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Transaction } from 'prosemirror-state';
|
|
1
2
|
import { Command } from '../../../types';
|
|
3
|
+
import { EditorView } from 'prosemirror-view';
|
|
4
|
+
export declare function addColumnAt(column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined): (tr: Transaction) => Transaction<any>;
|
|
2
5
|
export declare const addColumnBefore: Command;
|
|
3
6
|
export declare const addColumnAfter: Command;
|
|
4
7
|
export declare const insertColumn: (column: number) => Command;
|
|
@@ -2,4 +2,5 @@ import { Plugin } from 'prosemirror-state';
|
|
|
2
2
|
import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
|
|
3
3
|
import { PortalProviderAPI } from '../../../ui/PortalProvider';
|
|
4
4
|
import { PluginConfig } from '../types';
|
|
5
|
-
|
|
5
|
+
import { DispatchAnalyticsEvent } from '../../analytics/types/dispatch-analytics-event';
|
|
6
|
+
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, dynamicTextSizing?: boolean | undefined, breakoutEnabled?: boolean | undefined, fullWidthModeEnabled?: boolean | undefined, previousFullWidthModeEnabled?: boolean | undefined) => Plugin<import("../types").TablePluginState, import("prosemirror-model").Schema<any, any>>;
|
|
@@ -5,7 +5,10 @@ import { ContentNodeWithPos } from 'prosemirror-utils';
|
|
|
5
5
|
import { EditorView } from 'prosemirror-view';
|
|
6
6
|
export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNode, start: number) => (tr: Transaction) => Transaction;
|
|
7
7
|
/**
|
|
8
|
-
* This function is called when user inserts/deletes a column in a table to
|
|
8
|
+
* This function is called when user inserts/deletes a column in a table to;
|
|
9
|
+
* - rescale all columns (if the table did not overflow before the insertion)
|
|
10
|
+
* - and update column widths.
|
|
11
|
+
*
|
|
9
12
|
* This is done manually to avoid a multi-dispatch in TableComponent. See [ED-8288].
|
|
10
13
|
* @param table
|
|
11
14
|
* @param view
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Node as PMNode } from 'prosemirror-model';
|
|
2
2
|
import { Transaction } from 'prosemirror-state';
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
|
+
import { ReportInvalidNodeAttrs } from '../types';
|
|
4
5
|
export declare const fireAnalytics: (properties?: {}) => Promise<Response>;
|
|
5
|
-
export declare const removeExtraneousColumnWidths: (node: PMNode, basePos: number, tr: Transaction) => boolean;
|
|
6
|
-
export declare const fixTables: (tr: Transaction) => Transaction | undefined;
|
|
6
|
+
export declare const removeExtraneousColumnWidths: (node: PMNode, basePos: number, tr: Transaction, reportInvalidTableCellSpanAttrs?: ReportInvalidNodeAttrs | undefined) => boolean;
|
|
7
|
+
export declare const fixTables: (tr: Transaction, reportInvalidTableCellSpanAttrs?: ReportInvalidNodeAttrs | undefined) => Transaction | undefined;
|
|
7
8
|
export declare const fixAutoSizedTable: (view: EditorView, tableNode: PMNode, tableRef: HTMLTableElement, tablePos: number, opts: {
|
|
8
9
|
dynamicTextSizing: boolean;
|
|
9
10
|
containerWidth: number;
|
|
@@ -324,3 +324,11 @@ export declare enum ShadowEvent {
|
|
|
324
324
|
SHOW_BEFORE_SHADOW = "showBeforeShadow",
|
|
325
325
|
SHOW_AFTER_SHADOW = "showAfterShadow"
|
|
326
326
|
}
|
|
327
|
+
export declare type ReportInvalidNodeAttrs = (invalidNodeAttrs: InvalidNodeAttr) => void;
|
|
328
|
+
export declare type InvalidNodeAttr = {
|
|
329
|
+
nodeType: string;
|
|
330
|
+
attribute: string;
|
|
331
|
+
reason: string;
|
|
332
|
+
spanValue: number;
|
|
333
|
+
tableLocalId: string;
|
|
334
|
+
};
|
|
@@ -10,7 +10,7 @@ export declare const tableCellSelectedColor = "#B3D4FF";
|
|
|
10
10
|
export declare const tableToolbarSelectedColor = "#4C9AFF";
|
|
11
11
|
export declare const tableBorderSelectedColor = "#0065FF";
|
|
12
12
|
export declare const tableCellDeleteColor = "#FFEBE6";
|
|
13
|
-
export declare const tableBorderDeleteColor = "#
|
|
13
|
+
export declare const tableBorderDeleteColor = "#DE350B";
|
|
14
14
|
export declare const tableToolbarDeleteColor = "#FFBDAD";
|
|
15
15
|
export declare const tableBorderRadiusSize = 3;
|
|
16
16
|
export declare const tablePadding = 8;
|
|
@@ -4,7 +4,7 @@ import { ProviderFactory, ExtensionHandlers } from '@atlaskit/editor-common';
|
|
|
4
4
|
import { EventDispatcher } from '../event-dispatcher';
|
|
5
5
|
import EditorActions from '../actions';
|
|
6
6
|
import { UIComponentFactory } from '../types/ui-components';
|
|
7
|
-
import { ReactComponents } from '../types/editor-props';
|
|
7
|
+
import { ReactComponents, PrimaryToolbarComponents } from '../types/editor-props';
|
|
8
8
|
import { ToolbarUIComponentFactory } from '../ui/Toolbar/types';
|
|
9
9
|
import { CollabEditOptions } from '../plugins/collab-edit/types';
|
|
10
10
|
import { DispatchAnalyticsEvent } from '../plugins/analytics';
|
|
@@ -28,7 +28,7 @@ export interface EditorAppearanceComponentProps {
|
|
|
28
28
|
primaryToolbarIconBefore?: ReactElement;
|
|
29
29
|
secondaryToolbarComponents?: UIComponentFactory[];
|
|
30
30
|
customContentComponents?: ReactComponents;
|
|
31
|
-
customPrimaryToolbarComponents?:
|
|
31
|
+
customPrimaryToolbarComponents?: PrimaryToolbarComponents;
|
|
32
32
|
customSecondaryToolbarComponents?: ReactComponents;
|
|
33
33
|
insertMenuItems?: MenuItem[];
|
|
34
34
|
contextPanel?: ReactComponents;
|
|
@@ -41,10 +41,15 @@ export declare type FeedbackInfo = {
|
|
|
41
41
|
contentId?: string;
|
|
42
42
|
tabId?: string;
|
|
43
43
|
};
|
|
44
|
+
export declare type BeforeAndAfterToolbarComponents = {
|
|
45
|
+
before: ReactComponents;
|
|
46
|
+
after: ReactComponents;
|
|
47
|
+
};
|
|
48
|
+
export declare type PrimaryToolbarComponents = BeforeAndAfterToolbarComponents | ReactComponents;
|
|
44
49
|
export interface EditorProps {
|
|
45
50
|
appearance?: EditorAppearance;
|
|
46
51
|
contentComponents?: ReactComponents;
|
|
47
|
-
primaryToolbarComponents?:
|
|
52
|
+
primaryToolbarComponents?: PrimaryToolbarComponents;
|
|
48
53
|
primaryToolbarIconBefore?: ReactElement;
|
|
49
54
|
secondaryToolbarComponents?: ReactComponents;
|
|
50
55
|
allowAnalyticsGASV3?: boolean;
|
|
@@ -205,6 +210,11 @@ export interface EditorProps {
|
|
|
205
210
|
featureFlags?: {
|
|
206
211
|
[featureFlag: string]: string | boolean;
|
|
207
212
|
};
|
|
213
|
+
/**
|
|
214
|
+
* Enable experimental support for the "fragment" mark.
|
|
215
|
+
* Refer to ADF Change proposal #60 for more details.
|
|
216
|
+
*/
|
|
217
|
+
UNSAFE_allowFragmentMark?: boolean;
|
|
208
218
|
/**
|
|
209
219
|
* @deprecated Do not use outside of Editor team.
|
|
210
220
|
* This has subtle side effects - you __WILL__ break functionality without implementer knowledge of editor-core internals
|
|
@@ -28,6 +28,13 @@
|
|
|
28
28
|
* Example: name = "newInsertionBehaviour" -> "Enable new insertion behaviour"
|
|
29
29
|
*/
|
|
30
30
|
export declare type FeatureFlags = {
|
|
31
|
+
/**
|
|
32
|
+
* @description Enable single layout option
|
|
33
|
+
*
|
|
34
|
+
* @see https://hello.atlassian.net/browse/LOVE-187
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
singleLayout?: boolean;
|
|
31
38
|
/**
|
|
32
39
|
* @description Enable new insertion behaviour
|
|
33
40
|
*
|
|
@@ -259,5 +266,11 @@ export declare type FeatureFlags = {
|
|
|
259
266
|
* @default false
|
|
260
267
|
*/
|
|
261
268
|
ufo?: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Split editor toolbar to two lines when viewport is small
|
|
271
|
+
* @see https://product-fabric.atlassian.net/browse/CERN-1124
|
|
272
|
+
* @default false
|
|
273
|
+
*/
|
|
274
|
+
twoLineEditorToolbar?: boolean;
|
|
262
275
|
};
|
|
263
276
|
export declare type FeatureFlagKey = keyof FeatureFlags;
|
|
@@ -2,7 +2,7 @@ export type { EditorInstance } from './editor-instance';
|
|
|
2
2
|
export type { EditorConfig } from './editor-config';
|
|
3
3
|
export type { EditorPlugin, PluginsOptions } from './editor-plugin';
|
|
4
4
|
export type { EditorReactContext } from './editor-react-context';
|
|
5
|
-
export type { EditorProps, FeedbackInfo, ReactComponents, ExtensionProvidersProp, } from './editor-props';
|
|
5
|
+
export type { EditorProps, FeedbackInfo, ReactComponents, ExtensionProvidersProp, PrimaryToolbarComponents, } from './editor-props';
|
|
6
6
|
export type { EditorAppearanceComponentProps } from './editor-appearance-component';
|
|
7
7
|
export type { Command, CommandDispatch } from './command';
|
|
8
8
|
export type { MessageDescriptor } from './i18n';
|