@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
|
@@ -133,6 +133,8 @@ exports.openLinkSettings = openLinkSettings;
|
|
|
133
133
|
|
|
134
134
|
var floatingToolbar = function floatingToolbar(cardOptions, platform, linkPickerOptions) {
|
|
135
135
|
return function (state, intl, providerFactory) {
|
|
136
|
+
var _linkPickerOptions$pl;
|
|
137
|
+
|
|
136
138
|
var _state$schema$nodes = state.schema.nodes,
|
|
137
139
|
inlineCard = _state$schema$nodes.inlineCard,
|
|
138
140
|
blockCard = _state$schema$nodes.blockCard,
|
|
@@ -159,10 +161,22 @@ var floatingToolbar = function floatingToolbar(cardOptions, platform, linkPicker
|
|
|
159
161
|
} : {}; // Applies padding override for when link picker is currently displayed
|
|
160
162
|
|
|
161
163
|
var className = pluginState.showLinkingToolbar ? _styles2.FLOATING_TOOLBAR_LINKPICKER_CLASSNAME : undefined;
|
|
162
|
-
|
|
164
|
+
/**
|
|
165
|
+
* Enable focus trap only if feature flag is enabled AND for the new version of the picker
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
var _getFeatureFlags = (0, _featureFlagsContext.getFeatureFlags)(state),
|
|
169
|
+
lpLinkPicker = _getFeatureFlags.lpLinkPicker,
|
|
170
|
+
lpLinkPickerFocusTrap = _getFeatureFlags.lpLinkPickerFocusTrap,
|
|
171
|
+
preventPopupOverflow = _getFeatureFlags.preventPopupOverflow;
|
|
172
|
+
|
|
173
|
+
var shouldEnableFocusTrap = lpLinkPicker && lpLinkPickerFocusTrap;
|
|
174
|
+
var isLinkPickerEnabled = !!lpLinkPicker && !!(linkPickerOptions !== null && linkPickerOptions !== void 0 && (_linkPickerOptions$pl = linkPickerOptions.plugins) !== null && _linkPickerOptions$pl !== void 0 && _linkPickerOptions$pl.length);
|
|
175
|
+
return _objectSpread(_objectSpread({
|
|
163
176
|
title: intl.formatMessage(_messages2.messages.card),
|
|
164
177
|
className: className,
|
|
165
|
-
nodeType: nodeType
|
|
178
|
+
nodeType: nodeType,
|
|
179
|
+
preventPopupOverflow: preventPopupOverflow
|
|
166
180
|
}, toolbarOffset), {}, {
|
|
167
181
|
getDomRef: function getDomRef(view) {
|
|
168
182
|
var element = (0, _prosemirrorUtils.findDomRefAtPos)(view.state.selection.from, view.domAtPos.bind(view));
|
|
@@ -177,10 +191,10 @@ var floatingToolbar = function floatingToolbar(cardOptions, platform, linkPicker
|
|
|
177
191
|
|
|
178
192
|
return element;
|
|
179
193
|
},
|
|
180
|
-
items: generateToolbarItems(state, intl, providerFactory, cardOptions, platform, linkPickerOptions)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
});
|
|
194
|
+
items: generateToolbarItems(state, intl, providerFactory, cardOptions, platform, linkPickerOptions),
|
|
195
|
+
scrollable: pluginState.showLinkingToolbar ? false : true,
|
|
196
|
+
focusTrap: shouldEnableFocusTrap && pluginState.showLinkingToolbar
|
|
197
|
+
}, (0, _EditLinkToolbar.editLinkToolbarConfig)(pluginState.showLinkingToolbar, isLinkPickerEnabled));
|
|
184
198
|
};
|
|
185
199
|
};
|
|
186
200
|
|
|
@@ -267,6 +281,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
267
281
|
}]
|
|
268
282
|
}], (0, _toConsumableArray2.default)(getSettingsButtonGroup(state, intl)), [{
|
|
269
283
|
id: 'editor.link.delete',
|
|
284
|
+
focusEditoronEnter: true,
|
|
270
285
|
type: 'button',
|
|
271
286
|
appearance: 'danger',
|
|
272
287
|
icon: _remove.default,
|
|
@@ -322,6 +337,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
322
337
|
var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inlineCard) {
|
|
323
338
|
return node.type === inlineCard ? [{
|
|
324
339
|
id: 'editor.link.unlink',
|
|
340
|
+
focusEditoronEnter: true,
|
|
325
341
|
type: 'button',
|
|
326
342
|
title: intl.formatMessage(_messages.linkToolbarMessages.unlink),
|
|
327
343
|
icon: _unlink.default,
|
|
@@ -332,8 +348,8 @@ var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inli
|
|
|
332
348
|
};
|
|
333
349
|
|
|
334
350
|
var getSettingsButtonGroup = function getSettingsButtonGroup(state, intl) {
|
|
335
|
-
var
|
|
336
|
-
floatingToolbarLinkSettingsButton =
|
|
351
|
+
var _getFeatureFlags2 = (0, _featureFlagsContext.getFeatureFlags)(state),
|
|
352
|
+
floatingToolbarLinkSettingsButton = _getFeatureFlags2.floatingToolbarLinkSettingsButton;
|
|
337
353
|
|
|
338
354
|
return floatingToolbarLinkSettingsButton === 'true' ? [{
|
|
339
355
|
id: 'editor.link.settings',
|
|
@@ -123,8 +123,8 @@ var buildEditLinkToolbar = function buildEditLinkToolbar(_ref) {
|
|
|
123
123
|
linkPicker = _ref.linkPicker;
|
|
124
124
|
return {
|
|
125
125
|
type: 'custom',
|
|
126
|
-
fallback: [],
|
|
127
126
|
disableArrowNavigation: true,
|
|
127
|
+
fallback: [],
|
|
128
128
|
render: function render(view, idx) {
|
|
129
129
|
if (!view || !providerFactory) {
|
|
130
130
|
return null;
|
|
@@ -159,9 +159,13 @@ var buildEditLinkToolbar = function buildEditLinkToolbar(_ref) {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
exports.buildEditLinkToolbar = buildEditLinkToolbar;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
|
|
163
|
+
var editLinkToolbarConfig = function editLinkToolbarConfig(showLinkingToolbar, linkPickerOptions) {
|
|
164
|
+
return showLinkingToolbar ? {
|
|
165
|
+
height: linkPickerOptions ? _ToolbarComponents.LINKPICKER_HEIGHT_IN_PX : _ToolbarComponents.RECENT_SEARCH_HEIGHT_IN_PX,
|
|
166
|
+
width: _ToolbarComponents.RECENT_SEARCH_WIDTH_IN_PX,
|
|
167
|
+
forcePlacement: true
|
|
168
|
+
} : {};
|
|
166
169
|
};
|
|
170
|
+
|
|
167
171
|
exports.editLinkToolbarConfig = editLinkToolbarConfig;
|
|
@@ -21,31 +21,23 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
21
21
|
|
|
22
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
23
|
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
24
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
25
|
|
|
28
26
|
var _prosemirrorModel = require("prosemirror-model");
|
|
29
27
|
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
var _nodes = require("../../../utils/nodes");
|
|
33
|
-
|
|
34
|
-
var _Dropdown = _interopRequireDefault(require("../../floating-toolbar/ui/Dropdown"));
|
|
35
|
-
|
|
36
|
-
var _messages = require("../messages");
|
|
28
|
+
var _react = _interopRequireDefault(require("react"));
|
|
37
29
|
|
|
38
|
-
var
|
|
30
|
+
var _messages = _interopRequireDefault(require("../../../messages"));
|
|
39
31
|
|
|
40
|
-
var
|
|
32
|
+
var _nodes = require("../../../utils/nodes");
|
|
41
33
|
|
|
42
|
-
var
|
|
34
|
+
var _messages2 = require("../messages");
|
|
43
35
|
|
|
44
|
-
var
|
|
36
|
+
var _doc = require("../pm-plugins/doc");
|
|
45
37
|
|
|
46
38
|
var _linkToolbarButtonGroupOptions = require("./link-toolbar-button-group-options");
|
|
47
39
|
|
|
48
|
-
var
|
|
40
|
+
var _LinkToolbarButtonGroup = require("./LinkToolbarButtonGroup");
|
|
49
41
|
|
|
50
42
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
51
43
|
|
|
@@ -90,7 +82,7 @@ var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
90
82
|
var isEmbedCardLinkSupportedInParent = allowEmbeds ? (0, _nodes.isSupportedInParent)(editorState, _prosemirrorModel.Fragment.from(editorState.schema.nodes.embedCard.createChecked({})), currentAppearance) : false;
|
|
91
83
|
var embedOption = allowEmbeds && preview && {
|
|
92
84
|
appearance: 'embed',
|
|
93
|
-
title: intl.formatMessage(
|
|
85
|
+
title: intl.formatMessage(_messages2.messages.embed),
|
|
94
86
|
onClick: (0, _doc.setSelectedCardAppearance)('embed'),
|
|
95
87
|
selected: currentAppearance === 'embed',
|
|
96
88
|
hidden: false,
|
|
@@ -99,7 +91,7 @@ var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
99
91
|
tooltip: isEmbedCardLinkSupportedInParent ? undefined : getUnavailableMessage(editorState, intl)
|
|
100
92
|
};
|
|
101
93
|
var options = [{
|
|
102
|
-
title: intl.formatMessage(
|
|
94
|
+
title: intl.formatMessage(_messages2.messages.url),
|
|
103
95
|
onClick: function onClick() {
|
|
104
96
|
return (0, _doc.changeSelectedCardToLink)(url, url, true)(editorState, view === null || view === void 0 ? void 0 : view.dispatch);
|
|
105
97
|
},
|
|
@@ -107,13 +99,13 @@ var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
107
99
|
testId: 'url-appearance'
|
|
108
100
|
}, {
|
|
109
101
|
appearance: 'inline',
|
|
110
|
-
title: intl.formatMessage(
|
|
102
|
+
title: intl.formatMessage(_messages2.messages.inline),
|
|
111
103
|
onClick: (0, _doc.setSelectedCardAppearance)('inline'),
|
|
112
104
|
selected: currentAppearance === 'inline',
|
|
113
105
|
testId: 'inline-appearance'
|
|
114
106
|
}, {
|
|
115
107
|
appearance: 'block',
|
|
116
|
-
title: intl.formatMessage(
|
|
108
|
+
title: intl.formatMessage(_messages2.messages.block),
|
|
117
109
|
onClick: (0, _doc.setSelectedCardAppearance)('block'),
|
|
118
110
|
selected: currentAppearance === 'block',
|
|
119
111
|
testId: 'block-appearance',
|
|
@@ -133,37 +125,11 @@ var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
133
125
|
options.push(embedOption);
|
|
134
126
|
}
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
key: "link-toolbar-button-group",
|
|
142
|
-
options: options.map(function (option) {
|
|
143
|
-
return (0, _linkToolbarButtonGroupOptions.getButtonGroupOption)(intl, dispatchCommand, option);
|
|
144
|
-
})
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (viewChangingExperimentToolbarStyle === 'newDropdown') {
|
|
149
|
-
return /*#__PURE__*/_react.default.createElement(_LinkToolbarIconDropdown.LinkToolbarIconDropdown, {
|
|
150
|
-
key: "link-toolbar-icon-dropdown",
|
|
151
|
-
title: "Change view",
|
|
152
|
-
buttonTestId: "link-toolbar-appearance-button",
|
|
153
|
-
dispatchCommand: dispatchCommand,
|
|
154
|
-
options: options.map(function (option) {
|
|
155
|
-
return (0, _linkToolbarIconDropdownOptions.getIconDropdownOption)(intl, dispatchCommand, option);
|
|
156
|
-
})
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
var title = intl.formatMessage(currentAppearance ? _messages.messages[currentAppearance] : _messages.messages.url);
|
|
161
|
-
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
|
|
162
|
-
key: "link-toolbar",
|
|
163
|
-
buttonTestId: "link-toolbar-appearance-button",
|
|
164
|
-
title: title,
|
|
165
|
-
dispatchCommand: dispatchCommand,
|
|
166
|
-
options: options
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_LinkToolbarButtonGroup.LinkToolbarButtonGroup, {
|
|
129
|
+
key: "link-toolbar-button-group",
|
|
130
|
+
options: options.map(function (option) {
|
|
131
|
+
return (0, _linkToolbarButtonGroupOptions.getButtonGroupOption)(intl, dispatchCommand, option);
|
|
132
|
+
})
|
|
167
133
|
});
|
|
168
134
|
});
|
|
169
135
|
return _this;
|
|
@@ -188,14 +154,14 @@ exports.LinkToolbarAppearance = LinkToolbarAppearance;
|
|
|
188
154
|
var getUnavailableMessage = function getUnavailableMessage(state, intl) {
|
|
189
155
|
try {
|
|
190
156
|
var parentNode = state.selection.$from.node(1);
|
|
191
|
-
var parentName = intl.formatMessage(
|
|
192
|
-
var tooltip = intl.formatMessage(
|
|
157
|
+
var parentName = intl.formatMessage(_messages.default[parentNode.type.name]);
|
|
158
|
+
var tooltip = intl.formatMessage(_messages2.messages.displayOptionUnavailableInParentNode, {
|
|
193
159
|
node: parentName
|
|
194
160
|
});
|
|
195
161
|
return tooltip;
|
|
196
162
|
} catch (e) {
|
|
197
|
-
return intl.formatMessage(
|
|
198
|
-
node: intl.formatMessage(
|
|
163
|
+
return intl.formatMessage(_messages2.messages.displayOptionUnavailableInParentNode, {
|
|
164
|
+
node: intl.formatMessage(_messages.default.defaultBlockNode)
|
|
199
165
|
});
|
|
200
166
|
}
|
|
201
167
|
};
|
|
@@ -76,13 +76,15 @@ var findCardInfo = function findCardInfo(state) {
|
|
|
76
76
|
|
|
77
77
|
exports.findCardInfo = findCardInfo;
|
|
78
78
|
|
|
79
|
-
var transformUnsupportedBlockCardToInline = function transformUnsupportedBlockCardToInline(slice, state) {
|
|
79
|
+
var transformUnsupportedBlockCardToInline = function transformUnsupportedBlockCardToInline(slice, state, cardOptions) {
|
|
80
80
|
var _state$schema$nodes = state.schema.nodes,
|
|
81
81
|
blockCard = _state$schema$nodes.blockCard,
|
|
82
82
|
inlineCard = _state$schema$nodes.inlineCard;
|
|
83
83
|
var children = [];
|
|
84
84
|
(0, _slice.mapChildren)(slice.content, function (node, i, frag) {
|
|
85
|
-
|
|
85
|
+
var _cardOptions$allowBlo;
|
|
86
|
+
|
|
87
|
+
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)) {
|
|
86
88
|
children.push(inlineCard.createChecked(node.attrs, node.content, node.marks));
|
|
87
89
|
} else {
|
|
88
90
|
children.push(node);
|
|
@@ -90,5 +92,17 @@ var transformUnsupportedBlockCardToInline = function transformUnsupportedBlockCa
|
|
|
90
92
|
});
|
|
91
93
|
return new _prosemirrorModel.Slice(_prosemirrorModel.Fragment.fromArray(children), slice.openStart, slice.openEnd);
|
|
92
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* Function to determine if a block card is supported by the editor
|
|
97
|
+
* @param state
|
|
98
|
+
* @param frag
|
|
99
|
+
* @param allowBlockCards
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
exports.transformUnsupportedBlockCardToInline = transformUnsupportedBlockCardToInline;
|
|
93
105
|
|
|
94
|
-
|
|
106
|
+
var isBlockCardSupported = function isBlockCardSupported(state, frag, allowBlockCards) {
|
|
107
|
+
return allowBlockCards && (0, _nodes.isSupportedInParent)(state, frag);
|
|
108
|
+
};
|
|
@@ -29,7 +29,7 @@ var handleInit = function handleInit(initData, view, options) {
|
|
|
29
29
|
tr.setMeta('isRemote', true);
|
|
30
30
|
view.dispatch(tr);
|
|
31
31
|
} else if (json) {
|
|
32
|
-
applyRemoteSteps(json,
|
|
32
|
+
applyRemoteSteps(json, view);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -55,13 +55,13 @@ var applyRemoteData = function applyRemoteData(remoteData, view, options) {
|
|
|
55
55
|
userIds = _remoteData$userIds === void 0 ? [] : _remoteData$userIds;
|
|
56
56
|
|
|
57
57
|
if (json) {
|
|
58
|
-
applyRemoteSteps(json,
|
|
58
|
+
applyRemoteSteps(json, view, userIds, options);
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
exports.applyRemoteData = applyRemoteData;
|
|
63
63
|
|
|
64
|
-
var applyRemoteSteps = function applyRemoteSteps(json,
|
|
64
|
+
var applyRemoteSteps = function applyRemoteSteps(json, view, userIds, options) {
|
|
65
65
|
if (!json || !json.length) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
@@ -37,7 +37,9 @@ function getCopyButtonConfig(options) {
|
|
|
37
37
|
var state = options.state,
|
|
38
38
|
formatMessage = options.formatMessage,
|
|
39
39
|
onMouseEnter = options.onMouseEnter,
|
|
40
|
-
onMouseLeave = options.onMouseLeave
|
|
40
|
+
onMouseLeave = options.onMouseLeave,
|
|
41
|
+
onFocus = options.onFocus,
|
|
42
|
+
onBlur = options.onBlur;
|
|
41
43
|
|
|
42
44
|
var copyButtonState = _pluginKey.copyButtonPluginKey.getState(state);
|
|
43
45
|
|
|
@@ -49,11 +51,11 @@ function getCopyButtonConfig(options) {
|
|
|
49
51
|
// Note for future changes: these two handlers should perform
|
|
50
52
|
// the same action.
|
|
51
53
|
onMouseEnter: onMouseEnter || (0, _decoration.hoverDecoration)(options.nodeType, true, 'ak-editor-selected-node'),
|
|
52
|
-
onFocus: (0, _decoration.hoverDecoration)(options.nodeType, true, 'ak-editor-selected-node'),
|
|
54
|
+
onFocus: onFocus || (0, _decoration.hoverDecoration)(options.nodeType, true, 'ak-editor-selected-node'),
|
|
53
55
|
// Note for future changes: these two handlers should perform
|
|
54
56
|
// the same action.
|
|
55
57
|
onMouseLeave: (0, _commands.resetCopiedState)(options.nodeType, onMouseLeave),
|
|
56
|
-
onBlur: (0, _commands.resetCopiedState)(options.nodeType)
|
|
58
|
+
onBlur: (0, _commands.resetCopiedState)(options.nodeType, onBlur)
|
|
57
59
|
};
|
|
58
60
|
} else {
|
|
59
61
|
buttonActionHandlers = {
|
|
@@ -25,8 +25,6 @@ var _main = _interopRequireDefault(require("./pm-plugins/main"));
|
|
|
25
25
|
|
|
26
26
|
var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
|
|
27
27
|
|
|
28
|
-
var _featureFlagsContext = require("../feature-flags-context");
|
|
29
|
-
|
|
30
28
|
var _editorDisabled = require("../editor-disabled");
|
|
31
29
|
|
|
32
30
|
var _assets = require("../quick-insert/assets");
|
|
@@ -84,8 +82,7 @@ var datePlugin = function datePlugin() {
|
|
|
84
82
|
popupsMountPoint = _ref.popupsMountPoint,
|
|
85
83
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
86
84
|
popupsScrollableElement = _ref.popupsScrollableElement;
|
|
87
|
-
var
|
|
88
|
-
dispatch = editorView.dispatch;
|
|
85
|
+
var dispatch = editorView.dispatch;
|
|
89
86
|
var domAtPos = editorView.domAtPos.bind(editorView);
|
|
90
87
|
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
91
88
|
plugins: {
|
|
@@ -104,14 +101,11 @@ var datePlugin = function datePlugin() {
|
|
|
104
101
|
isNew = datePlugin.isNew,
|
|
105
102
|
focusDateInput = datePlugin.focusDateInput;
|
|
106
103
|
var element = (0, _prosemirrorUtils.findDomRefAtPos)(showDatePickerAt, domAtPos);
|
|
107
|
-
var allFlags = (0, _featureFlagsContext.getFeatureFlags)(state);
|
|
108
|
-
var keyboardAccessibleDatepicker = allFlags.keyboardAccessibleDatepicker;
|
|
109
104
|
return /*#__PURE__*/_react.default.createElement(DatePicker, {
|
|
110
105
|
mountTo: popupsMountPoint,
|
|
111
106
|
boundariesElement: popupsBoundariesElement,
|
|
112
107
|
scrollableElement: popupsScrollableElement,
|
|
113
108
|
key: showDatePickerAt,
|
|
114
|
-
showTextField: keyboardAccessibleDatepicker,
|
|
115
109
|
element: element,
|
|
116
110
|
isNew: isNew,
|
|
117
111
|
autoFocus: focusDateInput,
|
|
@@ -143,7 +143,6 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
143
143
|
mountTo = _this$props.mountTo,
|
|
144
144
|
boundariesElement = _this$props.boundariesElement,
|
|
145
145
|
scrollableElement = _this$props.scrollableElement,
|
|
146
|
-
showTextField = _this$props.showTextField,
|
|
147
146
|
intl = _this$props.intl,
|
|
148
147
|
dispatchAnalyticsEvent = _this$props.dispatchAnalyticsEvent,
|
|
149
148
|
isNew = _this$props.isNew,
|
|
@@ -181,7 +180,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
181
180
|
scrollableElement: scrollableElement
|
|
182
181
|
}, (0, _react2.jsx)("div", {
|
|
183
182
|
css: popupContentWrapper
|
|
184
|
-
},
|
|
183
|
+
}, (0, _react2.jsx)(_datePickerInput.default, {
|
|
185
184
|
date: date,
|
|
186
185
|
onNewDate: this.handleNewDate,
|
|
187
186
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -38,8 +38,6 @@ var _assets = require("../quick-insert/assets");
|
|
|
38
38
|
|
|
39
39
|
var _emoji3 = require("./nodeviews/emoji");
|
|
40
40
|
|
|
41
|
-
var _EmojiContextProvider = require("./ui/EmojiContextProvider");
|
|
42
|
-
|
|
43
41
|
var _messages = require("../insert-block/ui/ToolbarInsertBlock/messages");
|
|
44
42
|
|
|
45
43
|
var _openTypeaheadAtCursor = require("../type-ahead/transforms/open-typeahead-at-cursor");
|
|
@@ -56,18 +54,13 @@ var emojiToTypeaheadItem = function emojiToTypeaheadItem(emoji, emojiProvider) {
|
|
|
56
54
|
var isSelected = _ref.isSelected,
|
|
57
55
|
onClick = _ref.onClick,
|
|
58
56
|
onHover = _ref.onHover;
|
|
59
|
-
return (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
selected: isSelected,
|
|
67
|
-
onMouseMove: onHover,
|
|
68
|
-
onSelection: onClick
|
|
69
|
-
}))
|
|
70
|
-
);
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_emoji2.EmojiTypeAheadItem, {
|
|
58
|
+
emoji: emoji,
|
|
59
|
+
selected: isSelected,
|
|
60
|
+
onMouseMove: onHover,
|
|
61
|
+
onSelection: onClick,
|
|
62
|
+
emojiProvider: emojiProvider
|
|
63
|
+
});
|
|
71
64
|
},
|
|
72
65
|
emoji: emoji
|
|
73
66
|
};
|
|
@@ -5,6 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.containsClass = containsClass;
|
|
8
9
|
exports.createPlugin = void 0;
|
|
9
10
|
|
|
10
11
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
@@ -24,7 +25,9 @@ var _classNames = require("../ui/class-names");
|
|
|
24
25
|
var _pluginFactory = require("./plugin-factory");
|
|
25
26
|
|
|
26
27
|
function containsClass(element, className) {
|
|
27
|
-
|
|
28
|
+
var _element$classList;
|
|
29
|
+
|
|
30
|
+
return Boolean(element === null || element === void 0 ? void 0 : (_element$classList = element.classList) === null || _element$classList === void 0 ? void 0 : _element$classList.contains(className));
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
var createPlugin = function createPlugin(dispatch, getIntl) {
|
|
@@ -47,6 +47,7 @@ var getToolbarConfig = function getToolbarConfig(state, _ref) {
|
|
|
47
47
|
id: 'editor.expand.delete',
|
|
48
48
|
type: 'button',
|
|
49
49
|
appearance: 'danger',
|
|
50
|
+
focusEditoronEnter: true,
|
|
50
51
|
icon: _remove.default,
|
|
51
52
|
onClick: (0, _commands.deleteExpand)(),
|
|
52
53
|
onMouseEnter: (0, _decoration.hoverDecoration)([nestedExpand, expand], true),
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.removeExtension = exports.forceAutoSave = exports.clearEditingContext = void 0;
|
|
8
|
+
exports.removeExtension = exports.removeDescendantNodes = exports.forceAutoSave = exports.clearEditingContext = void 0;
|
|
9
9
|
exports.setEditingContextToContextPanel = setEditingContextToContextPanel;
|
|
10
10
|
exports.updateExtensionLayout = exports.showContextPanel = void 0;
|
|
11
11
|
exports.updateState = updateState;
|
|
@@ -20,6 +20,8 @@ var _pluginFactory = require("./plugin-factory");
|
|
|
20
20
|
|
|
21
21
|
var _utils = require("./utils");
|
|
22
22
|
|
|
23
|
+
var _utils2 = require("@atlaskit/editor-common/utils");
|
|
24
|
+
|
|
23
25
|
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; }
|
|
24
26
|
|
|
25
27
|
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; }
|
|
@@ -109,4 +111,17 @@ var removeExtension = function removeExtension() {
|
|
|
109
111
|
});
|
|
110
112
|
};
|
|
111
113
|
|
|
112
|
-
exports.removeExtension = removeExtension;
|
|
114
|
+
exports.removeExtension = removeExtension;
|
|
115
|
+
|
|
116
|
+
var removeDescendantNodes = function removeDescendantNodes(sourceNode) {
|
|
117
|
+
return (0, _pluginFactory.createCommand)({
|
|
118
|
+
type: 'UPDATE_STATE',
|
|
119
|
+
data: {
|
|
120
|
+
element: undefined
|
|
121
|
+
}
|
|
122
|
+
}, function (tr, state) {
|
|
123
|
+
return sourceNode ? (0, _utils2.removeConnectedNodes)(state, sourceNode) : tr;
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
exports.removeDescendantNodes = removeDescendantNodes;
|
|
@@ -327,6 +327,16 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
327
327
|
if (!selectedExtension) {
|
|
328
328
|
if (showContextPanel) {
|
|
329
329
|
(0, _commands.clearEditingContext)(state, dispatch);
|
|
330
|
+
} // if an extension is no longer selected, but the plugin has cached the previous selected extension id/ref
|
|
331
|
+
// then this should clear those values so that if an exention is selected again, then this sees it as a change
|
|
332
|
+
// and updates the state correctly.
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
if (!!localId || !!element) {
|
|
336
|
+
(0, _commands.updateState)({
|
|
337
|
+
localId: undefined,
|
|
338
|
+
element: undefined
|
|
339
|
+
})(state, dispatch);
|
|
330
340
|
}
|
|
331
341
|
|
|
332
342
|
return;
|
|
@@ -45,15 +45,25 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
45
45
|
defaultMessage: 'Edit',
|
|
46
46
|
description: 'Edit the properties for this extension.'
|
|
47
47
|
},
|
|
48
|
+
deleteElementTitle: {
|
|
49
|
+
id: 'fabric.editor.extension.deleteElementTitle',
|
|
50
|
+
defaultMessage: 'Delete element',
|
|
51
|
+
description: 'Title text for confirm modal when deleting an extension linked to a data consumer.'
|
|
52
|
+
},
|
|
48
53
|
confirmDeleteLinkedModalOKButton: {
|
|
49
54
|
id: 'fabric.editor.extension.confirmDeleteLinkedModalOKButton',
|
|
50
|
-
defaultMessage: '
|
|
55
|
+
defaultMessage: 'Delete',
|
|
51
56
|
description: 'Action button label for confirm modal when deleting an extension linked to a data consumer.'
|
|
52
57
|
},
|
|
53
58
|
confirmDeleteLinkedModalMessage: {
|
|
54
59
|
id: 'fabric.editor.extension.confirmDeleteLinkedModalMessage',
|
|
55
|
-
defaultMessage: '
|
|
60
|
+
defaultMessage: 'Deleting {nodeName} will break anything connected to it.',
|
|
56
61
|
description: 'Message for confirm modal when deleting a extension linked to an data consumer.'
|
|
62
|
+
},
|
|
63
|
+
confirmModalCheckboxLabel: {
|
|
64
|
+
id: 'fabric.editor.floatingToolbar.confirmModalCheckboxLabel',
|
|
65
|
+
defaultMessage: 'Also delete connected elements',
|
|
66
|
+
description: 'checkbox label text'
|
|
57
67
|
}
|
|
58
68
|
});
|
|
59
69
|
exports.messages = messages;
|
|
@@ -127,7 +137,8 @@ var editButton = function editButton(formatMessage, extensionState) {
|
|
|
127
137
|
return true;
|
|
128
138
|
},
|
|
129
139
|
title: formatMessage(messages.edit),
|
|
130
|
-
tabIndex: null
|
|
140
|
+
tabIndex: null,
|
|
141
|
+
focusEditoronEnter: true
|
|
131
142
|
}];
|
|
132
143
|
};
|
|
133
144
|
|
|
@@ -146,9 +157,23 @@ var getToolbarConfig = function getToolbarConfig() {
|
|
|
146
157
|
var confirmDialog;
|
|
147
158
|
|
|
148
159
|
if ((0, _utils2.isReferencedSource)(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node)) {
|
|
149
|
-
confirmDialog = {
|
|
150
|
-
|
|
151
|
-
|
|
160
|
+
confirmDialog = function confirmDialog() {
|
|
161
|
+
return {
|
|
162
|
+
title: formatMessage(messages.deleteElementTitle),
|
|
163
|
+
okButtonLabel: formatMessage(messages.confirmDeleteLinkedModalOKButton),
|
|
164
|
+
message: formatMessage(messages.confirmDeleteLinkedModalMessage, {
|
|
165
|
+
nodeName: (0, _utils2.getNodeName)(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node)
|
|
166
|
+
}),
|
|
167
|
+
isReferentialityDialog: true,
|
|
168
|
+
getChildrenInfo: function getChildrenInfo() {
|
|
169
|
+
return (0, _utils2.getChildrenInfo)(state, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node);
|
|
170
|
+
},
|
|
171
|
+
checkboxLabel: formatMessage(messages.confirmModalCheckboxLabel),
|
|
172
|
+
onConfirm: function onConfirm() {
|
|
173
|
+
var isChecked = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
174
|
+
return clickWithCheckboxHandler(isChecked, extensionObj === null || extensionObj === void 0 ? void 0 : extensionObj.node);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
152
177
|
};
|
|
153
178
|
}
|
|
154
179
|
|
|
@@ -183,6 +208,7 @@ var getToolbarConfig = function getToolbarConfig() {
|
|
|
183
208
|
onMouseLeave: (0, _decoration.hoverDecoration)(nodeType, false),
|
|
184
209
|
onFocus: (0, _decoration.hoverDecoration)(nodeType, true),
|
|
185
210
|
onBlur: (0, _decoration.hoverDecoration)(nodeType, false),
|
|
211
|
+
focusEditoronEnter: true,
|
|
186
212
|
title: formatMessage(_messages.default.remove),
|
|
187
213
|
tabIndex: null,
|
|
188
214
|
confirmDialog: confirmDialog
|
|
@@ -195,4 +221,20 @@ var getToolbarConfig = function getToolbarConfig() {
|
|
|
195
221
|
};
|
|
196
222
|
};
|
|
197
223
|
|
|
198
|
-
exports.getToolbarConfig = getToolbarConfig;
|
|
224
|
+
exports.getToolbarConfig = getToolbarConfig;
|
|
225
|
+
|
|
226
|
+
var clickWithCheckboxHandler = function clickWithCheckboxHandler(isChecked, node) {
|
|
227
|
+
return function (state, dispatch) {
|
|
228
|
+
if (!node) {
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (!isChecked) {
|
|
233
|
+
(0, _commands.removeExtension)()(state, dispatch);
|
|
234
|
+
} else {
|
|
235
|
+
(0, _commands.removeDescendantNodes)(node)(state, dispatch);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return true;
|
|
239
|
+
};
|
|
240
|
+
};
|