@atlaskit/editor-core 151.1.2 → 151.3.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 +22 -0
- package/dist/cjs/create-editor/ReactEditorView.js +22 -8
- package/dist/cjs/create-editor/create-plugins-list.js +30 -11
- package/dist/cjs/labs/next/presets/cxhtml.js +1 -2
- package/dist/cjs/labs/next/presets/default.js +3 -1
- 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/code-bidi-warning/index.js +5 -2
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/main.js +12 -3
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +15 -5
- package/dist/cjs/plugins/code-block/index.js +3 -3
- package/dist/cjs/plugins/code-block/nodeviews/highlighting-code-block.js +6 -3
- package/dist/cjs/plugins/code-block/pm-plugins/main.js +11 -3
- 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/mediaNodeUpdater.js +3 -3
- 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 +31 -12
- package/dist/es2019/labs/next/presets/cxhtml.js +1 -2
- package/dist/es2019/labs/next/presets/default.js +3 -1
- 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/code-bidi-warning/index.js +8 -2
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/main.js +12 -2
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +16 -5
- package/dist/es2019/plugins/code-block/index.js +3 -2
- package/dist/es2019/plugins/code-block/nodeviews/highlighting-code-block.js +6 -3
- package/dist/es2019/plugins/code-block/pm-plugins/main.js +11 -3
- 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/mediaNodeUpdater.js +3 -3
- 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 +31 -12
- package/dist/esm/labs/next/presets/cxhtml.js +1 -2
- package/dist/esm/labs/next/presets/default.js +3 -1
- 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/code-bidi-warning/index.js +5 -2
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/main.js +12 -3
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +15 -5
- package/dist/esm/plugins/code-block/index.js +3 -3
- package/dist/esm/plugins/code-block/nodeviews/highlighting-code-block.js +6 -3
- package/dist/esm/plugins/code-block/pm-plugins/main.js +11 -3
- 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/mediaNodeUpdater.js +3 -3
- 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-bidi-warning/index.d.ts +4 -2
- package/dist/types/plugins/code-bidi-warning/pm-plugins/main.d.ts +4 -2
- package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +2 -1
- package/dist/types/plugins/code-bidi-warning/pm-plugins/types.d.ts +1 -0
- package/dist/types/plugins/code-block/index.d.ts +1 -1
- package/dist/types/plugins/code-block/nodeviews/highlighting-code-block.d.ts +12 -1
- package/dist/types/plugins/code-block/pm-plugins/main.d.ts +3 -1
- package/dist/types/plugins/code-block/types.d.ts +2 -0
- 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/mediaNodeUpdater.d.ts +2 -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 +14 -10
- 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
|
@@ -33,6 +33,36 @@ var fireAnalytics = function fireAnalytics() {
|
|
|
33
33
|
user: '-'
|
|
34
34
|
}]
|
|
35
35
|
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.fireAnalytics = fireAnalytics;
|
|
39
|
+
|
|
40
|
+
var validateTableCellNodeAttrs = function validateTableCellNodeAttrs(_ref, reportInvalidTableCellSpanAttrs) {
|
|
41
|
+
var colspan = _ref.colspan,
|
|
42
|
+
rowspan = _ref.rowspan,
|
|
43
|
+
tableLocalId = _ref.tableLocalId;
|
|
44
|
+
|
|
45
|
+
if (colspan && colspan < 0) {
|
|
46
|
+
reportInvalidTableCellSpanAttrs({
|
|
47
|
+
nodeType: 'tableCell',
|
|
48
|
+
attribute: 'colspan',
|
|
49
|
+
reason: 'negative value',
|
|
50
|
+
tableLocalId: tableLocalId,
|
|
51
|
+
spanValue: colspan
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (rowspan && rowspan < 0) {
|
|
56
|
+
reportInvalidTableCellSpanAttrs({
|
|
57
|
+
nodeType: 'tableCell',
|
|
58
|
+
attribute: 'rowspan',
|
|
59
|
+
reason: 'negative value',
|
|
60
|
+
tableLocalId: tableLocalId,
|
|
61
|
+
spanValue: rowspan
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return;
|
|
36
66
|
}; // We attempt to patch the document when we have extra, unneeded, column widths
|
|
37
67
|
// Take this node for example:
|
|
38
68
|
//
|
|
@@ -42,14 +72,21 @@ var fireAnalytics = function fireAnalytics() {
|
|
|
42
72
|
// We remove the third width here, assumed duplicate content.
|
|
43
73
|
|
|
44
74
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var removeExtraneousColumnWidths = function removeExtraneousColumnWidths(node, basePos, tr) {
|
|
75
|
+
var removeExtraneousColumnWidths = function removeExtraneousColumnWidths(node, basePos, tr, reportInvalidTableCellSpanAttrs) {
|
|
48
76
|
var hasProblems = false;
|
|
49
77
|
tr = replaceCells(tr, node, basePos, function (cell) {
|
|
50
78
|
var _cell$attrs = cell.attrs,
|
|
51
79
|
colwidth = _cell$attrs.colwidth,
|
|
52
|
-
colspan = _cell$attrs.colspan
|
|
80
|
+
colspan = _cell$attrs.colspan,
|
|
81
|
+
rowspan = _cell$attrs.rowspan;
|
|
82
|
+
|
|
83
|
+
if (reportInvalidTableCellSpanAttrs) {
|
|
84
|
+
validateTableCellNodeAttrs({
|
|
85
|
+
colspan: colspan,
|
|
86
|
+
rowspan: rowspan,
|
|
87
|
+
tableLocalId: node.attrs.localId
|
|
88
|
+
}, reportInvalidTableCellSpanAttrs);
|
|
89
|
+
}
|
|
53
90
|
|
|
54
91
|
if (colwidth && colwidth.length > colspan) {
|
|
55
92
|
hasProblems = true;
|
|
@@ -73,12 +110,12 @@ var removeExtraneousColumnWidths = function removeExtraneousColumnWidths(node, b
|
|
|
73
110
|
|
|
74
111
|
exports.removeExtraneousColumnWidths = removeExtraneousColumnWidths;
|
|
75
112
|
|
|
76
|
-
var fixTables = function fixTables(tr) {
|
|
113
|
+
var fixTables = function fixTables(tr, reportInvalidTableCellSpanAttrs) {
|
|
77
114
|
var hasProblems = false;
|
|
78
115
|
tr.doc.descendants(function (node, pos) {
|
|
79
116
|
if (node.type.name === 'table') {
|
|
80
117
|
// in the unlikely event of having to fix multiple tables at the same time
|
|
81
|
-
hasProblems = removeExtraneousColumnWidths(node, tr.mapping.map(pos), tr);
|
|
118
|
+
hasProblems = removeExtraneousColumnWidths(node, tr.mapping.map(pos), tr, reportInvalidTableCellSpanAttrs);
|
|
82
119
|
}
|
|
83
120
|
});
|
|
84
121
|
|
|
@@ -147,8 +147,9 @@ var FloatingContextualButtonInner = /*#__PURE__*/function (_React$Component) {
|
|
|
147
147
|
title: labelCellOptions,
|
|
148
148
|
onClick: this.handleClick,
|
|
149
149
|
iconBefore: /*#__PURE__*/_react.default.createElement(_chevronDown.default, {
|
|
150
|
-
label:
|
|
151
|
-
})
|
|
150
|
+
label: ""
|
|
151
|
+
}),
|
|
152
|
+
"aria-label": labelCellOptions
|
|
152
153
|
}));
|
|
153
154
|
|
|
154
155
|
var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
|
|
@@ -491,6 +491,7 @@ var ContextualMenu = /*#__PURE__*/function (_Component) {
|
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
494
|
+
"data-testid": "table-cell-contextual-menu",
|
|
494
495
|
onMouseLeave: this.closeSubmenu
|
|
495
496
|
}, /*#__PURE__*/_react.default.createElement(_DropdownMenu.default, {
|
|
496
497
|
mountTo: mountPoint,
|
|
@@ -30,7 +30,7 @@ var _uiStyles = require("./ui-styles.css");
|
|
|
30
30
|
var _templateObject, _templateObject2, _templateObject3;
|
|
31
31
|
|
|
32
32
|
var rangeSelectionStyles = "\n.".concat(_types.TableCssClassName.NODEVIEW_WRAPPER, ".").concat(_editorSharedStyles.akEditorSelectedNodeClassName, " table tbody tr {\n th,td {\n ").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), "\n }\n}\n");
|
|
33
|
-
var sentinelStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, ", > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n position: absolute;\n width: 100%;\n height:
|
|
33
|
+
var sentinelStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, ", > .").concat(_types.TableCssClassName.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(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: ").concat(_consts.columnControlsDecorationHeight, "px;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n bottom: ").concat(_consts.tableScrollbarOffset + _consts.stickyRowOffsetTop + _consts.tablePadding * 2 + 23, "px;\n }\n &.").concat(_types.TableCssClassName.WITH_CONTROLS, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: 0px;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n margin-bottom: ").concat(_consts.columnControlsDecorationHeight, "px;\n }\n }\n}");
|
|
34
34
|
var tableStyles = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), _types.TableCssClassName.LAYOUT_BUTTON, _colors.N20A, _colors.N300, _types.TableCssClassName.LAYOUT_BUTTON, _types.TableCssClassName.IS_RESIZING, _colors.B300, _editorCommon.tableSharedStyle, _uiStyles.columnControlsLineMarker, _uiStyles.hoveredDeleteButton, _uiStyles.hoveredCell, _uiStyles.hoveredWarningCell, _uiStyles.resizeHandle, rangeSelectionStyles, _types.TableCssClassName.LAST_ITEM_IN_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_CELL, _consts.tableCellBackgroundColor, _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, _uiStyles.insertColumnButtonWrapper, _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, _uiStyles.insertRowButtonWrapper, _uiStyles.DeleteButton, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.stickyRowOffsetTop + 2, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.stickyRowOffsetTop, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.CORNER_CONTROLS, _editorSharedStyles.akEditorSmallZIndex, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, _consts.stickyRowOffsetTop, _consts.stickyRowZIndex, _colors.N40A, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.stickyRowZIndex + 1, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tableToolbarSize, _consts.stickyHeaderBorderBottomWidth, _consts.tableBorderColor, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_CONTROLS, _consts.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableControlsSpacing + 2, _types.TableCssClassName.CORNER_CONTROLS, _consts.tableControlsSpacing - _consts.tableToolbarSize + 2, function (props) {
|
|
35
35
|
var _props$featureFlags;
|
|
36
36
|
|
|
@@ -48,7 +48,7 @@ var tableBorderSelectedColor = _colors.B300;
|
|
|
48
48
|
exports.tableBorderSelectedColor = tableBorderSelectedColor;
|
|
49
49
|
var tableCellDeleteColor = _colors.R50;
|
|
50
50
|
exports.tableCellDeleteColor = tableCellDeleteColor;
|
|
51
|
-
var tableBorderDeleteColor = _colors.
|
|
51
|
+
var tableBorderDeleteColor = _colors.R400;
|
|
52
52
|
exports.tableBorderDeleteColor = tableBorderDeleteColor;
|
|
53
53
|
var tableToolbarDeleteColor = _colors.R75;
|
|
54
54
|
exports.tableToolbarDeleteColor = tableToolbarDeleteColor;
|
|
@@ -40,7 +40,7 @@ var _default = (0, _reactIntl.defineMessages)({
|
|
|
40
40
|
},
|
|
41
41
|
confirmDeleteLinkedModalMessage: {
|
|
42
42
|
id: 'fabric.editor.tables.confirmDeleteLinkedModalMessage',
|
|
43
|
-
defaultMessage: 'Removing this table will
|
|
43
|
+
defaultMessage: 'Removing this table will break all the charts connected to it.',
|
|
44
44
|
description: 'Message for confirm modal when deleting a table linked to an extension.'
|
|
45
45
|
}
|
|
46
46
|
});
|
|
@@ -87,7 +87,7 @@ var Decision = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
87
87
|
value: function update(node, decorations) {
|
|
88
88
|
var _this = this;
|
|
89
89
|
|
|
90
|
-
return (0, _get2.default)((0, _getPrototypeOf2.default)(Decision.prototype), "update", this).call(this, node, decorations, // Toggle the placeholder based on whether user input exists.
|
|
90
|
+
return (0, _get2.default)((0, _getPrototypeOf2.default)(Decision.prototype), "update", this).call(this, node, decorations, undefined, // Toggle the placeholder based on whether user input exists.
|
|
91
91
|
function (_currentNode, _newNode) {
|
|
92
92
|
return !_this.isContentEmpty(_newNode);
|
|
93
93
|
});
|
|
@@ -170,7 +170,7 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
170
170
|
value: function update(node, decorations) {
|
|
171
171
|
var _this3 = this;
|
|
172
172
|
|
|
173
|
-
return (0, _get2.default)((0, _getPrototypeOf2.default)(Task.prototype), "update", this).call(this, node, decorations, function (currentNode, newNode) {
|
|
173
|
+
return (0, _get2.default)((0, _getPrototypeOf2.default)(Task.prototype), "update", this).call(this, node, decorations, undefined, function (currentNode, newNode) {
|
|
174
174
|
return (// Toggle the placeholder based on whether user input exists
|
|
175
175
|
!_this3.isContentEmpty(newNode) && !!(currentNode.attrs.state === newNode.attrs.state)
|
|
176
176
|
);
|
|
@@ -162,9 +162,9 @@ function createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispa
|
|
|
162
162
|
rest = (0, _objectWithoutProperties2.default)(_node$attrs, ["localId"]);
|
|
163
163
|
|
|
164
164
|
if (localId === undefined || localId === null || localId === '') {
|
|
165
|
-
tr.
|
|
165
|
+
tr.step(new _utils.SetAttrsStep(pos, _objectSpread({
|
|
166
166
|
localId: _adfSchema.uuid.generate()
|
|
167
|
-
}, rest));
|
|
167
|
+
}, rest)));
|
|
168
168
|
modified = true;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -267,7 +267,8 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
267
267
|
onClick: function onClick(color) {
|
|
268
268
|
return _this2.changeTextColor(color, pluginState.disabled);
|
|
269
269
|
},
|
|
270
|
-
selectedColor: pluginState.color
|
|
270
|
+
selectedColor: pluginState.color,
|
|
271
|
+
isShowingMoreColors: isShowingMoreColors
|
|
271
272
|
})), showMoreColorsToggle && /*#__PURE__*/_react.default.createElement(_styles2.ShowMoreWrapper, null, /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
|
|
272
273
|
appearance: "subtle",
|
|
273
274
|
onClick: this.handleShowMoreToggle,
|
|
@@ -107,7 +107,8 @@ var textFormatting = function textFormatting() {
|
|
|
107
107
|
disabled = _ref6.disabled;
|
|
108
108
|
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
109
109
|
plugins: {
|
|
110
|
-
textFormattingState: _main.pluginKey
|
|
110
|
+
textFormattingState: _main.pluginKey,
|
|
111
|
+
clearFormattingPluginState: _clearFormatting.pluginKey
|
|
111
112
|
},
|
|
112
113
|
render: function render() {
|
|
113
114
|
return /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
|
|
@@ -35,6 +35,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
35
|
|
|
36
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
37
|
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
38
39
|
var ITEM_PADDING = 12;
|
|
39
40
|
var LIST_ITEM_ESTIMATED_HEIGHT = _TypeAheadListItem.ICON_HEIGHT + ITEM_PADDING * 2;
|
|
40
41
|
var LIST_MAX_HEIGHT = 380;
|
|
@@ -2,52 +2,103 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
8
10
|
exports.FullPageToolbar = void 0;
|
|
9
11
|
|
|
10
|
-
var
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
15
|
|
|
12
16
|
var _ui = _interopRequireDefault(require("../../../plugins/collab-edit/ui"));
|
|
13
17
|
|
|
18
|
+
var _FindReplaceToolbarButtonWithState = _interopRequireDefault(require("../../../plugins/find-replace/FindReplaceToolbarButtonWithState"));
|
|
19
|
+
|
|
20
|
+
var _BeforePrimaryToolbarWrapper = require("../../../plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper");
|
|
21
|
+
|
|
14
22
|
var _Toolbar = _interopRequireDefault(require("../../Toolbar"));
|
|
15
23
|
|
|
16
24
|
var _MainToolbar = require("./MainToolbar");
|
|
17
25
|
|
|
18
26
|
var _context = require("../../ContextPanel/context");
|
|
19
27
|
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
|
|
20
32
|
var FullPageToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
33
|
+
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _props$featureFlags4, _props$featureFlags5;
|
|
34
|
+
|
|
35
|
+
var _useState = (0, _react.useState)(false),
|
|
36
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
37
|
+
shouldSplitToolbar = _useState2[0],
|
|
38
|
+
setShouldSplitToolbar = _useState2[1];
|
|
39
|
+
|
|
40
|
+
var nonCustomToolbar = /*#__PURE__*/_react.default.createElement(_MainToolbar.NonCustomToolbarWrapper, null, props.beforeIcon && /*#__PURE__*/_react.default.createElement(_MainToolbar.MainToolbarIconBefore, null, props.beforeIcon), /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
|
|
41
|
+
editorView: props.editorView,
|
|
42
|
+
editorActions: props.editorActions,
|
|
43
|
+
eventDispatcher: props.eventDispatcher,
|
|
44
|
+
providerFactory: props.providerFactory,
|
|
45
|
+
appearance: props.appearance,
|
|
46
|
+
items: props.primaryToolbarComponents,
|
|
47
|
+
popupsMountPoint: props.popupsMountPoint,
|
|
48
|
+
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
49
|
+
popupsScrollableElement: props.popupsScrollableElement,
|
|
50
|
+
disabled: props.disabled,
|
|
51
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
52
|
+
containerElement: props.containerElement,
|
|
53
|
+
hasMinWidth: props.hasMinWidth
|
|
54
|
+
}));
|
|
55
|
+
|
|
56
|
+
var customToolbar = /*#__PURE__*/_react.default.createElement(_MainToolbar.CustomToolbarWrapper, null, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/_react.default.createElement(_BeforePrimaryToolbarWrapper.BeforePrimaryToolbarWrapper, {
|
|
57
|
+
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
58
|
+
}) : 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.default.createElement(_ui.default, {
|
|
59
|
+
editorView: props.editorView,
|
|
60
|
+
eventDispatcher: props.eventDispatcher,
|
|
61
|
+
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
62
|
+
inviteToEditHandler: (_props$collabEdit2 = props.collabEdit) === null || _props$collabEdit2 === void 0 ? void 0 : _props$collabEdit2.inviteToEditHandler,
|
|
63
|
+
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected
|
|
64
|
+
}), (_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.default.createElement(_FindReplaceToolbarButtonWithState.default, {
|
|
65
|
+
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
66
|
+
popupsMountPoint: props.popupsMountPoint,
|
|
67
|
+
popupsScrollableElement: props.popupsScrollableElement,
|
|
68
|
+
editorView: props.editorView,
|
|
69
|
+
containerElement: props.containerElement,
|
|
70
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent
|
|
71
|
+
}) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
|
|
72
|
+
|
|
73
|
+
(0, _react.useEffect)(function () {
|
|
74
|
+
var _props$featureFlags6;
|
|
75
|
+
|
|
76
|
+
if ((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.twoLineEditorToolbar) {
|
|
77
|
+
var updateOnResize = function updateOnResize() {
|
|
78
|
+
setShouldSplitToolbar(window.innerWidth <= _MainToolbar.MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
window.addEventListener('resize', updateOnResize);
|
|
82
|
+
updateOnResize();
|
|
83
|
+
return function () {
|
|
84
|
+
return window.removeEventListener('resize', updateOnResize);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
21
88
|
return /*#__PURE__*/_react.default.createElement(_context.ContextPanelConsumer, null, function (_ref) {
|
|
22
|
-
var _props$
|
|
89
|
+
var _props$featureFlags7, _props$featureFlags8, _props$featureFlags9;
|
|
23
90
|
|
|
24
91
|
var contextPanelWidth = _ref.width;
|
|
25
92
|
return /*#__PURE__*/_react.default.createElement(_MainToolbar.MainToolbar, {
|
|
26
93
|
"data-testid": "ak-editor-main-toolbar",
|
|
27
|
-
showKeyline: props.showKeyline || contextPanelWidth > 0
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
popupsMountPoint: props.popupsMountPoint,
|
|
36
|
-
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
37
|
-
popupsScrollableElement: props.popupsScrollableElement,
|
|
38
|
-
disabled: props.disabled,
|
|
39
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
40
|
-
containerElement: props.containerElement,
|
|
41
|
-
hasMinWidth: props.hasMinWidth
|
|
42
|
-
}), /*#__PURE__*/_react.default.createElement(_MainToolbar.MainToolbarCustomComponentsSlot, {
|
|
43
|
-
"data-testid": 'avatar-group-outside-plugin'
|
|
44
|
-
}, (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.default.createElement(_ui.default, {
|
|
45
|
-
editorView: props.editorView,
|
|
46
|
-
eventDispatcher: props.eventDispatcher,
|
|
47
|
-
inviteToEditComponent: props.collabEdit && props.collabEdit.inviteToEditComponent,
|
|
48
|
-
inviteToEditHandler: props.collabEdit && props.collabEdit.inviteToEditHandler,
|
|
49
|
-
isInviteToEditButtonSelected: props.collabEdit && props.collabEdit.isInviteToEditButtonSelected
|
|
50
|
-
}), props.customPrimaryToolbarComponents));
|
|
94
|
+
showKeyline: props.showKeyline || contextPanelWidth > 0,
|
|
95
|
+
twoLineEditorToolbar: !!((_props$featureFlags7 = props.featureFlags) !== null && _props$featureFlags7 !== void 0 && _props$featureFlags7.twoLineEditorToolbar)
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement(_MainToolbar.MainToolbarFirstChild, {
|
|
97
|
+
twoLineEditorToolbar: !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.twoLineEditorToolbar)
|
|
98
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), /*#__PURE__*/_react.default.createElement(_MainToolbar.MainToolbarSecondChild, {
|
|
99
|
+
"data-testid": 'avatar-group-outside-plugin',
|
|
100
|
+
twoLineEditorToolbar: !!((_props$featureFlags9 = props.featureFlags) !== null && _props$featureFlags9 !== void 0 && _props$featureFlags9.twoLineEditorToolbar)
|
|
101
|
+
}, shouldSplitToolbar ? nonCustomToolbar : customToolbar));
|
|
51
102
|
});
|
|
52
103
|
});
|
|
53
104
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.SecondaryToolbar = exports.
|
|
8
|
+
exports.CustomToolbarWrapper = exports.NonCustomToolbarWrapper = exports.SecondaryToolbar = exports.MainToolbarSecondChild = exports.MainToolbarFirstChild = exports.MainToolbarIconBefore = exports.MainToolbar = exports.MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
@@ -17,13 +17,17 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
17
17
|
|
|
18
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
19
19
|
|
|
20
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
20
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
21
21
|
|
|
22
|
+
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
23
|
+
exports.MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT;
|
|
22
24
|
var toolbarLineHeight = 56;
|
|
23
25
|
|
|
24
|
-
var MainToolbar = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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) {
|
|
26
|
+
var MainToolbar = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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) {
|
|
25
27
|
return props.showKeyline ? "0 ".concat(_editorSharedStyles.akEditorToolbarKeylineHeight, "px 0 0 ").concat(_colors.N30) : 'none';
|
|
26
|
-
}, _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorMenuZIndex, toolbarLineHeight,
|
|
28
|
+
}, _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorMenuZIndex, toolbarLineHeight, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, function (props) {
|
|
29
|
+
return props.twoLineEditorToolbar && "\n flex-wrap: wrap;\n height: calc(".concat(toolbarLineHeight, "px * 2);\n ");
|
|
30
|
+
}, _editorSharedStyles.akEditorMobileMaxWidth, toolbarLineHeight);
|
|
27
31
|
|
|
28
32
|
exports.MainToolbar = MainToolbar;
|
|
29
33
|
MainToolbar.displayName = 'MainToolbar';
|
|
@@ -33,12 +37,31 @@ var MainToolbarIconBefore = _styledComponents.default.div(_templateObject2 || (_
|
|
|
33
37
|
exports.MainToolbarIconBefore = MainToolbarIconBefore;
|
|
34
38
|
MainToolbarIconBefore.displayName = 'MainToolbarIconBefore';
|
|
35
39
|
|
|
36
|
-
var
|
|
40
|
+
var MainToolbarFirstChild = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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) {
|
|
41
|
+
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 ");
|
|
42
|
+
}, _editorSharedStyles.akEditorMobileMaxWidth);
|
|
37
43
|
|
|
38
|
-
exports.
|
|
39
|
-
|
|
44
|
+
exports.MainToolbarFirstChild = MainToolbarFirstChild;
|
|
45
|
+
MainToolbarFirstChild.displayName = 'MainToolbarFirstChild';
|
|
40
46
|
|
|
41
|
-
var
|
|
47
|
+
var MainToolbarSecondChild = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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) {
|
|
48
|
+
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 ");
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
exports.MainToolbarSecondChild = MainToolbarSecondChild;
|
|
52
|
+
MainToolbarSecondChild.displayName = 'MainToolbarSecondChild';
|
|
53
|
+
|
|
54
|
+
var SecondaryToolbar = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\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"])));
|
|
42
55
|
|
|
43
56
|
exports.SecondaryToolbar = SecondaryToolbar;
|
|
44
|
-
SecondaryToolbar.displayName = 'SecondaryToolbar';
|
|
57
|
+
SecondaryToolbar.displayName = 'SecondaryToolbar';
|
|
58
|
+
|
|
59
|
+
var NonCustomToolbarWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n flex-grow: 1;\n"])));
|
|
60
|
+
|
|
61
|
+
exports.NonCustomToolbarWrapper = NonCustomToolbarWrapper;
|
|
62
|
+
NonCustomToolbarWrapper.displayName = 'NonCustomToolbar';
|
|
63
|
+
|
|
64
|
+
var CustomToolbarWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n"])));
|
|
65
|
+
|
|
66
|
+
exports.CustomToolbarWrapper = CustomToolbarWrapper;
|
|
67
|
+
CustomToolbarWrapper.displayName = 'CustomToolbar';
|
|
@@ -25,8 +25,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
25
25
|
|
|
26
26
|
var _react = _interopRequireWildcard(require("react"));
|
|
27
27
|
|
|
28
|
-
var _reactIntl = require("react-intl");
|
|
29
|
-
|
|
30
28
|
var _done = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/done"));
|
|
31
29
|
|
|
32
30
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -43,15 +41,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
43
41
|
|
|
44
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
43
|
|
|
46
|
-
// IMO these should live inside @atlaskit/theme
|
|
47
|
-
var messages = (0, _reactIntl.defineMessages)({
|
|
48
|
-
selected: {
|
|
49
|
-
id: 'fabric.editor.selected',
|
|
50
|
-
defaultMessage: 'Selected',
|
|
51
|
-
description: 'If the item is selected or not.'
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
44
|
var Color = /*#__PURE__*/function (_PureComponent) {
|
|
56
45
|
(0, _inherits2.default)(Color, _PureComponent);
|
|
57
46
|
|
|
@@ -85,19 +74,20 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
85
74
|
key: "render",
|
|
86
75
|
value: function render() {
|
|
87
76
|
var _this$props2 = this.props,
|
|
77
|
+
autoFocus = _this$props2.autoFocus,
|
|
88
78
|
tabIndex = _this$props2.tabIndex,
|
|
89
79
|
value = _this$props2.value,
|
|
90
80
|
label = _this$props2.label,
|
|
91
81
|
isSelected = _this$props2.isSelected,
|
|
92
82
|
borderColor = _this$props2.borderColor,
|
|
93
83
|
_this$props2$checkMar = _this$props2.checkMarkColor,
|
|
94
|
-
checkMarkColor = _this$props2$checkMar === void 0 ? _colors.N0 : _this$props2$checkMar
|
|
95
|
-
formatMessage = _this$props2.intl.formatMessage;
|
|
96
|
-
var ariaLabelText = isSelected ? "".concat(label, " ").concat(formatMessage(messages.selected)) : label;
|
|
84
|
+
checkMarkColor = _this$props2$checkMar === void 0 ? _colors.N0 : _this$props2$checkMar;
|
|
97
85
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
98
86
|
content: label
|
|
99
87
|
}, /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
100
|
-
"aria-label":
|
|
88
|
+
"aria-label": label,
|
|
89
|
+
role: "radio",
|
|
90
|
+
"aria-checked": isSelected,
|
|
101
91
|
onClick: this.onClick,
|
|
102
92
|
onMouseDown: this.onMouseDown,
|
|
103
93
|
tabIndex: tabIndex,
|
|
@@ -105,7 +95,8 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
105
95
|
style: {
|
|
106
96
|
backgroundColor: value || 'transparent',
|
|
107
97
|
border: "1px solid ".concat(borderColor)
|
|
108
|
-
}
|
|
98
|
+
},
|
|
99
|
+
autoFocus: autoFocus
|
|
109
100
|
}, isSelected && /*#__PURE__*/_react.default.createElement(_done.default, {
|
|
110
101
|
primaryColor: checkMarkColor,
|
|
111
102
|
label: ""
|
|
@@ -115,6 +106,5 @@ var Color = /*#__PURE__*/function (_PureComponent) {
|
|
|
115
106
|
return Color;
|
|
116
107
|
}(_react.PureComponent);
|
|
117
108
|
|
|
118
|
-
var _default =
|
|
119
|
-
|
|
109
|
+
var _default = Color;
|
|
120
110
|
exports.default = _default;
|
|
@@ -40,6 +40,7 @@ var ColorPalette = function ColorPalette(props) {
|
|
|
40
40
|
onClick = props.onClick,
|
|
41
41
|
selectedColor = props.selectedColor,
|
|
42
42
|
className = props.className,
|
|
43
|
+
isShowingMoreColors = props.isShowingMoreColors,
|
|
43
44
|
formatMessage = props.intl.formatMessage;
|
|
44
45
|
|
|
45
46
|
var colorsPerRow = _react.default.useMemo(function () {
|
|
@@ -52,11 +53,12 @@ var ColorPalette = function ColorPalette(props) {
|
|
|
52
53
|
}, []);
|
|
53
54
|
}, [palette, cols]);
|
|
54
55
|
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, colorsPerRow.map(function (row) {
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, colorsPerRow.map(function (row, rowIdx) {
|
|
56
57
|
return /*#__PURE__*/_react.default.createElement(_styles.ColorPaletteWrapper, {
|
|
57
58
|
className: className,
|
|
58
|
-
key: "row-first-color-".concat(row[0].value)
|
|
59
|
-
|
|
59
|
+
key: "row-first-color-".concat(row[0].value),
|
|
60
|
+
role: "radiogroup"
|
|
61
|
+
}, row.map(function (_ref, colorIdx) {
|
|
60
62
|
var value = _ref.value,
|
|
61
63
|
label = _ref.label,
|
|
62
64
|
border = _ref.border,
|
|
@@ -68,7 +70,8 @@ var ColorPalette = function ColorPalette(props) {
|
|
|
68
70
|
label: message ? formatMessage(message) : label,
|
|
69
71
|
onClick: onClick,
|
|
70
72
|
isSelected: value === selectedColor,
|
|
71
|
-
checkMarkColor: getContrastColor(value, [_colors.N0, _colors.N500])
|
|
73
|
+
checkMarkColor: getContrastColor(value, [_colors.N0, _colors.N500]),
|
|
74
|
+
autoFocus: isShowingMoreColors && rowIdx === 1 && colorIdx === 0
|
|
72
75
|
});
|
|
73
76
|
}));
|
|
74
77
|
}));
|
|
@@ -41,7 +41,7 @@ var _templateObject, _templateObject2;
|
|
|
41
41
|
var ColorPickerButtonWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"]))); // Control the size of color picker buttons and preview
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var ColorPickerWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n background-color: white;\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n padding:
|
|
44
|
+
var ColorPickerWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n background-color: white;\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n padding: 8px 0px;\n"])), (0, _constants.borderRadius)(), _colors.N60A, _colors.N60A);
|
|
45
45
|
|
|
46
46
|
var ColorPickerButton = function ColorPickerButton(props) {
|
|
47
47
|
var _props$size, _props$size2;
|