@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
|
@@ -12,7 +12,7 @@ import React from 'react';
|
|
|
12
12
|
import HyperlinkToolbar from '../../hyperlink/ui/HyperlinkAddToolbar';
|
|
13
13
|
import { showLinkToolbar, hideLinkToolbar as _hideLinkToolbar } from '../pm-plugins/actions';
|
|
14
14
|
import { addAnalytics } from '../../analytics';
|
|
15
|
-
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '../../../ui/LinkSearch/ToolbarComponents';
|
|
15
|
+
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '../../../ui/LinkSearch/ToolbarComponents';
|
|
16
16
|
import { changeSelectedCardToLink, updateCard } from '../pm-plugins/doc';
|
|
17
17
|
import { findCardInfo, displayInfoForCard } from '../utils';
|
|
18
18
|
import { NodeSelection } from 'prosemirror-state';
|
|
@@ -97,8 +97,8 @@ export var buildEditLinkToolbar = function buildEditLinkToolbar(_ref) {
|
|
|
97
97
|
linkPicker = _ref.linkPicker;
|
|
98
98
|
return {
|
|
99
99
|
type: 'custom',
|
|
100
|
-
fallback: [],
|
|
101
100
|
disableArrowNavigation: true,
|
|
101
|
+
fallback: [],
|
|
102
102
|
render: function render(view, idx) {
|
|
103
103
|
if (!view || !providerFactory) {
|
|
104
104
|
return null;
|
|
@@ -131,8 +131,10 @@ export var buildEditLinkToolbar = function buildEditLinkToolbar(_ref) {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
-
export var editLinkToolbarConfig = {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
export var editLinkToolbarConfig = function editLinkToolbarConfig(showLinkingToolbar, linkPickerOptions) {
|
|
135
|
+
return showLinkingToolbar ? {
|
|
136
|
+
height: linkPickerOptions ? LINKPICKER_HEIGHT_IN_PX : RECENT_SEARCH_HEIGHT_IN_PX,
|
|
137
|
+
width: RECENT_SEARCH_WIDTH_IN_PX,
|
|
138
|
+
forcePlacement: true
|
|
139
|
+
} : {};
|
|
138
140
|
};
|
|
@@ -10,19 +10,15 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
|
|
13
|
-
import React from 'react';
|
|
14
13
|
import PropTypes from 'prop-types';
|
|
15
14
|
import { Fragment } from 'prosemirror-model';
|
|
16
|
-
import
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import nodeNames from '../../../messages';
|
|
17
17
|
import { isSupportedInParent } from '../../../utils/nodes';
|
|
18
|
-
import Dropdown from '../../floating-toolbar/ui/Dropdown';
|
|
19
18
|
import { messages } from '../messages';
|
|
20
|
-
import
|
|
21
|
-
import { getFeatureFlags } from '../../../plugins/feature-flags-context';
|
|
22
|
-
import { LinkToolbarIconDropdown } from './LinkToolbarIconDropdown';
|
|
23
|
-
import { LinkToolbarButtonGroup } from './LinkToolbarButtonGroup';
|
|
19
|
+
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
24
20
|
import { getButtonGroupOption } from './link-toolbar-button-group-options';
|
|
25
|
-
import {
|
|
21
|
+
import { LinkToolbarButtonGroup } from './LinkToolbarButtonGroup';
|
|
26
22
|
export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
27
23
|
_inherits(LinkToolbarAppearance, _React$Component);
|
|
28
24
|
|
|
@@ -106,37 +102,11 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
106
102
|
options.push(embedOption);
|
|
107
103
|
}
|
|
108
104
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
key: "link-toolbar-button-group",
|
|
115
|
-
options: options.map(function (option) {
|
|
116
|
-
return getButtonGroupOption(intl, dispatchCommand, option);
|
|
117
|
-
})
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (viewChangingExperimentToolbarStyle === 'newDropdown') {
|
|
122
|
-
return /*#__PURE__*/React.createElement(LinkToolbarIconDropdown, {
|
|
123
|
-
key: "link-toolbar-icon-dropdown",
|
|
124
|
-
title: "Change view",
|
|
125
|
-
buttonTestId: "link-toolbar-appearance-button",
|
|
126
|
-
dispatchCommand: dispatchCommand,
|
|
127
|
-
options: options.map(function (option) {
|
|
128
|
-
return getIconDropdownOption(intl, dispatchCommand, option);
|
|
129
|
-
})
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
var title = intl.formatMessage(currentAppearance ? messages[currentAppearance] : messages.url);
|
|
134
|
-
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
135
|
-
key: "link-toolbar",
|
|
136
|
-
buttonTestId: "link-toolbar-appearance-button",
|
|
137
|
-
title: title,
|
|
138
|
-
dispatchCommand: dispatchCommand,
|
|
139
|
-
options: options
|
|
105
|
+
return /*#__PURE__*/React.createElement(LinkToolbarButtonGroup, {
|
|
106
|
+
key: "link-toolbar-button-group",
|
|
107
|
+
options: options.map(function (option) {
|
|
108
|
+
return getButtonGroupOption(intl, dispatchCommand, option);
|
|
109
|
+
})
|
|
140
110
|
});
|
|
141
111
|
});
|
|
142
112
|
|
|
@@ -45,17 +45,30 @@ export var findCardInfo = function findCardInfo(state) {
|
|
|
45
45
|
return cardInfo.pos === state.selection.from;
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
|
-
export var transformUnsupportedBlockCardToInline = function transformUnsupportedBlockCardToInline(slice, state) {
|
|
48
|
+
export var transformUnsupportedBlockCardToInline = function transformUnsupportedBlockCardToInline(slice, state, cardOptions) {
|
|
49
49
|
var _state$schema$nodes = state.schema.nodes,
|
|
50
50
|
blockCard = _state$schema$nodes.blockCard,
|
|
51
51
|
inlineCard = _state$schema$nodes.inlineCard;
|
|
52
52
|
var children = [];
|
|
53
53
|
mapChildren(slice.content, function (node, i, frag) {
|
|
54
|
-
|
|
54
|
+
var _cardOptions$allowBlo;
|
|
55
|
+
|
|
56
|
+
if (node.type === blockCard && !isBlockCardSupported(state, frag, (_cardOptions$allowBlo = cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowBlockCards) !== null && _cardOptions$allowBlo !== void 0 ? _cardOptions$allowBlo : false)) {
|
|
55
57
|
children.push(inlineCard.createChecked(node.attrs, node.content, node.marks));
|
|
56
58
|
} else {
|
|
57
59
|
children.push(node);
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
62
|
return new Slice(Fragment.fromArray(children), slice.openStart, slice.openEnd);
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Function to determine if a block card is supported by the editor
|
|
66
|
+
* @param state
|
|
67
|
+
* @param frag
|
|
68
|
+
* @param allowBlockCards
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
var isBlockCardSupported = function isBlockCardSupported(state, frag, allowBlockCards) {
|
|
73
|
+
return allowBlockCards && isSupportedInParent(state, frag);
|
|
61
74
|
};
|
|
@@ -15,7 +15,7 @@ export var handleInit = function handleInit(initData, view, options) {
|
|
|
15
15
|
tr.setMeta('isRemote', true);
|
|
16
16
|
view.dispatch(tr);
|
|
17
17
|
} else if (json) {
|
|
18
|
-
applyRemoteSteps(json,
|
|
18
|
+
applyRemoteSteps(json, view);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
export var handleConnection = function handleConnection(connectionData, view) {
|
|
@@ -32,10 +32,10 @@ export var applyRemoteData = function applyRemoteData(remoteData, view, options)
|
|
|
32
32
|
userIds = _remoteData$userIds === void 0 ? [] : _remoteData$userIds;
|
|
33
33
|
|
|
34
34
|
if (json) {
|
|
35
|
-
applyRemoteSteps(json,
|
|
35
|
+
applyRemoteSteps(json, view, userIds, options);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
export var applyRemoteSteps = function applyRemoteSteps(json,
|
|
38
|
+
export var applyRemoteSteps = function applyRemoteSteps(json, view, userIds, options) {
|
|
39
39
|
if (!json || !json.length) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
@@ -22,7 +22,9 @@ export function getCopyButtonConfig(options) {
|
|
|
22
22
|
var state = options.state,
|
|
23
23
|
formatMessage = options.formatMessage,
|
|
24
24
|
onMouseEnter = options.onMouseEnter,
|
|
25
|
-
onMouseLeave = options.onMouseLeave
|
|
25
|
+
onMouseLeave = options.onMouseLeave,
|
|
26
|
+
onFocus = options.onFocus,
|
|
27
|
+
onBlur = options.onBlur;
|
|
26
28
|
var copyButtonState = copyButtonPluginKey.getState(state);
|
|
27
29
|
var buttonActionHandlers;
|
|
28
30
|
|
|
@@ -32,11 +34,11 @@ export function getCopyButtonConfig(options) {
|
|
|
32
34
|
// Note for future changes: these two handlers should perform
|
|
33
35
|
// the same action.
|
|
34
36
|
onMouseEnter: onMouseEnter || hoverDecoration(options.nodeType, true, 'ak-editor-selected-node'),
|
|
35
|
-
onFocus: hoverDecoration(options.nodeType, true, 'ak-editor-selected-node'),
|
|
37
|
+
onFocus: onFocus || hoverDecoration(options.nodeType, true, 'ak-editor-selected-node'),
|
|
36
38
|
// Note for future changes: these two handlers should perform
|
|
37
39
|
// the same action.
|
|
38
40
|
onMouseLeave: resetCopiedState(options.nodeType, onMouseLeave),
|
|
39
|
-
onBlur: resetCopiedState(options.nodeType)
|
|
41
|
+
onBlur: resetCopiedState(options.nodeType, onBlur)
|
|
40
42
|
};
|
|
41
43
|
} else {
|
|
42
44
|
buttonActionHandlers = {
|
|
@@ -6,7 +6,6 @@ import WithPluginState from '../../ui/WithPluginState';
|
|
|
6
6
|
import { insertDate, closeDatePicker as _closeDatePicker, closeDatePickerWithAnalytics as _closeDatePickerWithAnalytics, createDate, deleteDate } from './actions';
|
|
7
7
|
import createDatePlugin from './pm-plugins/main';
|
|
8
8
|
import keymap from './pm-plugins/keymap';
|
|
9
|
-
import { getFeatureFlags } from '../feature-flags-context';
|
|
10
9
|
import { pluginKey as editorDisabledPluginKey } from '../editor-disabled';
|
|
11
10
|
import { IconDate } from '../quick-insert/assets';
|
|
12
11
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD } from '../analytics';
|
|
@@ -55,8 +54,7 @@ var datePlugin = function datePlugin() {
|
|
|
55
54
|
popupsMountPoint = _ref.popupsMountPoint,
|
|
56
55
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
57
56
|
popupsScrollableElement = _ref.popupsScrollableElement;
|
|
58
|
-
var
|
|
59
|
-
dispatch = editorView.dispatch;
|
|
57
|
+
var dispatch = editorView.dispatch;
|
|
60
58
|
var domAtPos = editorView.domAtPos.bind(editorView);
|
|
61
59
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
62
60
|
plugins: {
|
|
@@ -75,14 +73,11 @@ var datePlugin = function datePlugin() {
|
|
|
75
73
|
isNew = datePlugin.isNew,
|
|
76
74
|
focusDateInput = datePlugin.focusDateInput;
|
|
77
75
|
var element = findDomRefAtPos(showDatePickerAt, domAtPos);
|
|
78
|
-
var allFlags = getFeatureFlags(state);
|
|
79
|
-
var keyboardAccessibleDatepicker = allFlags.keyboardAccessibleDatepicker;
|
|
80
76
|
return /*#__PURE__*/React.createElement(DatePicker, {
|
|
81
77
|
mountTo: popupsMountPoint,
|
|
82
78
|
boundariesElement: popupsBoundariesElement,
|
|
83
79
|
scrollableElement: popupsScrollableElement,
|
|
84
80
|
key: showDatePickerAt,
|
|
85
|
-
showTextField: keyboardAccessibleDatepicker,
|
|
86
81
|
element: element,
|
|
87
82
|
isNew: isNew,
|
|
88
83
|
autoFocus: focusDateInput,
|
|
@@ -122,7 +122,6 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
122
122
|
mountTo = _this$props.mountTo,
|
|
123
123
|
boundariesElement = _this$props.boundariesElement,
|
|
124
124
|
scrollableElement = _this$props.scrollableElement,
|
|
125
|
-
showTextField = _this$props.showTextField,
|
|
126
125
|
intl = _this$props.intl,
|
|
127
126
|
dispatchAnalyticsEvent = _this$props.dispatchAnalyticsEvent,
|
|
128
127
|
isNew = _this$props.isNew,
|
|
@@ -160,7 +159,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
160
159
|
scrollableElement: scrollableElement
|
|
161
160
|
}, jsx("div", {
|
|
162
161
|
css: popupContentWrapper
|
|
163
|
-
},
|
|
162
|
+
}, jsx(DatePickerInput, {
|
|
164
163
|
date: date,
|
|
165
164
|
onNewDate: this.handleNewDate,
|
|
166
165
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -16,7 +16,6 @@ import { inputRulePlugin as asciiInputRulePlugin } from './pm-plugins/ascii-inpu
|
|
|
16
16
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD } from '../analytics';
|
|
17
17
|
import { IconEmoji } from '../quick-insert/assets';
|
|
18
18
|
import { EmojiNodeView } from './nodeviews/emoji';
|
|
19
|
-
import { EmojiContextProvider } from './ui/EmojiContextProvider';
|
|
20
19
|
import { messages } from '../insert-block/ui/ToolbarInsertBlock/messages';
|
|
21
20
|
import { openTypeAheadAtCursor } from '../type-ahead/transforms/open-typeahead-at-cursor';
|
|
22
21
|
export var emojiToTypeaheadItem = function emojiToTypeaheadItem(emoji, emojiProvider) {
|
|
@@ -27,18 +26,13 @@ export var emojiToTypeaheadItem = function emojiToTypeaheadItem(emoji, emojiProv
|
|
|
27
26
|
var isSelected = _ref.isSelected,
|
|
28
27
|
onClick = _ref.onClick,
|
|
29
28
|
onHover = _ref.onHover;
|
|
30
|
-
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
selected: isSelected,
|
|
38
|
-
onMouseMove: onHover,
|
|
39
|
-
onSelection: onClick
|
|
40
|
-
}))
|
|
41
|
-
);
|
|
29
|
+
return /*#__PURE__*/React.createElement(EmojiTypeAheadItem, {
|
|
30
|
+
emoji: emoji,
|
|
31
|
+
selected: isSelected,
|
|
32
|
+
onMouseMove: onHover,
|
|
33
|
+
onSelection: onClick,
|
|
34
|
+
emojiProvider: emojiProvider
|
|
35
|
+
});
|
|
42
36
|
},
|
|
43
37
|
emoji: emoji
|
|
44
38
|
};
|
|
@@ -6,11 +6,11 @@ import { setExpandRef } from '../commands';
|
|
|
6
6
|
import { findExpand } from '../utils';
|
|
7
7
|
import { expandClassNames } from '../ui/class-names';
|
|
8
8
|
import { getPluginState, createPluginState, pluginKey } from './plugin-factory';
|
|
9
|
+
export function containsClass(element, className) {
|
|
10
|
+
var _element$classList;
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
return !!element && element.classList.contains(className);
|
|
12
|
+
return Boolean(element === null || element === void 0 ? void 0 : (_element$classList = element.classList) === null || _element$classList === void 0 ? void 0 : _element$classList.contains(className));
|
|
12
13
|
}
|
|
13
|
-
|
|
14
14
|
export var createPlugin = function createPlugin(dispatch, getIntl) {
|
|
15
15
|
var appearance = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'full-page';
|
|
16
16
|
var useLongPressSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
@@ -33,6 +33,7 @@ export var getToolbarConfig = function getToolbarConfig(state, _ref) {
|
|
|
33
33
|
id: 'editor.expand.delete',
|
|
34
34
|
type: 'button',
|
|
35
35
|
appearance: 'danger',
|
|
36
|
+
focusEditoronEnter: true,
|
|
36
37
|
icon: RemoveIcon,
|
|
37
38
|
onClick: deleteExpand(),
|
|
38
39
|
onMouseEnter: hoverDecoration([nestedExpand, expand], true),
|
|
@@ -7,7 +7,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
import { removeSelectedNode, removeParentNodeOfType } from 'prosemirror-utils';
|
|
8
8
|
import { applyChange } from '../context-panel/transforms';
|
|
9
9
|
import { createCommand } from './plugin-factory';
|
|
10
|
-
import { getSelectedExtension } from './utils';
|
|
10
|
+
import { getSelectedExtension } from './utils';
|
|
11
|
+
import { removeConnectedNodes } from '@atlaskit/editor-common/utils'; // AFP-2532 TODO: Fix automatic suppressions below
|
|
11
12
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
12
13
|
|
|
13
14
|
export function updateState(state) {
|
|
@@ -82,4 +83,14 @@ export var removeExtension = function removeExtension() {
|
|
|
82
83
|
return removeParentNodeOfType(state.schema.nodes.bodiedExtension)(tr);
|
|
83
84
|
}
|
|
84
85
|
});
|
|
86
|
+
};
|
|
87
|
+
export var removeDescendantNodes = function removeDescendantNodes(sourceNode) {
|
|
88
|
+
return createCommand({
|
|
89
|
+
type: 'UPDATE_STATE',
|
|
90
|
+
data: {
|
|
91
|
+
element: undefined
|
|
92
|
+
}
|
|
93
|
+
}, function (tr, state) {
|
|
94
|
+
return sourceNode ? removeConnectedNodes(state, sourceNode) : tr;
|
|
95
|
+
});
|
|
85
96
|
};
|
|
@@ -282,6 +282,16 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
282
282
|
if (!selectedExtension) {
|
|
283
283
|
if (showContextPanel) {
|
|
284
284
|
clearEditingContext(state, dispatch);
|
|
285
|
+
} // if an extension is no longer selected, but the plugin has cached the previous selected extension id/ref
|
|
286
|
+
// then this should clear those values so that if an exention is selected again, then this sees it as a change
|
|
287
|
+
// and updates the state correctly.
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
if (!!localId || !!element) {
|
|
291
|
+
updateState({
|
|
292
|
+
localId: undefined,
|
|
293
|
+
element: undefined
|
|
294
|
+
})(state, dispatch);
|
|
285
295
|
}
|
|
286
296
|
|
|
287
297
|
return;
|
|
@@ -11,24 +11,34 @@ import { hoverDecoration } from '../base/pm-plugins/decoration';
|
|
|
11
11
|
import { editExtension } from './actions';
|
|
12
12
|
import { getPluginState } from './pm-plugins/main';
|
|
13
13
|
import { getSelectedExtension } from './utils';
|
|
14
|
-
import { updateExtensionLayout, removeExtension } from './commands';
|
|
14
|
+
import { updateExtensionLayout, removeExtension, removeDescendantNodes } from './commands';
|
|
15
15
|
import { pluginKey as macroPluginKey } from '../macro/plugin-key';
|
|
16
|
-
import { isReferencedSource } from '@atlaskit/editor-common/utils';
|
|
16
|
+
import { isReferencedSource, getChildrenInfo as _getChildrenInfo, getNodeName } from '@atlaskit/editor-common/utils';
|
|
17
17
|
export var messages = defineMessages({
|
|
18
18
|
edit: {
|
|
19
19
|
id: 'fabric.editor.edit',
|
|
20
20
|
defaultMessage: 'Edit',
|
|
21
21
|
description: 'Edit the properties for this extension.'
|
|
22
22
|
},
|
|
23
|
+
deleteElementTitle: {
|
|
24
|
+
id: 'fabric.editor.extension.deleteElementTitle',
|
|
25
|
+
defaultMessage: 'Delete element',
|
|
26
|
+
description: 'Title text for confirm modal when deleting an extension linked to a data consumer.'
|
|
27
|
+
},
|
|
23
28
|
confirmDeleteLinkedModalOKButton: {
|
|
24
29
|
id: 'fabric.editor.extension.confirmDeleteLinkedModalOKButton',
|
|
25
|
-
defaultMessage: '
|
|
30
|
+
defaultMessage: 'Delete',
|
|
26
31
|
description: 'Action button label for confirm modal when deleting an extension linked to a data consumer.'
|
|
27
32
|
},
|
|
28
33
|
confirmDeleteLinkedModalMessage: {
|
|
29
34
|
id: 'fabric.editor.extension.confirmDeleteLinkedModalMessage',
|
|
30
|
-
defaultMessage: '
|
|
35
|
+
defaultMessage: 'Deleting {nodeName} will break anything connected to it.',
|
|
31
36
|
description: 'Message for confirm modal when deleting a extension linked to an data consumer.'
|
|
37
|
+
},
|
|
38
|
+
confirmModalCheckboxLabel: {
|
|
39
|
+
id: 'fabric.editor.floatingToolbar.confirmModalCheckboxLabel',
|
|
40
|
+
defaultMessage: 'Also delete connected elements',
|
|
41
|
+
description: 'checkbox label text'
|
|
32
42
|
}
|
|
33
43
|
});
|
|
34
44
|
|
|
@@ -101,7 +111,8 @@ var editButton = function editButton(formatMessage, extensionState) {
|
|
|
101
111
|
return true;
|
|
102
112
|
},
|
|
103
113
|
title: formatMessage(messages.edit),
|
|
104
|
-
tabIndex: null
|
|
114
|
+
tabIndex: null,
|
|
115
|
+
focusEditoronEnter: true
|
|
105
116
|
}];
|
|
106
117
|
};
|
|
107
118
|
|
|
@@ -120,9 +131,23 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
120
131
|
var confirmDialog;
|
|
121
132
|
|
|
122
133
|
if (isReferencedSource(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node)) {
|
|
123
|
-
confirmDialog = {
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
confirmDialog = function confirmDialog() {
|
|
135
|
+
return {
|
|
136
|
+
title: formatMessage(messages.deleteElementTitle),
|
|
137
|
+
okButtonLabel: formatMessage(messages.confirmDeleteLinkedModalOKButton),
|
|
138
|
+
message: formatMessage(messages.confirmDeleteLinkedModalMessage, {
|
|
139
|
+
nodeName: getNodeName(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node)
|
|
140
|
+
}),
|
|
141
|
+
isReferentialityDialog: true,
|
|
142
|
+
getChildrenInfo: function getChildrenInfo() {
|
|
143
|
+
return _getChildrenInfo(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node);
|
|
144
|
+
},
|
|
145
|
+
checkboxLabel: formatMessage(messages.confirmModalCheckboxLabel),
|
|
146
|
+
onConfirm: function onConfirm() {
|
|
147
|
+
var isChecked = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
148
|
+
return clickWithCheckboxHandler(isChecked, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
126
151
|
};
|
|
127
152
|
}
|
|
128
153
|
|
|
@@ -157,6 +182,7 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
157
182
|
onMouseLeave: hoverDecoration(nodeType, false),
|
|
158
183
|
onFocus: hoverDecoration(nodeType, true),
|
|
159
184
|
onBlur: hoverDecoration(nodeType, false),
|
|
185
|
+
focusEditoronEnter: true,
|
|
160
186
|
title: formatMessage(commonMessages.remove),
|
|
161
187
|
tabIndex: null,
|
|
162
188
|
confirmDialog: confirmDialog
|
|
@@ -167,4 +193,20 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
167
193
|
|
|
168
194
|
return;
|
|
169
195
|
};
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
var clickWithCheckboxHandler = function clickWithCheckboxHandler(isChecked, node) {
|
|
199
|
+
return function (state, dispatch) {
|
|
200
|
+
if (!node) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (!isChecked) {
|
|
205
|
+
removeExtension()(state, dispatch);
|
|
206
|
+
} else {
|
|
207
|
+
removeDescendantNodes(node)(state, dispatch);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return true;
|
|
211
|
+
};
|
|
170
212
|
};
|
|
@@ -33,7 +33,7 @@ function getSpellCheck(featureFlags) {
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
export function createFeatureFlagsFromProps(props) {
|
|
36
|
-
var _props$featureFlags, _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$collabEdit, _props$collabEdit2, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39;
|
|
36
|
+
var _props$featureFlags, _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$collabEdit, _props$collabEdit2, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42;
|
|
37
37
|
|
|
38
38
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
39
39
|
var tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
|
|
@@ -41,11 +41,9 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
41
41
|
newInsertionBehaviour: props.allowNewInsertionBehaviour,
|
|
42
42
|
interactiveExpand: typeof props.allowExpand === 'boolean' ? props.allowExpand : Boolean(props.allowExpand && props.allowExpand.allowInteractiveExpand !== false),
|
|
43
43
|
placeholderBracketHint: !!props.placeholderBracketHint,
|
|
44
|
-
placeholderHints: Array.isArray(props.placeholderHints) && props.placeholderHints.length > 0,
|
|
45
44
|
moreTextColors: typeof props.allowTextColor === 'boolean' ? false : Boolean(((_props$allowTextColor = props.allowTextColor) === null || _props$allowTextColor === void 0 ? void 0 : _props$allowTextColor.allowMoreTextColors) === true),
|
|
46
45
|
findReplace: !!props.allowFindReplace,
|
|
47
46
|
findReplaceMatchCase: _typeof(props.allowFindReplace) === 'object' && Boolean(props.allowFindReplace.allowMatchCase),
|
|
48
|
-
keyboardAccessibleDatepicker: typeof props.allowKeyboardAccessibleDatepicker === 'boolean' ? props.allowKeyboardAccessibleDatepicker : false,
|
|
49
47
|
addColumnWithCustomStep: !props.allowTables || typeof props.allowTables === 'boolean' ? false : Boolean(props.allowTables.allowAddColumnWithCustomStep),
|
|
50
48
|
singleLayout: _typeof(props.allowLayouts) === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
|
|
51
49
|
undoRedoButtons: props.allowUndoRedoButtons,
|
|
@@ -66,17 +64,19 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
66
64
|
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.saferDispatchedTransactions) : false)),
|
|
67
65
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
68
66
|
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
69
|
-
viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined,
|
|
70
67
|
tableCellOptionsInFloatingToolbar: typeof tableCellOptionsInFloatingToolbar === 'boolean' ? tableCellOptionsInFloatingToolbar : false,
|
|
71
|
-
showHoverPreview: Boolean(typeof ((_props$
|
|
72
|
-
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$
|
|
73
|
-
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$
|
|
74
|
-
floatingToolbarLinkSettingsButton: typeof ((_props$
|
|
68
|
+
showHoverPreview: Boolean(typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.showHoverPreview) === 'boolean' ? !!((_props$featureFlags30 = props.featureFlags) !== null && _props$featureFlags30 !== void 0 && _props$featureFlags30.showHoverPreview) : false),
|
|
69
|
+
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.indentationButtonsInTheToolbar) : false)),
|
|
70
|
+
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags34 = props.featureFlags) !== null && _props$featureFlags34 !== void 0 && _props$featureFlags34.floatingToolbarCopyButton) : false)),
|
|
71
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
75
72
|
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
|
|
76
73
|
// Including fallback to props.featureFlags so that mobile feature flags
|
|
77
74
|
// are included (they are not kebab cased)
|
|
78
|
-
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$
|
|
79
|
-
listNumberContinuity: normalizedFeatureFlags.listNumberContinuity === true || ((_props$
|
|
80
|
-
restartNumberedListsToolbar: normalizedFeatureFlags.restartNumberedListsToolbar === true || ((_props$
|
|
75
|
+
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36.restartNumberedLists) === true,
|
|
76
|
+
listNumberContinuity: normalizedFeatureFlags.listNumberContinuity === true || ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37.listNumberContinuity) === true,
|
|
77
|
+
restartNumberedListsToolbar: normalizedFeatureFlags.restartNumberedListsToolbar === true || ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.restartNumberedListsToolbar) === true,
|
|
78
|
+
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags39 = props.featureFlags) === null || _props$featureFlags39 === void 0 ? void 0 : _props$featureFlags39.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags40 = props.featureFlags) !== null && _props$featureFlags40 !== void 0 && _props$featureFlags40.useSomewhatSemanticTextColorNames) : false)),
|
|
79
|
+
lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
|
|
80
|
+
preventPopupOverflow: Boolean(typeof ((_props$featureFlags41 = props.featureFlags) === null || _props$featureFlags41 === void 0 ? void 0 : _props$featureFlags41['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags42 = props.featureFlags) !== null && _props$featureFlags42 !== void 0 && _props$featureFlags42['prevent-popup-overflow']) : false)
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -24,7 +24,8 @@ import ToolbarButton, { TOOLBAR_BUTTON } from '../../../ui/ToolbarButton';
|
|
|
24
24
|
import Dropdown from '../../../ui/Dropdown';
|
|
25
25
|
import FindReplace from './FindReplace';
|
|
26
26
|
import { TRIGGER_METHOD } from '../../analytics/types';
|
|
27
|
-
import { ToolTipContent, findKeymapByDescription } from '../../../keymaps';
|
|
27
|
+
import { ToolTipContent, findKeymapByDescription, tooltip } from '../../../keymaps';
|
|
28
|
+
import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
28
29
|
var toolbarButtonWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex: 1 1 auto;\n flex-grow: 0;\n justify-content: flex-end;\n align-items: center;\n padding: 0 8px;\n @media (max-width: ", "px) {\n justify-content: center;\n padding: 0;\n }\n"])), akEditorMobileMaxWidth);
|
|
29
30
|
var toolbarButtonWrapperFullWith = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n"])));
|
|
30
31
|
var wrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
|
|
@@ -84,6 +85,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
84
85
|
takeFullWidth = _this$props.takeFullWidth;
|
|
85
86
|
var title = formatMessage(messages.findReplaceToolbarButton);
|
|
86
87
|
var stackBelowOtherEditorFloatingPanels = akEditorFloatingPanelZIndex - 1;
|
|
88
|
+
var keymap = findKeymapByDescription('Find');
|
|
87
89
|
return jsx("div", {
|
|
88
90
|
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWith]
|
|
89
91
|
}, jsx(Dropdown, {
|
|
@@ -107,14 +109,16 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
107
109
|
selected: isActive,
|
|
108
110
|
title: jsx(ToolTipContent, {
|
|
109
111
|
description: title,
|
|
110
|
-
keymap:
|
|
112
|
+
keymap: keymap
|
|
111
113
|
}),
|
|
112
114
|
iconBefore: jsx(EditorSearchIcon, {
|
|
113
115
|
label: title
|
|
114
116
|
}),
|
|
115
117
|
onClick: this.toggleOpen,
|
|
116
118
|
"aria-expanded": isActive,
|
|
117
|
-
"aria-haspopup": true
|
|
119
|
+
"aria-haspopup": true,
|
|
120
|
+
"aria-label": keymap ? tooltip(keymap, title) : title,
|
|
121
|
+
"aria-keyshortcuts": getAriaKeyshortcuts(keymap)
|
|
118
122
|
})
|
|
119
123
|
}, jsx("div", {
|
|
120
124
|
css: wrapper
|
|
@@ -195,7 +195,9 @@ var floatingToolbarPlugin = function floatingToolbarPlugin() {
|
|
|
195
195
|
_config$offset = config.offset,
|
|
196
196
|
offset = _config$offset === void 0 ? [0, 12] : _config$offset,
|
|
197
197
|
forcePlacement = config.forcePlacement,
|
|
198
|
-
|
|
198
|
+
preventPopupOverflow = config.preventPopupOverflow,
|
|
199
|
+
onPositionCalculated = config.onPositionCalculated,
|
|
200
|
+
focusTrap = config.focusTrap;
|
|
199
201
|
var targetRef = getDomRef(editorView, dispatchAnalyticsEvent);
|
|
200
202
|
|
|
201
203
|
if (!targetRef || editorDisabledPlugin && editorDisabledPlugin.editorDisabled) {
|
|
@@ -221,6 +223,7 @@ var floatingToolbarPlugin = function floatingToolbarPlugin() {
|
|
|
221
223
|
|
|
222
224
|
var confirmButtonItem = confirmDialogForItem ? toolbarItems[confirmDialogForItem] : undefined;
|
|
223
225
|
var scrollable = getFeatureFlags(editorView.state).floatingToolbarCopyButton && config.scrollable;
|
|
226
|
+
var confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
|
|
224
227
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
225
228
|
component: ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN,
|
|
226
229
|
componentId: camelCase(title),
|
|
@@ -243,7 +246,9 @@ var floatingToolbarPlugin = function floatingToolbarPlugin() {
|
|
|
243
246
|
onPositionCalculated: customPositionCalculation,
|
|
244
247
|
style: scrollable ? {
|
|
245
248
|
maxWidth: '100%'
|
|
246
|
-
} : {}
|
|
249
|
+
} : {},
|
|
250
|
+
focusTrap: focusTrap,
|
|
251
|
+
preventOverflow: preventPopupOverflow
|
|
247
252
|
}, /*#__PURE__*/React.createElement(ToolbarLoader, {
|
|
248
253
|
target: targetRef,
|
|
249
254
|
items: toolbarItems,
|
|
@@ -262,9 +267,16 @@ var floatingToolbarPlugin = function floatingToolbarPlugin() {
|
|
|
262
267
|
extensionsProvider: extensionsState === null || extensionsState === void 0 ? void 0 : extensionsState.extensionProvider,
|
|
263
268
|
scrollable: scrollable
|
|
264
269
|
})), /*#__PURE__*/React.createElement(ConfirmationModal, {
|
|
265
|
-
options:
|
|
270
|
+
options: confirmDialogOptions,
|
|
266
271
|
onConfirm: function onConfirm() {
|
|
267
|
-
|
|
272
|
+
var isChecked = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
273
|
+
|
|
274
|
+
if (!!confirmDialogOptions.onConfirm) {
|
|
275
|
+
dispatchCommand(confirmDialogOptions.onConfirm(isChecked));
|
|
276
|
+
} else {
|
|
277
|
+
dispatchCommand(confirmButtonItem.onClick);
|
|
278
|
+
}
|
|
279
|
+
|
|
268
280
|
dispatchCommand(hideConfirmDialog());
|
|
269
281
|
} // When closed without clicking OK or cancel buttons
|
|
270
282
|
,
|