@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
|
@@ -22,7 +22,7 @@ function addColumnAtCustomStep(column) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function addColumnAt(column) {
|
|
25
|
+
export function addColumnAt(column) {
|
|
26
26
|
var allowAddColumnCustomStep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
27
27
|
var view = arguments.length > 2 ? arguments[2] : undefined;
|
|
28
28
|
return function (tr) {
|
|
@@ -46,7 +46,6 @@ function addColumnAt(column) {
|
|
|
46
46
|
} // :: (EditorState, dispatch: ?(tr: Transaction)) → bool
|
|
47
47
|
// Command to add a column before the column with the selection.
|
|
48
48
|
|
|
49
|
-
|
|
50
49
|
export var addColumnBefore = function addColumnBefore(state, dispatch, view) {
|
|
51
50
|
var table = findTable(state.selection);
|
|
52
51
|
|
|
@@ -48,7 +48,8 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
48
48
|
return [{
|
|
49
49
|
name: 'table',
|
|
50
50
|
plugin: function plugin(_ref) {
|
|
51
|
-
var
|
|
51
|
+
var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
52
|
+
dispatch = _ref.dispatch,
|
|
52
53
|
portalProviderAPI = _ref.portalProviderAPI,
|
|
53
54
|
eventDispatcher = _ref.eventDispatcher;
|
|
54
55
|
|
|
@@ -59,7 +60,7 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
59
60
|
breakoutEnabled = _ref2.breakoutEnabled,
|
|
60
61
|
tableOptions = _ref2.tableOptions;
|
|
61
62
|
|
|
62
|
-
return createPlugin(dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), breakoutEnabled && dynamicSizingEnabled, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
|
|
63
|
+
return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), breakoutEnabled && dynamicSizingEnabled, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
|
|
63
64
|
}
|
|
64
65
|
}, {
|
|
65
66
|
name: 'tablePMColResizing',
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import { tableCellBorderWidth } from '@atlaskit/editor-common';
|
|
5
4
|
import { ShadowEvent, TableCssClassName as ClassName } from '../types';
|
|
6
5
|
import { tableInsertColumnButtonSize } from '../ui/consts';
|
|
7
6
|
import { updateShadowListForStickyStyles } from './update-overflow-shadows';
|
|
@@ -63,7 +62,7 @@ export var OverflowShadowsObserver = /*#__PURE__*/function () {
|
|
|
63
62
|
}, {
|
|
64
63
|
threshold: [0, 1],
|
|
65
64
|
root: _this.wrapper,
|
|
66
|
-
rootMargin: "0px ".concat(tableInsertColumnButtonSize / 2
|
|
65
|
+
rootMargin: "0px ".concat(tableInsertColumnButtonSize / 2, "px 0px 0px")
|
|
67
66
|
});
|
|
68
67
|
return;
|
|
69
68
|
}
|
|
@@ -16,7 +16,7 @@ import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plu
|
|
|
16
16
|
import { fixTables, replaceSelectedTable } from '../transforms';
|
|
17
17
|
import { TableCssClassName as ClassName } from '../types';
|
|
18
18
|
import { findControlsHoverDecoration, updateResizeHandles } from '../utils';
|
|
19
|
-
import { INPUT_METHOD } from '../../analytics';
|
|
19
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '../../analytics';
|
|
20
20
|
import { defaultTableSelection } from './default-table-selection';
|
|
21
21
|
import { createPluginState, getPluginState, pluginKey } from './plugin-factory';
|
|
22
22
|
import TableCellNodeView from '../nodeviews/tableCell';
|
|
@@ -24,7 +24,7 @@ var isBreakoutEnabled;
|
|
|
24
24
|
var isDynamicTextSizingEnabled;
|
|
25
25
|
var isFullWidthModeEnabled;
|
|
26
26
|
var wasFullWidthModeEnabled;
|
|
27
|
-
export var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispatcher, pluginConfig, dynamicTextSizing, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled) {
|
|
27
|
+
export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig, dynamicTextSizing, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled) {
|
|
28
28
|
var _window;
|
|
29
29
|
|
|
30
30
|
isBreakoutEnabled = breakoutEnabled;
|
|
@@ -56,7 +56,9 @@ export var createPlugin = function createPlugin(dispatch, portalProviderAPI, eve
|
|
|
56
56
|
tableHeader: function tableHeader(node, view, getPos) {
|
|
57
57
|
return new TableCellNodeView(node, view, getPos, observer);
|
|
58
58
|
}
|
|
59
|
-
} : {};
|
|
59
|
+
} : {}; // Used to prevent invalid table cell spans being reported more than once per editor/document
|
|
60
|
+
|
|
61
|
+
var invalidTableIds = [];
|
|
60
62
|
return new Plugin({
|
|
61
63
|
state: state,
|
|
62
64
|
key: pluginKey,
|
|
@@ -65,6 +67,27 @@ export var createPlugin = function createPlugin(dispatch, portalProviderAPI, eve
|
|
|
65
67
|
return tr.getMeta('uiEvent') === 'cut';
|
|
66
68
|
});
|
|
67
69
|
|
|
70
|
+
function reportInvalidTableCellSpanAttrs(invalidNodeAttr) {
|
|
71
|
+
if (invalidTableIds.find(function (id) {
|
|
72
|
+
return id === invalidNodeAttr.tableLocalId;
|
|
73
|
+
})) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
invalidTableIds.push(invalidNodeAttr.tableLocalId);
|
|
78
|
+
dispatchAnalyticsEvent({
|
|
79
|
+
action: ACTION.INVALID_DOCUMENT_ENCOUNTERED,
|
|
80
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
81
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
82
|
+
attributes: {
|
|
83
|
+
nodeType: invalidNodeAttr.nodeType,
|
|
84
|
+
reason: "".concat(invalidNodeAttr.attribute, ": ").concat(invalidNodeAttr.reason),
|
|
85
|
+
tableLocalId: invalidNodeAttr.tableLocalId,
|
|
86
|
+
spanValue: invalidNodeAttr.spanValue
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
68
91
|
if (tr) {
|
|
69
92
|
// "fixTables" removes empty rows as we don't allow that in schema
|
|
70
93
|
var updatedTr = handleCut(tr, oldState, newState);
|
|
@@ -74,7 +97,7 @@ export var createPlugin = function createPlugin(dispatch, portalProviderAPI, eve
|
|
|
74
97
|
if (transactions.find(function (tr) {
|
|
75
98
|
return tr.docChanged;
|
|
76
99
|
})) {
|
|
77
|
-
return fixTables(newState.tr);
|
|
100
|
+
return fixTables(newState.tr, reportInvalidTableCellSpanAttrs);
|
|
78
101
|
}
|
|
79
102
|
},
|
|
80
103
|
view: function view(editorView) {
|
|
@@ -10,9 +10,9 @@ export var generateColgroup = function generateColgroup(table) {
|
|
|
10
10
|
// We slice here to guard against our colwidth array having more entries
|
|
11
11
|
// Than the we actually span. We'll patch the document at a later point.
|
|
12
12
|
cell.attrs.colwidth.slice(0, colspan).forEach(function (width) {
|
|
13
|
-
cols.push(['col', {
|
|
13
|
+
cols.push(['col', width ? {
|
|
14
14
|
style: "width: ".concat(width, "px;")
|
|
15
|
-
}]);
|
|
15
|
+
} : {}]);
|
|
16
16
|
});
|
|
17
17
|
} else {
|
|
18
18
|
// When we have merged cells on the first row (firstChild),
|
|
@@ -41,6 +41,7 @@ export var getResizeState = function getResizeState(_ref) {
|
|
|
41
41
|
cols: _cols,
|
|
42
42
|
widths: _widths,
|
|
43
43
|
maxSize: maxSize,
|
|
44
|
+
tableWidth: _tableWidth,
|
|
44
45
|
overflow: _overflow
|
|
45
46
|
};
|
|
46
47
|
} // Getting the resize state from DOM
|
|
@@ -62,6 +63,7 @@ export var getResizeState = function getResizeState(_ref) {
|
|
|
62
63
|
cols: cols,
|
|
63
64
|
widths: widths,
|
|
64
65
|
maxSize: maxSize,
|
|
66
|
+
tableWidth: tableWidth,
|
|
65
67
|
overflow: overflow
|
|
66
68
|
};
|
|
67
69
|
}; // updates Colgroup DOM node with new widths
|
|
@@ -5,6 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
6
6
|
|
|
7
7
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
8
|
+
import { tableNewColumnMinWidth } from '@atlaskit/editor-common';
|
|
8
9
|
import { hasTableBeenResized } from '../pm-plugins/table-resizing/utils';
|
|
9
10
|
import { setMeta } from './metadata';
|
|
10
11
|
import { getResizeState, normaliseTableLayout } from '../pm-plugins/table-resizing/utils/resize-state';
|
|
@@ -115,7 +116,10 @@ export var updateColumnWidths = function updateColumnWidths(resizeState, table,
|
|
|
115
116
|
};
|
|
116
117
|
};
|
|
117
118
|
/**
|
|
118
|
-
* This function is called when user inserts/deletes a column in a table to
|
|
119
|
+
* This function is called when user inserts/deletes a column in a table to;
|
|
120
|
+
* - rescale all columns (if the table did not overflow before the insertion)
|
|
121
|
+
* - and update column widths.
|
|
122
|
+
*
|
|
119
123
|
* This is done manually to avoid a multi-dispatch in TableComponent. See [ED-8288].
|
|
120
124
|
* @param table
|
|
121
125
|
* @param view
|
|
@@ -124,6 +128,8 @@ export var updateColumnWidths = function updateColumnWidths(resizeState, table,
|
|
|
124
128
|
|
|
125
129
|
export var rescaleColumns = function rescaleColumns(table, view) {
|
|
126
130
|
return function (tr) {
|
|
131
|
+
// If the table has been not been resized we skip updating the size
|
|
132
|
+
// of columns here.
|
|
127
133
|
if (!view || !hasTableBeenResized(table.node)) {
|
|
128
134
|
return tr;
|
|
129
135
|
}
|
|
@@ -137,7 +143,8 @@ export var rescaleColumns = function rescaleColumns(table, view) {
|
|
|
137
143
|
return tr;
|
|
138
144
|
}
|
|
139
145
|
|
|
140
|
-
var layout = normaliseTableLayout(tableRef === null || tableRef === void 0 ? void 0 : tableRef.dataset.layout);
|
|
146
|
+
var layout = normaliseTableLayout(tableRef === null || tableRef === void 0 ? void 0 : tableRef.dataset.layout); // The is the width the table can reach before overflowing
|
|
147
|
+
|
|
141
148
|
var maxSize = getTableMaxWidth({
|
|
142
149
|
table: table.node,
|
|
143
150
|
tableStart: table.start,
|
|
@@ -153,8 +160,11 @@ export var rescaleColumns = function rescaleColumns(table, view) {
|
|
|
153
160
|
domAtPos: domAtPos,
|
|
154
161
|
maxSize: maxSize
|
|
155
162
|
});
|
|
163
|
+
var previousTableWidth = resizeState.tableWidth - tableNewColumnMinWidth;
|
|
164
|
+
var tableDidntPreviouslyOverflow = previousTableWidth <= maxSize; // If the new table width will result in the table going into an overflow state
|
|
165
|
+
// we resize the cells to avoid the overflow occuring
|
|
156
166
|
|
|
157
|
-
if (resizeState.overflow) {
|
|
167
|
+
if (tableDidntPreviouslyOverflow && resizeState.overflow) {
|
|
158
168
|
resizeState = scaleTableTo(resizeState, maxSize);
|
|
159
169
|
}
|
|
160
170
|
|
|
@@ -20,6 +20,34 @@ export var fireAnalytics = function fireAnalytics() {
|
|
|
20
20
|
user: '-'
|
|
21
21
|
}]
|
|
22
22
|
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var validateTableCellNodeAttrs = function validateTableCellNodeAttrs(_ref, reportInvalidTableCellSpanAttrs) {
|
|
26
|
+
var colspan = _ref.colspan,
|
|
27
|
+
rowspan = _ref.rowspan,
|
|
28
|
+
tableLocalId = _ref.tableLocalId;
|
|
29
|
+
|
|
30
|
+
if (colspan && colspan < 0) {
|
|
31
|
+
reportInvalidTableCellSpanAttrs({
|
|
32
|
+
nodeType: 'tableCell',
|
|
33
|
+
attribute: 'colspan',
|
|
34
|
+
reason: 'negative value',
|
|
35
|
+
tableLocalId: tableLocalId,
|
|
36
|
+
spanValue: colspan
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (rowspan && rowspan < 0) {
|
|
41
|
+
reportInvalidTableCellSpanAttrs({
|
|
42
|
+
nodeType: 'tableCell',
|
|
43
|
+
attribute: 'rowspan',
|
|
44
|
+
reason: 'negative value',
|
|
45
|
+
tableLocalId: tableLocalId,
|
|
46
|
+
spanValue: rowspan
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return;
|
|
23
51
|
}; // We attempt to patch the document when we have extra, unneeded, column widths
|
|
24
52
|
// Take this node for example:
|
|
25
53
|
//
|
|
@@ -28,12 +56,22 @@ export var fireAnalytics = function fireAnalytics() {
|
|
|
28
56
|
// This row only spans two columns, yet it contains widths for 3.
|
|
29
57
|
// We remove the third width here, assumed duplicate content.
|
|
30
58
|
|
|
31
|
-
|
|
59
|
+
|
|
60
|
+
export var removeExtraneousColumnWidths = function removeExtraneousColumnWidths(node, basePos, tr, reportInvalidTableCellSpanAttrs) {
|
|
32
61
|
var hasProblems = false;
|
|
33
62
|
tr = replaceCells(tr, node, basePos, function (cell) {
|
|
34
63
|
var _cell$attrs = cell.attrs,
|
|
35
64
|
colwidth = _cell$attrs.colwidth,
|
|
36
|
-
colspan = _cell$attrs.colspan
|
|
65
|
+
colspan = _cell$attrs.colspan,
|
|
66
|
+
rowspan = _cell$attrs.rowspan;
|
|
67
|
+
|
|
68
|
+
if (reportInvalidTableCellSpanAttrs) {
|
|
69
|
+
validateTableCellNodeAttrs({
|
|
70
|
+
colspan: colspan,
|
|
71
|
+
rowspan: rowspan,
|
|
72
|
+
tableLocalId: node.attrs.localId
|
|
73
|
+
}, reportInvalidTableCellSpanAttrs);
|
|
74
|
+
}
|
|
37
75
|
|
|
38
76
|
if (colwidth && colwidth.length > colspan) {
|
|
39
77
|
hasProblems = true;
|
|
@@ -54,12 +92,12 @@ export var removeExtraneousColumnWidths = function removeExtraneousColumnWidths(
|
|
|
54
92
|
|
|
55
93
|
return false;
|
|
56
94
|
};
|
|
57
|
-
export var fixTables = function fixTables(tr) {
|
|
95
|
+
export var fixTables = function fixTables(tr, reportInvalidTableCellSpanAttrs) {
|
|
58
96
|
var hasProblems = false;
|
|
59
97
|
tr.doc.descendants(function (node, pos) {
|
|
60
98
|
if (node.type.name === 'table') {
|
|
61
99
|
// in the unlikely event of having to fix multiple tables at the same time
|
|
62
|
-
hasProblems = removeExtraneousColumnWidths(node, tr.mapping.map(pos), tr);
|
|
100
|
+
hasProblems = removeExtraneousColumnWidths(node, tr.mapping.map(pos), tr, reportInvalidTableCellSpanAttrs);
|
|
63
101
|
}
|
|
64
102
|
});
|
|
65
103
|
|
|
@@ -114,8 +114,9 @@ export var FloatingContextualButtonInner = /*#__PURE__*/function (_React$Compone
|
|
|
114
114
|
title: labelCellOptions,
|
|
115
115
|
onClick: this.handleClick,
|
|
116
116
|
iconBefore: /*#__PURE__*/React.createElement(ExpandIcon, {
|
|
117
|
-
label:
|
|
118
|
-
})
|
|
117
|
+
label: ""
|
|
118
|
+
}),
|
|
119
|
+
"aria-label": labelCellOptions
|
|
119
120
|
}));
|
|
120
121
|
var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
|
|
121
122
|
|
|
@@ -460,6 +460,7 @@ var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
return /*#__PURE__*/React.createElement("div", {
|
|
463
|
+
"data-testid": "table-cell-contextual-menu",
|
|
463
464
|
onMouseLeave: this.closeSubmenu
|
|
464
465
|
}, /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
465
466
|
mountTo: mountPoint,
|
|
@@ -12,7 +12,7 @@ import { TableCssClassName as ClassName } from '../types';
|
|
|
12
12
|
import { tableCellBackgroundColor, tableToolbarColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
|
|
13
13
|
import { HeaderButton, HeaderButtonHover, HeaderButtonDanger, insertColumnButtonWrapper, insertRowButtonWrapper, columnControlsLineMarker, DeleteButton, OverflowShadow, columnControlsDecoration, hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, InsertMarker } from './ui-styles.css';
|
|
14
14
|
var rangeSelectionStyles = "\n.".concat(ClassName.NODEVIEW_WRAPPER, ".").concat(akEditorSelectedNodeClassName, " table tbody tr {\n th,td {\n ").concat(getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border]), "\n }\n}\n");
|
|
15
|
-
var sentinelStyles = ".".concat(ClassName.TABLE_CONTAINER, " {\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_TOP, ", > .").concat(ClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n position: absolute;\n width: 100%;\n height:
|
|
15
|
+
var sentinelStyles = ".".concat(ClassName.TABLE_CONTAINER, " {\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_TOP, ", > .").concat(ClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n position: absolute;\n width: 100%;\n height: 1px;\n margin-top: -1px;\n // need this to avoid sentinel being focused via keyboard\n // this still allows it to be detected by intersection observer\n visibility: hidden;\n }\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: ").concat(columnControlsDecorationHeight, "px;\n }\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n bottom: ").concat(tableScrollbarOffset + stickyRowOffsetTop + tablePadding * 2 + 23, "px;\n }\n &.").concat(ClassName.WITH_CONTROLS, " {\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: 0px;\n }\n > .").concat(ClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n margin-bottom: ").concat(columnControlsDecorationHeight, "px;\n }\n }\n}");
|
|
16
16
|
export var tableStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: white !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button*/\n ", "\n /* Ends Delete button*/\n\n /* sticky styles */\n .", " .", " .", ":first-child {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n\n box-shadow: 0px -", "px white;\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: white;\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid white;\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid green;\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: white;\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-child {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-child {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid white;\n }\n\n ", "\n\n ", "\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0.3;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n }\n }\n .", " {\n position: absolute;\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /* \n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-top: ", "px;\n margin-top: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n"])), ClassName.LAYOUT_BUTTON, N20A, N300, ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, B300, tableSharedStyle, columnControlsLineMarker, hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor, ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, stickyRowOffsetTop, stickyRowZIndex, N40A, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, function (props) {
|
|
17
17
|
var _props$featureFlags;
|
|
18
18
|
|
|
@@ -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 var tableCellSelectedColor = B75;
|
|
|
28
28
|
export var tableToolbarSelectedColor = B100;
|
|
29
29
|
export var tableBorderSelectedColor = B300;
|
|
30
30
|
export var tableCellDeleteColor = R50;
|
|
31
|
-
export var tableBorderDeleteColor =
|
|
31
|
+
export var tableBorderDeleteColor = R400;
|
|
32
32
|
export var tableToolbarDeleteColor = R75;
|
|
33
33
|
export var tableBorderRadiusSize = 3;
|
|
34
34
|
export var 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
|
});
|
|
@@ -71,7 +71,7 @@ var Decision = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
71
71
|
value: function update(node, decorations) {
|
|
72
72
|
var _this = this;
|
|
73
73
|
|
|
74
|
-
return _get(_getPrototypeOf(Decision.prototype), "update", this).call(this, node, decorations, // Toggle the placeholder based on whether user input exists.
|
|
74
|
+
return _get(_getPrototypeOf(Decision.prototype), "update", this).call(this, node, decorations, undefined, // Toggle the placeholder based on whether user input exists.
|
|
75
75
|
function (_currentNode, _newNode) {
|
|
76
76
|
return !_this.isContentEmpty(_newNode);
|
|
77
77
|
});
|
|
@@ -151,7 +151,7 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
151
151
|
value: function update(node, decorations) {
|
|
152
152
|
var _this3 = this;
|
|
153
153
|
|
|
154
|
-
return _get(_getPrototypeOf(Task.prototype), "update", this).call(this, node, decorations, function (currentNode, newNode) {
|
|
154
|
+
return _get(_getPrototypeOf(Task.prototype), "update", this).call(this, node, decorations, undefined, function (currentNode, newNode) {
|
|
155
155
|
return (// Toggle the placeholder based on whether user input exists
|
|
156
156
|
!_this3.isContentEmpty(newNode) && !!(currentNode.attrs.state === newNode.attrs.state)
|
|
157
157
|
);
|
|
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
|
|
8
8
|
import { NodeSelection, Plugin } from 'prosemirror-state';
|
|
9
9
|
import { uuid } from '@atlaskit/adf-schema';
|
|
10
|
-
import { nodesBetweenChanged } from '../../../utils';
|
|
10
|
+
import { nodesBetweenChanged, SetAttrsStep } from '../../../utils';
|
|
11
11
|
import { createSelectionClickHandler } from '../../selection/utils';
|
|
12
12
|
import { decisionItemNodeView } from '../nodeviews/decisionItem';
|
|
13
13
|
import { taskItemNodeViewFactory } from '../nodeviews/taskItem';
|
|
@@ -145,9 +145,9 @@ export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory
|
|
|
145
145
|
rest = _objectWithoutProperties(_node$attrs, ["localId"]);
|
|
146
146
|
|
|
147
147
|
if (localId === undefined || localId === null || localId === '') {
|
|
148
|
-
tr.
|
|
148
|
+
tr.step(new SetAttrsStep(pos, _objectSpread({
|
|
149
149
|
localId: uuid.generate()
|
|
150
|
-
}, rest));
|
|
150
|
+
}, rest)));
|
|
151
151
|
modified = true;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
@@ -238,7 +238,8 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
238
238
|
onClick: function onClick(color) {
|
|
239
239
|
return _this2.changeTextColor(color, pluginState.disabled);
|
|
240
240
|
},
|
|
241
|
-
selectedColor: pluginState.color
|
|
241
|
+
selectedColor: pluginState.color,
|
|
242
|
+
isShowingMoreColors: isShowingMoreColors
|
|
242
243
|
})), showMoreColorsToggle && /*#__PURE__*/React.createElement(ShowMoreWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
243
244
|
appearance: "subtle",
|
|
244
245
|
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';
|
|
@@ -88,7 +88,8 @@ var textFormatting = function textFormatting() {
|
|
|
88
88
|
disabled = _ref6.disabled;
|
|
89
89
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
90
90
|
plugins: {
|
|
91
|
-
textFormattingState: textFormattingPluginKey
|
|
91
|
+
textFormattingState: textFormattingPluginKey,
|
|
92
|
+
clearFormattingPluginState: clearFormattingPluginKey
|
|
92
93
|
},
|
|
93
94
|
render: function render() {
|
|
94
95
|
return /*#__PURE__*/React.createElement(Toolbar, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { useMemo, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
|
|
3
|
-
import { text as colorsText, N200, N20, DN70, N800, DN600, DN300 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { text as colorsText, N200, N20, DN70, N800, DN600, DN300 } from '@atlaskit/theme/colors'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
|
+
|
|
4
5
|
import { ItemGroup, itemThemeNamespace } from '@atlaskit/item';
|
|
5
6
|
import { themed } from '@atlaskit/theme/components';
|
|
6
7
|
import { ThemeProvider } from 'styled-components';
|
|
@@ -4,7 +4,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useMemo, useRef, useLayoutEffect } from 'react';
|
|
6
6
|
import { N200 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
|
+
import { borderRadius } from '@atlaskit/theme/constants'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
8
|
+
|
|
8
9
|
import Item from '@atlaskit/item';
|
|
9
10
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
10
11
|
import styled from 'styled-components';
|
|
@@ -1,38 +1,78 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
2
3
|
import AvatarsWithPluginState from '../../../plugins/collab-edit/ui';
|
|
4
|
+
import FindReplaceToolbarButtonWithState from '../../../plugins/find-replace/FindReplaceToolbarButtonWithState';
|
|
5
|
+
import { BeforePrimaryToolbarWrapper } from '../../../plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper';
|
|
3
6
|
import Toolbar from '../../Toolbar';
|
|
4
|
-
import { MainToolbar, MainToolbarIconBefore,
|
|
7
|
+
import { MainToolbar, MainToolbarIconBefore, MainToolbarFirstChild, MainToolbarSecondChild, NonCustomToolbarWrapper, CustomToolbarWrapper, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
|
|
5
8
|
import { ContextPanelConsumer } from '../../ContextPanel/context';
|
|
6
9
|
export var FullPageToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
10
|
+
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _props$featureFlags4, _props$featureFlags5;
|
|
11
|
+
|
|
12
|
+
var _useState = useState(false),
|
|
13
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14
|
+
shouldSplitToolbar = _useState2[0],
|
|
15
|
+
setShouldSplitToolbar = _useState2[1];
|
|
16
|
+
|
|
17
|
+
var nonCustomToolbar = /*#__PURE__*/React.createElement(NonCustomToolbarWrapper, null, props.beforeIcon && /*#__PURE__*/React.createElement(MainToolbarIconBefore, null, props.beforeIcon), /*#__PURE__*/React.createElement(Toolbar, {
|
|
18
|
+
editorView: props.editorView,
|
|
19
|
+
editorActions: props.editorActions,
|
|
20
|
+
eventDispatcher: props.eventDispatcher,
|
|
21
|
+
providerFactory: props.providerFactory,
|
|
22
|
+
appearance: props.appearance,
|
|
23
|
+
items: props.primaryToolbarComponents,
|
|
24
|
+
popupsMountPoint: props.popupsMountPoint,
|
|
25
|
+
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
26
|
+
popupsScrollableElement: props.popupsScrollableElement,
|
|
27
|
+
disabled: props.disabled,
|
|
28
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
29
|
+
containerElement: props.containerElement,
|
|
30
|
+
hasMinWidth: props.hasMinWidth
|
|
31
|
+
}));
|
|
32
|
+
var customToolbar = /*#__PURE__*/React.createElement(CustomToolbarWrapper, null, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
|
|
33
|
+
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
34
|
+
}) : null, (props === null || props === void 0 ? void 0 : (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null : /*#__PURE__*/React.createElement(AvatarsWithPluginState, {
|
|
35
|
+
editorView: props.editorView,
|
|
36
|
+
eventDispatcher: props.eventDispatcher,
|
|
37
|
+
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
38
|
+
inviteToEditHandler: (_props$collabEdit2 = props.collabEdit) === null || _props$collabEdit2 === void 0 ? void 0 : _props$collabEdit2.inviteToEditHandler,
|
|
39
|
+
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected
|
|
40
|
+
}), (_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.findReplace && (_props$featureFlags5 = props.featureFlags) !== null && _props$featureFlags5 !== void 0 && _props$featureFlags5.twoLineEditorToolbar ? /*#__PURE__*/React.createElement(FindReplaceToolbarButtonWithState, {
|
|
41
|
+
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
42
|
+
popupsMountPoint: props.popupsMountPoint,
|
|
43
|
+
popupsScrollableElement: props.popupsScrollableElement,
|
|
44
|
+
editorView: props.editorView,
|
|
45
|
+
containerElement: props.containerElement,
|
|
46
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent
|
|
47
|
+
}) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
var _props$featureFlags6;
|
|
50
|
+
|
|
51
|
+
if ((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.twoLineEditorToolbar) {
|
|
52
|
+
var updateOnResize = function updateOnResize() {
|
|
53
|
+
setShouldSplitToolbar(window.innerWidth <= MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
window.addEventListener('resize', updateOnResize);
|
|
57
|
+
updateOnResize();
|
|
58
|
+
return function () {
|
|
59
|
+
return window.removeEventListener('resize', updateOnResize);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
7
63
|
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref) {
|
|
8
|
-
var _props$
|
|
64
|
+
var _props$featureFlags7, _props$featureFlags8, _props$featureFlags9;
|
|
9
65
|
|
|
10
66
|
var contextPanelWidth = _ref.width;
|
|
11
67
|
return /*#__PURE__*/React.createElement(MainToolbar, {
|
|
12
68
|
"data-testid": "ak-editor-main-toolbar",
|
|
13
|
-
showKeyline: props.showKeyline || contextPanelWidth > 0
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
popupsMountPoint: props.popupsMountPoint,
|
|
22
|
-
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
23
|
-
popupsScrollableElement: props.popupsScrollableElement,
|
|
24
|
-
disabled: props.disabled,
|
|
25
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
26
|
-
containerElement: props.containerElement,
|
|
27
|
-
hasMinWidth: props.hasMinWidth
|
|
28
|
-
}), /*#__PURE__*/React.createElement(MainToolbarCustomComponentsSlot, {
|
|
29
|
-
"data-testid": 'avatar-group-outside-plugin'
|
|
30
|
-
}, (props === null || props === void 0 ? void 0 : (_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.showAvatarGroupAsPlugin) === true ? null : /*#__PURE__*/React.createElement(AvatarsWithPluginState, {
|
|
31
|
-
editorView: props.editorView,
|
|
32
|
-
eventDispatcher: props.eventDispatcher,
|
|
33
|
-
inviteToEditComponent: props.collabEdit && props.collabEdit.inviteToEditComponent,
|
|
34
|
-
inviteToEditHandler: props.collabEdit && props.collabEdit.inviteToEditHandler,
|
|
35
|
-
isInviteToEditButtonSelected: props.collabEdit && props.collabEdit.isInviteToEditButtonSelected
|
|
36
|
-
}), props.customPrimaryToolbarComponents));
|
|
69
|
+
showKeyline: props.showKeyline || contextPanelWidth > 0,
|
|
70
|
+
twoLineEditorToolbar: !!((_props$featureFlags7 = props.featureFlags) !== null && _props$featureFlags7 !== void 0 && _props$featureFlags7.twoLineEditorToolbar)
|
|
71
|
+
}, /*#__PURE__*/React.createElement(MainToolbarFirstChild, {
|
|
72
|
+
twoLineEditorToolbar: !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.twoLineEditorToolbar)
|
|
73
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), /*#__PURE__*/React.createElement(MainToolbarSecondChild, {
|
|
74
|
+
"data-testid": 'avatar-group-outside-plugin',
|
|
75
|
+
twoLineEditorToolbar: !!((_props$featureFlags9 = props.featureFlags) !== null && _props$featureFlags9 !== void 0 && _props$featureFlags9.twoLineEditorToolbar)
|
|
76
|
+
}, shouldSplitToolbar ? nonCustomToolbar : customToolbar));
|
|
37
77
|
});
|
|
38
78
|
});
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
4
4
|
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { N30 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
8
8
|
import { akEditorMenuZIndex, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
9
|
+
export var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
9
10
|
var toolbarLineHeight = 56;
|
|
10
|
-
export var MainToolbar = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n box-shadow: ", ";\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n background-color: white;\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), function (props) {
|
|
11
|
+
export var MainToolbar = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n box-shadow: ", ";\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n background-color: white;\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), function (props) {
|
|
11
12
|
return props.showKeyline ? "0 ".concat(akEditorToolbarKeylineHeight, "px 0 0 ").concat(N30) : 'none';
|
|
12
|
-
}, akEditorSwoopCubicBezier, akEditorMenuZIndex, toolbarLineHeight,
|
|
13
|
+
}, akEditorSwoopCubicBezier, akEditorMenuZIndex, toolbarLineHeight, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, function (props) {
|
|
14
|
+
return props.twoLineEditorToolbar && "\n flex-wrap: wrap;\n height: calc(".concat(toolbarLineHeight, "px * 2);\n ");
|
|
15
|
+
}, akEditorMobileMaxWidth, toolbarLineHeight);
|
|
13
16
|
MainToolbar.displayName = 'MainToolbar';
|
|
14
17
|
export var MainToolbarIconBefore = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: ", "px;\n height: ", "px;\n width: ", "px;\n @media (max-width: ", "px) {\n grid-column: 1;\n grid-row: 1;\n }\n"])), gridSize() * 2, gridSize() * 4, gridSize() * 4, akEditorMobileMaxWidth);
|
|
15
18
|
MainToolbarIconBefore.displayName = 'MainToolbarIconBefore';
|
|
16
|
-
export var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
export var MainToolbarFirstChild = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n\n @media (max-width: ", "px) {\n ", "\n }\n @media (max-width: ", "px) {\n grid-column: 1;\n grid-row: 1;\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, function (props) {
|
|
20
|
+
return props.twoLineEditorToolbar && "\n flex: 1 1 100%;\n height: ".concat(toolbarLineHeight, "px;\n justify-content: flex-end;\n // ED-10241: We add fit-content to ensure that MainToolbar does not\n // shrink more than the size of its contents. This will prevent the\n // find/replace icon from being overlapped during a confluence\n // publish operation\n min-width: fit-content;\n ");
|
|
21
|
+
}, akEditorMobileMaxWidth);
|
|
22
|
+
MainToolbarFirstChild.displayName = 'MainToolbarFirstChild';
|
|
23
|
+
export var MainToolbarSecondChild = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n // ED-10241: We add fit-content to ensure that MainToolbar does not\n // shrink more than the size of its contents. This will prevent the\n // find/replace icon from being overlapped during a confluence\n // publish operation\n min-width: fit-content;\n @media (max-width: ", "px) {\n ", "\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, function (props) {
|
|
24
|
+
return props.twoLineEditorToolbar && "\n display: flex;\n flex-grow: 1;\n flex: 1 1 100%;\n margin: auto;\n height: ".concat(toolbarLineHeight, "px;\n min-width: 0;\n ");
|
|
25
|
+
});
|
|
26
|
+
MainToolbarSecondChild.displayName = 'MainToolbarSecondChild';
|
|
27
|
+
export var SecondaryToolbar = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n flex-shrink: 0;\n display: flex;\n padding: 24px 0;\n"])));
|
|
28
|
+
SecondaryToolbar.displayName = 'SecondaryToolbar';
|
|
29
|
+
export var NonCustomToolbarWrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n flex-grow: 1;\n"])));
|
|
30
|
+
NonCustomToolbarWrapper.displayName = 'NonCustomToolbar';
|
|
31
|
+
export var CustomToolbarWrapper = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n"])));
|
|
32
|
+
CustomToolbarWrapper.displayName = 'CustomToolbar';
|