@atlaskit/editor-core 182.0.1 → 182.0.3
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/CHANGELOG.md +12 -0
- package/dist/cjs/actions/index.js +17 -7
- package/dist/cjs/create-editor/ErrorBoundary.js +8 -7
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +0 -1
- package/dist/cjs/editor-next/editor-internal.js +1 -1
- package/dist/cjs/editor-next/index.js +1 -1
- package/dist/cjs/editor-next/utils/sendDurationAnalytics.js +4 -3
- package/dist/cjs/editor-next/utils/trackEditorActions.js +4 -3
- package/dist/cjs/editor.js +15 -1
- package/dist/cjs/labs/next/full-page.js +1 -0
- package/dist/cjs/labs/next/internal/context/shared-config.js +5 -0
- package/dist/cjs/labs/next/presets/cxhtml.js +25 -0
- package/dist/cjs/labs/next/presets/default.js +2 -0
- package/dist/cjs/labs/next/presets/mobile.js +13 -0
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +0 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +1 -1
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +6 -5
- package/dist/cjs/plugins/annotation/toolbar.js +3 -0
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +1 -0
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +1 -0
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +1 -1
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +1 -0
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +1 -0
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +6 -0
- package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +1 -0
- package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +1 -1
- package/dist/cjs/plugins/collab-edit/index.js +4 -3
- package/dist/cjs/plugins/custom-autoformat/doc.js +4 -3
- package/dist/cjs/plugins/custom-autoformat/index.js +4 -3
- package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -0
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +1 -0
- package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +1 -1
- package/dist/cjs/plugins/extension/actions.js +4 -3
- package/dist/cjs/plugins/extension/commands.js +3 -0
- package/dist/cjs/plugins/extension/context-panel.js +8 -7
- package/dist/cjs/plugins/extension/pm-plugins/main.js +8 -7
- package/dist/cjs/plugins/extension/pm-plugins/utils.js +6 -5
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +1 -0
- package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +11 -3
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +1 -1
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +1 -1
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +1 -0
- package/dist/cjs/plugins/feedback-dialog/index.js +6 -5
- package/dist/cjs/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +4 -3
- package/dist/cjs/plugins/find-replace/styles.js +2 -0
- package/dist/cjs/plugins/find-replace/ui/Find.js +1 -1
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +1 -1
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -0
- package/dist/cjs/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/cjs/plugins/find-replace/ui/styles.js +1 -0
- package/dist/cjs/plugins/find-replace/utils/batch-decorations.js +10 -9
- package/dist/cjs/plugins/floating-toolbar/index.js +2 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +3 -0
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +7 -7
- package/dist/cjs/plugins/floating-toolbar/ui/Input.js +1 -1
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +1 -0
- package/dist/cjs/plugins/help-dialog/ui/index.js +1 -1
- package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +7 -7
- package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +4 -0
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +14 -13
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +4 -3
- package/dist/cjs/plugins/indentation/commands/utils.js +2 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +1 -0
- package/dist/cjs/plugins/list/commands/listBackspace.js +0 -1
- package/dist/cjs/plugins/macro/actions.js +6 -5
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +4 -3
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +5 -5
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +34 -32
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +12 -6
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +10 -9
- package/dist/cjs/plugins/media/nodeviews/styles.js +1 -0
- package/dist/cjs/plugins/media/picker-facade.js +4 -3
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -0
- package/dist/cjs/plugins/media/pm-plugins/main.js +25 -7
- package/dist/cjs/plugins/media/pm-plugins/mediaTaskManager.js +4 -3
- package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +1 -0
- package/dist/cjs/plugins/media/toolbar/utils.js +4 -3
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +1 -0
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +1 -0
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +2 -0
- package/dist/cjs/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +4 -3
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +7 -6
- package/dist/cjs/plugins/media/utils/check-media-type.js +4 -3
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +3 -3
- package/dist/cjs/plugins/paste/handlers.js +4 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +3 -3
- package/dist/cjs/plugins/quick-insert/index.js +4 -3
- package/dist/cjs/plugins/status/nodeviews/status.js +1 -0
- package/dist/cjs/plugins/status/ui/statusPicker.js +5 -0
- package/dist/cjs/plugins/tasks-and-decisions/index.js +1 -0
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +10 -0
- package/dist/cjs/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +8 -4
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +1 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +1 -0
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +1 -1
- package/dist/cjs/plugins/type-ahead/ui/AssistiveText.js +1 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +1 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +1 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +1 -0
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +1 -1
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +1 -0
- package/dist/cjs/ui/Addon/ClickAreaInline/index.js +1 -0
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +1 -0
- package/dist/cjs/ui/Addon/Dropdown/index.js +1 -1
- package/dist/cjs/ui/Alignment/index.js +1 -1
- package/dist/cjs/ui/Appearance/Chromeless.js +1 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +19 -1
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +1 -0
- package/dist/cjs/ui/ChromeCollapsed/index.js +1 -1
- package/dist/cjs/ui/ColorPickerButton/index.js +1 -0
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +9 -5
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +3 -3
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +5 -5
- package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +4 -3
- package/dist/cjs/ui/ConfigPanel/Header.js +1 -0
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +1 -0
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +1 -0
- package/dist/cjs/ui/ConfigPanel/transformers.js +20 -19
- package/dist/cjs/ui/ContentStyles/index.js +1 -0
- package/dist/cjs/ui/ContextPanel/context.js +15 -0
- package/dist/cjs/ui/ContextPanel/index.js +1 -0
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +3 -0
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +1 -0
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +1 -0
- package/dist/cjs/ui/ElementBrowser/components/ElementBrowserLoader.js +1 -0
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +1 -0
- package/dist/cjs/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +1 -0
- package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -0
- package/dist/cjs/ui/ElementBrowser/hooks/use-container-width.js +27 -0
- package/dist/cjs/ui/ElementBrowser/hooks/use-focus.js +32 -0
- package/dist/cjs/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +38 -0
- package/dist/cjs/ui/FloatingToolbar/index.js +1 -1
- package/dist/cjs/ui/LinkSearch/LinkSearchList.js +1 -0
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +3 -0
- package/dist/cjs/ui/LinkSearch/index.js +8 -7
- package/dist/cjs/ui/PanelTextInput/index.js +1 -1
- package/dist/cjs/ui/PluginSlot/index.js +1 -0
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +1 -0
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +1 -0
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +33 -20
- package/dist/cjs/ui/ToolbarFeedback/index.js +7 -4
- package/dist/cjs/ui/WithFlash/index.js +1 -0
- package/dist/cjs/ui/styles.js +5 -3
- package/dist/cjs/utils/action.js +6 -5
- package/dist/cjs/utils/announcer/announcer.js +9 -1
- package/dist/cjs/utils/clipboard.js +5 -5
- package/dist/cjs/utils/extensions.js +6 -5
- package/dist/cjs/utils/index.js +12 -0
- package/dist/cjs/utils/performance/simple-measure-to-entries.js +2 -1
- package/dist/cjs/utils/performance/track-transactions.js +2 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +9 -0
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +0 -1
- package/dist/es2019/editor.js +14 -0
- package/dist/es2019/labs/next/internal/context/shared-config.js +6 -0
- package/dist/es2019/labs/next/presets/cxhtml.js +23 -0
- package/dist/es2019/labs/next/presets/mobile.js +0 -2
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +0 -1
- package/dist/es2019/plugins/annotation/toolbar.js +0 -1
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +7 -0
- package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +7 -0
- package/dist/es2019/plugins/extension/commands.js +0 -1
- package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +9 -0
- package/dist/es2019/plugins/floating-toolbar/index.js +0 -1
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +3 -0
- package/dist/es2019/plugins/indentation/commands/utils.js +3 -0
- package/dist/es2019/plugins/list/commands/listBackspace.js +0 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +5 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +9 -1
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +3 -0
- package/dist/es2019/plugins/media/pm-plugins/main.js +18 -0
- package/dist/es2019/plugins/quick-insert/commands.js +0 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +4 -0
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +11 -0
- package/dist/es2019/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +5 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +18 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +4 -0
- package/dist/es2019/ui/ContextPanel/context.js +0 -1
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +26 -15
- package/dist/es2019/ui/ToolbarFeedback/index.js +3 -0
- package/dist/es2019/ui/styles.js +5 -0
- package/dist/es2019/utils/announcer/announcer.js +0 -2
- package/dist/es2019/utils/index.js +9 -0
- package/dist/es2019/utils/performance/simple-measure-to-entries.js +1 -1
- package/dist/es2019/utils/performance/track-transactions.js +2 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +17 -7
- package/dist/esm/create-editor/ErrorBoundary.js +8 -7
- package/dist/esm/create-editor/ReactEditorViewInternal.js +0 -1
- package/dist/esm/editor-next/utils/sendDurationAnalytics.js +4 -3
- package/dist/esm/editor-next/utils/trackEditorActions.js +4 -3
- package/dist/esm/editor.js +14 -0
- package/dist/esm/labs/next/internal/context/shared-config.js +6 -0
- package/dist/esm/labs/next/presets/cxhtml.js +23 -0
- package/dist/esm/labs/next/presets/mobile.js +0 -2
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +0 -1
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +6 -5
- package/dist/esm/plugins/annotation/toolbar.js +0 -1
- package/dist/esm/plugins/card/nodeviews/embedCard.js +6 -0
- package/dist/esm/plugins/collab-edit/index.js +4 -3
- package/dist/esm/plugins/custom-autoformat/doc.js +4 -3
- package/dist/esm/plugins/custom-autoformat/index.js +4 -3
- package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +6 -0
- package/dist/esm/plugins/extension/actions.js +4 -3
- package/dist/esm/plugins/extension/commands.js +0 -1
- package/dist/esm/plugins/extension/context-panel.js +7 -7
- package/dist/esm/plugins/extension/pm-plugins/main.js +7 -7
- package/dist/esm/plugins/extension/pm-plugins/utils.js +6 -5
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +12 -3
- package/dist/esm/plugins/feedback-dialog/index.js +6 -5
- package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +4 -3
- package/dist/esm/plugins/find-replace/utils/batch-decorations.js +10 -9
- package/dist/esm/plugins/floating-toolbar/index.js +0 -1
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +3 -0
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -7
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +8 -7
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +14 -13
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +4 -3
- package/dist/esm/plugins/indentation/commands/utils.js +3 -0
- package/dist/esm/plugins/list/commands/listBackspace.js +0 -1
- package/dist/esm/plugins/macro/actions.js +6 -5
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +4 -3
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +6 -5
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +34 -32
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +13 -6
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +10 -8
- package/dist/esm/plugins/media/picker-facade.js +4 -3
- package/dist/esm/plugins/media/pm-plugins/main.js +26 -7
- package/dist/esm/plugins/media/pm-plugins/mediaTaskManager.js +4 -3
- package/dist/esm/plugins/media/toolbar/utils.js +4 -3
- package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +4 -3
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +6 -5
- package/dist/esm/plugins/media/utils/check-media-type.js +4 -3
- package/dist/esm/plugins/mentions/nodeviews/mention.js +4 -3
- package/dist/esm/plugins/paste/handlers.js +4 -3
- package/dist/esm/plugins/paste/pm-plugins/main.js +4 -3
- package/dist/esm/plugins/quick-insert/commands.js +0 -1
- package/dist/esm/plugins/quick-insert/index.js +4 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +4 -0
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +10 -0
- package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +9 -4
- package/dist/esm/ui/Appearance/Comment/Comment.js +18 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +10 -5
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +4 -3
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +6 -5
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +4 -3
- package/dist/esm/ui/ConfigPanel/transformers.js +19 -19
- package/dist/esm/ui/ContextPanel/context.js +0 -1
- package/dist/esm/ui/LinkSearch/index.js +8 -7
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +26 -14
- package/dist/esm/ui/ToolbarFeedback/index.js +6 -3
- package/dist/esm/ui/styles.js +3 -2
- package/dist/esm/utils/action.js +6 -5
- package/dist/esm/utils/announcer/announcer.js +0 -2
- package/dist/esm/utils/clipboard.js +6 -5
- package/dist/esm/utils/extensions.js +6 -5
- package/dist/esm/utils/index.js +9 -0
- package/dist/esm/utils/performance/simple-measure-to-entries.js +2 -1
- package/dist/esm/utils/performance/track-transactions.js +2 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +8 -2
- package/dist/types/ui/styles.d.ts +1 -0
- package/package.json +4 -4
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
// #region Imports
|
|
2
2
|
import React from 'react';
|
|
3
|
+
|
|
4
|
+
//import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
5
|
+
//
|
|
6
|
+
//import {
|
|
7
|
+
// panelPlugin,
|
|
8
|
+
// listPlugin,
|
|
9
|
+
// textColorPlugin,
|
|
10
|
+
// breakoutPlugin,
|
|
11
|
+
// jiraIssuePlugin,
|
|
12
|
+
// extensionPlugin,
|
|
13
|
+
// rulePlugin,
|
|
14
|
+
// datePlugin,
|
|
15
|
+
// layoutPlugin,
|
|
16
|
+
// indentationPlugin,
|
|
17
|
+
// cardPlugin,
|
|
18
|
+
// statusPlugin,
|
|
19
|
+
// mediaPlugin,
|
|
20
|
+
// mentionsPlugin,
|
|
21
|
+
// tasksAndDecisionsPlugin,
|
|
22
|
+
// insertBlockPlugin,
|
|
23
|
+
// basePlugin,
|
|
24
|
+
// //placeholderPlugin,
|
|
25
|
+
//} from '../../../plugins';
|
|
3
26
|
import { PresetProvider } from '../Editor';
|
|
4
27
|
import { useDefaultPreset } from './default';
|
|
5
28
|
// #endregion
|
|
@@ -11,7 +11,6 @@ useProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
11
11
|
//import extensionPlugin from '../../../plugins/extension';
|
|
12
12
|
//import layoutPlugin from '../../../plugins/layout';
|
|
13
13
|
//import listPlugin from '../../../plugins/list';
|
|
14
|
-
|
|
15
14
|
//import mentionsPlugin from '../../../plugins/mentions';
|
|
16
15
|
//import mobileDimensionsPlugin from '../../../plugins/mobile-dimensions';
|
|
17
16
|
//import panelPlugin from '../../../plugins/panel';
|
|
@@ -30,7 +29,6 @@ import { addExcludesFromProviderFactory } from './utils';
|
|
|
30
29
|
//import { quickInsertPlugin } from '../../../plugins';
|
|
31
30
|
|
|
32
31
|
// #endregion
|
|
33
|
-
|
|
34
32
|
export function useMobilePreset({
|
|
35
33
|
media,
|
|
36
34
|
placeholder,
|
|
@@ -196,7 +196,6 @@ function getPortalChildren({
|
|
|
196
196
|
// nodeViews: {
|
|
197
197
|
// [nodeViewName: string]: NodeViewProducer
|
|
198
198
|
// }
|
|
199
|
-
|
|
200
199
|
// This return of this function is intended to be the value of a key
|
|
201
200
|
// in a ProseMirror nodeViews object.
|
|
202
201
|
export function getInlineNodeViewProducer({
|
|
@@ -3,7 +3,6 @@ import { defineMessages } from 'react-intl-next';
|
|
|
3
3
|
import CommentIcon from '@atlaskit/icon/glyph/comment';
|
|
4
4
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
5
5
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
6
|
-
|
|
7
6
|
import { addInlineComment, ToolTipContent } from '../../keymaps';
|
|
8
7
|
import { setInlineCommentDraftState } from './commands';
|
|
9
8
|
import { AnnotationTestIds, AnnotationSelectionType } from './types';
|
|
@@ -164,6 +164,13 @@ export class EmbedCardComponent extends React.PureComponent {
|
|
|
164
164
|
const scrollContainer = findOverflowScrollParent(view.dom);
|
|
165
165
|
this.scrollContainer = scrollContainer || undefined;
|
|
166
166
|
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Even though render is capable of listening and reacting to iframely wrapper iframe sent `resize` events
|
|
170
|
+
* it's good idea to store latest actual height in ADF, so that when renderer (well, editor as well) is loading
|
|
171
|
+
* we will show embed window of appropriate size and avoid unnecessary content jumping.
|
|
172
|
+
*/
|
|
173
|
+
|
|
167
174
|
render() {
|
|
168
175
|
const {
|
|
169
176
|
node,
|
|
@@ -217,6 +217,10 @@ class DatePickerInput extends React.Component {
|
|
|
217
217
|
* Focus the input textfield
|
|
218
218
|
*/
|
|
219
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Select all the input text
|
|
222
|
+
*/
|
|
223
|
+
|
|
220
224
|
componentWillUnmount() {
|
|
221
225
|
if (this.autofocusTimeout !== undefined) {
|
|
222
226
|
clearTimeout(this.autofocusTimeout);
|
|
@@ -225,5 +229,8 @@ class DatePickerInput extends React.Component {
|
|
|
225
229
|
clearTimeout(this.autoSelectAllTimeout);
|
|
226
230
|
}
|
|
227
231
|
}
|
|
232
|
+
|
|
233
|
+
// arrow keys are only triggered by onKeyDown, not onKeyPress
|
|
228
234
|
}
|
|
235
|
+
|
|
229
236
|
export default injectIntl(DatePickerInput);
|
|
@@ -5,7 +5,6 @@ import { getSelectedExtension } from './utils';
|
|
|
5
5
|
import { removeConnectedNodes } from '@atlaskit/editor-common/utils';
|
|
6
6
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
7
7
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
8
|
-
|
|
9
8
|
export function updateState(state) {
|
|
10
9
|
return createCommand({
|
|
11
10
|
type: 'UPDATE_STATE',
|
|
@@ -153,6 +153,15 @@ export default class ExtensionComponent extends Component {
|
|
|
153
153
|
return null;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Parses any private nodes once an extension provider is available.
|
|
159
|
+
*
|
|
160
|
+
* We do this separately from resolving a node renderer component since the
|
|
161
|
+
* private props come from extension provider, rather than an extension
|
|
162
|
+
* handler which only handles `render`/component concerns.
|
|
163
|
+
*/
|
|
164
|
+
|
|
156
165
|
tryExtensionHandler() {
|
|
157
166
|
const {
|
|
158
167
|
node
|
|
@@ -6,7 +6,6 @@ import camelCase from 'lodash/camelCase';
|
|
|
6
6
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
7
7
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
8
8
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
9
|
-
|
|
10
9
|
import WithPluginState from '../../ui/WithPluginState';
|
|
11
10
|
import { CONTENT_COMPONENT } from '../analytics/types';
|
|
12
11
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
@@ -36,6 +36,9 @@ const label = css`
|
|
|
36
36
|
width: 100%;
|
|
37
37
|
`;
|
|
38
38
|
export const itemSpacing = gridSize() / 2;
|
|
39
|
+
|
|
40
|
+
// Extend the ButtonItem component type to allow mouse events to be accepted from the Typescript check
|
|
41
|
+
|
|
39
42
|
const DropdownButtonItem = ButtonItem;
|
|
40
43
|
const DropdownMenuItem = ({
|
|
41
44
|
item,
|
|
@@ -4,7 +4,6 @@ import { findParentNodeOfType } from 'prosemirror-utils';
|
|
|
4
4
|
import { isListNode, isParagraphNode } from '../utils/node';
|
|
5
5
|
import { isPosInsideList, isPosInsideParagraph } from '../utils/selection';
|
|
6
6
|
//Cases below refer to the cases found in this document: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1146954996/List+Backspace+and+Delete+Behaviour
|
|
7
|
-
|
|
8
7
|
//Case for two adjacent list items of the same indentation
|
|
9
8
|
const listBackspaceCase2 = (tr, dispatch, $prev, $head) => {
|
|
10
9
|
/* CASE 2
|
|
@@ -306,7 +306,6 @@ export class MediaNodeUpdater {
|
|
|
306
306
|
|
|
307
307
|
// Updates the node with contextId if it doesn't have one already
|
|
308
308
|
// TODO [MS-2258]: remove updateContextId in order to only use updateMediaSingleFileAttrs
|
|
309
|
-
|
|
310
309
|
async getRemoteDimensions() {
|
|
311
310
|
const mediaProvider = await this.props.mediaProvider;
|
|
312
311
|
const {
|
|
@@ -370,7 +369,12 @@ export class MediaNodeUpdater {
|
|
|
370
369
|
await this.uploadExternalMedia(getPos);
|
|
371
370
|
}
|
|
372
371
|
}
|
|
372
|
+
|
|
373
|
+
// Copies the pasted node into the current collection using a getPos handler
|
|
374
|
+
|
|
375
|
+
// Copies the pasted node into the current collection
|
|
373
376
|
}
|
|
377
|
+
|
|
374
378
|
const hasPrivateAttrsChanged = (currentAttrs, newAttrs) => {
|
|
375
379
|
return currentAttrs.__fileName !== newAttrs.__fileName || currentAttrs.__fileMimeType !== newAttrs.__fileMimeType || currentAttrs.__fileSize !== newAttrs.__fileSize || currentAttrs.__contextId !== newAttrs.__contextId;
|
|
376
380
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { withImageLoader } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
|
+
import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context';
|
|
3
5
|
import { Card, CardLoading } from '@atlaskit/media-card';
|
|
4
6
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
7
|
import React, { Component } from 'react';
|
|
@@ -142,6 +144,12 @@ export class MediaNode extends Component {
|
|
|
142
144
|
onContextMenu: this.selectMediaSingle,
|
|
143
145
|
borderWidth: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size,
|
|
144
146
|
selected: selected
|
|
147
|
+
}, /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
148
|
+
data: {
|
|
149
|
+
[MEDIA_CONTEXT]: {
|
|
150
|
+
border: !!borderMark
|
|
151
|
+
}
|
|
152
|
+
}
|
|
145
153
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
146
154
|
mediaClientConfig: mediaClientConfig,
|
|
147
155
|
resizeMode: "stretchy-fit",
|
|
@@ -158,7 +166,7 @@ export class MediaNode extends Component {
|
|
|
158
166
|
featureFlags: mediaOptions && mediaOptions.featureFlags,
|
|
159
167
|
contextId: contextId,
|
|
160
168
|
alt: alt
|
|
161
|
-
}));
|
|
169
|
+
})));
|
|
162
170
|
}
|
|
163
171
|
}
|
|
164
172
|
export default withImageLoader(MediaNode);
|
|
@@ -204,6 +204,9 @@ export default class MediaSingleNode extends Component {
|
|
|
204
204
|
contextIdentifierProvider: await contextIdentifierProvider
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
+
|
|
208
|
+
// Workaound for iOS 16 Caption selection issue
|
|
209
|
+
// @see https://product-fabric.atlassian.net/browse/MEX-2012
|
|
207
210
|
render() {
|
|
208
211
|
const {
|
|
209
212
|
selected,
|
|
@@ -43,6 +43,8 @@ const createDropPlaceholder = (intl, allowDropLine) => {
|
|
|
43
43
|
};
|
|
44
44
|
const MEDIA_RESOLVED_STATES = ['ready', 'error', 'cancelled'];
|
|
45
45
|
export class MediaPluginStateImplementation {
|
|
46
|
+
// @ts-ignore: private is OK
|
|
47
|
+
|
|
46
48
|
constructor(_state, options, mediaOptions, _dispatch) {
|
|
47
49
|
_defineProperty(this, "allowsUploads", false);
|
|
48
50
|
_defineProperty(this, "ignoreLinks", false);
|
|
@@ -403,6 +405,13 @@ export class MediaPluginStateImplementation {
|
|
|
403
405
|
* called when we insert a new file via the picker (connected via pickerfacade)
|
|
404
406
|
*/
|
|
405
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Returns a promise that is resolved after all pending operations have been finished.
|
|
410
|
+
* An optional timeout will cause the promise to reject if the operation takes too long
|
|
411
|
+
*
|
|
412
|
+
* NOTE: The promise will resolve even if some of the media have failed to process.
|
|
413
|
+
*/
|
|
414
|
+
|
|
406
415
|
setView(view) {
|
|
407
416
|
this.view = view;
|
|
408
417
|
}
|
|
@@ -412,6 +421,15 @@ export class MediaPluginStateImplementation {
|
|
|
412
421
|
* inside of it
|
|
413
422
|
*/
|
|
414
423
|
|
|
424
|
+
/**
|
|
425
|
+
* Called from React UI Component on componentDidMount
|
|
426
|
+
*/
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Called from React UI Component on componentWillUnmount and UNSAFE_componentWillReceiveProps
|
|
430
|
+
* when React component's underlying node property is replaced with a new node
|
|
431
|
+
*/
|
|
432
|
+
|
|
415
433
|
destroy() {
|
|
416
434
|
if (this.destroyed) {
|
|
417
435
|
return;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
2
2
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
3
|
-
|
|
4
3
|
import { insertSelectedItem } from '../../utils/insert';
|
|
5
4
|
import { pluginKey } from './plugin-key';
|
|
6
5
|
export const openElementBrowserModal = () => (state, dispatch) => {
|
|
@@ -214,5 +214,9 @@ export class StatusPickerWithoutAnalytcs extends React.Component {
|
|
|
214
214
|
onEnter: this.onEnter
|
|
215
215
|
})));
|
|
216
216
|
}
|
|
217
|
+
|
|
218
|
+
// cancel bubbling to fix clickOutside logic:
|
|
219
|
+
// popup re-renders its content before the click event bubbles up to the document
|
|
220
|
+
// therefore click target element would be different from the popup content
|
|
217
221
|
}
|
|
218
222
|
export default withAnalyticsEvents()(StatusPickerWithoutAnalytcs);
|
|
@@ -60,6 +60,17 @@ class Task extends ReactNodeView {
|
|
|
60
60
|
isContentEmpty(node) {
|
|
61
61
|
return node.content.childCount === 0;
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Dynamically generates analytics data relating to the parent list.
|
|
66
|
+
*
|
|
67
|
+
* Required to be dynamic, as list (in prosemirror model) may have
|
|
68
|
+
* changed (e.g. item movements, or additional items in list).
|
|
69
|
+
* This node view will have not rerendered for those changes, so
|
|
70
|
+
* cannot render the position and listSize into the
|
|
71
|
+
* AnalyticsContext at initial render time.
|
|
72
|
+
*/
|
|
73
|
+
|
|
63
74
|
createDomRef() {
|
|
64
75
|
const domRef = document.createElement('div');
|
|
65
76
|
domRef.style['list-style-type'] = 'none';
|
|
@@ -10,7 +10,11 @@ export default class TaskItemWithProviders extends Component {
|
|
|
10
10
|
resolvedContextProvider: undefined
|
|
11
11
|
});
|
|
12
12
|
_defineProperty(this, "mounted", false);
|
|
13
|
-
}
|
|
13
|
+
} // Storing the mounted state is an anti-pattern, however the asynchronous state
|
|
14
|
+
// updates via `updateContextIdentifierProvider` means we may be dismounted before
|
|
15
|
+
// it receives a response.
|
|
16
|
+
// Since we can't cancel the Promise we store the mounted state to avoid state
|
|
17
|
+
// updates when no longer suitable.
|
|
14
18
|
UNSAFE_componentWillMount() {
|
|
15
19
|
this.mounted = true;
|
|
16
20
|
this.updateContextIdentifierProvider(this.props);
|
|
@@ -23,6 +23,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
23
23
|
import messages from '../../../messages';
|
|
24
24
|
import { TableControlsPadding, MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
|
|
25
25
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
26
|
+
import { ToolbarArrowKeyNavigationProvider } from '../../ToolbarArrowKeyNavigationProvider';
|
|
26
27
|
const CommentEditorMargin = 14;
|
|
27
28
|
const CommentEditorSmallerMargin = 8;
|
|
28
29
|
const commentEditorStyle = css`
|
|
@@ -123,6 +124,15 @@ class Editor extends React.Component {
|
|
|
123
124
|
} = this.props;
|
|
124
125
|
const maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
125
126
|
const showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
|
|
127
|
+
const isShortcutToFocusToolbar = event => {
|
|
128
|
+
//Alt + F9 to reach first element in this main toolbar
|
|
129
|
+
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
130
|
+
};
|
|
131
|
+
const handleEscape = event => {
|
|
132
|
+
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
133
|
+
editorView === null || editorView === void 0 ? void 0 : editorView.focus();
|
|
134
|
+
}
|
|
135
|
+
};
|
|
126
136
|
return jsx(WithFlash, {
|
|
127
137
|
animate: maxContentSizeReached
|
|
128
138
|
}, jsx("div", {
|
|
@@ -133,6 +143,13 @@ class Editor extends React.Component {
|
|
|
133
143
|
ref: this.wrapperElementRef
|
|
134
144
|
}, jsx(MainToolbar, {
|
|
135
145
|
useStickyToolbar: useStickyToolbar
|
|
146
|
+
}, jsx(ToolbarArrowKeyNavigationProvider, {
|
|
147
|
+
editorView: editorView,
|
|
148
|
+
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
149
|
+
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
150
|
+
handleEscape: handleEscape,
|
|
151
|
+
editorAppearance: this.appearance,
|
|
152
|
+
useStickyToolbar: useStickyToolbar
|
|
136
153
|
}, jsx(Toolbar, {
|
|
137
154
|
editorView: editorView,
|
|
138
155
|
editorActions: editorActions,
|
|
@@ -148,7 +165,7 @@ class Editor extends React.Component {
|
|
|
148
165
|
containerElement: this.containerElement
|
|
149
166
|
}), jsx("div", {
|
|
150
167
|
css: mainToolbarCustomComponentsSlotStyle
|
|
151
|
-
}, customPrimaryToolbarComponents)), jsx(ClickAreaBlock, {
|
|
168
|
+
}, customPrimaryToolbarComponents))), jsx(ClickAreaBlock, {
|
|
152
169
|
editorView: editorView,
|
|
153
170
|
editorDisabled: disabled
|
|
154
171
|
}, jsx(WidthConsumer, null, ({
|
|
@@ -319,6 +319,10 @@ class ConfigPanel extends React.Component {
|
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
+
|
|
323
|
+
// https://product-fabric.atlassian.net/browse/DST-2697
|
|
324
|
+
// workaround for DST-2697, remove this function once fix.
|
|
325
|
+
// memoized to prevent rerender on new parameters
|
|
322
326
|
render() {
|
|
323
327
|
const {
|
|
324
328
|
extensionManifest
|
|
@@ -15,7 +15,6 @@ import React from 'react';
|
|
|
15
15
|
// positionedOverEditor is used to determine whether the context panel is positioned over the Editor so we are
|
|
16
16
|
// able to position and add margins to handle certain elements like inline comment dialogues overlapping the context
|
|
17
17
|
// panel
|
|
18
|
-
|
|
19
18
|
export const ContextPanel = /*#__PURE__*/React.createContext({
|
|
20
19
|
width: 0,
|
|
21
20
|
positionedOverEditor: false,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
/* eslint-disable no-console */
|
|
2
|
-
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { centeredToolbarContainer } from '../styles';
|
|
3
5
|
import React, { useCallback, useLayoutEffect, useRef } from 'react';
|
|
4
6
|
/*
|
|
5
7
|
** The context is used to handle the keydown events of submenus.
|
|
@@ -24,7 +26,9 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
24
26
|
childComponentSelector,
|
|
25
27
|
handleEscape,
|
|
26
28
|
disableArrowKeyNavigation,
|
|
27
|
-
isShortcutToFocusToolbar
|
|
29
|
+
isShortcutToFocusToolbar,
|
|
30
|
+
editorAppearance,
|
|
31
|
+
useStickyToolbar
|
|
28
32
|
}) => {
|
|
29
33
|
const wrapperRef = useRef(null);
|
|
30
34
|
const selectedItemIndex = useRef(0);
|
|
@@ -61,12 +65,14 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
61
65
|
const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
62
66
|
(_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
|
|
63
67
|
};
|
|
64
|
-
const focusAndScrollToElement = element => {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
const focusAndScrollToElement = (element, scrollToElement = true) => {
|
|
69
|
+
if (scrollToElement) {
|
|
70
|
+
element === null || element === void 0 ? void 0 : element.scrollIntoView({
|
|
71
|
+
behavior: 'smooth',
|
|
72
|
+
block: 'center',
|
|
73
|
+
inline: 'nearest'
|
|
74
|
+
});
|
|
75
|
+
}
|
|
70
76
|
element.focus();
|
|
71
77
|
};
|
|
72
78
|
const submenuKeydownHandleContext = {
|
|
@@ -117,15 +123,18 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
117
123
|
} else {
|
|
118
124
|
selectedItemIndex.current = filteredFocusableElements.indexOf(targetElement) > -1 ? filteredFocusableElements.indexOf(targetElement) : selectedItemIndex.current;
|
|
119
125
|
}
|
|
126
|
+
|
|
127
|
+
//do not scroll to focused element for sticky toolbar when navigating with arrows to avoid unnesessary scroll jump
|
|
128
|
+
const allowScrollToElement = !(editorAppearance === 'comment' && !!useStickyToolbar);
|
|
120
129
|
switch (event.key) {
|
|
121
130
|
case 'ArrowRight':
|
|
122
131
|
incrementIndex(filteredFocusableElements);
|
|
123
|
-
focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current]);
|
|
132
|
+
focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current], allowScrollToElement);
|
|
124
133
|
event.preventDefault();
|
|
125
134
|
break;
|
|
126
135
|
case 'ArrowLeft':
|
|
127
136
|
decrementIndex(filteredFocusableElements);
|
|
128
|
-
focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current]);
|
|
137
|
+
focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current], allowScrollToElement);
|
|
129
138
|
event.preventDefault();
|
|
130
139
|
break;
|
|
131
140
|
case 'Escape':
|
|
@@ -148,20 +157,22 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
148
157
|
}
|
|
149
158
|
};
|
|
150
159
|
element === null || element === void 0 ? void 0 : element.addEventListener('keydown', handleKeyDown);
|
|
160
|
+
const editorViewDom = editorView === null || editorView === void 0 ? void 0 : editorView.dom;
|
|
151
161
|
if (isShortcutToFocusToolbar) {
|
|
152
|
-
|
|
162
|
+
editorViewDom === null || editorViewDom === void 0 ? void 0 : editorViewDom.addEventListener('keydown', globalKeyDownHandler);
|
|
153
163
|
}
|
|
154
164
|
return () => {
|
|
155
165
|
element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleKeyDown);
|
|
156
166
|
if (isShortcutToFocusToolbar) {
|
|
157
|
-
|
|
167
|
+
editorViewDom === null || editorViewDom === void 0 ? void 0 : editorViewDom.removeEventListener('keydown', globalKeyDownHandler);
|
|
158
168
|
}
|
|
159
169
|
};
|
|
160
|
-
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar]);
|
|
161
|
-
return
|
|
170
|
+
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar]);
|
|
171
|
+
return jsx("div", {
|
|
172
|
+
css: editorAppearance === 'comment' && centeredToolbarContainer,
|
|
162
173
|
className: "custom-key-handler-wrapper",
|
|
163
174
|
ref: wrapperRef
|
|
164
|
-
},
|
|
175
|
+
}, jsx(KeyDownHandlerContext.Provider, {
|
|
165
176
|
value: submenuKeydownHandleContext
|
|
166
177
|
}, children));
|
|
167
178
|
};
|
package/dist/es2019/ui/styles.js
CHANGED
|
@@ -9,10 +9,8 @@ import React, { forwardRef, memo, useState, useEffect } from 'react';
|
|
|
9
9
|
|
|
10
10
|
// Note: Text won't be announced if the text message doesn't change after the render.
|
|
11
11
|
// For using a forced announcement in this case, set the 'key' attribute - key={Date.now()}
|
|
12
|
-
|
|
13
12
|
// Note: Flag 'contentRendered' resolves bug with duplicates messages (NVDA + Firefox)
|
|
14
13
|
// https://github.com/nvaccess/nvda/labels/bug%2Fdouble-speaking
|
|
15
|
-
|
|
16
14
|
let timer;
|
|
17
15
|
const Announcer = /*#__PURE__*/forwardRef(({
|
|
18
16
|
ariaAtomic = 'true',
|
|
@@ -349,6 +349,15 @@ export function compose(func, ...funcs) {
|
|
|
349
349
|
return allFuncs.reduceRight((memo, func) => func(memo), raw);
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
+
|
|
353
|
+
// one function
|
|
354
|
+
|
|
355
|
+
// two function
|
|
356
|
+
|
|
357
|
+
// three function
|
|
358
|
+
|
|
359
|
+
// If needed add more than 3 function
|
|
360
|
+
// Generic
|
|
352
361
|
// rest
|
|
353
362
|
export function pipe(...fns) {
|
|
354
363
|
if (fns.length === 0) {
|
|
@@ -68,7 +68,8 @@ export class TransactionTracker {
|
|
|
68
68
|
}));
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
}
|
|
71
|
+
} // Counter so we can rate limit the transaction performance tracking
|
|
72
|
+
// A map containing the time which measurement starts
|
|
72
73
|
addMeasureListener(listener) {
|
|
73
74
|
this.measureListeners.push(listener);
|
|
74
75
|
}
|
package/dist/es2019/version.json
CHANGED