@atlaskit/editor-core 161.0.0 → 162.0.2
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 +50 -0
- package/dist/cjs/actions/index.js +76 -48
- package/dist/cjs/extensibility.js +2 -2
- package/dist/cjs/labs/next/full-page.js +2 -2
- package/dist/cjs/plugins/block-type/styles.js +5 -2
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +13 -11
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +11 -7
- package/dist/cjs/plugins/card/messages.js +4 -4
- package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +29 -11
- package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +66 -7
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +166 -7
- package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +9 -6
- package/dist/cjs/plugins/card/ui/assets/card.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/embed.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/inline.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/url.js +1 -1
- package/dist/cjs/plugins/card/ui/link-toolbar-button-group-options.js +60 -0
- package/dist/cjs/plugins/card/ui/link-toolbar-icon-dropdown-options.js +66 -0
- package/dist/cjs/plugins/card/ui/styled.js +5 -13
- package/dist/cjs/plugins/card/ui/types.js +5 -0
- package/dist/cjs/plugins/clipboard/pm-plugins/main.js +99 -3
- package/dist/cjs/plugins/code-block/styles.js +45 -38
- package/dist/cjs/plugins/extension/plugin-factory.js +4 -1
- package/dist/cjs/plugins/extension/pm-plugins/main.js +34 -11
- package/dist/cjs/plugins/extension/utils.js +57 -12
- package/dist/cjs/plugins/find-replace/ui/Find.js +12 -12
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +5 -5
- package/dist/cjs/plugins/find-replace/ui/Replace.js +5 -5
- package/dist/cjs/plugins/find-replace/ui/styles.js +12 -15
- package/dist/cjs/plugins/layout/styles.js +2 -2
- package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +180 -0
- package/dist/cjs/plugins/list/commands/index.js +35 -38
- package/dist/cjs/plugins/list/utils/replace-content.js +31 -0
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/cjs/plugins/media/styles.js +2 -2
- package/dist/cjs/plugins/media/utils/media-single.js +15 -2
- package/dist/cjs/plugins/paste/handlers.js +19 -5
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +1 -1
- package/dist/cjs/plugins/placeholder-text/index.js +45 -1
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +66 -22
- package/dist/cjs/plugins/placeholder-text/selection-utils.js +19 -0
- package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
- package/dist/cjs/plugins/table/commands/index.js +0 -6
- package/dist/cjs/plugins/table/commands/insert.js +1 -1
- package/dist/cjs/plugins/table/commands/misc.js +5 -18
- package/dist/cjs/plugins/table/commands-with-analytics.js +1 -1
- package/dist/cjs/plugins/table/handlers.js +6 -2
- package/dist/cjs/plugins/table/index.js +7 -13
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/cjs/plugins/table/nodeviews/table.js +7 -38
- package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/main.js +3 -1
- package/dist/cjs/plugins/table/pm-plugins/plugin-factory.js +4 -7
- package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +11 -0
- package/dist/cjs/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -3
- package/dist/cjs/plugins/table/reducer.js +0 -7
- package/dist/cjs/plugins/table/toolbar.js +5 -15
- package/dist/cjs/plugins/table/transforms/metadata.js +2 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +1 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/{styles.css.js → styles.js} +0 -0
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +4 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/{styles.css.js → styles.js} +0 -0
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/cjs/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/cjs/plugins/table/ui/common-styles.js +53 -0
- package/dist/cjs/plugins/table/ui/ui-styles.js +109 -0
- package/dist/cjs/plugins/table/utils/nodes.js +15 -15
- package/dist/cjs/plugins/tasks-and-decisions/commands.js +15 -1
- package/dist/cjs/plugins/text-formatting/styles.js +5 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +71 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/cjs/plugins/text-formatting/utils.js +30 -2
- package/dist/cjs/plugins/type-ahead/api.js +32 -1
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -5
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/cjs/plugins/type-ahead/utils.js +22 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +33 -10
- package/dist/cjs/utils/index.js +1 -8
- package/dist/cjs/utils/insert.js +1 -9
- package/dist/cjs/utils/selection.js +2 -9
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +20 -23
- package/dist/es2019/extensibility.js +1 -1
- package/dist/es2019/labs/next/full-page.js +2 -2
- package/dist/es2019/plugins/block-type/styles.js +3 -3
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +15 -12
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +19 -14
- package/dist/es2019/plugins/card/messages.js +4 -4
- package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +21 -9
- package/dist/es2019/plugins/card/ui/LinkToolbarButtonGroup.js +54 -3
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +145 -3
- package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +10 -6
- package/dist/es2019/plugins/card/ui/assets/card.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/embed.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/inline.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/url.js +1 -1
- package/dist/es2019/plugins/card/ui/link-toolbar-button-group-options.js +45 -0
- package/dist/es2019/plugins/card/ui/link-toolbar-icon-dropdown-options.js +51 -0
- package/dist/es2019/plugins/card/ui/styled.js +2 -2
- package/dist/es2019/plugins/card/ui/types.js +1 -0
- package/dist/es2019/plugins/clipboard/pm-plugins/main.js +91 -9
- package/dist/es2019/plugins/code-block/styles.js +14 -14
- package/dist/es2019/plugins/extension/plugin-factory.js +3 -1
- package/dist/es2019/plugins/extension/pm-plugins/main.js +38 -12
- package/dist/es2019/plugins/extension/utils.js +37 -2
- package/dist/es2019/plugins/find-replace/ui/Find.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/styles.js +14 -9
- package/dist/es2019/plugins/layout/styles.js +5 -1
- package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +163 -0
- package/dist/es2019/plugins/list/commands/index.js +29 -28
- package/dist/es2019/plugins/list/utils/replace-content.js +22 -0
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/es2019/plugins/media/styles.js +1 -1
- package/dist/es2019/plugins/media/utils/media-single.js +14 -1
- package/dist/es2019/plugins/paste/handlers.js +19 -5
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/es2019/plugins/placeholder-text/index.js +46 -1
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +66 -20
- package/dist/es2019/plugins/placeholder-text/selection-utils.js +9 -0
- package/dist/es2019/plugins/placeholder-text/styles.js +22 -0
- package/dist/es2019/plugins/table/commands/index.js +1 -1
- package/dist/es2019/plugins/table/commands/insert.js +1 -1
- package/dist/es2019/plugins/table/commands/misc.js +5 -11
- package/dist/es2019/plugins/table/commands-with-analytics.js +1 -1
- package/dist/es2019/plugins/table/handlers.js +6 -2
- package/dist/es2019/plugins/table/index.js +4 -8
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/es2019/plugins/table/nodeviews/table.js +2 -16
- package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/main.js +2 -1
- package/dist/es2019/plugins/table/pm-plugins/plugin-factory.js +1 -2
- package/dist/es2019/plugins/table/pm-plugins/plugin-key.js +2 -0
- package/dist/es2019/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +1 -1
- package/dist/es2019/plugins/table/reducer.js +0 -9
- package/dist/es2019/plugins/table/toolbar.js +1 -4
- package/dist/es2019/plugins/table/transforms/metadata.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/{styles.css.js → styles.js} +0 -0
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +3 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/{styles.css.js → styles.js} +0 -0
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/es2019/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/es2019/plugins/table/ui/{common-styles.css.js → common-styles.js} +57 -27
- package/dist/es2019/plugins/table/ui/{ui-styles.css.js → ui-styles.js} +99 -78
- package/dist/es2019/plugins/table/utils/nodes.js +11 -11
- package/dist/es2019/plugins/tasks-and-decisions/commands.js +13 -1
- package/dist/es2019/plugins/text-formatting/styles.js +3 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +61 -2
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/es2019/plugins/text-formatting/utils.js +13 -1
- package/dist/es2019/plugins/type-ahead/api.js +31 -2
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +17 -5
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/es2019/plugins/type-ahead/utils.js +15 -0
- package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/ContentStyles/index.js +46 -24
- package/dist/es2019/utils/index.js +1 -1
- package/dist/es2019/utils/insert.js +2 -10
- package/dist/es2019/utils/selection.js +1 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +76 -48
- package/dist/esm/extensibility.js +1 -1
- package/dist/esm/labs/next/full-page.js +2 -2
- package/dist/esm/plugins/block-type/styles.js +4 -2
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +14 -12
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +9 -5
- package/dist/esm/plugins/card/messages.js +4 -4
- package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +25 -9
- package/dist/esm/plugins/card/ui/LinkToolbarButtonGroup.js +57 -5
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +154 -5
- package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +9 -6
- package/dist/esm/plugins/card/ui/assets/card.js +1 -1
- package/dist/esm/plugins/card/ui/assets/embed.js +1 -1
- package/dist/esm/plugins/card/ui/assets/inline.js +1 -1
- package/dist/esm/plugins/card/ui/assets/url.js +1 -1
- package/dist/esm/plugins/card/ui/link-toolbar-button-group-options.js +45 -0
- package/dist/esm/plugins/card/ui/link-toolbar-icon-dropdown-options.js +51 -0
- package/dist/esm/plugins/card/ui/styled.js +2 -2
- package/dist/esm/plugins/card/ui/types.js +1 -0
- package/dist/esm/plugins/clipboard/pm-plugins/main.js +91 -2
- package/dist/esm/plugins/code-block/styles.js +42 -38
- package/dist/esm/plugins/extension/plugin-factory.js +3 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +34 -11
- package/dist/esm/plugins/extension/utils.js +51 -9
- package/dist/esm/plugins/find-replace/ui/Find.js +1 -1
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +1 -1
- package/dist/esm/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/esm/plugins/find-replace/ui/styles.js +6 -10
- package/dist/esm/plugins/layout/styles.js +2 -2
- package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +168 -0
- package/dist/esm/plugins/list/commands/index.js +33 -34
- package/dist/esm/plugins/list/utils/replace-content.js +21 -0
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/utils/media-single.js +12 -1
- package/dist/esm/plugins/paste/handlers.js +19 -5
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/esm/plugins/placeholder-text/index.js +44 -1
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +67 -20
- package/dist/esm/plugins/placeholder-text/selection-utils.js +9 -0
- package/dist/esm/plugins/placeholder-text/styles.js +2 -1
- package/dist/esm/plugins/table/commands/index.js +1 -1
- package/dist/esm/plugins/table/commands/insert.js +1 -1
- package/dist/esm/plugins/table/commands/misc.js +5 -15
- package/dist/esm/plugins/table/commands-with-analytics.js +1 -1
- package/dist/esm/plugins/table/handlers.js +6 -2
- package/dist/esm/plugins/table/index.js +6 -11
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/esm/plugins/table/nodeviews/table.js +6 -37
- package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/main.js +2 -1
- package/dist/esm/plugins/table/pm-plugins/plugin-factory.js +1 -2
- package/dist/esm/plugins/table/pm-plugins/plugin-key.js +2 -0
- package/dist/esm/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +1 -1
- package/dist/esm/plugins/table/reducer.js +0 -7
- package/dist/esm/plugins/table/toolbar.js +1 -10
- package/dist/esm/plugins/table/transforms/metadata.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualButton/{styles.css.js → styles.js} +0 -0
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +3 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/{styles.css.js → styles.js} +0 -0
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/esm/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/esm/plugins/table/ui/common-styles.js +27 -0
- package/dist/esm/plugins/table/ui/ui-styles.js +68 -0
- package/dist/esm/plugins/table/utils/nodes.js +14 -14
- package/dist/esm/plugins/tasks-and-decisions/commands.js +13 -1
- package/dist/esm/plugins/text-formatting/styles.js +4 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +69 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/esm/plugins/text-formatting/utils.js +18 -0
- package/dist/esm/plugins/type-ahead/api.js +30 -2
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +16 -4
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/esm/plugins/type-ahead/utils.js +17 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/ContentStyles/index.js +28 -10
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/insert.js +2 -10
- package/dist/esm/utils/selection.js +1 -6
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +2 -2
- package/dist/types/extensibility.d.ts +1 -1
- package/dist/types/plugins/analytics/types/list-events.d.ts +0 -1
- package/dist/types/plugins/block-type/styles.d.ts +2 -1
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -0
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/styled.d.ts +2 -7
- package/dist/types/plugins/card/messages.d.ts +2 -2
- package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +18 -2
- package/dist/types/plugins/card/ui/LinkToolbarIconDropdown.d.ts +23 -3
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +3 -1
- package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +5 -0
- package/dist/types/plugins/card/ui/link-toolbar-icon-dropdown-options.d.ts +5 -0
- package/dist/types/plugins/card/ui/styled.d.ts +2 -3
- package/dist/types/plugins/card/ui/types.d.ts +12 -0
- package/dist/types/plugins/clipboard/pm-plugins/main.d.ts +10 -1
- package/dist/types/plugins/code-block/styles.d.ts +3 -2
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/extension/types.d.ts +1 -0
- package/dist/types/plugins/extension/utils.d.ts +3 -1
- package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +2 -1
- package/dist/types/plugins/find-replace/ui/styles.d.ts +5 -5
- package/dist/types/plugins/layout/styles.d.ts +1 -1
- package/dist/types/plugins/list/actions/wrap-and-join-lists.d.ts +25 -0
- package/dist/types/plugins/list/commands/index.d.ts +0 -1
- package/dist/types/plugins/list/utils/replace-content.d.ts +8 -0
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -2
- package/dist/types/plugins/media/styles.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-single.d.ts +1 -0
- package/dist/types/plugins/panel/styles.d.ts +1 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -1
- package/dist/types/plugins/placeholder-text/placeholder-text-nodeview.d.ts +3 -2
- package/dist/types/plugins/placeholder-text/selection-utils.d.ts +2 -0
- package/dist/types/plugins/rule/styles.d.ts +1 -1
- package/dist/types/plugins/table/commands/index.d.ts +1 -1
- package/dist/types/plugins/table/commands/misc.d.ts +0 -1
- package/dist/types/plugins/table/nodeviews/table.d.ts +0 -1
- package/dist/types/plugins/table/pm-plugins/plugin-factory.d.ts +1 -4
- package/dist/types/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
- package/dist/types/plugins/table/types.d.ts +1 -8
- package/dist/types/plugins/table/ui/FloatingContextualButton/{styles.css.d.ts → styles.d.ts} +0 -0
- package/dist/types/plugins/table/ui/FloatingContextualMenu/{styles.css.d.ts → styles.d.ts} +0 -0
- package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +0 -1
- package/dist/types/plugins/table/ui/common-styles.d.ts +6 -0
- package/dist/types/plugins/table/ui/ui-styles.d.ts +15 -0
- package/dist/types/plugins/table/utils/nodes.d.ts +6 -6
- package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
- package/dist/types/plugins/text-formatting/styles.d.ts +2 -1
- package/dist/types/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +30 -0
- package/dist/types/plugins/text-formatting/utils.d.ts +4 -0
- package/dist/types/plugins/type-ahead/api.d.ts +11 -1
- package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +4 -0
- package/dist/types/ui/ContentStyles/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/selection.d.ts +0 -1
- package/package.json +28 -26
- package/dist/cjs/plugins/table/ui/common-styles.css.js +0 -44
- package/dist/cjs/plugins/table/ui/ui-styles.css.js +0 -95
- package/dist/esm/plugins/table/ui/common-styles.css.js +0 -23
- package/dist/esm/plugins/table/ui/ui-styles.css.js +0 -59
- package/dist/types/plugins/table/ui/common-styles.css.d.ts +0 -3
- package/dist/types/plugins/table/ui/ui-styles.css.d.ts +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 162.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cfcc23db294`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfcc23db294) - ED-14735 Rename table styles from '.css.ts' to '.
|
|
8
|
+
|
|
9
|
+
## 162.0.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`b70bf801c6d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b70bf801c6d) - [ux] ED-14235 Fix conversion of aligned text to list
|
|
14
|
+
- [`53046ba2ac3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/53046ba2ac3) - [ux] Added a new dropdown menu for smart cards view changing in the floating toolbar as a variant to be tested against the current dropdown.
|
|
15
|
+
- [`d1faad40e59`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d1faad40e59) - [ux] Adds helper function to find caption node and hides adaptive toolbar on mobile when selection is inside caption node
|
|
16
|
+
- [`7f158b2734b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7f158b2734b) - [ux] Shows correct toolbar state after header row or header column option is undone
|
|
17
|
+
- [`9712e78abb0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9712e78abb0) - ED-14255 moved some usages of editor-shared-styles to emotion
|
|
18
|
+
- [`9d6e344a6d6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d6e344a6d6) - [ux] EDM-2642: Added icons/buttons for smart cards view changing directly in the toolbar as opposed to the normal dropdown.
|
|
19
|
+
- [`171af4f5fda`](https://bitbucket.org/atlassian/atlassian-frontend/commits/171af4f5fda) - Ed-14165 Remove table resize button optimization code.
|
|
20
|
+
Removing the code fixes the strange behaviour in multi-user collaboration.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [`35c1a07273b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/35c1a07273b) - [ux] ED-13003: Fix copying table rows, ensuring they keep the original table's attributes (such as layout).
|
|
25
|
+
- [`6e551822ea8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6e551822ea8) - Extracted out smart-mention-resource
|
|
26
|
+
- [`98304ee1b02`](https://bitbucket.org/atlassian/atlassian-frontend/commits/98304ee1b02) - import embedHeaderHeight from smart-card instead of media-ui
|
|
27
|
+
- [`29c631e4e60`](https://bitbucket.org/atlassian/atlassian-frontend/commits/29c631e4e60) - ED-11866 Remove unused canSink parameter from list analytics
|
|
28
|
+
- [`8984ab2e078`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8984ab2e078) - [ux] ED-14650 Ensure we locate any table node in the current list of children nodes to determine if table wrapper exists
|
|
29
|
+
- [`d0eed99c3e3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d0eed99c3e3) - ED-14264 Moved styles to emotion css
|
|
30
|
+
- [`cb6bf345163`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb6bf345163) - [ED-13933] Fix issue when backspacing text into an image inside a list. Avoid also the ProseMirror error when this issue occurs.
|
|
31
|
+
- [`f9a144c5a71`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9a144c5a71) - ED-14255 migrated table styles to use emotion
|
|
32
|
+
- [`55256125722`](https://bitbucket.org/atlassian/atlassian-frontend/commits/55256125722) - ED-14262 update editor packages to use emotion 11
|
|
33
|
+
- [`ee8e5f50b6f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ee8e5f50b6f) - Add regression testing for multi cell table selection
|
|
34
|
+
- [`9dfdfaab7c6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9dfdfaab7c6) - [ux] ED-14241: fix initial visibility of edit icon on extension floating toolbar when selecting an editable extension at the first node in the document
|
|
35
|
+
|
|
36
|
+
- fixed bug in bodiedExtension where clicking on the border of 'extension-content' wont trigger a selection
|
|
37
|
+
|
|
38
|
+
- [`b960f4f81ee`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b960f4f81ee) - [ED-11194] Fix typehead insertion from placeholders
|
|
39
|
+
- [`d0dff8da956`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d0dff8da956) - [ED-14514] In NCS backed editor wait for media uploads to complete before getting the final acknowledged state in getResolvedEditorState EditorAction. Fixes from ED-14588 were also copied over and a fix on media uploads in the collaborative-editing atlaskit example.
|
|
40
|
+
ResolvedEditorState type updated for compatability with synchrony code.
|
|
41
|
+
- [`03930b9f4c7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/03930b9f4c7) - ED-14253: fixed infinite transaction loop after uploading a file to the editor.
|
|
42
|
+
|
|
43
|
+
- updated ADF for MediaBaseAttributes.\_\_contextId to allow for null value
|
|
44
|
+
- fixed Editor example page 2-comment-jira-bento
|
|
45
|
+
|
|
46
|
+
- [`1a664f6b1e5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1a664f6b1e5) - [ux][ed-14583] Solve inconsistencies in paste handler. Specifically targeting invalid nodes being pasted into decision nodes (should safe insert if not valid content) and nested expands being pasted into tables (invalid so return early out of expand paste handler).
|
|
47
|
+
- [`e22509504e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e22509504e8) - ED-14255 migrate editor-shared-style to emotion
|
|
48
|
+
- [`58016841de5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58016841de5) - [ux] Now allows users to use the toolbar to insert action items and decision items when wrapped within a blockquote.
|
|
49
|
+
- [`92537fdfe96`](https://bitbucket.org/atlassian/atlassian-frontend/commits/92537fdfe96) - ED-14376 Removes workaround code for Chrome 58 selection bug as solution has been implemented by prosemirror
|
|
50
|
+
- [`6dc2254f102`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6dc2254f102) - AK-850: Text formatting shortcuts provide status updates for screen readers
|
|
51
|
+
- Updated dependencies
|
|
52
|
+
|
|
3
53
|
## 161.0.0
|
|
4
54
|
|
|
5
55
|
### Patch Changes
|
|
@@ -53,36 +53,64 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
(0, _defineProperty2.default)(this, "getResolvedEditorState", function () {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
56
|
+
(0, _defineProperty2.default)(this, "getResolvedEditorState", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
57
|
+
var _getCollabProvider;
|
|
58
|
+
|
|
59
|
+
var featureFlags, editorValue, editorView;
|
|
60
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
61
|
+
while (1) {
|
|
62
|
+
switch (_context.prev = _context.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
if (_this.editorView) {
|
|
65
|
+
_context.next = 2;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
throw new Error('Called getResolvedEditorState before editorView is ready');
|
|
70
|
+
|
|
71
|
+
case 2:
|
|
72
|
+
featureFlags = (0, _getFeatureFlags.getFeatureFlags)(_this.editorView.state);
|
|
73
|
+
|
|
74
|
+
if (featureFlags.useNativeCollabPlugin) {
|
|
75
|
+
_context.next = 10;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
_context.next = 6;
|
|
80
|
+
return _this.getValue();
|
|
81
|
+
|
|
82
|
+
case 6:
|
|
83
|
+
editorValue = _context.sent;
|
|
84
|
+
|
|
85
|
+
if (editorValue) {
|
|
86
|
+
_context.next = 9;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
throw new Error('editorValue is undefined');
|
|
91
|
+
|
|
92
|
+
case 9:
|
|
93
|
+
return _context.abrupt("return", {
|
|
94
|
+
content: editorValue,
|
|
95
|
+
title: null,
|
|
96
|
+
stepVersion: -1
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
case 10:
|
|
100
|
+
editorView = _this.editorView;
|
|
101
|
+
_context.next = 13;
|
|
102
|
+
return (0, _action.getEditorValueWithMedia)(editorView);
|
|
103
|
+
|
|
104
|
+
case 13:
|
|
105
|
+
return _context.abrupt("return", (_getCollabProvider = (0, _nativeCollabProviderPlugin.getCollabProvider)(editorView.state)) === null || _getCollabProvider === void 0 ? void 0 : _getCollabProvider.getFinalAcknowledgedState());
|
|
106
|
+
|
|
107
|
+
case 14:
|
|
108
|
+
case "end":
|
|
109
|
+
return _context.stop();
|
|
110
|
+
}
|
|
77
111
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
resolver(resolvedEditorState);
|
|
81
|
-
}).catch(function (error) {
|
|
82
|
-
reject(error);
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
});
|
|
112
|
+
}, _callee);
|
|
113
|
+
})));
|
|
86
114
|
}
|
|
87
115
|
|
|
88
116
|
(0, _createClass2.default)(EditorActions, [{
|
|
@@ -182,30 +210,30 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
182
210
|
}, {
|
|
183
211
|
key: "__temporaryFixForConfigPanel",
|
|
184
212
|
value: function () {
|
|
185
|
-
var _temporaryFixForConfigPanel2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
213
|
+
var _temporaryFixForConfigPanel2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
186
214
|
var editorView;
|
|
187
|
-
return _regenerator.default.wrap(function
|
|
215
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
188
216
|
while (1) {
|
|
189
|
-
switch (
|
|
217
|
+
switch (_context2.prev = _context2.next) {
|
|
190
218
|
case 0:
|
|
191
219
|
editorView = this.editorView;
|
|
192
220
|
|
|
193
221
|
if (editorView) {
|
|
194
|
-
|
|
222
|
+
_context2.next = 3;
|
|
195
223
|
break;
|
|
196
224
|
}
|
|
197
225
|
|
|
198
|
-
return
|
|
226
|
+
return _context2.abrupt("return");
|
|
199
227
|
|
|
200
228
|
case 3:
|
|
201
229
|
(0, _action.__temporaryFixForConfigPanel)(editorView);
|
|
202
230
|
|
|
203
231
|
case 4:
|
|
204
232
|
case "end":
|
|
205
|
-
return
|
|
233
|
+
return _context2.stop();
|
|
206
234
|
}
|
|
207
235
|
}
|
|
208
|
-
},
|
|
236
|
+
}, _callee2, this);
|
|
209
237
|
}));
|
|
210
238
|
|
|
211
239
|
function __temporaryFixForConfigPanel() {
|
|
@@ -218,46 +246,46 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
218
246
|
}, {
|
|
219
247
|
key: "getValue",
|
|
220
248
|
value: function () {
|
|
221
|
-
var _getValue = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
249
|
+
var _getValue = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
222
250
|
var editorView, doc, json, nodeSanitized;
|
|
223
|
-
return _regenerator.default.wrap(function
|
|
251
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
224
252
|
while (1) {
|
|
225
|
-
switch (
|
|
253
|
+
switch (_context3.prev = _context3.next) {
|
|
226
254
|
case 0:
|
|
227
255
|
editorView = this.editorView;
|
|
228
256
|
|
|
229
257
|
if (editorView) {
|
|
230
|
-
|
|
258
|
+
_context3.next = 3;
|
|
231
259
|
break;
|
|
232
260
|
}
|
|
233
261
|
|
|
234
|
-
return
|
|
262
|
+
return _context3.abrupt("return");
|
|
235
263
|
|
|
236
264
|
case 3:
|
|
237
|
-
|
|
265
|
+
_context3.next = 5;
|
|
238
266
|
return (0, _action.getEditorValueWithMedia)(editorView);
|
|
239
267
|
|
|
240
268
|
case 5:
|
|
241
|
-
doc =
|
|
269
|
+
doc = _context3.sent;
|
|
242
270
|
json = (0, _utils.toJSON)(doc);
|
|
243
271
|
|
|
244
272
|
if (this.contentEncode) {
|
|
245
|
-
|
|
273
|
+
_context3.next = 9;
|
|
246
274
|
break;
|
|
247
275
|
}
|
|
248
276
|
|
|
249
|
-
return
|
|
277
|
+
return _context3.abrupt("return", json);
|
|
250
278
|
|
|
251
279
|
case 9:
|
|
252
280
|
nodeSanitized = _prosemirrorModel.Node.fromJSON(this.editorView.state.schema, json);
|
|
253
|
-
return
|
|
281
|
+
return _context3.abrupt("return", this.contentEncode(nodeSanitized));
|
|
254
282
|
|
|
255
283
|
case 11:
|
|
256
284
|
case "end":
|
|
257
|
-
return
|
|
285
|
+
return _context3.stop();
|
|
258
286
|
}
|
|
259
287
|
}
|
|
260
|
-
},
|
|
288
|
+
}, _callee3, this);
|
|
261
289
|
}));
|
|
262
290
|
|
|
263
291
|
function getValue() {
|
|
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "getChangedNodes", {
|
|
|
33
33
|
Object.defineProperty(exports, "tablePluginKey", {
|
|
34
34
|
enumerable: true,
|
|
35
35
|
get: function get() {
|
|
36
|
-
return
|
|
36
|
+
return _pluginKey.pluginKey;
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "toJSON", {
|
|
@@ -61,7 +61,7 @@ var _ExtensionNodeWrapper = _interopRequireDefault(require("./plugins/extension/
|
|
|
61
61
|
|
|
62
62
|
var _extension = require("./plugins/extension/nodeviews/extension");
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _pluginKey = require("./plugins/table/pm-plugins/plugin-key");
|
|
65
65
|
|
|
66
66
|
var EmitterEvents = {
|
|
67
67
|
TABLE_DELETED: 'TABLE_DELETED'
|
|
@@ -35,7 +35,7 @@ var _Addon = require("../../ui/Addon");
|
|
|
35
35
|
|
|
36
36
|
var _styles = require("../../ui/styles");
|
|
37
37
|
|
|
38
|
-
var _commonStyles = require("../../plugins/table/ui/common-styles
|
|
38
|
+
var _commonStyles = require("../../plugins/table/ui/common-styles");
|
|
39
39
|
|
|
40
40
|
var _ui2 = _interopRequireDefault(require("../../plugins/collab-edit/ui"));
|
|
41
41
|
|
|
@@ -68,7 +68,7 @@ ContentArea.displayName = 'ContentArea';
|
|
|
68
68
|
var EditorContentArea = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 24px;\n height: 100%;\n width: 100%;\n max-width: ", "px;\n padding-top: 50px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n padding-bottom: 55px;\n\n & .ProseMirror {\n flex-grow: 1;\n box-sizing: border-box;\n }\n\n && .ProseMirror {\n & > * {\n clear: both;\n }\n > p,\n > ul,\n > ol,\n > h1,\n > h2,\n > h3,\n > h4,\n > h5,\n > h6 {\n clear: none;\n }\n }\n ", ";\n"])), function (_ref) {
|
|
69
69
|
var theme = _ref.theme;
|
|
70
70
|
return theme.layoutMaxWidth + GUTTER_PADDING * 2;
|
|
71
|
-
}, _commonStyles.
|
|
71
|
+
}, _commonStyles.deprecatedTableFullPageEditorStyles);
|
|
72
72
|
|
|
73
73
|
EditorContentArea.displayName = 'EditorContentArea';
|
|
74
74
|
|
|
@@ -9,11 +9,14 @@ exports.blocktypeStyles = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var blocktypeStyles =
|
|
18
|
+
var blocktypeStyles = function blocktypeStyles(props) {
|
|
19
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", ";\n ", ";\n }\n"])), _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(props));
|
|
20
|
+
};
|
|
21
|
+
|
|
19
22
|
exports.blocktypeStyles = blocktypeStyles;
|
|
@@ -25,6 +25,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
25
25
|
|
|
26
26
|
var _react = _interopRequireDefault(require("react"));
|
|
27
27
|
|
|
28
|
+
var _react2 = require("@emotion/react");
|
|
29
|
+
|
|
28
30
|
var _reactIntlNext = require("react-intl-next");
|
|
29
31
|
|
|
30
32
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
@@ -80,16 +82,16 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
80
82
|
availableBlockTypes = _this$props$pluginSta.availableBlockTypes;
|
|
81
83
|
var items = availableBlockTypes.map(function (blockType, index) {
|
|
82
84
|
var isActive = currentBlockType === blockType;
|
|
83
|
-
var
|
|
85
|
+
var tagName = blockType.tagName || 'p';
|
|
86
|
+
var Tag = tagName;
|
|
84
87
|
return {
|
|
85
|
-
content:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, /*#__PURE__*/_react.default.createElement(Tag, null, formatMessage(blockType.title))),
|
|
88
|
+
content: (0, _react2.jsx)("div", {
|
|
89
|
+
css: (0, _styled.blockTypeMenuItemStyle)(tagName, isActive)
|
|
90
|
+
}, (0, _react2.jsx)(Tag, null, formatMessage(blockType.title))),
|
|
89
91
|
value: blockType,
|
|
90
92
|
label: formatMessage(blockType.title),
|
|
91
93
|
key: "".concat(blockType.name, "-").concat(index),
|
|
92
|
-
elemAfter:
|
|
94
|
+
elemAfter: (0, _react2.jsx)(_styled.KeyboardShortcut, {
|
|
93
95
|
selected: isActive
|
|
94
96
|
}, (0, _keymaps.tooltip)((0, _keymaps.findKeymapByDescription)(blockType.title.defaultMessage))),
|
|
95
97
|
isActive: isActive
|
|
@@ -147,7 +149,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
147
149
|
|
|
148
150
|
if (!this.props.isDisabled && !blockTypesDisabled) {
|
|
149
151
|
var items = this.createItems();
|
|
150
|
-
return
|
|
152
|
+
return (0, _react2.jsx)(_styles.MenuWrapper, null, (0, _react2.jsx)(_DropdownMenu.default, {
|
|
151
153
|
items: items,
|
|
152
154
|
onOpenChange: this.onOpenChange,
|
|
153
155
|
onItemActivated: this.handleSelectBlockType,
|
|
@@ -159,7 +161,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
159
161
|
fitHeight: 360,
|
|
160
162
|
fitWidth: 106,
|
|
161
163
|
shouldUseDefaultRole: true
|
|
162
|
-
},
|
|
164
|
+
}, (0, _react2.jsx)(_blocktypeButton.BlockTypeButton, {
|
|
163
165
|
isSmall: isSmall,
|
|
164
166
|
isReducedSpacing: isReducedSpacing,
|
|
165
167
|
selected: active,
|
|
@@ -168,10 +170,10 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
168
170
|
onClick: this.handleTriggerClick,
|
|
169
171
|
formatMessage: formatMessage,
|
|
170
172
|
"aria-expanded": active
|
|
171
|
-
}, longestDropdownMenuItem)),
|
|
173
|
+
}, longestDropdownMenuItem)), (0, _react2.jsx)(_styles.Separator, null));
|
|
172
174
|
}
|
|
173
175
|
|
|
174
|
-
return
|
|
176
|
+
return (0, _react2.jsx)(_styles.Wrapper, null, (0, _react2.jsx)(_blocktypeButton.BlockTypeButton, {
|
|
175
177
|
isSmall: isSmall,
|
|
176
178
|
isReducedSpacing: isReducedSpacing,
|
|
177
179
|
selected: active,
|
|
@@ -180,7 +182,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
180
182
|
onClick: this.handleTriggerClick,
|
|
181
183
|
formatMessage: formatMessage,
|
|
182
184
|
"aria-expanded": active
|
|
183
|
-
}, longestDropdownMenuItem),
|
|
185
|
+
}, longestDropdownMenuItem), (0, _react2.jsx)(_styles.Separator, null));
|
|
184
186
|
}
|
|
185
187
|
}]);
|
|
186
188
|
return ToolbarBlockType;
|
|
@@ -5,10 +5,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.blockTypeMenuItemStyle = exports.KeyboardShortcut = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
|
+
|
|
12
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
15
|
|
|
14
16
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
@@ -19,13 +21,15 @@ var _styles2 = require("../../../../ui/styles");
|
|
|
19
21
|
|
|
20
22
|
var _templateObject, _templateObject2;
|
|
21
23
|
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
});
|
|
24
|
+
var blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected) {
|
|
25
|
+
// TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
|
|
26
|
+
var selectedStyle = selected ? "".concat(tagName, " { color: white !important; }") : '';
|
|
27
|
+
return function (themeProps) {
|
|
28
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n }\n }\n ", ";\n "])), (0, _styles.headingsSharedStyles)(themeProps), selectedStyle);
|
|
29
|
+
};
|
|
30
|
+
};
|
|
27
31
|
|
|
28
|
-
exports.
|
|
32
|
+
exports.blockTypeMenuItemStyle = blockTypeMenuItemStyle;
|
|
29
33
|
var KeyboardShortcut = (0, _styledComponents.default)(_styles2.Shortcut)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n margin-left: 16px;\n"])), function (props) {
|
|
30
34
|
return props.selected ? "color: ".concat(_colors.N400, ";") : '';
|
|
31
35
|
});
|
|
@@ -53,8 +53,8 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
53
53
|
defaultMessage: 'URL',
|
|
54
54
|
description: 'Title for option to convert the card to become a regular text-based hyperlink.'
|
|
55
55
|
},
|
|
56
|
-
|
|
57
|
-
id: 'fabric.editor.
|
|
56
|
+
blockTitle: {
|
|
57
|
+
id: 'fabric.editor.blockTitle',
|
|
58
58
|
defaultMessage: 'Card',
|
|
59
59
|
description: 'Title for option to display link in the card view.'
|
|
60
60
|
},
|
|
@@ -73,8 +73,8 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
73
73
|
defaultMessage: 'Display link as URL',
|
|
74
74
|
description: 'Description for option to convert the card to become a regular text-based hyperlink.'
|
|
75
75
|
},
|
|
76
|
-
|
|
77
|
-
id: 'fabric.editor.
|
|
76
|
+
blockDescription: {
|
|
77
|
+
id: 'fabric.editor.blockDescription',
|
|
78
78
|
defaultMessage: 'Display more information about a link, including a summary and actions',
|
|
79
79
|
description: 'Description for option to display link in the card view.'
|
|
80
80
|
},
|
|
@@ -39,9 +39,13 @@ var _messages2 = _interopRequireDefault(require("../../../messages"));
|
|
|
39
39
|
|
|
40
40
|
var _featureFlagsContext = require("../../../plugins/feature-flags-context");
|
|
41
41
|
|
|
42
|
-
var _LinkToolbarIconDropdown =
|
|
42
|
+
var _LinkToolbarIconDropdown = require("./LinkToolbarIconDropdown");
|
|
43
43
|
|
|
44
|
-
var _LinkToolbarButtonGroup =
|
|
44
|
+
var _LinkToolbarButtonGroup = require("./LinkToolbarButtonGroup");
|
|
45
|
+
|
|
46
|
+
var _linkToolbarButtonGroupOptions = require("./link-toolbar-button-group-options");
|
|
47
|
+
|
|
48
|
+
var _linkToolbarIconDropdownOptions = require("./link-toolbar-icon-dropdown-options");
|
|
45
49
|
|
|
46
50
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
47
51
|
|
|
@@ -85,6 +89,7 @@ var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
85
89
|
var isSmartLinkSupportedInParent = (0, _nodes.isSupportedInParent)(editorState, _prosemirrorModel.Fragment.from(editorState.schema.nodes.blockCard.createChecked({})), currentAppearance);
|
|
86
90
|
var tooltip = isSmartLinkSupportedInParent ? undefined : parentNodeName(editorState, intl);
|
|
87
91
|
var embedOption = allowEmbeds && preview && {
|
|
92
|
+
appearance: 'embed',
|
|
88
93
|
title: intl.formatMessage(_messages.messages.embed),
|
|
89
94
|
onClick: (0, _doc.setSelectedCardAppearance)('embed'),
|
|
90
95
|
selected: currentAppearance === 'embed',
|
|
@@ -101,24 +106,27 @@ var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
101
106
|
selected: !currentAppearance,
|
|
102
107
|
testId: 'url-appearance'
|
|
103
108
|
}, {
|
|
109
|
+
appearance: 'inline',
|
|
104
110
|
title: intl.formatMessage(_messages.messages.inline),
|
|
105
111
|
onClick: (0, _doc.setSelectedCardAppearance)('inline'),
|
|
106
112
|
selected: currentAppearance === 'inline',
|
|
107
|
-
hidden: false,
|
|
108
113
|
testId: 'inline-appearance'
|
|
109
114
|
}, {
|
|
115
|
+
appearance: 'block',
|
|
110
116
|
title: intl.formatMessage(_messages.messages.block),
|
|
111
117
|
onClick: (0, _doc.setSelectedCardAppearance)('block'),
|
|
112
118
|
selected: currentAppearance === 'block',
|
|
113
|
-
hidden: false,
|
|
114
119
|
testId: 'block-appearance',
|
|
115
120
|
disabled: !isSmartLinkSupportedInParent,
|
|
116
121
|
tooltip: tooltip
|
|
117
122
|
}];
|
|
118
|
-
var title = intl.formatMessage(currentAppearance ? _messages.messages[currentAppearance] : _messages.messages.url);
|
|
119
123
|
|
|
120
124
|
var dispatchCommand = function dispatchCommand(fn) {
|
|
121
|
-
fn && fn(editorState, view && view.dispatch);
|
|
125
|
+
fn && fn(editorState, view && view.dispatch); // Refocus the view to ensure the editor has focus
|
|
126
|
+
|
|
127
|
+
if (view && !view.hasFocus()) {
|
|
128
|
+
view.focus();
|
|
129
|
+
}
|
|
122
130
|
};
|
|
123
131
|
|
|
124
132
|
if (embedOption) {
|
|
@@ -129,19 +137,29 @@ var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
|
129
137
|
viewChangingExperimentToolbarStyle = _getFeatureFlags.viewChangingExperimentToolbarStyle;
|
|
130
138
|
|
|
131
139
|
if (viewChangingExperimentToolbarStyle === 'toolbarIcons') {
|
|
132
|
-
return /*#__PURE__*/_react.default.createElement(_LinkToolbarButtonGroup.
|
|
133
|
-
key: "link-toolbar-button-group"
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(_LinkToolbarButtonGroup.LinkToolbarButtonGroup, {
|
|
141
|
+
key: "link-toolbar-button-group",
|
|
142
|
+
options: options.map(function (option) {
|
|
143
|
+
return (0, _linkToolbarButtonGroupOptions.getButtonGroupOption)(intl, dispatchCommand, option);
|
|
144
|
+
})
|
|
134
145
|
});
|
|
135
146
|
}
|
|
136
147
|
|
|
137
148
|
if (viewChangingExperimentToolbarStyle === 'newDropdown') {
|
|
138
|
-
return /*#__PURE__*/_react.default.createElement(_LinkToolbarIconDropdown.
|
|
139
|
-
key: "link-toolbar-icon-dropdown"
|
|
149
|
+
return /*#__PURE__*/_react.default.createElement(_LinkToolbarIconDropdown.LinkToolbarIconDropdown, {
|
|
150
|
+
key: "link-toolbar-icon-dropdown",
|
|
151
|
+
title: "Change view",
|
|
152
|
+
buttonTestId: "link-toolbar-appearance-button",
|
|
153
|
+
dispatchCommand: dispatchCommand,
|
|
154
|
+
options: options.map(function (option) {
|
|
155
|
+
return (0, _linkToolbarIconDropdownOptions.getIconDropdownOption)(intl, dispatchCommand, option);
|
|
156
|
+
})
|
|
140
157
|
});
|
|
141
158
|
}
|
|
142
159
|
|
|
160
|
+
var title = intl.formatMessage(currentAppearance ? _messages.messages[currentAppearance] : _messages.messages.url);
|
|
143
161
|
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
|
|
144
|
-
key:
|
|
162
|
+
key: "link-toolbar",
|
|
145
163
|
buttonTestId: "link-toolbar-appearance-button",
|
|
146
164
|
title: title,
|
|
147
165
|
dispatchCommand: dispatchCommand,
|
|
@@ -5,16 +5,75 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.StyledButton = exports.LinkToolbarButtonGroup = void 0;
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
13
|
|
|
12
14
|
var _react = _interopRequireDefault(require("react"));
|
|
13
15
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
|
+
|
|
18
|
+
var _button = require("@atlaskit/button");
|
|
19
|
+
|
|
20
|
+
var _Button = _interopRequireDefault(require("../../floating-toolbar/ui/Button"));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["disabled"];
|
|
23
|
+
|
|
24
|
+
var _templateObject, _templateObject2;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Applying `pointer-events: none;` when disabled allows the Tooltip to be displayed
|
|
28
|
+
*/
|
|
29
|
+
var StyledButton = (0, _styledComponents.default)(_Button.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n pointer-events: ", ";\n"])), function (_ref) {
|
|
30
|
+
var disabled = _ref.disabled;
|
|
31
|
+
return disabled ? 'none' : 'auto';
|
|
32
|
+
});
|
|
33
|
+
exports.StyledButton = StyledButton;
|
|
34
|
+
|
|
35
|
+
var DisallowedWrapper = function DisallowedWrapper(_ref2) {
|
|
36
|
+
var disabled = _ref2.disabled,
|
|
37
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement("div", props);
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The button requires `pointer-events: none;` in order to fix the tooltip, hence
|
|
42
|
+
* leaving us without a disabled cursor, the following fixes this:
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
var StyledDisallowedWrapper = (0, _styledComponents.default)(DisallowedWrapper)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n cursor: ", ";\n"])), function (_ref3) {
|
|
47
|
+
var disabled = _ref3.disabled;
|
|
48
|
+
return disabled ? 'not-allowed' : 'pointer';
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref4) {
|
|
52
|
+
var options = _ref4.options;
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_button.ButtonGroup, null, options.map(function (_ref5) {
|
|
54
|
+
var onClick = _ref5.onClick,
|
|
55
|
+
selected = _ref5.selected,
|
|
56
|
+
disabled = _ref5.disabled,
|
|
57
|
+
testId = _ref5.testId,
|
|
58
|
+
tooltipContent = _ref5.tooltipContent,
|
|
59
|
+
title = _ref5.title,
|
|
60
|
+
Icon = _ref5.icon;
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(StyledDisallowedWrapper, {
|
|
62
|
+
key: testId,
|
|
63
|
+
disabled: disabled
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement(StyledButton, {
|
|
65
|
+
title: title,
|
|
66
|
+
icon: /*#__PURE__*/_react.default.createElement(Icon, {
|
|
67
|
+
size: "medium",
|
|
68
|
+
label: title
|
|
69
|
+
}),
|
|
70
|
+
selected: selected,
|
|
71
|
+
onClick: onClick,
|
|
72
|
+
testId: testId,
|
|
73
|
+
disabled: disabled,
|
|
74
|
+
tooltipContent: tooltipContent
|
|
75
|
+
}));
|
|
76
|
+
}));
|
|
17
77
|
};
|
|
18
78
|
|
|
19
|
-
|
|
20
|
-
exports.default = _default;
|
|
79
|
+
exports.LinkToolbarButtonGroup = LinkToolbarButtonGroup;
|