@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
|
@@ -21,6 +21,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
21
21
|
|
|
22
22
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
23
23
|
|
|
24
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
25
|
+
|
|
24
26
|
var _react = _interopRequireWildcard(require("react"));
|
|
25
27
|
|
|
26
28
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -41,6 +43,10 @@ var _dropdownMenu = require("./dropdown-menu");
|
|
|
41
43
|
|
|
42
44
|
var _toolbarMessages = require("./toolbar-messages");
|
|
43
45
|
|
|
46
|
+
var _utils = require("../../utils");
|
|
47
|
+
|
|
48
|
+
var _announcer = _interopRequireDefault(require("../../../../utils/announcer/announcer"));
|
|
49
|
+
|
|
44
50
|
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); }
|
|
45
51
|
|
|
46
52
|
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; }
|
|
@@ -62,6 +68,12 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
|
|
|
62
68
|
var editorState = (0, _react.useMemo)(function () {
|
|
63
69
|
return editorView.state;
|
|
64
70
|
}, [editorView.state]);
|
|
71
|
+
|
|
72
|
+
var _useState = (0, _react.useState)(''),
|
|
73
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
74
|
+
message = _useState2[0],
|
|
75
|
+
setMessage = _useState2[1];
|
|
76
|
+
|
|
65
77
|
var defaultIcons = (0, _formattingIcons.useFormattingIcons)({
|
|
66
78
|
editorState: editorState,
|
|
67
79
|
intl: intl,
|
|
@@ -88,6 +100,54 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
|
|
|
88
100
|
dropdownItems = _useResponsiveToolbar.dropdownItems,
|
|
89
101
|
singleItems = _useResponsiveToolbar.singleItems;
|
|
90
102
|
|
|
103
|
+
var clearFormattingStatus = intl.formatMessage(_toolbarMessages.toolbarMessages.textFormattingOff);
|
|
104
|
+
var superscriptOffSubscriptOnStatus = intl.formatMessage(_toolbarMessages.toolbarMessages.superscriptOffSubscriptOn);
|
|
105
|
+
var subscriptOffSuperscriptOnStatus = intl.formatMessage(_toolbarMessages.toolbarMessages.subscriptOffSuperscriptOn);
|
|
106
|
+
var activeItems = [].concat((0, _toConsumableArray2.default)(dropdownItems), (0, _toConsumableArray2.default)(singleItems)).filter(function (item) {
|
|
107
|
+
return item.isActive;
|
|
108
|
+
});
|
|
109
|
+
var prevActiveItems = (0, _utils.usePreviousObjectState)(activeItems);
|
|
110
|
+
var fromSuperscriptToSubscript = (0, _utils.isArrayContainsContent)(activeItems, 'Subscript') && (0, _utils.isArrayContainsContent)(prevActiveItems, 'Superscript');
|
|
111
|
+
var fromSubscriptToSuperscript = (0, _utils.isArrayContainsContent)(activeItems, 'Superscript') && (0, _utils.isArrayContainsContent)(prevActiveItems, 'Subscript');
|
|
112
|
+
var comparedItems;
|
|
113
|
+
var screenReaderMessage = '';
|
|
114
|
+
|
|
115
|
+
if (prevActiveItems && activeItems.length > prevActiveItems.length) {
|
|
116
|
+
comparedItems = (0, _utils.compareItemsArrays)(activeItems, prevActiveItems);
|
|
117
|
+
screenReaderMessage = intl.formatMessage(_toolbarMessages.toolbarMessages.on, {
|
|
118
|
+
formattingType: comparedItems[0].content
|
|
119
|
+
});
|
|
120
|
+
} else {
|
|
121
|
+
comparedItems = (0, _utils.compareItemsArrays)(prevActiveItems, activeItems);
|
|
122
|
+
|
|
123
|
+
if (comparedItems && comparedItems.length) {
|
|
124
|
+
var _activeItems$;
|
|
125
|
+
|
|
126
|
+
screenReaderMessage = intl.formatMessage(_toolbarMessages.toolbarMessages.off, {
|
|
127
|
+
formattingType: comparedItems[0].content
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
if (((_activeItems$ = activeItems[0]) === null || _activeItems$ === void 0 ? void 0 : _activeItems$.content) === 'Code') {
|
|
131
|
+
screenReaderMessage = intl.formatMessage(_toolbarMessages.toolbarMessages.codeOn, {
|
|
132
|
+
textFormattingOff: (prevActiveItems === null || prevActiveItems === void 0 ? void 0 : prevActiveItems.length) > 1 ? clearFormattingStatus : screenReaderMessage
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (fromSuperscriptToSubscript) {
|
|
137
|
+
screenReaderMessage = superscriptOffSubscriptOnStatus;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (fromSubscriptToSuperscript) {
|
|
141
|
+
screenReaderMessage = subscriptOffSuperscriptOnStatus;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} // handle 'Clear formatting' status for screen readers
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
if (!(activeItems !== null && activeItems !== void 0 && activeItems.length) && (prevActiveItems === null || prevActiveItems === void 0 ? void 0 : prevActiveItems.length) > 1) {
|
|
148
|
+
screenReaderMessage = clearFormattingStatus;
|
|
149
|
+
}
|
|
150
|
+
|
|
91
151
|
var items = (0, _react.useMemo)(function () {
|
|
92
152
|
if (!clearIcon) {
|
|
93
153
|
return dropdownItems;
|
|
@@ -96,9 +156,19 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
|
|
|
96
156
|
return [].concat((0, _toConsumableArray2.default)(dropdownItems), [clearIcon]);
|
|
97
157
|
}, [clearIcon, dropdownItems]);
|
|
98
158
|
var moreFormattingButtonLabel = intl.formatMessage(_toolbarMessages.toolbarMessages.moreFormatting);
|
|
159
|
+
(0, _react.useEffect)(function () {
|
|
160
|
+
if (screenReaderMessage) {
|
|
161
|
+
setMessage(screenReaderMessage);
|
|
162
|
+
}
|
|
163
|
+
}, [screenReaderMessage]);
|
|
99
164
|
return /*#__PURE__*/_react.default.createElement(_styles.ButtonGroup, {
|
|
100
165
|
width: isReducedSpacing ? 'small' : 'large'
|
|
101
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
166
|
+
}, message && /*#__PURE__*/_react.default.createElement(_announcer.default, {
|
|
167
|
+
ariaLive: "assertive",
|
|
168
|
+
text: message,
|
|
169
|
+
ariaRelevant: "additions",
|
|
170
|
+
delay: 250
|
|
171
|
+
}), /*#__PURE__*/_react.default.createElement(_singleToolbarButtons.SingleToolbarButtons, {
|
|
102
172
|
items: singleItems,
|
|
103
173
|
editorView: editorView,
|
|
104
174
|
isReducedSpacing: isReducedSpacing
|
|
@@ -23,16 +23,31 @@ var toolbarMessages = (0, _reactIntlNext.defineMessages)({
|
|
|
23
23
|
defaultMessage: 'Code',
|
|
24
24
|
description: 'Whether the text selection has monospaced/code font'
|
|
25
25
|
},
|
|
26
|
+
codeOn: {
|
|
27
|
+
id: 'fabric.editor.code.on',
|
|
28
|
+
defaultMessage: '{textFormattingOff}, Code On',
|
|
29
|
+
description: 'Reports that code formatting has been turned on'
|
|
30
|
+
},
|
|
26
31
|
subscript: {
|
|
27
32
|
id: 'fabric.editor.subscript',
|
|
28
33
|
defaultMessage: 'Subscript',
|
|
29
34
|
description: 'Whether the text selection is written below the line in a slightly smaller size'
|
|
30
35
|
},
|
|
36
|
+
subscriptOffSuperscriptOn: {
|
|
37
|
+
id: 'fabric.editor.subscript.off.superscript.on',
|
|
38
|
+
defaultMessage: 'Subscript Off, Superscript On',
|
|
39
|
+
description: 'Reports text formatting in case when subscript off and superscript on'
|
|
40
|
+
},
|
|
31
41
|
superscript: {
|
|
32
42
|
id: 'fabric.editor.superscript',
|
|
33
43
|
defaultMessage: 'Superscript',
|
|
34
44
|
description: 'Whether the text selection is written above the line in a slightly smaller size'
|
|
35
45
|
},
|
|
46
|
+
superscriptOffSubscriptOn: {
|
|
47
|
+
id: 'fabric.editor.superscript.off.subscript.on',
|
|
48
|
+
defaultMessage: 'Superscript Off, Subscript On',
|
|
49
|
+
description: 'Describe text formatting in case when Superscript Off and Subscript on'
|
|
50
|
+
},
|
|
36
51
|
clearFormatting: {
|
|
37
52
|
id: 'fabric.editor.clearFormatting',
|
|
38
53
|
defaultMessage: 'Clear formatting',
|
|
@@ -52,6 +67,21 @@ var toolbarMessages = (0, _reactIntlNext.defineMessages)({
|
|
|
52
67
|
id: 'fabric.editor.italic',
|
|
53
68
|
defaultMessage: 'Italic',
|
|
54
69
|
description: 'This refers to italics or emphasized formatting.'
|
|
70
|
+
},
|
|
71
|
+
on: {
|
|
72
|
+
id: 'fabric.editor.on',
|
|
73
|
+
defaultMessage: '{formattingType} On',
|
|
74
|
+
description: 'Reports that text formatting has been turned on'
|
|
75
|
+
},
|
|
76
|
+
off: {
|
|
77
|
+
id: 'fabric.editor.off',
|
|
78
|
+
defaultMessage: '{formattingType} Off',
|
|
79
|
+
description: 'Reports that text formatting has been turned off'
|
|
80
|
+
},
|
|
81
|
+
textFormattingOff: {
|
|
82
|
+
id: 'fabric.editor.text.formatting.off',
|
|
83
|
+
defaultMessage: 'Text formatting Off',
|
|
84
|
+
description: 'Reports that text formatting has been turned off'
|
|
55
85
|
}
|
|
56
86
|
});
|
|
57
87
|
exports.toolbarMessages = toolbarMessages;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.nodeLen = exports.markActive = exports.isIgnorable = exports.isBlockNode = exports.hasCode = exports.domIndex = exports.checkFormattingIsPresent = exports.anyMarkActive = void 0;
|
|
6
|
+
exports.usePreviousObjectState = exports.nodeLen = exports.markActive = exports.isIgnorable = exports.isBlockNode = exports.isArrayContainsContent = exports.hasCode = exports.domIndex = exports.compareItemsArrays = exports.checkFormattingIsPresent = exports.anyMarkActive = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
7
9
|
|
|
8
10
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
9
11
|
|
|
@@ -159,4 +161,30 @@ var checkFormattingIsPresent = function checkFormattingIsPresent(state) {
|
|
|
159
161
|
return marksArePresent(state) || blockStylingIsPresent(state);
|
|
160
162
|
};
|
|
161
163
|
|
|
162
|
-
exports.checkFormattingIsPresent = checkFormattingIsPresent;
|
|
164
|
+
exports.checkFormattingIsPresent = checkFormattingIsPresent;
|
|
165
|
+
|
|
166
|
+
var usePreviousObjectState = function usePreviousObjectState(value) {
|
|
167
|
+
var ref = (0, _react.useRef)();
|
|
168
|
+
(0, _react.useEffect)(function () {
|
|
169
|
+
ref.current = value;
|
|
170
|
+
});
|
|
171
|
+
return ref.current;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
exports.usePreviousObjectState = usePreviousObjectState;
|
|
175
|
+
|
|
176
|
+
var compareItemsArrays = function compareItemsArrays(items, prevItems) {
|
|
177
|
+
return items && items.filter(function (item) {
|
|
178
|
+
return !prevItems.includes(item);
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.compareItemsArrays = compareItemsArrays;
|
|
183
|
+
|
|
184
|
+
var isArrayContainsContent = function isArrayContainsContent(items, content) {
|
|
185
|
+
return items.filter(function (item) {
|
|
186
|
+
return item.content === content;
|
|
187
|
+
}).length > 0;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
exports.isArrayContainsContent = isArrayContainsContent;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.createTypeAheadTools = void 0;
|
|
6
|
+
exports.createTypeAheadTools = exports.createInternalTypeAheadTools = void 0;
|
|
7
7
|
|
|
8
8
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
9
9
|
|
|
@@ -220,6 +220,37 @@ var currentQuery = function currentQuery(_ref8) {
|
|
|
220
220
|
};
|
|
221
221
|
};
|
|
222
222
|
|
|
223
|
+
var find = function find(_ref9) {
|
|
224
|
+
var editorView = _ref9.editorView;
|
|
225
|
+
return function (trigger) {
|
|
226
|
+
var editorState = editorView.state;
|
|
227
|
+
var handler = (0, _utils.findHandlerByTrigger)({
|
|
228
|
+
trigger: trigger,
|
|
229
|
+
editorState: editorState
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
if (!handler) {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return handler;
|
|
237
|
+
};
|
|
238
|
+
}; // This is an internal tool to be used inside of others Editor Plugins
|
|
239
|
+
// We shouldn't public export this method.
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
var createInternalTypeAheadTools = function createInternalTypeAheadTools(editorView) {
|
|
243
|
+
var props = {
|
|
244
|
+
editorView: editorView
|
|
245
|
+
};
|
|
246
|
+
return {
|
|
247
|
+
findTypeAheadHandler: find(props),
|
|
248
|
+
openTypeAheadHandler: _openTypeaheadAtCursor.openTypeAhead
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
exports.createInternalTypeAheadTools = createInternalTypeAheadTools;
|
|
253
|
+
|
|
223
254
|
var createTypeAheadTools = function createTypeAheadTools(editorView) {
|
|
224
255
|
var props = {
|
|
225
256
|
editorView: editorView
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.openTypeAheadAtCursor = void 0;
|
|
6
|
+
exports.openTypeAheadAtCursor = exports.openTypeAhead = void 0;
|
|
7
7
|
|
|
8
8
|
var _prosemirrorState = require("prosemirror-state");
|
|
9
9
|
|
|
@@ -11,11 +11,11 @@ var _key = require("../pm-plugins/key");
|
|
|
11
11
|
|
|
12
12
|
var _actions = require("../pm-plugins/actions");
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
var triggerHandler = _ref.triggerHandler,
|
|
16
|
-
inputMethod = _ref.inputMethod,
|
|
17
|
-
query = _ref.query;
|
|
14
|
+
var openTypeAhead = function openTypeAhead(props) {
|
|
18
15
|
return function (tr) {
|
|
16
|
+
var triggerHandler = props.triggerHandler,
|
|
17
|
+
inputMethod = props.inputMethod,
|
|
18
|
+
query = props.query;
|
|
19
19
|
tr.setMeta(_key.pluginKey, {
|
|
20
20
|
action: _actions.ACTIONS.OPEN_TYPEAHEAD_AT_CURSOR,
|
|
21
21
|
params: {
|
|
@@ -24,6 +24,21 @@ var openTypeAheadAtCursor = function openTypeAheadAtCursor(_ref) {
|
|
|
24
24
|
query: query
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.openTypeAhead = openTypeAhead;
|
|
31
|
+
|
|
32
|
+
var openTypeAheadAtCursor = function openTypeAheadAtCursor(_ref) {
|
|
33
|
+
var triggerHandler = _ref.triggerHandler,
|
|
34
|
+
inputMethod = _ref.inputMethod,
|
|
35
|
+
query = _ref.query;
|
|
36
|
+
return function (tr) {
|
|
37
|
+
openTypeAhead({
|
|
38
|
+
triggerHandler: triggerHandler,
|
|
39
|
+
inputMethod: inputMethod,
|
|
40
|
+
query: query
|
|
41
|
+
})(tr);
|
|
27
42
|
var selection = tr.selection;
|
|
28
43
|
|
|
29
44
|
if (!(selection instanceof _prosemirrorState.TextSelection)) {
|
|
@@ -201,6 +201,18 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
var onFocusOut = function onFocusOut(event) {
|
|
204
|
+
var _window$getSelection;
|
|
205
|
+
|
|
206
|
+
// See ED-14909: Chrome may emit focusout events where an input
|
|
207
|
+
// device was not directly responsible. (This rears in react v17+ consumers
|
|
208
|
+
// where react-managed node removal now appears to propagate focusout events to
|
|
209
|
+
// our event listener). As this path is strictly for click or other typeahead
|
|
210
|
+
// dismissals that don't involve typeahead item selection, we carve out an
|
|
211
|
+
// exception for Chrome-specific events where an input device was not the initiator.
|
|
212
|
+
if (_utils.browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !(event !== null && event !== void 0 && event.sourceCapabilities)) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
204
216
|
cancel({
|
|
205
217
|
addPrefixTrigger: true,
|
|
206
218
|
text: cleanedInputContent(),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadHandler = exports.getPluginState = exports.findTypeAheadDecorations = exports.findHandler = void 0;
|
|
6
|
+
exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadHandler = exports.getPluginState = exports.findTypeAheadDecorations = exports.findHandlerByTrigger = exports.findHandler = void 0;
|
|
7
7
|
|
|
8
8
|
var _prosemirrorState = require("prosemirror-state");
|
|
9
9
|
|
|
@@ -97,9 +97,27 @@ var findHandler = function findHandler(id, state) {
|
|
|
97
97
|
|
|
98
98
|
exports.findHandler = findHandler;
|
|
99
99
|
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
-
|
|
100
|
+
var findHandlerByTrigger = function findHandlerByTrigger(_ref) {
|
|
101
|
+
var trigger = _ref.trigger,
|
|
102
|
+
editorState = _ref.editorState;
|
|
103
|
+
|
|
104
|
+
var pluginState = _key.pluginKey.getState(editorState);
|
|
105
|
+
|
|
106
|
+
if (!pluginState || !pluginState.typeAheadHandlers || pluginState.typeAheadHandlers.length === 0) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var typeAheadHandlers = pluginState.typeAheadHandlers;
|
|
111
|
+
return typeAheadHandlers.find(function (h) {
|
|
112
|
+
return h.trigger === trigger;
|
|
113
|
+
}) || null;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
exports.findHandlerByTrigger = findHandlerByTrigger;
|
|
117
|
+
|
|
118
|
+
var moveSelectedIndex = function moveSelectedIndex(_ref2) {
|
|
119
|
+
var editorView = _ref2.editorView,
|
|
120
|
+
direction = _ref2.direction;
|
|
103
121
|
return function () {
|
|
104
122
|
var typeAheadState = getPluginState(editorView.state);
|
|
105
123
|
|
|
@@ -49,7 +49,7 @@ var _pluginKey = require("../../../plugins/media/pm-plugins/plugin-key");
|
|
|
49
49
|
|
|
50
50
|
var _Addon = require("../../Addon");
|
|
51
51
|
|
|
52
|
-
var _commonStyles = require("../../../plugins/table/ui/common-styles
|
|
52
|
+
var _commonStyles = require("../../../plugins/table/ui/common-styles");
|
|
53
53
|
|
|
54
54
|
var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
|
|
55
55
|
|
|
@@ -83,7 +83,7 @@ var CommentEditor = _styledComponents.default.div(_templateObject || (_templateO
|
|
|
83
83
|
CommentEditor.displayName = 'CommentEditor';
|
|
84
84
|
var ContentArea = (0, _styledComponents.default)(_ContentStyles.default)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n ", ";\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for tables controlls. Otherwise marging collapse and controlls are misplaced. **/\n .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), function (props) {
|
|
85
85
|
return props.maxHeight ? 'max-height: ' + props.maxHeight + 'px;' : '';
|
|
86
|
-
}, CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - _grid.GRID_GUTTER, CommentEditorMargin - _grid.GRID_GUTTER, CommentEditorMargin - _grid.GRID_GUTTER, _Toolbar2.TableControlsPadding, _commonStyles.
|
|
86
|
+
}, CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - _grid.GRID_GUTTER, CommentEditorMargin - _grid.GRID_GUTTER, CommentEditorMargin - _grid.GRID_GUTTER, _Toolbar2.TableControlsPadding, _commonStyles.deprecatedTableCommentEditorStyles);
|
|
87
87
|
ContentArea.displayName = 'ContentArea';
|
|
88
88
|
|
|
89
89
|
var SecondaryToolbar = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: 12px 1px;\n"])));
|
|
@@ -17,7 +17,7 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
17
17
|
|
|
18
18
|
var _ContentStyles = _interopRequireDefault(require("../../ContentStyles"));
|
|
19
19
|
|
|
20
|
-
var _commonStyles = require("../../../plugins/table/ui/common-styles
|
|
20
|
+
var _commonStyles = require("../../../plugins/table/ui/common-styles");
|
|
21
21
|
|
|
22
22
|
var _consts = require("../../../plugins/table/ui/consts");
|
|
23
23
|
|
|
@@ -54,7 +54,7 @@ var EditorContentArea = _styledComponents.default.div(_templateObject5 || (_temp
|
|
|
54
54
|
var theme = _ref.theme,
|
|
55
55
|
fullWidthMode = _ref.fullWidthMode;
|
|
56
56
|
return (fullWidthMode ? _editorSharedStyles.akEditorFullWidthLayoutWidth : theme.layoutMaxWidth) + TOTAL_PADDING;
|
|
57
|
-
}, SWOOP_ANIMATION, _adfSchema.taskListSelector, _adfSchema.decisionListSelector, _commonStyles.
|
|
57
|
+
}, SWOOP_ANIMATION, _adfSchema.taskListSelector, _adfSchema.decisionListSelector, _commonStyles.deprecatedTableFullPageEditorStyles, function (_ref2) {
|
|
58
58
|
var containerWidth = _ref2.containerWidth;
|
|
59
59
|
|
|
60
60
|
if (!containerWidth) {
|
|
@@ -2,6 +2,8 @@
|
|
|
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
|
});
|
|
@@ -11,7 +13,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
13
|
|
|
12
14
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
15
|
|
|
14
|
-
var _react =
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _react2 = require("@emotion/react");
|
|
15
19
|
|
|
16
20
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
21
|
|
|
@@ -25,7 +29,7 @@ var _styles3 = require("../../plugins/collab-edit/styles");
|
|
|
25
29
|
|
|
26
30
|
var _styles4 = require("../../plugins/selection/gap-cursor/styles");
|
|
27
31
|
|
|
28
|
-
var _commonStyles = require("../../plugins/table/ui/common-styles
|
|
32
|
+
var _commonStyles = require("../../plugins/table/ui/common-styles");
|
|
29
33
|
|
|
30
34
|
var _styles5 = require("../../plugins/placeholder/styles");
|
|
31
35
|
|
|
@@ -77,21 +81,40 @@ var _styled = require("../../plugins/card/ui/styled");
|
|
|
77
81
|
|
|
78
82
|
var _featureFlagsContext = require("../../plugins/feature-flags-context");
|
|
79
83
|
|
|
80
|
-
var _templateObject;
|
|
84
|
+
var _templateObject, _templateObject2;
|
|
85
|
+
|
|
86
|
+
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); }
|
|
87
|
+
|
|
88
|
+
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; }
|
|
89
|
+
|
|
90
|
+
var contentStyles = function contentStyles(props) {
|
|
91
|
+
var _props$featureFlags;
|
|
92
|
+
|
|
93
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n"])), (0, _editorSharedStyles.editorFontSize)({
|
|
94
|
+
theme: props.theme
|
|
95
|
+
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, (0, _commonStyles.tableStyles)(props), (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.codeBlockSyntaxHighlighting ? (0, _styles7.highlightingCodeBlockStyles)(props) : (0, _styles7.codeBlockStyles)(props), (0, _styles6.blocktypeStyles)(props), (0, _styles16.textFormattingStyles)(props), _styles.textColorStyles, _styles10.mediaStyles, _styles11.layoutStyles, _styles.tasksAndDecisionsStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, (0, _styles.annotationSharedStyles)(props), _styled.embedCardStyles);
|
|
96
|
+
};
|
|
81
97
|
|
|
82
|
-
var
|
|
98
|
+
var DeprecatedContentStyles = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid #8cf;\n }\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap,\n .pm-table-cell-content-wrap div.fabric-editor-block-mark {\n p:first-child {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), _styles17.placeholderTextStyles, _styles5.placeholderStyles, _styles8.listsStyles, _styles9.ruleStyles, _styles3.telepointerStyle, _styles4.gapCursorStyles, _styles12.panelStyles, _styles13.fakeCursorStyles, _styles14.mentionsStyles, function (_ref) {
|
|
83
99
|
var featureFlags = _ref.featureFlags;
|
|
84
|
-
return featureFlags !== null && featureFlags !== void 0 && featureFlags.codeBlockSyntaxHighlighting ? _styles7.highlightingCodeBlockStyles : _styles7.codeBlockStyles;
|
|
85
|
-
}, _styles.textColorStyles, _styles8.listsStyles, _styles9.ruleStyles, _styles10.mediaStyles, _styles11.layoutStyles, _styles3.telepointerStyle, _styles4.gapCursorStyles, _commonStyles.tableStyles, _styles12.panelStyles, _styles13.fakeCursorStyles, _styles14.mentionsStyles, function (_ref2) {
|
|
86
|
-
var featureFlags = _ref2.featureFlags;
|
|
87
100
|
return featureFlags !== null && featureFlags !== void 0 && featureFlags.nextEmojiNodeView ? _styles15.emojiStylesNext : _styles15.emojiStyles;
|
|
88
|
-
},
|
|
101
|
+
}, _styles18.gridStyles, _styles19.linkStyles, _styles20.extensionStyles, _styles21.expandStyles, _styles22.findReplaceStyles, _styles23.taskDecisionStyles, _styles24.statusStyles, _styles25.smartCardStyles, _styles.smartCardSharedStyles, _styles26.dateStyles, _styles2.unsupportedStyles, _style.ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
89
102
|
|
|
90
103
|
var _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
91
104
|
var featureFlags = (0, _featureFlagsContext.useFeatureFlags)();
|
|
92
|
-
|
|
105
|
+
var allowAnnotation = props.allowAnnotation;
|
|
106
|
+
var theme = (0, _react2.useTheme)();
|
|
107
|
+
var memoizedStyle = (0, _react.useMemo)(function () {
|
|
108
|
+
return contentStyles({
|
|
109
|
+
theme: theme,
|
|
110
|
+
allowAnnotation: allowAnnotation,
|
|
111
|
+
featureFlags: featureFlags
|
|
112
|
+
});
|
|
113
|
+
}, [theme, featureFlags, allowAnnotation]);
|
|
114
|
+
return (0, _react2.jsx)(DeprecatedContentStyles, (0, _extends2.default)({}, props, {
|
|
93
115
|
innerRef: ref,
|
|
94
|
-
featureFlags: featureFlags
|
|
116
|
+
featureFlags: featureFlags,
|
|
117
|
+
css: memoizedStyle
|
|
95
118
|
}));
|
|
96
119
|
});
|
|
97
120
|
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -69,14 +69,7 @@ Object.defineProperty(exports, "hasVisibleContent", {
|
|
|
69
69
|
return _document.hasVisibleContent;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
exports.insideTableCell = exports.insideTable = void 0;
|
|
73
|
-
Object.defineProperty(exports, "isChromeWithSelectionBug", {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: function get() {
|
|
76
|
-
return _selection.isChromeWithSelectionBug;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
exports.isElementInTableCell = void 0;
|
|
72
|
+
exports.isElementInTableCell = exports.insideTableCell = exports.insideTable = void 0;
|
|
80
73
|
Object.defineProperty(exports, "isEmptyDocument", {
|
|
81
74
|
enumerable: true,
|
|
82
75
|
get: function get() {
|
package/dist/cjs/utils/insert.js
CHANGED
|
@@ -184,15 +184,7 @@ var insertSelectedItem = function insertSelectedItem(maybeNode) {
|
|
|
184
184
|
*/
|
|
185
185
|
} else if (node.isInline || isInputFragment) {
|
|
186
186
|
var fragment = isInputFragment ? node : _prosemirrorModel.Fragment.fromArray([node, state.schema.text(' ')]);
|
|
187
|
-
tr = tr.replaceWith(start, start, fragment);
|
|
188
|
-
|
|
189
|
-
if (_selection.isChromeWithSelectionBug) {
|
|
190
|
-
var selection = document.getSelection();
|
|
191
|
-
|
|
192
|
-
if (selection) {
|
|
193
|
-
selection.empty();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
187
|
+
tr = tr.replaceWith(start, start, fragment);
|
|
196
188
|
|
|
197
189
|
if (opts.selectInlineNode) {
|
|
198
190
|
// Select inserted node
|
|
@@ -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.normaliseNestedLayout = exports.isValidPosition = exports.isSelectionAtStartOfNode = exports.isSelectionAtEndOfNode = exports.
|
|
8
|
+
exports.normaliseNestedLayout = exports.isValidPosition = exports.isSelectionAtStartOfNode = exports.isSelectionAtEndOfNode = exports.duplicateSelection = void 0;
|
|
9
9
|
exports.setAllSelection = setAllSelection;
|
|
10
10
|
exports.setCellSelection = setCellSelection;
|
|
11
11
|
exports.setGapCursorSelection = setGapCursorSelection;
|
|
@@ -18,8 +18,6 @@ var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
|
18
18
|
|
|
19
19
|
var _prosemirrorState = require("prosemirror-state");
|
|
20
20
|
|
|
21
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
22
|
-
|
|
23
21
|
var _selection = require("../plugins/selection/gap-cursor/selection");
|
|
24
22
|
|
|
25
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -87,14 +85,9 @@ var normaliseNestedLayout = function normaliseNestedLayout(_ref, node) {
|
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
return node;
|
|
90
|
-
};
|
|
91
|
-
// @see: https://bugs.chromium.org/p/chromium/issues/detail?id=740085
|
|
92
|
-
// Chrome >= 58 (desktop only)
|
|
93
|
-
|
|
88
|
+
};
|
|
94
89
|
|
|
95
90
|
exports.normaliseNestedLayout = normaliseNestedLayout;
|
|
96
|
-
var isChromeWithSelectionBug = _utils.browser.chrome && !_utils.browser.android && _utils.browser.chrome_version >= 58;
|
|
97
|
-
exports.isChromeWithSelectionBug = isChromeWithSelectionBug;
|
|
98
91
|
|
|
99
92
|
var isSelectionAtStartOfNode = function isSelectionAtStartOfNode($pos, parentNode) {
|
|
100
93
|
if (!parentNode) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "162.0.2";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -23,35 +23,32 @@ export default class EditorActions {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
_defineProperty(this, "getResolvedEditorState", () => {
|
|
27
|
-
|
|
28
|
-
var _getCollabProvider;
|
|
26
|
+
_defineProperty(this, "getResolvedEditorState", async () => {
|
|
27
|
+
var _getCollabProvider;
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
29
|
+
if (!this.editorView) {
|
|
30
|
+
throw new Error('Called getResolvedEditorState before editorView is ready');
|
|
31
|
+
}
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
const featureFlags = getFeatureFlags(this.editorView.state);
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
if (!featureFlags.useNativeCollabPlugin) {
|
|
36
|
+
const editorValue = await this.getValue();
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
content: content,
|
|
43
|
-
title: null,
|
|
44
|
-
stepVersion: -1
|
|
45
|
-
});
|
|
46
|
-
});
|
|
38
|
+
if (!editorValue) {
|
|
39
|
+
throw new Error('editorValue is undefined');
|
|
47
40
|
}
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
}
|
|
42
|
+
return {
|
|
43
|
+
content: editorValue,
|
|
44
|
+
title: null,
|
|
45
|
+
stepVersion: -1
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const editorView = this.editorView;
|
|
50
|
+
await getEditorValueWithMedia(editorView);
|
|
51
|
+
return (_getCollabProvider = getCollabProvider(editorView.state)) === null || _getCollabProvider === void 0 ? void 0 : _getCollabProvider.getFinalAcknowledgedState();
|
|
55
52
|
});
|
|
56
53
|
}
|
|
57
54
|
|
|
@@ -4,7 +4,7 @@ export { toJSON } from './utils';
|
|
|
4
4
|
export { default as Extension } from './plugins/extension/ui/Extension';
|
|
5
5
|
export { default as ExtensionNodeWrapper } from './plugins/extension/ui/Extension/ExtensionNodeWrapper';
|
|
6
6
|
export { ExtensionNode } from './plugins/extension/nodeviews/extension';
|
|
7
|
-
export { pluginKey as tablePluginKey } from './plugins/table/pm-plugins/plugin-
|
|
7
|
+
export { pluginKey as tablePluginKey } from './plugins/table/pm-plugins/plugin-key';
|
|
8
8
|
export const EmitterEvents = {
|
|
9
9
|
TABLE_DELETED: 'TABLE_DELETED'
|
|
10
10
|
};
|