@atlaskit/editor-core 176.0.3 → 177.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +2 -2
- package/CHANGELOG.md +108 -0
- package/dist/cjs/create-editor/ReactEditorView.js +3 -1
- package/dist/cjs/create-editor/create-plugins-list.js +9 -6
- package/dist/cjs/create-editor/messages.js +17 -0
- package/dist/cjs/i18n/en.js +2 -2
- package/dist/cjs/i18n/en_GB.js +2 -2
- package/dist/cjs/i18n/en_ZZ.js +2 -2
- package/dist/cjs/i18n/index.js +4 -4
- package/dist/cjs/i18n/languages.js +9 -4
- package/dist/cjs/labs/next/presets/mobile.js +2 -2
- package/dist/cjs/labs/next/presets/preset.js +38 -6
- package/dist/cjs/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +6 -1
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +5 -1
- package/dist/cjs/plugins/card/pm-plugins/doc.js +18 -29
- package/dist/cjs/plugins/card/pm-plugins/main.js +7 -21
- package/dist/cjs/plugins/card/toolbar.js +24 -8
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +9 -5
- package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +19 -53
- package/dist/cjs/plugins/card/utils.js +17 -3
- package/dist/cjs/plugins/collab-edit/actions.js +3 -3
- package/dist/cjs/plugins/copy-button/toolbar.js +5 -3
- package/dist/cjs/plugins/date/index.js +1 -7
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +1 -2
- package/dist/cjs/plugins/emoji/index.js +7 -14
- package/dist/cjs/plugins/expand/pm-plugins/main.js +4 -1
- package/dist/cjs/plugins/expand/toolbar.js +1 -0
- package/dist/cjs/plugins/extension/commands.js +17 -2
- package/dist/cjs/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/cjs/plugins/extension/toolbar.js +49 -7
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -2
- package/dist/cjs/plugins/floating-toolbar/index.js +16 -4
- package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +99 -0
- package/dist/cjs/plugins/floating-toolbar/ui/ConfirmationModal.js +10 -30
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +16 -4
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +108 -55
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +29 -108
- package/dist/cjs/plugins/floating-toolbar/ui/SimpleModal.js +51 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +27 -47
- package/dist/cjs/plugins/floating-toolbar/ui/messages.js +13 -3
- package/dist/cjs/plugins/floating-toolbar/utils.js +4 -19
- package/dist/cjs/plugins/help-dialog/index.js +3 -2
- package/dist/cjs/plugins/hyperlink/Toolbar.js +20 -1
- package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +6 -3
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -10
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +26 -12
- package/dist/cjs/plugins/layout/toolbar.js +1 -0
- package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +34 -4
- package/dist/cjs/plugins/list/commands/outdent-list.js +1 -1
- package/dist/cjs/plugins/list/index.js +6 -2
- package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/cjs/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/cjs/plugins/list/pm-plugins/main.js +32 -10
- package/dist/cjs/plugins/media/index.js +35 -0
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +7 -6
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +70 -64
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +6 -0
- package/dist/cjs/plugins/media/toolbar/index.js +3 -0
- package/dist/cjs/plugins/media/utils/media-single.js +19 -3
- package/dist/cjs/plugins/panel/toolbar.js +1 -0
- package/dist/cjs/plugins/panel/utils.js +1 -1
- package/dist/cjs/plugins/paste/index.js +2 -1
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +19 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/paste/util/index.js +2 -2
- package/dist/cjs/plugins/placeholder/index.js +24 -47
- package/dist/cjs/plugins/placeholder/styles.js +2 -4
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +7 -3
- package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +10 -5
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +5 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +5 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -6
- package/dist/cjs/plugins/type-ahead/index.js +2 -8
- package/dist/cjs/plugins/type-ahead/messages.js +44 -4
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +0 -1
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +17 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +9 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
- package/dist/cjs/plugins/type-ahead/utils.js +44 -2
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -2
- package/dist/cjs/ui/Alignment/AlignmentButton/index.js +4 -1
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/cjs/ui/CollapsedEditor/index.js +4 -2
- package/dist/cjs/ui/ColorPickerButton/index.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -4
- package/dist/cjs/ui/ConfigPanel/FormContent.js +2 -1
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +3 -1
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +55 -33
- package/dist/cjs/utils/commands.js +25 -13
- package/dist/cjs/utils/input-rules.js +26 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -1
- package/dist/es2019/create-editor/create-plugins-list.js +9 -6
- package/dist/es2019/create-editor/messages.js +8 -0
- package/dist/es2019/i18n/en.js +2 -2
- package/dist/es2019/i18n/en_GB.js +2 -2
- package/dist/es2019/i18n/en_ZZ.js +2 -2
- package/dist/es2019/i18n/index.js +4 -4
- package/dist/es2019/i18n/languages.js +9 -4
- package/dist/es2019/labs/next/presets/mobile.js +2 -2
- package/dist/es2019/labs/next/presets/preset.js +28 -7
- package/dist/es2019/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +5 -1
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +4 -1
- package/dist/es2019/plugins/card/pm-plugins/doc.js +10 -19
- package/dist/es2019/plugins/card/pm-plugins/main.js +4 -19
- package/dist/es2019/plugins/card/toolbar.js +19 -2
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +8 -6
- package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +7 -36
- package/dist/es2019/plugins/card/utils.js +15 -2
- package/dist/es2019/plugins/collab-edit/actions.js +3 -3
- package/dist/es2019/plugins/copy-button/toolbar.js +5 -3
- package/dist/es2019/plugins/date/index.js +0 -7
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +1 -2
- package/dist/es2019/plugins/emoji/index.js +7 -13
- package/dist/es2019/plugins/expand/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/expand/toolbar.js +1 -0
- package/dist/es2019/plugins/extension/commands.js +10 -1
- package/dist/es2019/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/es2019/plugins/extension/toolbar.js +43 -8
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -3
- package/dist/es2019/plugins/floating-toolbar/index.js +15 -5
- package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +70 -0
- package/dist/es2019/plugins/floating-toolbar/ui/ConfirmationModal.js +8 -27
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +17 -4
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +96 -50
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +29 -76
- package/dist/es2019/plugins/floating-toolbar/ui/SimpleModal.js +32 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +26 -46
- package/dist/es2019/plugins/floating-toolbar/ui/messages.js +14 -4
- package/dist/es2019/plugins/floating-toolbar/utils.js +4 -17
- package/dist/es2019/plugins/help-dialog/index.js +2 -2
- package/dist/es2019/plugins/hyperlink/Toolbar.js +18 -2
- package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +9 -2
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -9
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +25 -12
- package/dist/es2019/plugins/layout/toolbar.js +1 -0
- package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +24 -4
- package/dist/es2019/plugins/list/commands/outdent-list.js +1 -1
- package/dist/es2019/plugins/list/index.js +7 -3
- package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/es2019/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/es2019/plugins/list/pm-plugins/main.js +31 -11
- package/dist/es2019/plugins/media/index.js +38 -0
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +6 -5
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +7 -0
- package/dist/es2019/plugins/media/toolbar/index.js +3 -0
- package/dist/es2019/plugins/media/utils/media-single.js +20 -3
- package/dist/es2019/plugins/panel/toolbar.js +1 -0
- package/dist/es2019/plugins/panel/utils.js +1 -1
- package/dist/es2019/plugins/paste/index.js +2 -1
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +15 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/paste/util/index.js +2 -2
- package/dist/es2019/plugins/placeholder/index.js +21 -47
- package/dist/es2019/plugins/placeholder/styles.js +1 -19
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +6 -3
- package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +8 -7
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +4 -1
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +18 -12
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -7
- package/dist/es2019/plugins/type-ahead/index.js +2 -2
- package/dist/es2019/plugins/type-ahead/messages.js +44 -4
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -1
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +17 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +10 -5
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
- package/dist/es2019/plugins/type-ahead/utils.js +38 -0
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -3
- package/dist/es2019/ui/Alignment/AlignmentButton/index.js +4 -2
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/es2019/ui/CollapsedEditor/index.js +3 -2
- package/dist/es2019/ui/ColorPickerButton/index.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +4 -5
- package/dist/es2019/ui/ConfigPanel/FormContent.js +3 -3
- package/dist/es2019/ui/ContentStyles/index.js +7 -2
- package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +1 -0
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +56 -34
- package/dist/es2019/utils/commands.js +26 -14
- package/dist/es2019/utils/input-rules.js +22 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -1
- package/dist/esm/create-editor/create-plugins-list.js +9 -6
- package/dist/esm/create-editor/messages.js +8 -0
- package/dist/esm/i18n/en.js +2 -2
- package/dist/esm/i18n/en_GB.js +2 -2
- package/dist/esm/i18n/en_ZZ.js +2 -2
- package/dist/esm/i18n/index.js +4 -4
- package/dist/esm/i18n/languages.js +9 -4
- package/dist/esm/labs/next/presets/mobile.js +2 -2
- package/dist/esm/labs/next/presets/preset.js +36 -6
- package/dist/esm/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +5 -1
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +4 -1
- package/dist/esm/plugins/card/pm-plugins/doc.js +10 -20
- package/dist/esm/plugins/card/pm-plugins/main.js +4 -17
- package/dist/esm/plugins/card/toolbar.js +24 -8
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +8 -6
- package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +9 -39
- package/dist/esm/plugins/card/utils.js +15 -2
- package/dist/esm/plugins/collab-edit/actions.js +3 -3
- package/dist/esm/plugins/copy-button/toolbar.js +5 -3
- package/dist/esm/plugins/date/index.js +1 -6
- package/dist/esm/plugins/date/ui/DatePicker/index.js +1 -2
- package/dist/esm/plugins/emoji/index.js +7 -13
- package/dist/esm/plugins/expand/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/expand/toolbar.js +1 -0
- package/dist/esm/plugins/extension/commands.js +12 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/esm/plugins/extension/toolbar.js +50 -8
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -3
- package/dist/esm/plugins/floating-toolbar/index.js +16 -4
- package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +75 -0
- package/dist/esm/plugins/floating-toolbar/ui/ConfirmationModal.js +11 -25
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +17 -4
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +100 -47
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +29 -108
- package/dist/esm/plugins/floating-toolbar/ui/SimpleModal.js +30 -0
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +27 -47
- package/dist/esm/plugins/floating-toolbar/ui/messages.js +13 -3
- package/dist/esm/plugins/floating-toolbar/utils.js +4 -17
- package/dist/esm/plugins/help-dialog/index.js +3 -2
- package/dist/esm/plugins/hyperlink/Toolbar.js +20 -2
- package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -3
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -10
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +25 -12
- package/dist/esm/plugins/layout/toolbar.js +1 -0
- package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +30 -4
- package/dist/esm/plugins/list/commands/outdent-list.js +1 -1
- package/dist/esm/plugins/list/index.js +7 -3
- package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/esm/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/esm/plugins/list/pm-plugins/main.js +31 -11
- package/dist/esm/plugins/media/index.js +33 -0
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +7 -6
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +70 -64
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +7 -0
- package/dist/esm/plugins/media/toolbar/index.js +3 -0
- package/dist/esm/plugins/media/utils/media-single.js +18 -3
- package/dist/esm/plugins/panel/toolbar.js +1 -0
- package/dist/esm/plugins/panel/utils.js +1 -1
- package/dist/esm/plugins/paste/index.js +2 -1
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +15 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/paste/util/index.js +2 -2
- package/dist/esm/plugins/placeholder/index.js +23 -45
- package/dist/esm/plugins/placeholder/styles.js +1 -2
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +6 -3
- package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +9 -5
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +4 -1
- package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +5 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -7
- package/dist/esm/plugins/type-ahead/index.js +2 -2
- package/dist/esm/plugins/type-ahead/messages.js +44 -4
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -1
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +17 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +10 -5
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
- package/dist/esm/plugins/type-ahead/utils.js +38 -0
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -3
- package/dist/esm/ui/Alignment/AlignmentButton/index.js +4 -2
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/esm/ui/CollapsedEditor/index.js +3 -2
- package/dist/esm/ui/ColorPickerButton/index.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +4 -5
- package/dist/esm/ui/ConfigPanel/FormContent.js +3 -3
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/LinkSearch/ToolbarComponents.js +1 -0
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +56 -34
- package/dist/esm/utils/commands.js +25 -13
- package/dist/esm/utils/input-rules.js +23 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/messages.d.ts +7 -0
- package/dist/types/i18n/index.d.ts +4 -4
- package/dist/types/i18n/languages.d.ts +8 -3
- package/dist/types/labs/next/presets/cxhtml.d.ts +1 -1
- package/dist/types/labs/next/presets/default.d.ts +2 -2
- package/dist/types/labs/next/presets/mobile.d.ts +1 -1
- package/dist/types/labs/next/presets/preset.d.ts +10 -6
- package/dist/types/plugins/alignment/index.d.ts +2 -2
- package/dist/types/plugins/analytics/plugin.d.ts +2 -2
- package/dist/types/plugins/annotation/index.d.ts +2 -2
- package/dist/types/plugins/avatar-group/index.d.ts +4 -3
- package/dist/types/plugins/base/index.d.ts +2 -2
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +4 -3
- package/dist/types/plugins/block-type/index.d.ts +2 -2
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -1
- package/dist/types/plugins/breakout/index.d.ts +2 -2
- package/dist/types/plugins/caption/index.d.ts +2 -2
- package/dist/types/plugins/card/index.d.ts +2 -2
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +4 -4
- package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +5 -5
- package/dist/types/plugins/card/utils.d.ts +2 -1
- package/dist/types/plugins/clear-marks-on-change-to-empty-document/index.d.ts +2 -2
- package/dist/types/plugins/clipboard/index.d.ts +2 -2
- package/dist/types/plugins/code-bidi-warning/index.d.ts +4 -3
- package/dist/types/plugins/code-block/index.d.ts +2 -2
- package/dist/types/plugins/collab-edit/actions.d.ts +1 -1
- package/dist/types/plugins/collab-edit/index.d.ts +2 -2
- package/dist/types/plugins/context-panel/index.d.ts +2 -2
- package/dist/types/plugins/copy-button/index.d.ts +2 -2
- package/dist/types/plugins/custom-autoformat/index.d.ts +2 -2
- package/dist/types/plugins/data-consumer/index.d.ts +2 -2
- package/dist/types/plugins/date/index.d.ts +2 -2
- package/dist/types/plugins/date/ui/DatePicker/index.d.ts +0 -1
- package/dist/types/plugins/editor-disabled/index.d.ts +2 -2
- package/dist/types/plugins/emoji/index.d.ts +2 -2
- package/dist/types/plugins/emoji/types.d.ts +2 -1
- package/dist/types/plugins/expand/index.d.ts +2 -2
- package/dist/types/plugins/expand/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/extension/commands.d.ts +2 -0
- package/dist/types/plugins/extension/index.d.ts +2 -2
- package/dist/types/plugins/extension/toolbar.d.ts +10 -0
- package/dist/types/plugins/fake-text-cursor/index.d.ts +2 -2
- package/dist/types/plugins/feature-flags-context/index.d.ts +2 -2
- package/dist/types/plugins/feedback-dialog/index.d.ts +3 -2
- package/dist/types/plugins/find-replace/index.d.ts +4 -3
- package/dist/types/plugins/floating-toolbar/index.d.ts +2 -2
- package/dist/types/plugins/floating-toolbar/ui/CheckboxModal.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/ConfirmationModal.d.ts +1 -8
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +3 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/SimpleModal.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/messages.d.ts +10 -0
- package/dist/types/plugins/floating-toolbar/ui/types.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/utils.d.ts +2 -3
- package/dist/types/plugins/fragment/index.d.ts +2 -2
- package/dist/types/plugins/grid/index.d.ts +2 -2
- package/dist/types/plugins/help-dialog/index.d.ts +2 -3
- package/dist/types/plugins/history/index.d.ts +2 -2
- package/dist/types/plugins/hyperlink/index.d.ts +2 -2
- package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +7 -2
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +2 -1
- package/dist/types/plugins/image-upload/index.d.ts +2 -2
- package/dist/types/plugins/indentation/index.d.ts +2 -2
- package/dist/types/plugins/insert-block/index.d.ts +2 -2
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
- package/dist/types/plugins/jira-issue/index.d.ts +2 -2
- package/dist/types/plugins/layout/index.d.ts +2 -2
- package/dist/types/plugins/list/actions/outdent-list-items-selected.d.ts +2 -2
- package/dist/types/plugins/list/index.d.ts +3 -2
- package/dist/types/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +3 -1
- package/dist/types/plugins/list/pm-plugins/main.d.ts +2 -2
- package/dist/types/plugins/list/types.d.ts +2 -0
- package/dist/types/plugins/macro/index.d.ts +2 -2
- package/dist/types/plugins/max-content-size/index.d.ts +2 -2
- package/dist/types/plugins/media/index.d.ts +2 -2
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/media/pm-plugins/types.d.ts +1 -0
- package/dist/types/plugins/mentions/index.d.ts +2 -2
- package/dist/types/plugins/mobile-dimensions/index.d.ts +2 -2
- package/dist/types/plugins/mobile-selection/mobile-selection-plugin.d.ts +2 -2
- package/dist/types/plugins/panel/index.d.ts +2 -2
- package/dist/types/plugins/paste/index.d.ts +3 -2
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
- package/dist/types/plugins/placeholder/index.d.ts +4 -4
- package/dist/types/plugins/placeholder/styles.d.ts +0 -1
- package/dist/types/plugins/placeholder-text/index.d.ts +2 -2
- package/dist/types/plugins/quick-insert/index.d.ts +2 -2
- package/dist/types/plugins/rule/index.d.ts +2 -2
- package/dist/types/plugins/save-on-enter/index.d.ts +3 -2
- package/dist/types/plugins/scroll-into-view/index.d.ts +2 -2
- package/dist/types/plugins/selection/index.d.ts +2 -2
- package/dist/types/plugins/status/index.d.ts +2 -2
- package/dist/types/plugins/submit-editor/index.d.ts +4 -2
- package/dist/types/plugins/tasks-and-decisions/index.d.ts +2 -2
- package/dist/types/plugins/text-color/index.d.ts +3 -2
- package/dist/types/plugins/text-formatting/index.d.ts +2 -2
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +4 -3
- package/dist/types/plugins/type-ahead/index.d.ts +2 -2
- package/dist/types/plugins/type-ahead/messages.d.ts +41 -1
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +3 -1
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +7 -1
- package/dist/types/plugins/undo-redo/index.d.ts +2 -2
- package/dist/types/plugins/unsupported-content/index.d.ts +2 -2
- package/dist/types/plugins/view-update-subscription/index.d.ts +2 -2
- package/dist/types/plugins/width/index.d.ts +2 -2
- package/dist/types/test-utils.d.ts +2 -1
- package/dist/types/types/editor-plugin.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +0 -2
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/FormContent.d.ts +2 -23
- package/dist/types/ui/ConfigPanel/types.d.ts +22 -0
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +1 -0
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +4 -1
- package/package.json +23 -23
- package/report.api.md +25 -16
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +0 -181
- package/dist/cjs/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -66
- package/dist/cjs/plugins/emoji/ui/EmojiContextProvider/index.js +0 -61
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +0 -151
- package/dist/es2019/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -51
- package/dist/es2019/plugins/emoji/ui/EmojiContextProvider/index.js +0 -21
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +0 -161
- package/dist/esm/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -51
- package/dist/esm/plugins/emoji/ui/EmojiContextProvider/index.js +0 -46
- package/dist/types/plugins/card/ui/LinkToolbarIconDropdown.d.ts +0 -25
- package/dist/types/plugins/card/ui/link-toolbar-icon-dropdown-options.d.ts +0 -5
- package/dist/types/plugins/emoji/ui/EmojiContextProvider/index.d.ts +0 -13
|
@@ -121,11 +121,26 @@ const applyMarkOnRange = (from, to, removeMark, mark, tr) => {
|
|
|
121
121
|
return tr;
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
+
const entireSelectionContainsMark = (mark, doc, fromPos, toPos) => {
|
|
125
|
+
let onlyContainsMark = true;
|
|
126
|
+
doc.nodesBetween(fromPos, toPos, node => {
|
|
127
|
+
// Skip recursion once we've found text which doesn't include the mark
|
|
128
|
+
if (!onlyContainsMark) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (node.isText) {
|
|
133
|
+
onlyContainsMark &&= mark.isInSet(node.marks);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
return onlyContainsMark;
|
|
137
|
+
};
|
|
138
|
+
|
|
124
139
|
const toggleMarkInRange = mark => (state, dispatch) => {
|
|
125
140
|
const tr = state.tr;
|
|
126
141
|
|
|
127
142
|
if (state.selection instanceof CellSelection) {
|
|
128
|
-
let
|
|
143
|
+
let removeMark = true;
|
|
129
144
|
const cells = [];
|
|
130
145
|
state.selection.forEachCell((cell, cellPos) => {
|
|
131
146
|
cells.push({
|
|
@@ -134,30 +149,27 @@ const toggleMarkInRange = mark => (state, dispatch) => {
|
|
|
134
149
|
});
|
|
135
150
|
const from = cellPos;
|
|
136
151
|
const to = cellPos + cell.nodeSize;
|
|
137
|
-
|
|
138
|
-
if (!markInRange) {
|
|
139
|
-
markInRange = state.doc.rangeHasMark(from, to, mark);
|
|
140
|
-
}
|
|
152
|
+
removeMark &&= entireSelectionContainsMark(mark, state.doc, from, to);
|
|
141
153
|
});
|
|
142
154
|
|
|
143
155
|
for (let i = cells.length - 1; i >= 0; i--) {
|
|
144
156
|
const cell = cells[i];
|
|
145
157
|
const from = cell.pos;
|
|
146
158
|
const to = from + cell.node.nodeSize;
|
|
147
|
-
applyMarkOnRange(from, to,
|
|
159
|
+
applyMarkOnRange(from, to, removeMark, mark, tr);
|
|
148
160
|
}
|
|
149
161
|
} else {
|
|
150
162
|
const {
|
|
151
163
|
$from,
|
|
152
164
|
$to
|
|
153
|
-
} = state.selection; //
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
applyMarkOnRange($from.pos, $to.pos,
|
|
165
|
+
} = state.selection; // We decide to remove the mark only if the entire selection contains the mark
|
|
166
|
+
// Examples with *bold* text
|
|
167
|
+
// Scenario 1: Selection contains both bold and non-bold text -> bold entire selection
|
|
168
|
+
// Scenario 2: Selection contains only bold text -> un-bold entire selection
|
|
169
|
+
// Scenario 3: Selection contains no bold text -> bold entire selection
|
|
170
|
+
|
|
171
|
+
const removeMark = entireSelectionContainsMark(mark, state.doc, $from.pos, $to.pos);
|
|
172
|
+
applyMarkOnRange($from.pos, $to.pos, removeMark, mark, tr);
|
|
161
173
|
}
|
|
162
174
|
|
|
163
175
|
if (tr.docChanged) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { closeHistory } from 'prosemirror-history';
|
|
2
1
|
import { TextSelection } from 'prosemirror-state';
|
|
3
2
|
import { canJoin, findWrapping } from 'prosemirror-transform';
|
|
4
3
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
5
4
|
import { createInputRulePlugin } from '@atlaskit/prosemirror-input-rules';
|
|
6
5
|
import { addAnalytics } from '../plugins/analytics';
|
|
6
|
+
import { closeHistory } from 'prosemirror-history';
|
|
7
|
+
import { findParentNodeOfTypeClosestToPos } from 'prosemirror-utils';
|
|
8
|
+
import { getFeatureFlags } from '../plugins/feature-flags-context';
|
|
7
9
|
export const ruleWithAnalytics = getPayload => {
|
|
8
10
|
return originalRule => {
|
|
9
11
|
const onHandlerApply = (state, tr, matchResult) => {
|
|
@@ -122,6 +124,25 @@ export const createWrappingJoinRule = ({
|
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
tr.wrap(range, wrapping);
|
|
127
|
+
const featureFlags = getFeatureFlags(state);
|
|
128
|
+
|
|
129
|
+
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists && nodeType === state.schema.nodes.orderedList) {
|
|
130
|
+
// if an orderedList node would be inserted by the input rule match, and
|
|
131
|
+
// that orderedList node is being added directly before another orderedList
|
|
132
|
+
// node, then join those nodes
|
|
133
|
+
const $end = tr.doc.resolve(tr.mapping.map(end));
|
|
134
|
+
const node = findParentNodeOfTypeClosestToPos($end, nodeType);
|
|
135
|
+
|
|
136
|
+
if (node) {
|
|
137
|
+
const nodeEnd = node.pos + node.node.nodeSize;
|
|
138
|
+
const after = tr.doc.resolve(nodeEnd).nodeAfter;
|
|
139
|
+
|
|
140
|
+
if (after && after.type === nodeType && canJoin(tr.doc, nodeEnd) && (!joinPredicate || joinPredicate(match, after))) {
|
|
141
|
+
tr.join(nodeEnd);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
125
146
|
const before = tr.doc.resolve(fixedStart - 1).nodeBefore;
|
|
126
147
|
|
|
127
148
|
if (before && before.type === nodeType && canJoin(tr.doc, fixedStart - 1) && (!joinPredicate || joinPredicate(match, before))) {
|
package/dist/es2019/version.json
CHANGED
|
@@ -21,6 +21,7 @@ import PropTypes from 'prop-types';
|
|
|
21
21
|
import { EditorState, Selection } from 'prosemirror-state';
|
|
22
22
|
import { EditorView } from 'prosemirror-view';
|
|
23
23
|
import { injectIntl } from 'react-intl-next';
|
|
24
|
+
import { editorMessages } from './messages';
|
|
24
25
|
import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
25
26
|
import { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
26
27
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
@@ -633,7 +634,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
633
634
|
className: getUAPrefix(),
|
|
634
635
|
key: "ProseMirror",
|
|
635
636
|
ref: _this.handleEditorViewRef,
|
|
636
|
-
"aria-label":
|
|
637
|
+
"aria-label": _this.props.intl.formatMessage(editorMessages.editorAssistiveLabel),
|
|
637
638
|
role: "textbox"
|
|
638
639
|
}));
|
|
639
640
|
|
|
@@ -78,7 +78,6 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
|
|
|
78
78
|
},
|
|
79
79
|
placeholder: {
|
|
80
80
|
placeholder: props.placeholder,
|
|
81
|
-
placeholderHints: props.placeholderHints,
|
|
82
81
|
placeholderBracketHint: props.placeholderBracketHint
|
|
83
82
|
},
|
|
84
83
|
textFormatting: _objectSpread(_objectSpread({}, props.textFormatting || {}), {}, {
|
|
@@ -155,7 +154,11 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
155
154
|
} // Needs to be after allowTextColor as order of buttons in toolbar depends on it
|
|
156
155
|
|
|
157
156
|
|
|
158
|
-
preset.add(listPlugin
|
|
157
|
+
preset.add([listPlugin, {
|
|
158
|
+
restartNumberedLists: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.restartNumberedLists,
|
|
159
|
+
restartNumberedListsToolbar: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.restartNumberedListsToolbar,
|
|
160
|
+
listNumberContinuity: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.listNumberContinuity
|
|
161
|
+
}]);
|
|
159
162
|
|
|
160
163
|
if (props.allowRule) {
|
|
161
164
|
preset.add(rulePlugin);
|
|
@@ -242,10 +245,10 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
242
245
|
}
|
|
243
246
|
|
|
244
247
|
if (props.allowHelpDialog) {
|
|
245
|
-
preset.add([helpDialogPlugin, props.legacyImageUploadProvider]);
|
|
248
|
+
preset.add([helpDialogPlugin, !!props.legacyImageUploadProvider]);
|
|
246
249
|
}
|
|
247
250
|
|
|
248
|
-
if (props.saveOnEnter) {
|
|
251
|
+
if (props.saveOnEnter && props.onSave) {
|
|
249
252
|
preset.add([saveOnEnterPlugin, props.onSave]);
|
|
250
253
|
}
|
|
251
254
|
|
|
@@ -313,7 +316,7 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
313
316
|
|
|
314
317
|
|
|
315
318
|
if (!props.annotationProviders && props.allowConfluenceInlineComment) {
|
|
316
|
-
preset.add(annotationPlugin);
|
|
319
|
+
preset.add([annotationPlugin, undefined]);
|
|
317
320
|
}
|
|
318
321
|
|
|
319
322
|
if (props.allowDate) {
|
|
@@ -428,7 +431,7 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
428
431
|
}
|
|
429
432
|
|
|
430
433
|
if (featureFlags.enableViewUpdateSubscription) {
|
|
431
|
-
preset.add(
|
|
434
|
+
preset.add(viewUpdateSubscriptionPlugin);
|
|
432
435
|
}
|
|
433
436
|
|
|
434
437
|
preset.add([codeBidiWarningPlugin, {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var editorMessages = defineMessages({
|
|
3
|
+
editorAssistiveLabel: {
|
|
4
|
+
id: 'fabric.editor.editorAssistiveLabel',
|
|
5
|
+
defaultMessage: 'Main content area, start typing to enter text.',
|
|
6
|
+
description: 'Text that is read out by screen reader when the main editor is in focus'
|
|
7
|
+
}
|
|
8
|
+
});
|
package/dist/esm/i18n/en.js
CHANGED
|
@@ -100,8 +100,8 @@ export default {
|
|
|
100
100
|
'fabric.editor.error': 'Error',
|
|
101
101
|
'fabric.editor.errorPanel': 'Error panel',
|
|
102
102
|
'fabric.editor.errorPanel.description': 'Call out errors in a colored panel',
|
|
103
|
-
'fabric.editor.extension.confirmDeleteLinkedModalMessage': '
|
|
104
|
-
'fabric.editor.extension.confirmDeleteLinkedModalOKButton': '
|
|
103
|
+
'fabric.editor.extension.confirmDeleteLinkedModalMessage': 'Deleting {nodeName} will break anything connected to it.',
|
|
104
|
+
'fabric.editor.extension.confirmDeleteLinkedModalOKButton': 'Delete',
|
|
105
105
|
'fabric.editor.extensions.config-panel.save-indicator': 'All changes are always autosaved',
|
|
106
106
|
'fabric.editor.find': 'Find',
|
|
107
107
|
'fabric.editor.findNext': 'Find next',
|
package/dist/esm/i18n/en_GB.js
CHANGED
|
@@ -100,8 +100,8 @@ export default {
|
|
|
100
100
|
'fabric.editor.error': 'Error',
|
|
101
101
|
'fabric.editor.errorPanel': 'Error panel',
|
|
102
102
|
'fabric.editor.errorPanel.description': 'Call out errors in a coloured panel',
|
|
103
|
-
'fabric.editor.extension.confirmDeleteLinkedModalMessage': '
|
|
104
|
-
'fabric.editor.extension.confirmDeleteLinkedModalOKButton': '
|
|
103
|
+
'fabric.editor.extension.confirmDeleteLinkedModalMessage': 'Deleting {nodeName} will break anything connected to it.',
|
|
104
|
+
'fabric.editor.extension.confirmDeleteLinkedModalOKButton': 'Delete',
|
|
105
105
|
'fabric.editor.extensions.config-panel.save-indicator': 'All changes are always autosaved',
|
|
106
106
|
'fabric.editor.find': 'Find',
|
|
107
107
|
'fabric.editor.findNext': 'Find next',
|
package/dist/esm/i18n/en_ZZ.js
CHANGED
|
@@ -100,8 +100,8 @@ export default {
|
|
|
100
100
|
'fabric.editor.error': 'Error',
|
|
101
101
|
'fabric.editor.errorPanel': 'Error panel',
|
|
102
102
|
'fabric.editor.errorPanel.description': 'Call out errors in a colored panel',
|
|
103
|
-
'fabric.editor.extension.confirmDeleteLinkedModalMessage': '
|
|
104
|
-
'fabric.editor.extension.confirmDeleteLinkedModalOKButton': '
|
|
103
|
+
'fabric.editor.extension.confirmDeleteLinkedModalMessage': 'Deleting {nodeName} will break anything connected to it.',
|
|
104
|
+
'fabric.editor.extension.confirmDeleteLinkedModalOKButton': 'Delete',
|
|
105
105
|
'fabric.editor.extensions.config-panel.save-indicator': 'All changes are always autosaved',
|
|
106
106
|
'fabric.editor.find': 'Find',
|
|
107
107
|
'fabric.editor.findNext': 'Find next',
|
package/dist/esm/i18n/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* ED-16073:
|
|
5
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
6
6
|
*/
|
|
7
7
|
export { default as zh } from './zh';
|
|
8
8
|
export { default as zh_TW } from './zh_TW';
|
|
9
9
|
export { default as cs } from './cs';
|
|
10
10
|
export { default as da } from './da';
|
|
11
|
+
export { default as en } from './en';
|
|
12
|
+
export { default as en_GB } from './en_GB';
|
|
11
13
|
export { default as nl } from './nl';
|
|
12
14
|
export { default as et } from './et';
|
|
13
15
|
export { default as fi } from './fi';
|
|
@@ -29,7 +31,5 @@ export { default as th } from './th';
|
|
|
29
31
|
export { default as tr } from './tr';
|
|
30
32
|
export { default as uk } from './uk';
|
|
31
33
|
export { default as vi } from './vi';
|
|
32
|
-
export { default as en } from './en';
|
|
33
|
-
export { default as en_GB } from './en_GB';
|
|
34
34
|
export { default as is } from './is';
|
|
35
35
|
export { default as ro } from './ro';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* ED-16073:
|
|
5
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
6
6
|
*/
|
|
7
7
|
export default {
|
|
8
8
|
zh: 'Chinese',
|
|
9
|
+
zh_TW: 'Chinese (Traditional)',
|
|
9
10
|
cs: 'Czech',
|
|
10
|
-
da: 'Danish',
|
|
11
11
|
nl: 'Dutch',
|
|
12
|
+
da: 'Danish',
|
|
12
13
|
en: 'English',
|
|
13
14
|
en_GB: 'English (United Kingdom)',
|
|
14
15
|
et: 'Estonian',
|
|
@@ -28,5 +29,9 @@ export default {
|
|
|
28
29
|
ru: 'Russian',
|
|
29
30
|
sk: 'Slovak',
|
|
30
31
|
es: 'Spanish',
|
|
31
|
-
sv: 'Swedish'
|
|
32
|
+
sv: 'Swedish',
|
|
33
|
+
th: 'Thai',
|
|
34
|
+
tr: 'Turkish',
|
|
35
|
+
uk: 'Ukrainian',
|
|
36
|
+
vi: 'Vietnamese'
|
|
32
37
|
};
|
|
@@ -85,8 +85,8 @@ export function useMobilePreset(_ref) {
|
|
|
85
85
|
allowBlockCards: true,
|
|
86
86
|
platform: 'mobile'
|
|
87
87
|
}]);
|
|
88
|
-
preset.add(
|
|
89
|
-
preset.add(
|
|
88
|
+
preset.add(mentionsPlugin);
|
|
89
|
+
preset.add(emojiPlugin); // End
|
|
90
90
|
|
|
91
91
|
if (maxContentSize) {
|
|
92
92
|
preset.add([maxContentSizePlugin, maxContentSize]);
|
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _construct from "@babel/runtime/helpers/construct";
|
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
6
|
export var Preset = /*#__PURE__*/function () {
|
|
5
7
|
function Preset() {
|
|
6
8
|
_classCallCheck(this, Preset);
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
for (var _len = arguments.length, more = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11
|
+
more[_key] = arguments[_key];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
this.data = [].concat(more) || [];
|
|
9
15
|
}
|
|
10
16
|
|
|
11
17
|
_createClass(Preset, [{
|
|
12
18
|
key: "add",
|
|
13
|
-
value: function add(
|
|
14
|
-
this.
|
|
15
|
-
|
|
19
|
+
value: function add(nextOrTuple) {
|
|
20
|
+
var newPreset = _construct(Preset, [nextOrTuple].concat(_toConsumableArray(this.data))); // TODO: remove this `this.data.push`,
|
|
21
|
+
// once refactoring `create-plugins-list` to address this complexity:
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* preset.add(x)
|
|
25
|
+
* preset.add(y)
|
|
26
|
+
* preset.add(z)
|
|
27
|
+
*/
|
|
28
|
+
// to:
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* immutablePreset = preset.add(x).add(foo).add(bar)
|
|
32
|
+
* presetWithY = presetWithY.add(y)
|
|
33
|
+
* presetWithZ = preset.add(z)
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
this.data.push(nextOrTuple);
|
|
38
|
+
return newPreset;
|
|
16
39
|
}
|
|
17
40
|
}, {
|
|
18
41
|
key: "has",
|
|
19
42
|
value: function has(plugin) {
|
|
20
|
-
return this.
|
|
43
|
+
return this.data.some(function (pluginPreset) {
|
|
21
44
|
if (Array.isArray(pluginPreset)) {
|
|
22
45
|
return pluginPreset[0] === plugin;
|
|
23
46
|
}
|
|
@@ -35,7 +58,7 @@ export var Preset = /*#__PURE__*/function () {
|
|
|
35
58
|
key: "processEditorPlugins",
|
|
36
59
|
value: function processEditorPlugins() {
|
|
37
60
|
var cache = new Map();
|
|
38
|
-
this.
|
|
61
|
+
this.data.forEach(function (pluginEntry) {
|
|
39
62
|
if (Array.isArray(pluginEntry)) {
|
|
40
63
|
var _pluginEntry = _slicedToArray(pluginEntry, 2),
|
|
41
64
|
fn = _pluginEntry[0],
|
|
@@ -62,6 +85,13 @@ export var Preset = /*#__PURE__*/function () {
|
|
|
62
85
|
cache.forEach(function (options, fn) {
|
|
63
86
|
plugins.push(fn(options));
|
|
64
87
|
});
|
|
88
|
+
|
|
89
|
+
if (plugins.some(function (plugin) {
|
|
90
|
+
return typeof plugin === 'function';
|
|
91
|
+
})) {
|
|
92
|
+
throw new Error("!!! NextEditorPluginWithDependencies detected in presets. That's an unsupported runtime use case right now.");
|
|
93
|
+
}
|
|
94
|
+
|
|
65
95
|
return plugins;
|
|
66
96
|
}
|
|
67
97
|
}, {
|
|
@@ -43,6 +43,7 @@ export var AnnotationNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
43
43
|
/*#__PURE__*/
|
|
44
44
|
// all inline comment states are now set in decorations at ../pm-plugins/inline-comment.ts
|
|
45
45
|
React.createElement("span", {
|
|
46
|
+
"data-mark-type": "annotation",
|
|
46
47
|
ref: forwardRef
|
|
47
48
|
})
|
|
48
49
|
);
|
|
@@ -22,6 +22,7 @@ import { NORMAL_TEXT } from '../../types';
|
|
|
22
22
|
import { blockTypeMenuItemStyle, keyboardShortcut, keyboardShortcutSelect } from './styled';
|
|
23
23
|
import { tooltip, findKeymapByDescription } from '../../../../keymaps';
|
|
24
24
|
import { BlockTypeButton } from './blocktype-button';
|
|
25
|
+
import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
25
26
|
|
|
26
27
|
var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
27
28
|
_inherits(ToolbarBlockType, _React$PureComponent);
|
|
@@ -64,16 +65,19 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
64
65
|
var isActive = currentBlockType === blockType;
|
|
65
66
|
var tagName = blockType.tagName || 'p';
|
|
66
67
|
var Tag = tagName;
|
|
68
|
+
var keyMap = findKeymapByDescription(blockType.title.defaultMessage);
|
|
67
69
|
return {
|
|
68
70
|
content: jsx("div", {
|
|
69
71
|
css: blockTypeMenuItemStyle(tagName, isActive)
|
|
70
72
|
}, jsx(Tag, null, formatMessage(blockType.title))),
|
|
71
73
|
value: blockType,
|
|
72
74
|
label: formatMessage(blockType.title),
|
|
75
|
+
'aria-label': tooltip(keyMap, formatMessage(blockType.title)),
|
|
76
|
+
keyShortcuts: getAriaKeyshortcuts(keyMap),
|
|
73
77
|
key: "".concat(blockType.name, "-").concat(index),
|
|
74
78
|
elemAfter: jsx("div", {
|
|
75
79
|
css: [keyboardShortcut, isActive && keyboardShortcutSelect]
|
|
76
|
-
}, tooltip(
|
|
80
|
+
}, tooltip(keyMap)),
|
|
77
81
|
isActive: isActive
|
|
78
82
|
};
|
|
79
83
|
});
|
|
@@ -33,6 +33,7 @@ import { getPluginState } from '../plugin-key';
|
|
|
33
33
|
import { NodeSelection } from 'prosemirror-state';
|
|
34
34
|
import { isSupportedNodeForBreakout } from '../utils/is-supported-node';
|
|
35
35
|
import { token } from '@atlaskit/tokens';
|
|
36
|
+
import { layers } from '@atlaskit/theme/constants';
|
|
36
37
|
var toolbarButtonWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n && button {\n background: ", ";\n color: ", ";\n :hover {\n background: ", ";\n color: ", " !important;\n }\n }\n"])), token('color.background.neutral', N20A), token('color.icon', N300), token('color.background.neutral.hovered', B300), token('color.icon', 'white'));
|
|
37
38
|
var BREAKOUT_MODE = {
|
|
38
39
|
FULL_WIDTH: 'full-width',
|
|
@@ -124,6 +125,7 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
124
125
|
var titleMessage = getTitle(breakoutMode);
|
|
125
126
|
var title = formatMessage(titleMessage);
|
|
126
127
|
var nextBreakoutMode = getNextBreakoutMode(breakoutMode);
|
|
128
|
+
var belowOtherPopupsZIndex = layers.layer() - 1;
|
|
127
129
|
var pluginState = getPluginState(state);
|
|
128
130
|
var element = getBreakoutNodeElement(pluginState, state.selection, editorView);
|
|
129
131
|
|
|
@@ -147,7 +149,8 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
147
149
|
boundariesElement: boundariesElement,
|
|
148
150
|
scrollableElement: scrollableElement,
|
|
149
151
|
stick: true,
|
|
150
|
-
forcePlacement: true
|
|
152
|
+
forcePlacement: true,
|
|
153
|
+
zIndex: belowOtherPopupsZIndex
|
|
151
154
|
}, jsx("div", {
|
|
152
155
|
css: toolbarButtonWrapper
|
|
153
156
|
}, jsx(ToolbarButton, {
|
|
@@ -5,20 +5,19 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
|
|
8
|
-
import { NodeSelection } from 'prosemirror-state';
|
|
9
8
|
import { closeHistory } from 'prosemirror-history';
|
|
10
|
-
import {
|
|
11
|
-
import { queueCards, resolveCard } from './actions';
|
|
12
|
-
import { appearanceForNodeType } from '../utils';
|
|
13
|
-
import { nodesBetweenChanged, processRawValue } from '../../../utils';
|
|
14
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD } from '../../../plugins/analytics';
|
|
9
|
+
import { NodeSelection } from 'prosemirror-state';
|
|
15
10
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
16
|
-
import {
|
|
17
|
-
import { shouldReplaceLink } from './shouldReplaceLink';
|
|
11
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD } from '../../../plugins/analytics';
|
|
18
12
|
import { SMART_LINK_TYPE } from '../../../plugins/analytics/types/node-events';
|
|
19
13
|
import { getLinkCreationAnalyticsEvent } from '../../../plugins/hyperlink/analytics';
|
|
14
|
+
import { nodesBetweenChanged, processRawValue } from '../../../utils';
|
|
20
15
|
import { unlinkPayload } from '../../../utils/linking-utils';
|
|
21
|
-
import {
|
|
16
|
+
import { isFromCurrentDomain } from '../../hyperlink/utils';
|
|
17
|
+
import { appearanceForNodeType } from '../utils';
|
|
18
|
+
import { queueCards, resolveCard } from './actions';
|
|
19
|
+
import { pluginKey } from './plugin-key';
|
|
20
|
+
import { shouldReplaceLink } from './shouldReplaceLink';
|
|
22
21
|
/**
|
|
23
22
|
* Attempt to replace the link into the respective card.
|
|
24
23
|
*/
|
|
@@ -215,17 +214,13 @@ export var changeSelectedCardToLink = function changeSelectedCardToLink(text, hr
|
|
|
215
214
|
|
|
216
215
|
if (sendAnalytics) {
|
|
217
216
|
if (selectedNode) {
|
|
218
|
-
var _getFeatureFlags = getFeatureFlags(state),
|
|
219
|
-
viewChangingExperimentToolbarStyle = _getFeatureFlags.viewChangingExperimentToolbarStyle;
|
|
220
|
-
|
|
221
217
|
addAnalytics(state, tr, {
|
|
222
218
|
action: ACTION.CHANGED_TYPE,
|
|
223
219
|
actionSubject: ACTION_SUBJECT.SMART_LINK,
|
|
224
220
|
eventType: EVENT_TYPE.TRACK,
|
|
225
221
|
attributes: {
|
|
226
222
|
newType: SMART_LINK_TYPE.URL,
|
|
227
|
-
previousType: appearanceForNodeType(selectedNode.type)
|
|
228
|
-
featureFlag: viewChangingExperimentToolbarStyle || 'noChange'
|
|
223
|
+
previousType: appearanceForNodeType(selectedNode.type)
|
|
229
224
|
}
|
|
230
225
|
});
|
|
231
226
|
}
|
|
@@ -352,18 +347,13 @@ export var setSelectedCardAppearance = function setSelectedCardAppearance(appear
|
|
|
352
347
|
var from = state.selection.from;
|
|
353
348
|
var nodeType = getLinkNodeType(appearance, state.schema.nodes);
|
|
354
349
|
var tr = state.tr.setNodeMarkup(from, nodeType, attrs, selectedNode.marks);
|
|
355
|
-
|
|
356
|
-
var _getFeatureFlags2 = getFeatureFlags(state),
|
|
357
|
-
viewChangingExperimentToolbarStyle = _getFeatureFlags2.viewChangingExperimentToolbarStyle;
|
|
358
|
-
|
|
359
350
|
addAnalytics(state, tr, {
|
|
360
351
|
action: ACTION.CHANGED_TYPE,
|
|
361
352
|
actionSubject: ACTION_SUBJECT.SMART_LINK,
|
|
362
353
|
eventType: EVENT_TYPE.TRACK,
|
|
363
354
|
attributes: {
|
|
364
355
|
newType: appearance,
|
|
365
|
-
previousType: appearanceForNodeType(selectedNode.type)
|
|
366
|
-
featureFlag: viewChangingExperimentToolbarStyle || 'noChange'
|
|
356
|
+
previousType: appearanceForNodeType(selectedNode.type)
|
|
367
357
|
}
|
|
368
358
|
});
|
|
369
359
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import rafSchedule from 'raf-schd';
|
|
3
3
|
import { getInlineNodeViewProducer } from '../../../nodeviews/getInlineNodeViewProducer';
|
|
4
|
-
import
|
|
4
|
+
import { BlockCard } from '../nodeviews/blockCard';
|
|
5
|
+
import { EmbedCard } from '../nodeviews/embedCard';
|
|
6
|
+
import { InlineCardNodeView } from '../nodeviews/inlineCard';
|
|
5
7
|
import { pluginKey } from './plugin-key';
|
|
8
|
+
import reducer from './reducers';
|
|
6
9
|
import { handleProvider, resolveWithProvider } from './util/resolve';
|
|
7
10
|
import { getNewRequests, getPluginState, getPluginStateWithUpdatedPos } from './util/state';
|
|
8
|
-
import { EmbedCard } from '../nodeviews/embedCard';
|
|
9
|
-
import { BlockCard } from '../nodeviews/blockCard';
|
|
10
|
-
import { InlineCardNodeView } from '../nodeviews/inlineCard';
|
|
11
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../../plugins/analytics';
|
|
12
11
|
export { pluginKey } from './plugin-key';
|
|
13
12
|
export var createPlugin = function createPlugin(options) {
|
|
14
13
|
return function (pmPluginFactoryParams) {
|
|
@@ -20,18 +19,6 @@ export var createPlugin = function createPlugin(options) {
|
|
|
20
19
|
return new SafePlugin({
|
|
21
20
|
state: {
|
|
22
21
|
init: function init() {
|
|
23
|
-
var viewChangingExperimentToolbarStyle = pmPluginFactoryParams.featureFlags.viewChangingExperimentToolbarStyle;
|
|
24
|
-
pmPluginFactoryParams.dispatchAnalyticsEvent({
|
|
25
|
-
eventType: EVENT_TYPE.OPERATIONAL,
|
|
26
|
-
action: ACTION.EXPOSED,
|
|
27
|
-
actionSubject: ACTION_SUBJECT.FEATURE,
|
|
28
|
-
attributes: {
|
|
29
|
-
flagKey: 'confluence.frontend.fabric.editor.view-changing-experiment-toolbar-style',
|
|
30
|
-
value: viewChangingExperimentToolbarStyle || 'noChange'
|
|
31
|
-
},
|
|
32
|
-
source: '@atlaskit/feature-flag-client',
|
|
33
|
-
tags: ['measurement']
|
|
34
|
-
});
|
|
35
22
|
return {
|
|
36
23
|
requests: [],
|
|
37
24
|
provider: null,
|
|
@@ -87,6 +87,8 @@ export var openLinkSettings = function openLinkSettings(state, dispatch) {
|
|
|
87
87
|
};
|
|
88
88
|
export var floatingToolbar = function floatingToolbar(cardOptions, platform, linkPickerOptions) {
|
|
89
89
|
return function (state, intl, providerFactory) {
|
|
90
|
+
var _linkPickerOptions$pl;
|
|
91
|
+
|
|
90
92
|
var _state$schema$nodes = state.schema.nodes,
|
|
91
93
|
inlineCard = _state$schema$nodes.inlineCard,
|
|
92
94
|
blockCard = _state$schema$nodes.blockCard,
|
|
@@ -112,10 +114,22 @@ export var floatingToolbar = function floatingToolbar(cardOptions, platform, lin
|
|
|
112
114
|
} : {}; // Applies padding override for when link picker is currently displayed
|
|
113
115
|
|
|
114
116
|
var className = pluginState.showLinkingToolbar ? FLOATING_TOOLBAR_LINKPICKER_CLASSNAME : undefined;
|
|
115
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Enable focus trap only if feature flag is enabled AND for the new version of the picker
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
var _getFeatureFlags = getFeatureFlags(state),
|
|
122
|
+
lpLinkPicker = _getFeatureFlags.lpLinkPicker,
|
|
123
|
+
lpLinkPickerFocusTrap = _getFeatureFlags.lpLinkPickerFocusTrap,
|
|
124
|
+
preventPopupOverflow = _getFeatureFlags.preventPopupOverflow;
|
|
125
|
+
|
|
126
|
+
var shouldEnableFocusTrap = lpLinkPicker && lpLinkPickerFocusTrap;
|
|
127
|
+
var isLinkPickerEnabled = !!lpLinkPicker && !!(linkPickerOptions !== null && linkPickerOptions !== void 0 && (_linkPickerOptions$pl = linkPickerOptions.plugins) !== null && _linkPickerOptions$pl !== void 0 && _linkPickerOptions$pl.length);
|
|
128
|
+
return _objectSpread(_objectSpread({
|
|
116
129
|
title: intl.formatMessage(messages.card),
|
|
117
130
|
className: className,
|
|
118
|
-
nodeType: nodeType
|
|
131
|
+
nodeType: nodeType,
|
|
132
|
+
preventPopupOverflow: preventPopupOverflow
|
|
119
133
|
}, toolbarOffset), {}, {
|
|
120
134
|
getDomRef: function getDomRef(view) {
|
|
121
135
|
var element = findDomRefAtPos(view.state.selection.from, view.domAtPos.bind(view));
|
|
@@ -130,10 +144,10 @@ export var floatingToolbar = function floatingToolbar(cardOptions, platform, lin
|
|
|
130
144
|
|
|
131
145
|
return element;
|
|
132
146
|
},
|
|
133
|
-
items: generateToolbarItems(state, intl, providerFactory, cardOptions, platform, linkPickerOptions)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
});
|
|
147
|
+
items: generateToolbarItems(state, intl, providerFactory, cardOptions, platform, linkPickerOptions),
|
|
148
|
+
scrollable: pluginState.showLinkingToolbar ? false : true,
|
|
149
|
+
focusTrap: shouldEnableFocusTrap && pluginState.showLinkingToolbar
|
|
150
|
+
}, editLinkToolbarConfig(pluginState.showLinkingToolbar, isLinkPickerEnabled));
|
|
137
151
|
};
|
|
138
152
|
};
|
|
139
153
|
|
|
@@ -217,6 +231,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
217
231
|
}]
|
|
218
232
|
}], _toConsumableArray(getSettingsButtonGroup(state, intl)), [{
|
|
219
233
|
id: 'editor.link.delete',
|
|
234
|
+
focusEditoronEnter: true,
|
|
220
235
|
type: 'button',
|
|
221
236
|
appearance: 'danger',
|
|
222
237
|
icon: RemoveIcon,
|
|
@@ -272,6 +287,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
272
287
|
var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inlineCard) {
|
|
273
288
|
return node.type === inlineCard ? [{
|
|
274
289
|
id: 'editor.link.unlink',
|
|
290
|
+
focusEditoronEnter: true,
|
|
275
291
|
type: 'button',
|
|
276
292
|
title: intl.formatMessage(linkToolbarMessages.unlink),
|
|
277
293
|
icon: UnlinkIcon,
|
|
@@ -282,8 +298,8 @@ var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inli
|
|
|
282
298
|
};
|
|
283
299
|
|
|
284
300
|
var getSettingsButtonGroup = function getSettingsButtonGroup(state, intl) {
|
|
285
|
-
var
|
|
286
|
-
floatingToolbarLinkSettingsButton =
|
|
301
|
+
var _getFeatureFlags2 = getFeatureFlags(state),
|
|
302
|
+
floatingToolbarLinkSettingsButton = _getFeatureFlags2.floatingToolbarLinkSettingsButton;
|
|
287
303
|
|
|
288
304
|
return floatingToolbarLinkSettingsButton === 'true' ? [{
|
|
289
305
|
id: 'editor.link.settings',
|