@atlaskit/editor-core 151.2.0 → 152.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +108 -0
- package/dist/cjs/create-editor/ReactEditorView.js +22 -8
- package/dist/cjs/create-editor/create-plugins-list.js +25 -9
- package/dist/cjs/labs/next/presets/cxhtml.js +1 -2
- package/dist/cjs/nodeviews/ReactNodeView.js +2 -2
- package/dist/cjs/nodeviews/SelectionBasedNodeView.js +6 -0
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/annotation/utils.js +19 -8
- package/dist/cjs/plugins/avatar-group/index.js +2 -1
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +5 -2
- package/dist/cjs/plugins/before-primaryToolbar/index.js +26 -0
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +28 -0
- package/dist/cjs/plugins/extension/extension-api.js +10 -2
- package/dist/cjs/plugins/extension/ui/styles.js +1 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +172 -0
- package/dist/cjs/plugins/find-replace/index.js +14 -137
- package/dist/cjs/plugins/find-replace/ui/Find.js +16 -9
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +9 -2
- package/dist/cjs/plugins/find-replace/ui/Replace.js +11 -3
- package/dist/cjs/plugins/find-replace/ui/styles.js +44 -35
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +10 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/cjs/plugins/fragment/index.js +34 -0
- package/dist/cjs/plugins/fragment/plugin-key.js +11 -0
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/cjs/plugins/index.js +16 -0
- package/dist/cjs/plugins/list/actions/conversions.js +39 -71
- package/dist/cjs/plugins/list/transforms.js +7 -1
- package/dist/cjs/plugins/media/index.js +2 -3
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +3 -1
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +12 -5
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +6 -4
- package/dist/cjs/plugins/media/nodeviews/styles.js +6 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +49 -15
- package/dist/cjs/plugins/media/toolbar/commands.js +59 -0
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +7 -2
- package/dist/cjs/plugins/media/toolbar/index.js +90 -3
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +9 -1
- package/dist/cjs/plugins/media/utils/media-common.js +1 -1
- package/dist/cjs/plugins/media/utils/media-files.js +5 -1
- package/dist/cjs/plugins/panel/actions.js +2 -2
- package/dist/cjs/plugins/panel/index.js +3 -3
- package/dist/cjs/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/cjs/plugins/panel/toolbar.js +10 -5
- package/dist/cjs/plugins/panel/utils.js +15 -0
- package/dist/cjs/plugins/rank.js +3 -2
- package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +49 -1
- package/dist/cjs/plugins/status/ui/statusPicker.js +4 -2
- package/dist/cjs/plugins/table/commands/insert.js +1 -0
- package/dist/cjs/plugins/table/index.js +3 -2
- package/dist/cjs/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -3
- package/dist/cjs/plugins/table/pm-plugins/main.js +26 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/cjs/plugins/table/transforms/column-width.js +14 -5
- package/dist/cjs/plugins/table/transforms/fix-tables.js +43 -6
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/cjs/plugins/table/ui/common-styles.css.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +1 -1
- package/dist/cjs/plugins/table/ui/messages.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/cjs/plugins/text-formatting/index.js +2 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +1 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +77 -26
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +32 -9
- package/dist/cjs/ui/ColorPalette/Color/index.js +8 -18
- package/dist/cjs/ui/ColorPalette/index.js +7 -4
- package/dist/cjs/ui/ColorPickerButton/index.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +114 -61
- package/dist/cjs/ui/ConfigPanel/FormContent.js +39 -26
- package/dist/cjs/ui/ConfigPanel/transformers.js +490 -248
- package/dist/cjs/ui/ConfigPanel/utils.js +2 -10
- package/dist/cjs/ui/DropdownMenu/index.js +3 -1
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/cjs/ui/Resizer/index.js +9 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +19 -8
- package/dist/es2019/create-editor/create-plugins-list.js +26 -10
- package/dist/es2019/labs/next/presets/cxhtml.js +1 -2
- package/dist/es2019/nodeviews/ReactNodeView.js +1 -1
- package/dist/es2019/nodeviews/SelectionBasedNodeView.js +11 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/annotation/utils.js +18 -7
- package/dist/es2019/plugins/avatar-group/index.js +2 -1
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -2
- package/dist/es2019/plugins/before-primaryToolbar/index.js +15 -0
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +12 -0
- package/dist/es2019/plugins/extension/extension-api.js +9 -2
- package/dist/es2019/plugins/extension/ui/styles.js +6 -0
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +152 -0
- package/dist/es2019/plugins/find-replace/index.js +15 -128
- package/dist/es2019/plugins/find-replace/ui/Find.js +18 -10
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +11 -3
- package/dist/es2019/plugins/find-replace/ui/Replace.js +12 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +37 -47
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +10 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/es2019/plugins/fragment/index.js +22 -0
- package/dist/es2019/plugins/fragment/plugin-key.js +2 -0
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/es2019/plugins/index.js +2 -0
- package/dist/es2019/plugins/list/actions/conversions.js +38 -69
- package/dist/es2019/plugins/list/transforms.js +5 -1
- package/dist/es2019/plugins/media/index.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +2 -1
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +8 -4
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +7 -5
- package/dist/es2019/plugins/media/nodeviews/styles.js +2 -0
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +32 -17
- package/dist/es2019/plugins/media/toolbar/commands.js +47 -0
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +6 -2
- package/dist/es2019/plugins/media/toolbar/index.js +90 -3
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +7 -1
- package/dist/es2019/plugins/media/utils/media-common.js +1 -1
- package/dist/es2019/plugins/media/utils/media-files.js +6 -1
- package/dist/es2019/plugins/panel/actions.js +2 -2
- package/dist/es2019/plugins/panel/index.js +5 -5
- package/dist/es2019/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/es2019/plugins/panel/toolbar.js +10 -5
- package/dist/es2019/plugins/panel/utils.js +8 -1
- package/dist/es2019/plugins/rank.js +3 -2
- package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +48 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +4 -2
- package/dist/es2019/plugins/table/commands/insert.js +1 -2
- package/dist/es2019/plugins/table/index.js +2 -1
- package/dist/es2019/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +25 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/es2019/plugins/table/transforms/column-width.js +13 -3
- package/dist/es2019/plugins/table/transforms/fix-tables.js +43 -5
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/es2019/plugins/table/ui/common-styles.css.js +5 -1
- package/dist/es2019/plugins/table/ui/consts.js +2 -2
- package/dist/es2019/plugins/table/ui/messages.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/es2019/plugins/text-formatting/index.js +3 -2
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +60 -27
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +51 -7
- package/dist/es2019/ui/ColorPalette/Color/index.js +9 -18
- package/dist/es2019/ui/ColorPalette/index.js +7 -4
- package/dist/es2019/ui/ColorPickerButton/index.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +101 -49
- package/dist/es2019/ui/ConfigPanel/FormContent.js +35 -26
- package/dist/es2019/ui/ConfigPanel/transformers.js +243 -72
- package/dist/es2019/ui/ConfigPanel/utils.js +1 -2
- package/dist/es2019/ui/Dropdown/index.js +2 -1
- package/dist/es2019/ui/DropdownMenu/index.js +7 -3
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/es2019/ui/Resizer/index.js +9 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +22 -8
- package/dist/esm/create-editor/create-plugins-list.js +26 -10
- package/dist/esm/labs/next/presets/cxhtml.js +1 -2
- package/dist/esm/nodeviews/ReactNodeView.js +2 -2
- package/dist/esm/nodeviews/SelectionBasedNodeView.js +7 -0
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/annotation/utils.js +18 -7
- package/dist/esm/plugins/avatar-group/index.js +2 -1
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +5 -2
- package/dist/esm/plugins/before-primaryToolbar/index.js +15 -0
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +12 -0
- package/dist/esm/plugins/extension/extension-api.js +9 -2
- package/dist/esm/plugins/extension/ui/styles.js +1 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +155 -0
- package/dist/esm/plugins/find-replace/index.js +14 -131
- package/dist/esm/plugins/find-replace/ui/Find.js +17 -10
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +10 -3
- package/dist/esm/plugins/find-replace/ui/Replace.js +11 -4
- package/dist/esm/plugins/find-replace/ui/styles.js +39 -18
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +9 -4
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/esm/plugins/fragment/index.js +22 -0
- package/dist/esm/plugins/fragment/plugin-key.js +2 -0
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/esm/plugins/index.js +2 -0
- package/dist/esm/plugins/list/actions/conversions.js +38 -71
- package/dist/esm/plugins/list/transforms.js +7 -1
- package/dist/esm/plugins/media/index.js +2 -3
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +11 -6
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +7 -5
- package/dist/esm/plugins/media/nodeviews/styles.js +2 -0
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +47 -16
- package/dist/esm/plugins/media/toolbar/commands.js +45 -0
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +6 -2
- package/dist/esm/plugins/media/toolbar/index.js +88 -3
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +9 -1
- package/dist/esm/plugins/media/utils/media-common.js +1 -1
- package/dist/esm/plugins/media/utils/media-files.js +6 -1
- package/dist/esm/plugins/panel/actions.js +2 -2
- package/dist/esm/plugins/panel/index.js +5 -5
- package/dist/esm/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/esm/plugins/panel/toolbar.js +9 -4
- package/dist/esm/plugins/panel/utils.js +13 -0
- package/dist/esm/plugins/rank.js +3 -2
- package/dist/esm/plugins/selection/pm-plugins/selection-main.js +50 -1
- package/dist/esm/plugins/status/ui/statusPicker.js +4 -2
- package/dist/esm/plugins/table/commands/insert.js +1 -2
- package/dist/esm/plugins/table/index.js +3 -2
- package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +27 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/esm/plugins/table/transforms/column-width.js +13 -3
- package/dist/esm/plugins/table/transforms/fix-tables.js +42 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/esm/plugins/table/ui/common-styles.css.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +2 -2
- package/dist/esm/plugins/table/ui/messages.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/esm/plugins/text-formatting/index.js +3 -2
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +67 -27
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +20 -7
- package/dist/esm/ui/ColorPalette/Color/index.js +9 -16
- package/dist/esm/ui/ColorPalette/index.js +7 -4
- package/dist/esm/ui/ColorPickerButton/index.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +113 -62
- package/dist/esm/ui/ConfigPanel/FormContent.js +39 -26
- package/dist/esm/ui/ConfigPanel/transformers.js +488 -248
- package/dist/esm/ui/ConfigPanel/utils.js +1 -6
- package/dist/esm/ui/Dropdown/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +7 -3
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/esm/ui/Resizer/index.js +9 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/nodeviews/ReactNodeView.d.ts +1 -1
- package/dist/types/nodeviews/SelectionBasedNodeView.d.ts +1 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +7 -1
- package/dist/types/plugins/annotation/utils.d.ts +1 -1
- package/dist/types/plugins/avatar-group/index.d.ts +1 -0
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +1 -0
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +5 -0
- package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +5 -0
- package/dist/types/plugins/code-block/types.d.ts +1 -1
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +15 -0
- package/dist/types/plugins/find-replace/index.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/Find.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/Replace.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/styles.d.ts +5 -14
- package/dist/types/plugins/floating-toolbar/ui/EmojiPickerButton.d.ts +1 -1
- package/dist/types/plugins/fragment/index.d.ts +5 -0
- package/dist/types/plugins/fragment/plugin-key.d.ts +2 -0
- package/dist/types/plugins/index.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +3 -2
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/styles.d.ts +2 -0
- package/dist/types/plugins/media/toolbar/commands.d.ts +3 -0
- package/dist/types/plugins/media/toolbar/filePreviewItem.d.ts +2 -0
- package/dist/types/plugins/media/types.d.ts +0 -1
- package/dist/types/plugins/panel/actions.d.ts +1 -1
- package/dist/types/plugins/panel/types.d.ts +8 -2
- package/dist/types/plugins/quick-insert/index.d.ts +2 -1
- package/dist/types/plugins/table/commands/insert.d.ts +3 -0
- package/dist/types/plugins/table/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -0
- package/dist/types/plugins/table/transforms/column-width.d.ts +4 -1
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +3 -2
- package/dist/types/plugins/table/types.d.ts +8 -0
- package/dist/types/plugins/table/ui/consts.d.ts +1 -1
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +11 -1
- package/dist/types/types/feature-flags.d.ts +13 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +10 -1
- package/dist/types/ui/ColorPalette/Color/index.d.ts +8 -5
- package/dist/types/ui/ColorPalette/index.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/transformers.d.ts +7 -1
- package/dist/types/ui/ConfigPanel/utils.d.ts +0 -1
- package/dist/types/ui/Resizer/index.d.ts +1 -0
- package/package.json +33 -29
- package/dist/cjs/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -38
- package/dist/es2019/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -28
- package/dist/esm/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -28
- package/dist/types/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.d.ts +0 -1
|
@@ -16,11 +16,18 @@ export const panelAttrsToDom = (attrs, allowCustomPanel) => {
|
|
|
16
16
|
const isCustomPanel = panelType === PanelType.CUSTOM && allowCustomPanel;
|
|
17
17
|
const style = panelColor && isCustomPanel ? `background-color: ${panelColor}` : '';
|
|
18
18
|
const hasIcon = !isCustomPanel || !!panelIcon;
|
|
19
|
-
|
|
19
|
+
let panelAttrs = {
|
|
20
20
|
class: PanelSharedCssClassName.prefix,
|
|
21
21
|
'data-panel-type': panelType || PanelType.INFO,
|
|
22
22
|
style
|
|
23
23
|
};
|
|
24
|
+
|
|
25
|
+
if (panelColor && isCustomPanel) {
|
|
26
|
+
panelAttrs = { ...panelAttrs,
|
|
27
|
+
'data-panel-color': panelColor
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
const iconDiv = ['div', {
|
|
25
32
|
class: PanelSharedCssClassName.icon
|
|
26
33
|
}];
|
|
@@ -6,9 +6,10 @@ export default {
|
|
|
6
6
|
// https://product-fabric.atlassian.net/wiki/spaces/E/pages/1113098008/Selection+Guide#Special-Cases
|
|
7
7
|
'expandKeymap', 'tableSelectionKeymap', 'tableKeymap', 'captionKeymap', // selection keymap needs to be above gap cursor keymap so it can set node selections from
|
|
8
8
|
// left/right arrows
|
|
9
|
-
'selectionKeymap', 'gapCursorKeymap', 'gapCursor', 'syncUrlText', 'fakeCursorToolbarPlugin', 'hyperLink', 'table', 'tableDecorations', 'hyperlinkInputRule', 'tablePMColResizing', 'hyperlinkKeymap', 'tableColResizing', 'undoRedoKeyMap', 'blockTypeKeyMap', 'tableEditing', 'filterStepsPlugin', 'pmCollab', 'collab', 'ruleInputRule', 'ruleKeymap', 'panel', 'media', 'mediaKeymap', 'mediaSingleKeymap', 'mediaEditor', 'unsupportedContent', 'jiraIssue', 'fakeTextCursor', 'helpDialog', 'helpDialogKeymap', 'macro', 'expand', 'extension', 'layout', 'contextPanel', 'floatingToolbar', 'clearMarksOnChange', 'reactNodeView', 'history', 'undoRedoPlugin', 'codeBlockIndent', 'placeholder', 'width', 'maxContentSize', 'multilineContent', 'grid', 'mobileDimensions', 'scrollGutterPlugin', 'analytics', 'findReplace', 'selection', 'avatarGroup', 'viewUpdateSubscription', 'inlineCode'],
|
|
9
|
+
'selectionKeymap', 'gapCursorKeymap', 'gapCursor', 'syncUrlText', 'fakeCursorToolbarPlugin', 'hyperLink', 'table', 'tableDecorations', 'hyperlinkInputRule', 'tablePMColResizing', 'hyperlinkKeymap', 'tableColResizing', 'undoRedoKeyMap', 'blockTypeKeyMap', 'tableEditing', 'filterStepsPlugin', 'pmCollab', 'collab', 'ruleInputRule', 'ruleKeymap', 'panel', 'media', 'mediaKeymap', 'mediaSingleKeymap', 'mediaEditor', 'unsupportedContent', 'jiraIssue', 'fakeTextCursor', 'helpDialog', 'helpDialogKeymap', 'macro', 'expand', 'extension', 'layout', 'contextPanel', 'floatingToolbar', 'clearMarksOnChange', 'reactNodeView', 'history', 'undoRedoPlugin', 'codeBlockIndent', 'placeholder', 'width', 'maxContentSize', 'multilineContent', 'grid', 'mobileDimensions', 'scrollGutterPlugin', 'analytics', 'findReplace', 'selection', 'avatarGroup', 'viewUpdateSubscription', 'beforePrimaryToolbar', 'inlineCode'],
|
|
10
10
|
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'rule', 'panel', 'mention', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'unsupportedBlock', 'unsupportedInline', 'confluenceJiraIssue', 'hardBreak', 'emoji', 'placeholder', 'mediaSingle', 'mediaGroup', 'table', 'expand', 'nestedExpand', 'media', 'tableHeader', 'decisionList', 'tableRow', 'decisionItem', 'tableCell', 'taskList', 'taskItem', 'extension', 'bodiedExtension', 'inlineExtension', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard'],
|
|
11
|
-
marks: [//
|
|
11
|
+
marks: [// Fragment mark is both for inline and block elements
|
|
12
|
+
'fragment', // Inline marks
|
|
12
13
|
'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'typeAheadQuery', // Block marks
|
|
13
14
|
'alignment', 'breakout', 'indentation', 'annotation', //Unsupported mark
|
|
14
15
|
'unsupportedMark', 'unsupportedNodeAttribute']
|
|
@@ -8,6 +8,25 @@ export const getInitialState = state => ({
|
|
|
8
8
|
decorationSet: getDecorations(state.tr),
|
|
9
9
|
selection: state.selection
|
|
10
10
|
});
|
|
11
|
+
|
|
12
|
+
const toggleContentEditable = (node, root = false) => {
|
|
13
|
+
if (root || node.getAttribute('contenteditable') === 'true') {
|
|
14
|
+
const wasTrue = node.getAttribute('contenteditable') === 'true';
|
|
15
|
+
node.setAttribute('contenteditable', 'false');
|
|
16
|
+
requestAnimationFrame(() => {
|
|
17
|
+
if (wasTrue) {
|
|
18
|
+
node.setAttribute('contenteditable', 'true');
|
|
19
|
+
} else {
|
|
20
|
+
node.removeAttribute('contenteditable');
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
} // any children with contenteditable = true block selection from proceeding
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const children = Array.from(node.children);
|
|
27
|
+
children.forEach(child => toggleContentEditable(child));
|
|
28
|
+
};
|
|
29
|
+
|
|
11
30
|
export const createPlugin = (dispatch, dispatchAnalyticsEvent, options = {}) => {
|
|
12
31
|
return new Plugin({
|
|
13
32
|
key: selectionPluginKey,
|
|
@@ -95,10 +114,13 @@ export const createPlugin = (dispatch, dispatchAnalyticsEvent, options = {}) =>
|
|
|
95
114
|
return false;
|
|
96
115
|
},
|
|
97
116
|
keydown: (editorView, event) => {
|
|
98
|
-
|
|
117
|
+
const {
|
|
118
|
+
state
|
|
119
|
+
} = editorView; // Firefox bugfix to bypass issue with editing text adjacent to a DOM node with
|
|
99
120
|
// contenteditable="false". (See https://product-fabric.atlassian.net/browse/ED-9452)
|
|
100
121
|
// On keypress, if the head of cursor selection touches a node with contenteditable="false",
|
|
101
122
|
// we temporarily remove the attribute, wait one tick, then restore it with its original value.
|
|
123
|
+
|
|
102
124
|
if (browser.gecko) {
|
|
103
125
|
const node = editorView.nodeDOM(editorView.state.selection.head);
|
|
104
126
|
|
|
@@ -108,6 +130,31 @@ export const createPlugin = (dispatch, dispatchAnalyticsEvent, options = {}) =>
|
|
|
108
130
|
node.setAttribute('contenteditable', 'false');
|
|
109
131
|
});
|
|
110
132
|
}
|
|
133
|
+
} // Bugfix for block ReactNodeViews like table and extension
|
|
134
|
+
// They could not be selected with Shift + ArrowDown/ArrowUp
|
|
135
|
+
// Fixed when contenteditable = false, but then you couldn't edit their contents
|
|
136
|
+
// Therefore, briefly set contenteditable=false to allow the selection through, then set it back to true
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
if (event instanceof KeyboardEvent && event.shiftKey && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {
|
|
140
|
+
let pos;
|
|
141
|
+
|
|
142
|
+
if (event.key === 'ArrowDown') {
|
|
143
|
+
pos = state.selection.$head.after();
|
|
144
|
+
} else {
|
|
145
|
+
pos = state.selection.$head.before() - 1; // block extensions only take up one position, dont need to get before()
|
|
146
|
+
|
|
147
|
+
if (!editorView.nodeDOM(pos)) {
|
|
148
|
+
pos = state.doc.resolve(pos).before();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const node = editorView.nodeDOM(pos);
|
|
153
|
+
|
|
154
|
+
if (node instanceof HTMLDivElement && node.className.includes('View-content-wrap') // class added by ReactNodeView
|
|
155
|
+
) {
|
|
156
|
+
toggleContentEditable(node, true);
|
|
157
|
+
}
|
|
111
158
|
}
|
|
112
159
|
|
|
113
160
|
return false;
|
|
@@ -203,7 +203,8 @@ export class StatusPickerWithoutAnalytcs extends React.Component {
|
|
|
203
203
|
} = this.props;
|
|
204
204
|
const {
|
|
205
205
|
color,
|
|
206
|
-
text
|
|
206
|
+
text,
|
|
207
|
+
localId
|
|
207
208
|
} = this.state;
|
|
208
209
|
return target && /*#__PURE__*/React.createElement(PopupWithListeners, {
|
|
209
210
|
target: target,
|
|
@@ -221,7 +222,8 @@ export class StatusPickerWithoutAnalytcs extends React.Component {
|
|
|
221
222
|
onColorClick: this.onColorClick,
|
|
222
223
|
onColorHover: this.onColorHover,
|
|
223
224
|
onTextChanged: this.onTextChanged,
|
|
224
|
-
onEnter: this.onEnter
|
|
225
|
+
onEnter: this.onEnter,
|
|
226
|
+
localId: localId
|
|
225
227
|
})));
|
|
226
228
|
}
|
|
227
229
|
|
|
@@ -22,7 +22,7 @@ function addColumnAtCustomStep(column) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function addColumnAt(column, allowAddColumnCustomStep = false, view) {
|
|
25
|
+
export function addColumnAt(column, allowAddColumnCustomStep = false, view) {
|
|
26
26
|
return tr => {
|
|
27
27
|
let updatedTr = tr;
|
|
28
28
|
|
|
@@ -44,7 +44,6 @@ function addColumnAt(column, allowAddColumnCustomStep = false, view) {
|
|
|
44
44
|
} // :: (EditorState, dispatch: ?(tr: Transaction)) → bool
|
|
45
45
|
// Command to add a column before the column with the selection.
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
export const addColumnBefore = (state, dispatch, view) => {
|
|
49
48
|
const table = findTable(state.selection);
|
|
50
49
|
|
|
@@ -49,6 +49,7 @@ const tablesPlugin = options => ({
|
|
|
49
49
|
return [{
|
|
50
50
|
name: 'table',
|
|
51
51
|
plugin: ({
|
|
52
|
+
dispatchAnalyticsEvent,
|
|
52
53
|
dispatch,
|
|
53
54
|
portalProviderAPI,
|
|
54
55
|
eventDispatcher
|
|
@@ -60,7 +61,7 @@ const tablesPlugin = options => ({
|
|
|
60
61
|
breakoutEnabled,
|
|
61
62
|
tableOptions
|
|
62
63
|
} = options || {};
|
|
63
|
-
return createPlugin(dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), breakoutEnabled && dynamicSizingEnabled, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
|
|
64
|
+
return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), breakoutEnabled && dynamicSizingEnabled, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
|
|
64
65
|
}
|
|
65
66
|
}, {
|
|
66
67
|
name: 'tablePMColResizing',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { tableCellBorderWidth } from '@atlaskit/editor-common';
|
|
3
2
|
import { ShadowEvent, TableCssClassName as ClassName } from '../types';
|
|
4
3
|
import { tableInsertColumnButtonSize } from '../ui/consts';
|
|
5
4
|
import { updateShadowListForStickyStyles } from './update-overflow-shadows';
|
|
@@ -54,7 +53,7 @@ export class OverflowShadowsObserver {
|
|
|
54
53
|
}, {
|
|
55
54
|
threshold: [0, 1],
|
|
56
55
|
root: this.wrapper,
|
|
57
|
-
rootMargin: `0px ${tableInsertColumnButtonSize / 2
|
|
56
|
+
rootMargin: `0px ${tableInsertColumnButtonSize / 2}px 0px 0px`
|
|
58
57
|
});
|
|
59
58
|
return;
|
|
60
59
|
}
|
|
@@ -10,7 +10,7 @@ import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plu
|
|
|
10
10
|
import { fixTables, replaceSelectedTable } from '../transforms';
|
|
11
11
|
import { TableCssClassName as ClassName } from '../types';
|
|
12
12
|
import { findControlsHoverDecoration, updateResizeHandles } from '../utils';
|
|
13
|
-
import { INPUT_METHOD } from '../../analytics';
|
|
13
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '../../analytics';
|
|
14
14
|
import { defaultTableSelection } from './default-table-selection';
|
|
15
15
|
import { createPluginState, getPluginState, pluginKey } from './plugin-factory';
|
|
16
16
|
import TableCellNodeView from '../nodeviews/tableCell';
|
|
@@ -18,7 +18,7 @@ let isBreakoutEnabled;
|
|
|
18
18
|
let isDynamicTextSizingEnabled;
|
|
19
19
|
let isFullWidthModeEnabled;
|
|
20
20
|
let wasFullWidthModeEnabled;
|
|
21
|
-
export const createPlugin = (dispatch, portalProviderAPI, eventDispatcher, pluginConfig, dynamicTextSizing, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled) => {
|
|
21
|
+
export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig, dynamicTextSizing, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled) => {
|
|
22
22
|
var _window;
|
|
23
23
|
|
|
24
24
|
isBreakoutEnabled = breakoutEnabled;
|
|
@@ -47,13 +47,34 @@ export const createPlugin = (dispatch, portalProviderAPI, eventDispatcher, plugi
|
|
|
47
47
|
const tableCellNodeview = pluginConfig.tableCellOptimization ? {
|
|
48
48
|
tableCell: (node, view, getPos) => new TableCellNodeView(node, view, getPos, observer),
|
|
49
49
|
tableHeader: (node, view, getPos) => new TableCellNodeView(node, view, getPos, observer)
|
|
50
|
-
} : {};
|
|
50
|
+
} : {}; // Used to prevent invalid table cell spans being reported more than once per editor/document
|
|
51
|
+
|
|
52
|
+
const invalidTableIds = [];
|
|
51
53
|
return new Plugin({
|
|
52
54
|
state: state,
|
|
53
55
|
key: pluginKey,
|
|
54
56
|
appendTransaction: (transactions, oldState, newState) => {
|
|
55
57
|
const tr = transactions.find(tr => tr.getMeta('uiEvent') === 'cut');
|
|
56
58
|
|
|
59
|
+
function reportInvalidTableCellSpanAttrs(invalidNodeAttr) {
|
|
60
|
+
if (invalidTableIds.find(id => id === invalidNodeAttr.tableLocalId)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
invalidTableIds.push(invalidNodeAttr.tableLocalId);
|
|
65
|
+
dispatchAnalyticsEvent({
|
|
66
|
+
action: ACTION.INVALID_DOCUMENT_ENCOUNTERED,
|
|
67
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
68
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
69
|
+
attributes: {
|
|
70
|
+
nodeType: invalidNodeAttr.nodeType,
|
|
71
|
+
reason: `${invalidNodeAttr.attribute}: ${invalidNodeAttr.reason}`,
|
|
72
|
+
tableLocalId: invalidNodeAttr.tableLocalId,
|
|
73
|
+
spanValue: invalidNodeAttr.spanValue
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
57
78
|
if (tr) {
|
|
58
79
|
// "fixTables" removes empty rows as we don't allow that in schema
|
|
59
80
|
const updatedTr = handleCut(tr, oldState, newState);
|
|
@@ -61,7 +82,7 @@ export const createPlugin = (dispatch, portalProviderAPI, eventDispatcher, plugi
|
|
|
61
82
|
}
|
|
62
83
|
|
|
63
84
|
if (transactions.find(tr => tr.docChanged)) {
|
|
64
|
-
return fixTables(newState.tr);
|
|
85
|
+
return fixTables(newState.tr, reportInvalidTableCellSpanAttrs);
|
|
65
86
|
}
|
|
66
87
|
},
|
|
67
88
|
view: editorView => {
|
|
@@ -9,9 +9,9 @@ export const generateColgroup = table => {
|
|
|
9
9
|
// We slice here to guard against our colwidth array having more entries
|
|
10
10
|
// Than the we actually span. We'll patch the document at a later point.
|
|
11
11
|
cell.attrs.colwidth.slice(0, colspan).forEach(width => {
|
|
12
|
-
cols.push(['col', {
|
|
12
|
+
cols.push(['col', width ? {
|
|
13
13
|
style: `width: ${width}px;`
|
|
14
|
-
}]);
|
|
14
|
+
} : {}]);
|
|
15
15
|
});
|
|
16
16
|
} else {
|
|
17
17
|
// When we have merged cells on the first row (firstChild),
|
|
@@ -25,6 +25,7 @@ export const getResizeState = ({
|
|
|
25
25
|
cols,
|
|
26
26
|
widths,
|
|
27
27
|
maxSize,
|
|
28
|
+
tableWidth,
|
|
28
29
|
overflow
|
|
29
30
|
};
|
|
30
31
|
} // Getting the resize state from DOM
|
|
@@ -42,6 +43,7 @@ export const getResizeState = ({
|
|
|
42
43
|
cols,
|
|
43
44
|
widths,
|
|
44
45
|
maxSize,
|
|
46
|
+
tableWidth,
|
|
45
47
|
overflow
|
|
46
48
|
};
|
|
47
49
|
}; // updates Colgroup DOM node with new widths
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
2
|
+
import { tableNewColumnMinWidth } from '@atlaskit/editor-common';
|
|
2
3
|
import { hasTableBeenResized } from '../pm-plugins/table-resizing/utils';
|
|
3
4
|
import { setMeta } from './metadata';
|
|
4
5
|
import { getResizeState, normaliseTableLayout } from '../pm-plugins/table-resizing/utils/resize-state';
|
|
@@ -105,7 +106,10 @@ export const updateColumnWidths = (resizeState, table, start) => tr => {
|
|
|
105
106
|
return tr.setSelection(selectionBookmark.resolve(tr.doc));
|
|
106
107
|
};
|
|
107
108
|
/**
|
|
108
|
-
* This function is called when user inserts/deletes a column in a table to
|
|
109
|
+
* This function is called when user inserts/deletes a column in a table to;
|
|
110
|
+
* - rescale all columns (if the table did not overflow before the insertion)
|
|
111
|
+
* - and update column widths.
|
|
112
|
+
*
|
|
109
113
|
* This is done manually to avoid a multi-dispatch in TableComponent. See [ED-8288].
|
|
110
114
|
* @param table
|
|
111
115
|
* @param view
|
|
@@ -113,6 +117,8 @@ export const updateColumnWidths = (resizeState, table, start) => tr => {
|
|
|
113
117
|
*/
|
|
114
118
|
|
|
115
119
|
export const rescaleColumns = (table, view) => tr => {
|
|
120
|
+
// If the table has been not been resized we skip updating the size
|
|
121
|
+
// of columns here.
|
|
116
122
|
if (!view || !hasTableBeenResized(table.node)) {
|
|
117
123
|
return tr;
|
|
118
124
|
}
|
|
@@ -128,7 +134,8 @@ export const rescaleColumns = (table, view) => tr => {
|
|
|
128
134
|
return tr;
|
|
129
135
|
}
|
|
130
136
|
|
|
131
|
-
const layout = normaliseTableLayout(tableRef === null || tableRef === void 0 ? void 0 : tableRef.dataset.layout);
|
|
137
|
+
const layout = normaliseTableLayout(tableRef === null || tableRef === void 0 ? void 0 : tableRef.dataset.layout); // The is the width the table can reach before overflowing
|
|
138
|
+
|
|
132
139
|
const maxSize = getTableMaxWidth({
|
|
133
140
|
table: table.node,
|
|
134
141
|
tableStart: table.start,
|
|
@@ -144,8 +151,11 @@ export const rescaleColumns = (table, view) => tr => {
|
|
|
144
151
|
domAtPos,
|
|
145
152
|
maxSize
|
|
146
153
|
});
|
|
154
|
+
const previousTableWidth = resizeState.tableWidth - tableNewColumnMinWidth;
|
|
155
|
+
const tableDidntPreviouslyOverflow = previousTableWidth <= maxSize; // If the new table width will result in the table going into an overflow state
|
|
156
|
+
// we resize the cells to avoid the overflow occuring
|
|
147
157
|
|
|
148
|
-
if (resizeState.overflow) {
|
|
158
|
+
if (tableDidntPreviouslyOverflow && resizeState.overflow) {
|
|
149
159
|
resizeState = scaleTableTo(resizeState, maxSize);
|
|
150
160
|
}
|
|
151
161
|
|
|
@@ -11,7 +11,35 @@ export const fireAnalytics = (properties = {}) => sendLogs({
|
|
|
11
11
|
server: 'local',
|
|
12
12
|
user: '-'
|
|
13
13
|
}]
|
|
14
|
-
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const validateTableCellNodeAttrs = ({
|
|
17
|
+
colspan,
|
|
18
|
+
rowspan,
|
|
19
|
+
tableLocalId
|
|
20
|
+
}, reportInvalidTableCellSpanAttrs) => {
|
|
21
|
+
if (colspan && colspan < 0) {
|
|
22
|
+
reportInvalidTableCellSpanAttrs({
|
|
23
|
+
nodeType: 'tableCell',
|
|
24
|
+
attribute: 'colspan',
|
|
25
|
+
reason: 'negative value',
|
|
26
|
+
tableLocalId,
|
|
27
|
+
spanValue: colspan
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (rowspan && rowspan < 0) {
|
|
32
|
+
reportInvalidTableCellSpanAttrs({
|
|
33
|
+
nodeType: 'tableCell',
|
|
34
|
+
attribute: 'rowspan',
|
|
35
|
+
reason: 'negative value',
|
|
36
|
+
tableLocalId,
|
|
37
|
+
spanValue: rowspan
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return;
|
|
42
|
+
}; // We attempt to patch the document when we have extra, unneeded, column widths
|
|
15
43
|
// Take this node for example:
|
|
16
44
|
//
|
|
17
45
|
// ['td', { colwidth: [100, 100, 100], colspan: 2 }]
|
|
@@ -19,14 +47,24 @@ export const fireAnalytics = (properties = {}) => sendLogs({
|
|
|
19
47
|
// This row only spans two columns, yet it contains widths for 3.
|
|
20
48
|
// We remove the third width here, assumed duplicate content.
|
|
21
49
|
|
|
22
|
-
|
|
50
|
+
|
|
51
|
+
export const removeExtraneousColumnWidths = (node, basePos, tr, reportInvalidTableCellSpanAttrs) => {
|
|
23
52
|
let hasProblems = false;
|
|
24
53
|
tr = replaceCells(tr, node, basePos, cell => {
|
|
25
54
|
const {
|
|
26
55
|
colwidth,
|
|
27
|
-
colspan
|
|
56
|
+
colspan,
|
|
57
|
+
rowspan
|
|
28
58
|
} = cell.attrs;
|
|
29
59
|
|
|
60
|
+
if (reportInvalidTableCellSpanAttrs) {
|
|
61
|
+
validateTableCellNodeAttrs({
|
|
62
|
+
colspan,
|
|
63
|
+
rowspan,
|
|
64
|
+
tableLocalId: node.attrs.localId
|
|
65
|
+
}, reportInvalidTableCellSpanAttrs);
|
|
66
|
+
}
|
|
67
|
+
|
|
30
68
|
if (colwidth && colwidth.length > colspan) {
|
|
31
69
|
hasProblems = true;
|
|
32
70
|
return cell.type.createChecked({ ...cell.attrs,
|
|
@@ -46,12 +84,12 @@ export const removeExtraneousColumnWidths = (node, basePos, tr) => {
|
|
|
46
84
|
|
|
47
85
|
return false;
|
|
48
86
|
};
|
|
49
|
-
export const fixTables = tr => {
|
|
87
|
+
export const fixTables = (tr, reportInvalidTableCellSpanAttrs) => {
|
|
50
88
|
let hasProblems = false;
|
|
51
89
|
tr.doc.descendants((node, pos) => {
|
|
52
90
|
if (node.type.name === 'table') {
|
|
53
91
|
// in the unlikely event of having to fix multiple tables at the same time
|
|
54
|
-
hasProblems = removeExtraneousColumnWidths(node, tr.mapping.map(pos), tr);
|
|
92
|
+
hasProblems = removeExtraneousColumnWidths(node, tr.mapping.map(pos), tr, reportInvalidTableCellSpanAttrs);
|
|
55
93
|
}
|
|
56
94
|
});
|
|
57
95
|
|
|
@@ -90,8 +90,9 @@ export class FloatingContextualButtonInner extends React.Component {
|
|
|
90
90
|
title: labelCellOptions,
|
|
91
91
|
onClick: this.handleClick,
|
|
92
92
|
iconBefore: /*#__PURE__*/React.createElement(ExpandIcon, {
|
|
93
|
-
label:
|
|
94
|
-
})
|
|
93
|
+
label: ""
|
|
94
|
+
}),
|
|
95
|
+
"aria-label": labelCellOptions
|
|
95
96
|
}));
|
|
96
97
|
const parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
|
|
97
98
|
|
|
@@ -443,6 +443,7 @@ class ContextualMenu extends Component {
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
return /*#__PURE__*/React.createElement("div", {
|
|
446
|
+
"data-testid": "table-cell-contextual-menu",
|
|
446
447
|
onMouseLeave: this.closeSubmenu
|
|
447
448
|
}, /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
448
449
|
mountTo: mountPoint,
|
|
@@ -18,7 +18,11 @@ const sentinelStyles = `.${ClassName.TABLE_CONTAINER} {
|
|
|
18
18
|
> .${ClassName.TABLE_STICKY_SENTINEL_TOP}, > .${ClassName.TABLE_STICKY_SENTINEL_BOTTOM} {
|
|
19
19
|
position: absolute;
|
|
20
20
|
width: 100%;
|
|
21
|
-
height:
|
|
21
|
+
height: 1px;
|
|
22
|
+
margin-top: -1px;
|
|
23
|
+
// need this to avoid sentinel being focused via keyboard
|
|
24
|
+
// this still allows it to be detected by intersection observer
|
|
25
|
+
visibility: hidden;
|
|
22
26
|
}
|
|
23
27
|
> .${ClassName.TABLE_STICKY_SENTINEL_TOP} {
|
|
24
28
|
top: ${columnControlsDecorationHeight}px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B100, B300, B75, N0, N20, R50,
|
|
1
|
+
import { B100, B300, B75, N0, N20, R50, R400, R75, DN400, N200, DN30 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common';
|
|
3
3
|
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
@@ -28,7 +28,7 @@ export const tableCellSelectedColor = B75;
|
|
|
28
28
|
export const tableToolbarSelectedColor = B100;
|
|
29
29
|
export const tableBorderSelectedColor = B300;
|
|
30
30
|
export const tableCellDeleteColor = R50;
|
|
31
|
-
export const tableBorderDeleteColor =
|
|
31
|
+
export const tableBorderDeleteColor = R400;
|
|
32
32
|
export const tableToolbarDeleteColor = R75;
|
|
33
33
|
export const tableBorderRadiusSize = 3;
|
|
34
34
|
export const tablePadding = 8;
|
|
@@ -32,7 +32,7 @@ export default defineMessages({
|
|
|
32
32
|
},
|
|
33
33
|
confirmDeleteLinkedModalMessage: {
|
|
34
34
|
id: 'fabric.editor.tables.confirmDeleteLinkedModalMessage',
|
|
35
|
-
defaultMessage: 'Removing this table will
|
|
35
|
+
defaultMessage: 'Removing this table will break all the charts connected to it.',
|
|
36
36
|
description: 'Message for confirm modal when deleting a table linked to an extension.'
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -41,7 +41,7 @@ class Decision extends ReactNodeView {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
update(node, decorations) {
|
|
44
|
-
return super.update(node, decorations, // Toggle the placeholder based on whether user input exists.
|
|
44
|
+
return super.update(node, decorations, undefined, // Toggle the placeholder based on whether user input exists.
|
|
45
45
|
(_currentNode, _newNode) => !this.isContentEmpty(_newNode));
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -110,7 +110,7 @@ class Task extends ReactNodeView {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
update(node, decorations) {
|
|
113
|
-
return super.update(node, decorations, (currentNode, newNode) => // Toggle the placeholder based on whether user input exists
|
|
113
|
+
return super.update(node, decorations, undefined, (currentNode, newNode) => // Toggle the placeholder based on whether user input exists
|
|
114
114
|
!this.isContentEmpty(newNode) && !!(currentNode.attrs.state === newNode.attrs.state));
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NodeSelection, Plugin } from 'prosemirror-state';
|
|
2
2
|
import { uuid } from '@atlaskit/adf-schema';
|
|
3
|
-
import { nodesBetweenChanged } from '../../../utils';
|
|
3
|
+
import { nodesBetweenChanged, SetAttrsStep } from '../../../utils';
|
|
4
4
|
import { createSelectionClickHandler } from '../../selection/utils';
|
|
5
5
|
import { decisionItemNodeView } from '../nodeviews/decisionItem';
|
|
6
6
|
import { taskItemNodeViewFactory } from '../nodeviews/taskItem';
|
|
@@ -145,10 +145,10 @@ export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory
|
|
|
145
145
|
} = node.attrs;
|
|
146
146
|
|
|
147
147
|
if (localId === undefined || localId === null || localId === '') {
|
|
148
|
-
tr.
|
|
148
|
+
tr.step(new SetAttrsStep(pos, {
|
|
149
149
|
localId: uuid.generate(),
|
|
150
150
|
...rest
|
|
151
|
-
});
|
|
151
|
+
}));
|
|
152
152
|
modified = true;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -206,7 +206,8 @@ class ToolbarTextColor extends React.Component {
|
|
|
206
206
|
}, /*#__PURE__*/React.createElement(ColorPalette, {
|
|
207
207
|
palette: palette,
|
|
208
208
|
onClick: color => this.changeTextColor(color, pluginState.disabled),
|
|
209
|
-
selectedColor: pluginState.color
|
|
209
|
+
selectedColor: pluginState.color,
|
|
210
|
+
isShowingMoreColors: isShowingMoreColors
|
|
210
211
|
})), showMoreColorsToggle && /*#__PURE__*/React.createElement(ShowMoreWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
211
212
|
appearance: "subtle",
|
|
212
213
|
onClick: this.handleShowMoreToggle,
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { code, em, strike, strong, subsup, underline } from '@atlaskit/adf-schema';
|
|
3
3
|
import WithPluginState from '../../ui/WithPluginState';
|
|
4
4
|
import { plugin as textFormattingPlugin, pluginKey as textFormattingPluginKey } from './pm-plugins/main';
|
|
5
|
-
import { plugin as clearFormattingPlugin } from './pm-plugins/clear-formatting';
|
|
5
|
+
import { plugin as clearFormattingPlugin, pluginKey as clearFormattingPluginKey } from './pm-plugins/clear-formatting';
|
|
6
6
|
import clearFormattingKeymapPlugin from './pm-plugins/clear-formatting-keymap';
|
|
7
7
|
import textFormattingCursorPlugin from './pm-plugins/cursor';
|
|
8
8
|
import textFormattingInputRulePlugin from './pm-plugins/input-rule';
|
|
@@ -81,7 +81,8 @@ const textFormatting = (options = {}) => ({
|
|
|
81
81
|
}) {
|
|
82
82
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
83
83
|
plugins: {
|
|
84
|
-
textFormattingState: textFormattingPluginKey
|
|
84
|
+
textFormattingState: textFormattingPluginKey,
|
|
85
|
+
clearFormattingPluginState: clearFormattingPluginKey
|
|
85
86
|
},
|
|
86
87
|
render: () => {
|
|
87
88
|
return /*#__PURE__*/React.createElement(Toolbar, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useMemo, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
|
|
2
|
-
import { text as colorsText, N200, N20, DN70, N800, DN600, DN300 } from '@atlaskit/theme/colors';
|
|
2
|
+
import { text as colorsText, N200, N20, DN70, N800, DN600, DN300 } from '@atlaskit/theme/colors'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
3
|
+
|
|
3
4
|
import { ItemGroup, itemThemeNamespace } from '@atlaskit/item';
|
|
4
5
|
import { themed } from '@atlaskit/theme/components';
|
|
5
6
|
import { ThemeProvider } from 'styled-components';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useRef, useLayoutEffect } from 'react';
|
|
2
2
|
import { N200 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
3
|
+
import { borderRadius } from '@atlaskit/theme/constants'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
|
+
|
|
4
5
|
import Item from '@atlaskit/item';
|
|
5
6
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
6
7
|
import styled from 'styled-components';
|