@atlaskit/editor-core 176.0.2 → 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 +114 -0
- package/codemods/{173.0.0-rename-unsafe-allowUndoRedoButton-prop.ts → 175.0.0-rename-unsafe-allowUndoRedoButton-prop.ts} +0 -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 +24 -24
- 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
|
@@ -142,12 +142,27 @@ var applyMarkOnRange = function applyMarkOnRange(from, to, removeMark, mark, tr)
|
|
|
142
142
|
|
|
143
143
|
exports.applyMarkOnRange = applyMarkOnRange;
|
|
144
144
|
|
|
145
|
+
var entireSelectionContainsMark = function entireSelectionContainsMark(mark, doc, fromPos, toPos) {
|
|
146
|
+
var onlyContainsMark = true;
|
|
147
|
+
doc.nodesBetween(fromPos, toPos, function (node) {
|
|
148
|
+
// Skip recursion once we've found text which doesn't include the mark
|
|
149
|
+
if (!onlyContainsMark) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (node.isText) {
|
|
154
|
+
onlyContainsMark && (onlyContainsMark = mark.isInSet(node.marks));
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
return onlyContainsMark;
|
|
158
|
+
};
|
|
159
|
+
|
|
145
160
|
var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
146
161
|
return function (state, dispatch) {
|
|
147
162
|
var tr = state.tr;
|
|
148
163
|
|
|
149
164
|
if (state.selection instanceof _cellSelection.CellSelection) {
|
|
150
|
-
var
|
|
165
|
+
var removeMark = true;
|
|
151
166
|
var cells = [];
|
|
152
167
|
state.selection.forEachCell(function (cell, cellPos) {
|
|
153
168
|
cells.push({
|
|
@@ -156,30 +171,27 @@ var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
|
156
171
|
});
|
|
157
172
|
var from = cellPos;
|
|
158
173
|
var to = cellPos + cell.nodeSize;
|
|
159
|
-
|
|
160
|
-
if (!markInRange) {
|
|
161
|
-
markInRange = state.doc.rangeHasMark(from, to, mark);
|
|
162
|
-
}
|
|
174
|
+
removeMark && (removeMark = entireSelectionContainsMark(mark, state.doc, from, to));
|
|
163
175
|
});
|
|
164
176
|
|
|
165
177
|
for (var i = cells.length - 1; i >= 0; i--) {
|
|
166
178
|
var cell = cells[i];
|
|
167
179
|
var from = cell.pos;
|
|
168
180
|
var to = from + cell.node.nodeSize;
|
|
169
|
-
applyMarkOnRange(from, to,
|
|
181
|
+
applyMarkOnRange(from, to, removeMark, mark, tr);
|
|
170
182
|
}
|
|
171
183
|
} else {
|
|
172
184
|
var _state$selection3 = state.selection,
|
|
173
185
|
$from = _state$selection3.$from,
|
|
174
|
-
$to = _state$selection3.$to; //
|
|
175
|
-
//
|
|
176
|
-
//
|
|
177
|
-
//
|
|
178
|
-
//
|
|
186
|
+
$to = _state$selection3.$to; // We decide to remove the mark only if the entire selection contains the mark
|
|
187
|
+
// Examples with *bold* text
|
|
188
|
+
// Scenario 1: Selection contains both bold and non-bold text -> bold entire selection
|
|
189
|
+
// Scenario 2: Selection contains only bold text -> un-bold entire selection
|
|
190
|
+
// Scenario 3: Selection contains no bold text -> bold entire selection
|
|
179
191
|
|
|
180
|
-
var
|
|
192
|
+
var _removeMark = entireSelectionContainsMark(mark, state.doc, $from.pos, $to.pos);
|
|
181
193
|
|
|
182
|
-
applyMarkOnRange($from.pos, $to.pos,
|
|
194
|
+
applyMarkOnRange($from.pos, $to.pos, _removeMark, mark, tr);
|
|
183
195
|
}
|
|
184
196
|
|
|
185
197
|
if (tr.docChanged) {
|
|
@@ -9,8 +9,6 @@ exports.ruleWithTransform = exports.ruleWithAnalytics = exports.createWrappingTe
|
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
12
|
-
var _prosemirrorHistory = require("prosemirror-history");
|
|
13
|
-
|
|
14
12
|
var _prosemirrorState = require("prosemirror-state");
|
|
15
13
|
|
|
16
14
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
@@ -21,6 +19,12 @@ var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
|
21
19
|
|
|
22
20
|
var _analytics = require("../plugins/analytics");
|
|
23
21
|
|
|
22
|
+
var _prosemirrorHistory = require("prosemirror-history");
|
|
23
|
+
|
|
24
|
+
var _prosemirrorUtils = require("prosemirror-utils");
|
|
25
|
+
|
|
26
|
+
var _featureFlagsContext = require("../plugins/feature-flags-context");
|
|
27
|
+
|
|
24
28
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
29
|
|
|
26
30
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -158,6 +162,26 @@ var createWrappingJoinRule = function createWrappingJoinRule(_ref3) {
|
|
|
158
162
|
}
|
|
159
163
|
|
|
160
164
|
tr.wrap(range, wrapping);
|
|
165
|
+
var featureFlags = (0, _featureFlagsContext.getFeatureFlags)(state);
|
|
166
|
+
|
|
167
|
+
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists && nodeType === state.schema.nodes.orderedList) {
|
|
168
|
+
// if an orderedList node would be inserted by the input rule match, and
|
|
169
|
+
// that orderedList node is being added directly before another orderedList
|
|
170
|
+
// node, then join those nodes
|
|
171
|
+
var $end = tr.doc.resolve(tr.mapping.map(end));
|
|
172
|
+
|
|
173
|
+
var _node = (0, _prosemirrorUtils.findParentNodeOfTypeClosestToPos)($end, nodeType);
|
|
174
|
+
|
|
175
|
+
if (_node) {
|
|
176
|
+
var nodeEnd = _node.pos + _node.node.nodeSize;
|
|
177
|
+
var after = tr.doc.resolve(nodeEnd).nodeAfter;
|
|
178
|
+
|
|
179
|
+
if (after && after.type === nodeType && (0, _prosemirrorTransform.canJoin)(tr.doc, nodeEnd) && (!joinPredicate || joinPredicate(match, after))) {
|
|
180
|
+
tr.join(nodeEnd);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
161
185
|
var before = tr.doc.resolve(fixedStart - 1).nodeBefore;
|
|
162
186
|
|
|
163
187
|
if (before && before.type === nodeType && (0, _prosemirrorTransform.canJoin)(tr.doc, fixedStart - 1) && (!joinPredicate || joinPredicate(match, before))) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "177.0.0";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { EditorState, Selection } from 'prosemirror-state';
|
|
5
5
|
import { EditorView } from 'prosemirror-view';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
|
+
import { editorMessages } from './messages';
|
|
7
8
|
import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
8
9
|
import { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
9
10
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
@@ -586,7 +587,7 @@ export class ReactEditorView extends React.Component {
|
|
|
586
587
|
className: getUAPrefix(),
|
|
587
588
|
key: "ProseMirror",
|
|
588
589
|
ref: this.handleEditorViewRef,
|
|
589
|
-
"aria-label":
|
|
590
|
+
"aria-label": this.props.intl.formatMessage(editorMessages.editorAssistiveLabel),
|
|
590
591
|
role: "textbox"
|
|
591
592
|
}));
|
|
592
593
|
|
|
@@ -69,7 +69,6 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
|
|
|
69
69
|
},
|
|
70
70
|
placeholder: {
|
|
71
71
|
placeholder: props.placeholder,
|
|
72
|
-
placeholderHints: props.placeholderHints,
|
|
73
72
|
placeholderBracketHint: props.placeholderBracketHint
|
|
74
73
|
},
|
|
75
74
|
textFormatting: { ...(props.textFormatting || {}),
|
|
@@ -146,7 +145,11 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
146
145
|
} // Needs to be after allowTextColor as order of buttons in toolbar depends on it
|
|
147
146
|
|
|
148
147
|
|
|
149
|
-
preset.add(listPlugin
|
|
148
|
+
preset.add([listPlugin, {
|
|
149
|
+
restartNumberedLists: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.restartNumberedLists,
|
|
150
|
+
restartNumberedListsToolbar: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.restartNumberedListsToolbar,
|
|
151
|
+
listNumberContinuity: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.listNumberContinuity
|
|
152
|
+
}]);
|
|
150
153
|
|
|
151
154
|
if (props.allowRule) {
|
|
152
155
|
preset.add(rulePlugin);
|
|
@@ -233,10 +236,10 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
233
236
|
}
|
|
234
237
|
|
|
235
238
|
if (props.allowHelpDialog) {
|
|
236
|
-
preset.add([helpDialogPlugin, props.legacyImageUploadProvider]);
|
|
239
|
+
preset.add([helpDialogPlugin, !!props.legacyImageUploadProvider]);
|
|
237
240
|
}
|
|
238
241
|
|
|
239
|
-
if (props.saveOnEnter) {
|
|
242
|
+
if (props.saveOnEnter && props.onSave) {
|
|
240
243
|
preset.add([saveOnEnterPlugin, props.onSave]);
|
|
241
244
|
}
|
|
242
245
|
|
|
@@ -306,7 +309,7 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
306
309
|
|
|
307
310
|
|
|
308
311
|
if (!props.annotationProviders && props.allowConfluenceInlineComment) {
|
|
309
|
-
preset.add(annotationPlugin);
|
|
312
|
+
preset.add([annotationPlugin, undefined]);
|
|
310
313
|
}
|
|
311
314
|
|
|
312
315
|
if (props.allowDate) {
|
|
@@ -423,7 +426,7 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
423
426
|
}
|
|
424
427
|
|
|
425
428
|
if (featureFlags.enableViewUpdateSubscription) {
|
|
426
|
-
preset.add(
|
|
429
|
+
preset.add(viewUpdateSubscriptionPlugin);
|
|
427
430
|
}
|
|
428
431
|
|
|
429
432
|
preset.add([codeBidiWarningPlugin, {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const 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/es2019/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',
|
|
@@ -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',
|
|
@@ -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',
|
|
@@ -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
|
};
|
|
@@ -79,8 +79,8 @@ export function useMobilePreset({
|
|
|
79
79
|
allowBlockCards: true,
|
|
80
80
|
platform: 'mobile'
|
|
81
81
|
}]);
|
|
82
|
-
preset.add(
|
|
83
|
-
preset.add(
|
|
82
|
+
preset.add(mentionsPlugin);
|
|
83
|
+
preset.add(emojiPlugin); // End
|
|
84
84
|
|
|
85
85
|
if (maxContentSize) {
|
|
86
86
|
preset.add([maxContentSizePlugin, maxContentSize]);
|
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
export class Preset {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.
|
|
2
|
+
constructor(...more) {
|
|
3
|
+
this.data = [...more] || [];
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
add(
|
|
7
|
-
this.
|
|
8
|
-
|
|
6
|
+
add(nextOrTuple) {
|
|
7
|
+
const newPreset = new Preset(nextOrTuple, ...this.data); // TODO: remove this `this.data.push`,
|
|
8
|
+
// once refactoring `create-plugins-list` to address this complexity:
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* preset.add(x)
|
|
12
|
+
* preset.add(y)
|
|
13
|
+
* preset.add(z)
|
|
14
|
+
*/
|
|
15
|
+
// to:
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* immutablePreset = preset.add(x).add(foo).add(bar)
|
|
19
|
+
* presetWithY = presetWithY.add(y)
|
|
20
|
+
* presetWithZ = preset.add(z)
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
this.data.push(nextOrTuple);
|
|
24
|
+
return newPreset;
|
|
9
25
|
}
|
|
10
26
|
|
|
11
27
|
has(plugin) {
|
|
12
|
-
return this.
|
|
28
|
+
return this.data.some(pluginPreset => {
|
|
13
29
|
if (Array.isArray(pluginPreset)) {
|
|
14
30
|
return pluginPreset[0] === plugin;
|
|
15
31
|
}
|
|
@@ -25,7 +41,7 @@ export class Preset {
|
|
|
25
41
|
|
|
26
42
|
processEditorPlugins() {
|
|
27
43
|
const cache = new Map();
|
|
28
|
-
this.
|
|
44
|
+
this.data.forEach(pluginEntry => {
|
|
29
45
|
if (Array.isArray(pluginEntry)) {
|
|
30
46
|
const [fn, options] = pluginEntry;
|
|
31
47
|
cache.set(fn, options);
|
|
@@ -49,6 +65,11 @@ export class Preset {
|
|
|
49
65
|
cache.forEach((options, fn) => {
|
|
50
66
|
plugins.push(fn(options));
|
|
51
67
|
});
|
|
68
|
+
|
|
69
|
+
if (plugins.some(plugin => typeof plugin === 'function')) {
|
|
70
|
+
throw new Error("!!! NextEditorPluginWithDependencies detected in presets. That's an unsupported runtime use case right now.");
|
|
71
|
+
}
|
|
72
|
+
|
|
52
73
|
return plugins;
|
|
53
74
|
}
|
|
54
75
|
|
|
@@ -19,6 +19,7 @@ export class AnnotationNodeView extends ReactNodeView {
|
|
|
19
19
|
/*#__PURE__*/
|
|
20
20
|
// all inline comment states are now set in decorations at ../pm-plugins/inline-comment.ts
|
|
21
21
|
React.createElement("span", {
|
|
22
|
+
"data-mark-type": "annotation",
|
|
22
23
|
ref: forwardRef
|
|
23
24
|
})
|
|
24
25
|
);
|
|
@@ -11,6 +11,7 @@ import { NORMAL_TEXT } from '../../types';
|
|
|
11
11
|
import { blockTypeMenuItemStyle, keyboardShortcut, keyboardShortcutSelect } from './styled';
|
|
12
12
|
import { tooltip, findKeymapByDescription } from '../../../../keymaps';
|
|
13
13
|
import { BlockTypeButton } from './blocktype-button';
|
|
14
|
+
import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
14
15
|
|
|
15
16
|
class ToolbarBlockType extends React.PureComponent {
|
|
16
17
|
constructor(...args) {
|
|
@@ -46,16 +47,19 @@ class ToolbarBlockType extends React.PureComponent {
|
|
|
46
47
|
const isActive = currentBlockType === blockType;
|
|
47
48
|
const tagName = blockType.tagName || 'p';
|
|
48
49
|
const Tag = tagName;
|
|
50
|
+
const keyMap = findKeymapByDescription(blockType.title.defaultMessage);
|
|
49
51
|
return {
|
|
50
52
|
content: jsx("div", {
|
|
51
53
|
css: blockTypeMenuItemStyle(tagName, isActive)
|
|
52
54
|
}, jsx(Tag, null, formatMessage(blockType.title))),
|
|
53
55
|
value: blockType,
|
|
54
56
|
label: formatMessage(blockType.title),
|
|
57
|
+
'aria-label': tooltip(keyMap, formatMessage(blockType.title)),
|
|
58
|
+
keyShortcuts: getAriaKeyshortcuts(keyMap),
|
|
55
59
|
key: `${blockType.name}-${index}`,
|
|
56
60
|
elemAfter: jsx("div", {
|
|
57
61
|
css: [keyboardShortcut, isActive && keyboardShortcutSelect]
|
|
58
|
-
}, tooltip(
|
|
62
|
+
}, tooltip(keyMap)),
|
|
59
63
|
isActive
|
|
60
64
|
};
|
|
61
65
|
});
|
|
@@ -20,6 +20,7 @@ import { getPluginState } from '../plugin-key';
|
|
|
20
20
|
import { NodeSelection } from 'prosemirror-state';
|
|
21
21
|
import { isSupportedNodeForBreakout } from '../utils/is-supported-node';
|
|
22
22
|
import { token } from '@atlaskit/tokens';
|
|
23
|
+
import { layers } from '@atlaskit/theme/constants';
|
|
23
24
|
const toolbarButtonWrapper = css`
|
|
24
25
|
&& button {
|
|
25
26
|
background: ${token('color.background.neutral', N20A)};
|
|
@@ -108,6 +109,7 @@ class LayoutButton extends React.Component {
|
|
|
108
109
|
const titleMessage = getTitle(breakoutMode);
|
|
109
110
|
const title = formatMessage(titleMessage);
|
|
110
111
|
const nextBreakoutMode = getNextBreakoutMode(breakoutMode);
|
|
112
|
+
const belowOtherPopupsZIndex = layers.layer() - 1;
|
|
111
113
|
let pluginState = getPluginState(state);
|
|
112
114
|
let element = getBreakoutNodeElement(pluginState, state.selection, editorView);
|
|
113
115
|
|
|
@@ -131,7 +133,8 @@ class LayoutButton extends React.Component {
|
|
|
131
133
|
boundariesElement: boundariesElement,
|
|
132
134
|
scrollableElement: scrollableElement,
|
|
133
135
|
stick: true,
|
|
134
|
-
forcePlacement: true
|
|
136
|
+
forcePlacement: true,
|
|
137
|
+
zIndex: belowOtherPopupsZIndex
|
|
135
138
|
}, jsx("div", {
|
|
136
139
|
css: toolbarButtonWrapper
|
|
137
140
|
}, jsx(ToolbarButton, {
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { NodeSelection } from 'prosemirror-state';
|
|
2
1
|
import { closeHistory } from 'prosemirror-history';
|
|
3
|
-
import {
|
|
4
|
-
import { queueCards, resolveCard } from './actions';
|
|
5
|
-
import { appearanceForNodeType } from '../utils';
|
|
6
|
-
import { nodesBetweenChanged, processRawValue } from '../../../utils';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD } from '../../../plugins/analytics';
|
|
2
|
+
import { NodeSelection } from 'prosemirror-state';
|
|
8
3
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
9
|
-
import {
|
|
10
|
-
import { shouldReplaceLink } from './shouldReplaceLink';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD } from '../../../plugins/analytics';
|
|
11
5
|
import { SMART_LINK_TYPE } from '../../../plugins/analytics/types/node-events';
|
|
12
6
|
import { getLinkCreationAnalyticsEvent } from '../../../plugins/hyperlink/analytics';
|
|
7
|
+
import { nodesBetweenChanged, processRawValue } from '../../../utils';
|
|
13
8
|
import { unlinkPayload } from '../../../utils/linking-utils';
|
|
14
|
-
import {
|
|
9
|
+
import { isFromCurrentDomain } from '../../hyperlink/utils';
|
|
10
|
+
import { appearanceForNodeType } from '../utils';
|
|
11
|
+
import { queueCards, resolveCard } from './actions';
|
|
12
|
+
import { pluginKey } from './plugin-key';
|
|
13
|
+
import { shouldReplaceLink } from './shouldReplaceLink';
|
|
15
14
|
/**
|
|
16
15
|
* Attempt to replace the link into the respective card.
|
|
17
16
|
*/
|
|
@@ -198,17 +197,13 @@ export const changeSelectedCardToLink = (text, href, sendAnalytics, node, pos) =
|
|
|
198
197
|
|
|
199
198
|
if (sendAnalytics) {
|
|
200
199
|
if (selectedNode) {
|
|
201
|
-
const {
|
|
202
|
-
viewChangingExperimentToolbarStyle
|
|
203
|
-
} = getFeatureFlags(state);
|
|
204
200
|
addAnalytics(state, tr, {
|
|
205
201
|
action: ACTION.CHANGED_TYPE,
|
|
206
202
|
actionSubject: ACTION_SUBJECT.SMART_LINK,
|
|
207
203
|
eventType: EVENT_TYPE.TRACK,
|
|
208
204
|
attributes: {
|
|
209
205
|
newType: SMART_LINK_TYPE.URL,
|
|
210
|
-
previousType: appearanceForNodeType(selectedNode.type)
|
|
211
|
-
featureFlag: viewChangingExperimentToolbarStyle || 'noChange'
|
|
206
|
+
previousType: appearanceForNodeType(selectedNode.type)
|
|
212
207
|
}
|
|
213
208
|
});
|
|
214
209
|
}
|
|
@@ -333,17 +328,13 @@ export const setSelectedCardAppearance = appearance => (state, dispatch) => {
|
|
|
333
328
|
} = state.selection;
|
|
334
329
|
const nodeType = getLinkNodeType(appearance, state.schema.nodes);
|
|
335
330
|
const tr = state.tr.setNodeMarkup(from, nodeType, attrs, selectedNode.marks);
|
|
336
|
-
const {
|
|
337
|
-
viewChangingExperimentToolbarStyle
|
|
338
|
-
} = getFeatureFlags(state);
|
|
339
331
|
addAnalytics(state, tr, {
|
|
340
332
|
action: ACTION.CHANGED_TYPE,
|
|
341
333
|
actionSubject: ACTION_SUBJECT.SMART_LINK,
|
|
342
334
|
eventType: EVENT_TYPE.TRACK,
|
|
343
335
|
attributes: {
|
|
344
336
|
newType: appearance,
|
|
345
|
-
previousType: appearanceForNodeType(selectedNode.type)
|
|
346
|
-
featureFlag: viewChangingExperimentToolbarStyle || 'noChange'
|
|
337
|
+
previousType: appearanceForNodeType(selectedNode.type)
|
|
347
338
|
}
|
|
348
339
|
});
|
|
349
340
|
|
|
@@ -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 const createPlugin = options => pmPluginFactoryParams => {
|
|
14
13
|
const {
|
|
@@ -21,20 +20,6 @@ export const createPlugin = options => pmPluginFactoryParams => {
|
|
|
21
20
|
return new SafePlugin({
|
|
22
21
|
state: {
|
|
23
22
|
init() {
|
|
24
|
-
const {
|
|
25
|
-
viewChangingExperimentToolbarStyle
|
|
26
|
-
} = pmPluginFactoryParams.featureFlags;
|
|
27
|
-
pmPluginFactoryParams.dispatchAnalyticsEvent({
|
|
28
|
-
eventType: EVENT_TYPE.OPERATIONAL,
|
|
29
|
-
action: ACTION.EXPOSED,
|
|
30
|
-
actionSubject: ACTION_SUBJECT.FEATURE,
|
|
31
|
-
attributes: {
|
|
32
|
-
flagKey: 'confluence.frontend.fabric.editor.view-changing-experiment-toolbar-style',
|
|
33
|
-
value: viewChangingExperimentToolbarStyle || 'noChange'
|
|
34
|
-
},
|
|
35
|
-
source: '@atlaskit/feature-flag-client',
|
|
36
|
-
tags: ['measurement']
|
|
37
|
-
});
|
|
38
23
|
return {
|
|
39
24
|
requests: [],
|
|
40
25
|
provider: null,
|
|
@@ -83,6 +83,8 @@ export const openLinkSettings = (state, dispatch) => {
|
|
|
83
83
|
};
|
|
84
84
|
export const floatingToolbar = (cardOptions, platform, linkPickerOptions) => {
|
|
85
85
|
return (state, intl, providerFactory) => {
|
|
86
|
+
var _linkPickerOptions$pl;
|
|
87
|
+
|
|
86
88
|
const {
|
|
87
89
|
inlineCard,
|
|
88
90
|
blockCard,
|
|
@@ -109,10 +111,22 @@ export const floatingToolbar = (cardOptions, platform, linkPickerOptions) => {
|
|
|
109
111
|
} : {}; // Applies padding override for when link picker is currently displayed
|
|
110
112
|
|
|
111
113
|
const className = pluginState.showLinkingToolbar ? FLOATING_TOOLBAR_LINKPICKER_CLASSNAME : undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Enable focus trap only if feature flag is enabled AND for the new version of the picker
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
const {
|
|
119
|
+
lpLinkPicker,
|
|
120
|
+
lpLinkPickerFocusTrap,
|
|
121
|
+
preventPopupOverflow
|
|
122
|
+
} = getFeatureFlags(state);
|
|
123
|
+
const shouldEnableFocusTrap = lpLinkPicker && lpLinkPickerFocusTrap;
|
|
124
|
+
const isLinkPickerEnabled = !!lpLinkPicker && !!(linkPickerOptions !== null && linkPickerOptions !== void 0 && (_linkPickerOptions$pl = linkPickerOptions.plugins) !== null && _linkPickerOptions$pl !== void 0 && _linkPickerOptions$pl.length);
|
|
112
125
|
return {
|
|
113
126
|
title: intl.formatMessage(messages.card),
|
|
114
127
|
className,
|
|
115
128
|
nodeType,
|
|
129
|
+
preventPopupOverflow,
|
|
116
130
|
...toolbarOffset,
|
|
117
131
|
getDomRef: view => {
|
|
118
132
|
const element = findDomRefAtPos(view.state.selection.from, view.domAtPos.bind(view));
|
|
@@ -128,8 +142,9 @@ export const floatingToolbar = (cardOptions, platform, linkPickerOptions) => {
|
|
|
128
142
|
return element;
|
|
129
143
|
},
|
|
130
144
|
items: generateToolbarItems(state, intl, providerFactory, cardOptions, platform, linkPickerOptions),
|
|
131
|
-
|
|
132
|
-
|
|
145
|
+
scrollable: pluginState.showLinkingToolbar ? false : true,
|
|
146
|
+
focusTrap: shouldEnableFocusTrap && pluginState.showLinkingToolbar,
|
|
147
|
+
...editLinkToolbarConfig(pluginState.showLinkingToolbar, isLinkPickerEnabled)
|
|
133
148
|
};
|
|
134
149
|
};
|
|
135
150
|
};
|
|
@@ -213,6 +228,7 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, platfor
|
|
|
213
228
|
}]
|
|
214
229
|
}, ...getSettingsButtonGroup(state, intl), {
|
|
215
230
|
id: 'editor.link.delete',
|
|
231
|
+
focusEditoronEnter: true,
|
|
216
232
|
type: 'button',
|
|
217
233
|
appearance: 'danger',
|
|
218
234
|
icon: RemoveIcon,
|
|
@@ -267,6 +283,7 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, platfor
|
|
|
267
283
|
const getUnlinkButtonGroup = (state, intl, node, inlineCard) => {
|
|
268
284
|
return node.type === inlineCard ? [{
|
|
269
285
|
id: 'editor.link.unlink',
|
|
286
|
+
focusEditoronEnter: true,
|
|
270
287
|
type: 'button',
|
|
271
288
|
title: intl.formatMessage(linkToolbarMessages.unlink),
|
|
272
289
|
icon: UnlinkIcon,
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import HyperlinkToolbar from '../../hyperlink/ui/HyperlinkAddToolbar';
|
|
3
3
|
import { showLinkToolbar, hideLinkToolbar } from '../pm-plugins/actions';
|
|
4
4
|
import { addAnalytics } from '../../analytics';
|
|
5
|
-
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '../../../ui/LinkSearch/ToolbarComponents';
|
|
5
|
+
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '../../../ui/LinkSearch/ToolbarComponents';
|
|
6
6
|
import { changeSelectedCardToLink, updateCard } from '../pm-plugins/doc';
|
|
7
7
|
import { findCardInfo, displayInfoForCard } from '../utils';
|
|
8
8
|
import { NodeSelection } from 'prosemirror-state';
|
|
@@ -72,8 +72,8 @@ export const buildEditLinkToolbar = ({
|
|
|
72
72
|
}) => {
|
|
73
73
|
return {
|
|
74
74
|
type: 'custom',
|
|
75
|
-
fallback: [],
|
|
76
75
|
disableArrowNavigation: true,
|
|
76
|
+
fallback: [],
|
|
77
77
|
render: (view, idx) => {
|
|
78
78
|
if (!view || !providerFactory) {
|
|
79
79
|
return null;
|
|
@@ -106,8 +106,10 @@ export const buildEditLinkToolbar = ({
|
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
|
-
export const editLinkToolbarConfig = {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
export const editLinkToolbarConfig = (showLinkingToolbar, linkPickerOptions) => {
|
|
110
|
+
return showLinkingToolbar ? {
|
|
111
|
+
height: linkPickerOptions ? LINKPICKER_HEIGHT_IN_PX : RECENT_SEARCH_HEIGHT_IN_PX,
|
|
112
|
+
width: RECENT_SEARCH_WIDTH_IN_PX,
|
|
113
|
+
forcePlacement: true
|
|
114
|
+
} : {};
|
|
113
115
|
};
|